Algorithm
\begin{Figure}[!t]\vspace*{\dimexpr\fboxsep+\fboxrule} \fbox{% \parbox{\dimexpr\linewidth-2\fboxsep-2\fboxrule}{\raggedright\begin{Algorithmic}[1]\state $L (P) = -1$,$p = 1,\ldots, n$.\state $D (P) = +\infty$,$p = 1,\ldots, n$.\for{$t =1$To$T $} \for{$k =1$To$K $} \for{$p \in s^t (k) $} \if{$D (P,k) < D (p) $} \state $D (P) = D (p,k) $ \state $L (P) = k$ \endif \endfor \endfor \stateUpdate New cluster Center.\stateUpdate New search space.\endfor\end{Algorithmic}% }}\caption{Caption.}\label{Fig:lkm_algo}\end{Figure}
Adjustbox
% [email protected]:~/$ pdflatex%\usepackage{graphicx}% graphicx must before adjustbox!!%\usepackage{adjustbox}\begin{Figure}[!ht]\centering\adjustbox{Width=\columnwidth, trim={.05\width}0{.09\width} {.05\height}, clip}%{%\includegraphics[Width=\columnwidth]{Test.png}%}\caption{Caption here.}\label{Fig:lb}\end{Figure}
Subfigures Cross Column
% \usepackage{graphicx}\begin{figure*}[!ht]\centering\subfloat[]{\includegraphics[width=0.32\linewidth]{1.png}%\label{Fig:m_r1}}\hfil\subfloat[]{\includegraphics[width=0.32\linewidth]{2.png}%\label{Fig:m_r2}}\hfil\subfloat[]{\includegraphics[width=0.32\linewidth]{3.png}%\label{Fig:m_r3}}\\\subfloat[]{\includegraphics[width=0.32\linewidth]{4.png}%\label{Fig:m_f1}}\hfil\subfloat[]{\includegraphics[width=0.32\linewidth]{5.png}%\label{Fig:m_f2}}\hfil\subfloat[]{\includegraphics[width=0.32\linewidth]{6.png}%\label{Fig:m_f3}}%\caption{Caption here!}\label{Fig:m}\end{figure*}
Subfigure with Adjustbox
\documentclass{Ieeetran}\usepackage{Graphicx}\usepackage{Adjustbox}\usepackage{Lipsum}\ifclassoptioncompsoc \usepackage[Caption=false,font=normalsize,labelfont=sf,textfont=sf]{Subfig}\else \usepackage[Caption=false,font=footnotesize]{Subfig}\fi%%\begin{Figure}[!htb]\centering\vfill\subfloat[]%{\adjustbox{Width=\columnwidth, trim={.04\width}0{.09\width} {.05\height}, clip}%{%\includegraphics[Width=\columnwidth]{1.jpg}%}}\\\subfloat[]%{\adjustbox{Width=\columnwidth, trim={.04\width}0{.09\width} {.05\height}, clip}%{%\includegraphics[Width=\columnwidth]{1.jpg}%}}\caption{Caption}\label{Fig:kalkuebr}\end{Figure}
Text width
\hsizeIs the main parameter this TeX uses when typesetting:whenever it finishes a paragraph it looks at the current value of for breaking it into horizontal boxes. Next, there is and and \leftskip \rightskip possibly other paragraph shape parameters (and or the more general \hangindent \hangafter \parshape ).
LaTeX uses an indirect approach and maintains many \...width parameters.
\textwidthis generally the global width of the text area, while is the \columnwidth width of a column of text (it'll be different from when typesetting in, or more columns). However, inside a minipage, 'll be set to the \textwidth given argument along with \hsize , \columnwidth , and \linewidth (they'll revert t o the previous values at the end of the minipage because it forms a group). Note that \parbox doesn ' t reset \textwidth ; The size is available as \linewidth .
The parameter \linewidth contains the line length inside a list (or derived) environment and it could change in a nested list (w Hile \hsize , \textwidth and \columnwidth don ' t change).
When we had to specify a length of depending on current conditions, we had to use the correct parameter. For example, the width of a figure should is specified in terms of \columnwidth a figure environment and of in \textwidth a figure* environment; However this was done rarely when it's known that the document would be a typeset in one column format. The same should is for a tabular* or TABULARX environment.
Instead, when we need something centered with respect to a line in a list, we should use \linewidth :
\begin{enumerate}\itemsometextthatcontains a `here‘ table \begin{center} \begin{tabularx}{.9\linewidth}{lXX} ... \end{tabularx} \end{center} andsometextthat follows.\item ...\end{enumerate}
In this case it would was wrong to use \textwidth or \columnwidth , as the line length was "unknown" at typing time.
Notice that LaTeX uses only \hangindent for typesetting sectional titles \leftskip rightskip \centering and and for, \raggedright and \raggedleft ; the IND Entation of a list environment is obtained via \parshape .
[LaTeX] Box algorithm Adjustbox subfigures, textwidth