TeX - LaTeX Asked by Park on June 8, 2021
I have a problem with APS’s revtex4-1.
I want to place an twocolumn-wide figure at the bottom of the page.
I know
begin{figure*}[position]
picture
end{figure*}
in {article} document class
[position] can be htb! , and I have no problem in {article} in placing pictures on here, top, and bottom.
But!!
in {revtex4-1} document class
[position] is not working! only for t. If I use b, the picture appears on the next page, and it takes up all paper. I want it to be bottom.
I tried usepackage{dblfloatfix} but it does not work in revtex4-1 and makes error with equation, and so on..(I see revtex4-1 is incompatible with dblfloatfix.)
The following URL is for article class, I have no problem to follow its instruction.
Displaying a wide figure in a two-column document
Please, Help!
This is my sample code, I manage to put long table at the position where I wanted, but long figure is not!
Thanks,
documentclass[
showkeys,reprint,
%superscriptaddress,
%groupedaddress,
%unsortedaddress,
%runinaddress,
%frontmatterverbose,
%preprint,
%showpacs,preprintnumbers,
%nofootinbib,
%nobibnotes,
%bibnotes,
amsmath,amssymb,
aps,
%pra,
%prb,
%rmp,
%prstab,
%prstper,
floatfix,
]{revtex4-1}
usepackage[demo]{graphicx}% Include figure files
usepackage{dcolumn}% Align table columns on decimal point
usepackage{bm}% bold math
%]{geometry}
usepackage{amsmath,amssymb,amsfonts}
usepackage{fancyhdr}
usepackage{lipsum}% just to generate text for the example
usepackage{subcaption}
usepackage{multirow}
pagestyle{fancy}
fancyhf{}
fancyhead{nouppercaseleftmark}
fancyhead[R]{thepage}
fancyhead[C]{}
begin{document}
preprint{APS/123-QED}
title{
%begin{minipage}{14cm}
Microscopic Images and Micro Vickers Hardness Test of
Fullly Pearlitic High-Carbon Steel Specimens
%end{minipage}
}
author{ABCD}
email{ABCD}
collaboration{ABCD}
date{today}
begin{abstract}
begin{center}
{bfseries Abstract}
end{center}
lipsum[1]
end{abstract}
keywords{lipsum[1]}
maketitle
%tableofcontents
section{Introduction}
lipsum[1-4]
begin{table*}[t]
centering
begin{tabular}{|r|r|r|r|r|r|r|r|r|r|r|}
long&long&long&long&long&long&long&long&long&long&long
end{tabular}
end{table*}
begin{figure*}[b]
includegraphics[width=.4linewidth]{tiger}
%linewidth or textwidth
caption{A gull}
label{fig:gull}
end{figure*}
section{Experiment}
lipsum[1-10]
end{document}
%
% ****** End of file apssamp.tex ******
I encountered the same problem editing a document under REVTeX.
Thanks for pointing out that only position [t]
is recognized under the {figure*}
environment.
A working solution is offered by using the onecolumngrid
and twocolumngrid
commands
documentclass[twocolumn,...]{revtex4-1}
begin{document}
...
onecolumngrid
begin{figure}[h]
includegraphics{example.eps}
end{figure}
twocolumngrid
...
I observed that the double newline after onecolumngrid
is essential to avoid the figure merging with the text. However, in my case this statement doesn't seem to hold for twocolumngrid
.
Pieter
Answered by Pieter De Beule on June 8, 2021
This was a dirty trick that worked for me. I found it on the LaTeX forum. I only had to cut my text at a suitable spot (between the [CUT HERE]
to reduce empty lines so that it did not look to obvious that I cut the text in half myself).
This is a sentence. This is a sentence. This is [CUT HERE]
onecolumngrid
begin{center}
begin{figure}[h]
includegraphics[scale=1.0]{myfig.pdf}
caption{mycaption}
end{figure}
end{center}
twocolumngrid
[CUT HERE] a sentence, This is a sentence....
I hope this can be useful for some people.
Answered by Twan on June 8, 2021
I think one hack that works is putting the figure as float inside a minipage widetext environment. For example,
begin{widetext}
begin{minipage}{linewidth}
begin{figure}[H]
centering
includegraphics[width=linewidth]{sample.png}
label{fig:sample}
end{figure}
end{minipage}
end{widetext}
Answered by Stefan Tanuwijaya on June 8, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP