TeX - LaTeX Asked by mickeymar on December 18, 2020
I need to place a 1 column-width figure at the bottom of the first column, but if I use [b]
like in the following code, the figure is placed at the bottom of the second column…
documentclass[%
reprint,
superscriptaddress,
amsmath,amssymb,
aps,
prb,
]{revtex4-2}
hypersetup{
colorlinks = true,
citecolor = blue,
linkcolor = blue}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{siunitx}
usepackage{nameref}
usepackage{amsmath}
usepackage{amstext}
usepackage{mathtools}
usepackage{amsmath,amssymb}
usepackage{booktabs}
usepackage{array}
usepackage{graphicx}
usepackage{xcolor}
usepackage{placeins}%
usepackage{tabularx}
usepackage{dblfloatfix}
usepackage{blindtext}
usepackage{lipsum}
usepackage{hyperref}
usepackage{floatrow}
usepackage{subfig}
begin{document}
begin{figure}[b]
centering
includegraphics[width=1textwidth]{img.eps}
caption{}
label{fig:figure}
end{figure}
end{document}
Ok so having gotten to a PC and tried out the class, that is a very complete class for very specific needs. If you are not submitting an article to a journal that requests exactly what that class offers, chances are you are going to have a very hard time making any custom formatting changes without a very serious and extensive knowledge in tex and latex.
But to add to my previous conjectures, playing around in the example found here:
https://journals.aps.org/revtex/revtex4-2-tds.zip
Under doclatexrevtexsampleapsapssamp.tex
I was able to get figures to appear on the bottom or top of any page using only [b]
and [t]
. You can try adding figures to page 3 for a good example, as there are no other conflicting floats that want to land on that page. I could find no correlation to even or odd page numbers so I suspect you are just fighting your other floats.
I cannot tell from your mwe how much you have worked on your project, but you have a lot of packages loaded as well. Particular the placeins
package could cause issues with this class. I also noticed that you are loading dblfloatfix
which based on this example, doesnt seem to be nessesary as there is a two column float on page 5 via begin{figure*}
emphasis on the *
. There is a lot of functionality build into this class and its options such as amsmath
and amssymb
so you shouldnt need to load those packages separately. This class also a %floatfix
option in but in this example it is commented out by default so I did not try it. I would recommend trimming what I suspect to be a copy-pasted preamble down to features you specifically need such as siunitx
.
Answered by Bob on December 18, 2020
What Bob said.
This is not an answer, but more an expanded comment:
Floats are designed to float, for good typographical reasons.
If you absolutely need your image not to float anywhere, take it out of the figure
environment and place it inline. You will need to experiment several times with exactly where in the text flow it should go, and you will also need to use the captionof{figure}{...}
command from the capt-of
package to apply the caption and to correctly step the figure
counter and TOC matters.
But this is not really practical, because you won't know beforehand what additional typesetting actions the journal will take.
reprint
option does two-column mode.
MWE
documentclass[%
reprint,
%superscriptaddress,
%amsmath,amssymb,
%aps,
%prb,--
]{revtex4-2}
usepackage{hyperref}
hypersetup{
colorlinks = true,
citecolor = blue,
linkcolor = blue}
usepackage{graphicx}
usepackage{lipsum}
usepackage{capt-of}
begin{document}
lipsum[5-7]
%begin{figure}[b]
{ centering
includegraphics[width=0.5textwidth]{example-image}
captionof{figure}{A Caption}
label{fig:figure}
}
% end{figure}
lipsum
end{document}
RevTex4 is quite a powerful package.
It provides an endfloats
option and a corresponding printfigures
command which (p 63 of the documentation) "determines where the figures are to appear
in a document in which floats@sw
is false. If the user invokes the endfloats
class option and fails to insert a printfigures
command, the figures will be printed
at the end of the document. If the command is given, but floats are not being deferred, it
amounts to a no-op." - which implies the APS likes the figures printing together when they don't float. And, indeed, running with that option, the list of figures is actually called "Figures":
Answered by Cicada on December 18, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP