I am wondering how do you usually deal with figure width when you are writing a paper. (use \linewidth, \textwidth ? others?)
Maybe we can just define a "switch" and use it with ifelse package?
(Assume that you are writing a onecolumn version, and you also want to know the twocolumn layout at the same time without adjusting the \witdh manually too often.)
EDIT. LaTeX is quite "intelligent" to format the text content. Can we let it deal with figures the same way?
That is, when we add a figure, we not only just set the width=..., but also add a tag for informing LaTeX that "I am setting this width according to A4 paper twocolumn".
Then when we change the layout to onecolumn, LaTeX knows how to handle (rescale).
EDIT
\usepackage{ifthen}
\newboolean{figColumnTrueOneFalseTwo}
\setboolean{figColumnTrueOneFalseTwo}{false}
%\setboolean{figColumnTrueOneFalseTwo}{true}
% in main.tex
\ifthenelse {\boolean{figColumnTrueOneFalseTwo}}{
% for onecolumn here
}{
% for twocolumn here
}
\columnwidthwhat you are looking for? – karlkoeller Sep 02 '13 at 14:56\columnwidth, +1. Thanks! (I am looking for suggestions, and would like to know how people usually do! :)) – Hongying Sep 02 '13 at 15:04\columnwidthor\linewidthshould do what you want. – David Carlisle Sep 02 '13 at 15:09\includegraphics[width=\columnwidth]{...}enough? What do you need this info for? – karlkoeller Sep 03 '13 at 08:23\documentclass[twocolumn]{IEEEtran}to\documentclass[onecolumn]{IEEEtran}, the image width would be doubled if we use\includegraphics[width=\columnwidth]. Maybe\textwidthis a better choice, but whensubfigpackage is also used, we have to add linebreak\\when switching totwocolumn. – Hongying Sep 03 '13 at 08:54\includegraphics[width=0.5\textwidth]{..}is the answer? – karlkoeller Sep 03 '13 at 09:50