Wandmalfarbe / pandoc-latex-template

A pandoc LaTeX template to convert markdown files to PDF or LaTeX.
BSD 3-Clause "New" or "Revised" License
6.01k stars 957 forks source link

float-placement-figure doesn't do anything #316

Open johannesmols opened 1 year ago

johannesmols commented 1 year ago

It looks like the option float-placement-figure that was introduced in #95 isn't present in the template anymore.

I'm not sure when this was removed, but the default figure placement was set to htbp here, 2 years ago.

To change the figure placement to H, I had to change this in the template itself, and add \include{float} as float-placement-figure doesn't do anything anymore. It would be good to update the documentation on this or reintroduce the functionality, as it is otherwise confusing to see this in the readme :)

brenocss commented 1 year ago

https://github.com/Wandmalfarbe/pandoc-latex-template/issues/315 this is related i think

Wandmalfarbe commented 1 year ago

That was probably a mistake when merging with the default template. I'll see how I can restore the old behavior of float-placement-figure.

brenocss commented 9 months ago

Hello @Wandmalfarbe, I'm still encountering some issues with image placement, but it appears that I've found a temporary solution for now.

% Override default figure placement To be within the flow of the text rather
% than on it's own page.
\usepackage{float}
\makeatletter
\def\fps@figure{H} 
\makeatother
-H disable_float.tex
dm5n commented 9 months ago

[H] not working for me, including the above solution (which I may not have implemented correctly – I replaced the original template code with those 4 lines).

What worked for my purposes is this solution https://tex.stackexchange.com/questions/2275/keeping-tables-figures-close-to-where-they-are-mentioned for completely avoiding float environment

text
\begin{minipage}{\linewidth}
\begin{center}
\includegraphics[width=.6\linewidth]{example-image}
\captionof{figure}{An example image not including a Wombat}
\end{center}
\end{minipage}
even more text