GeneralSimpler Combination of Boxes

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
hzmonte
Posts: 17
Joined: Sun Nov 16, 2008 8:05 am

Simpler Combination of Boxes

Post by hzmonte »

I have a my_fig.tex as follows:

Code: Select all

\begin{figure}[tp]
\centering
\mbox{\input{my_code.tex}}
\caption[...]{....}
\end{figure}
and a my_code.tex as follows:

Code: Select all

\fbox{\footnotesize
\parbox{1.5in}{\tt
\begin{tabbing}
...
\end{tabbing}
}}
I suspect that the combination of \mbox, [url=http://latex-community.org/know-how/424-latex-reference-manual#g_t_005cfbox-and-_005cframebox]\fbox[/url], and \parbox may be redundant. So I removed \parbox but then I got an error. (How) can I remove one or two of these "boxes"?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Simpler Combination of Boxes

Post by localghost »

The \mbox in the first example is superfluous. The \parbox in the second is mandatory because \fbox expects something that allows line breaks in this case.


Remarks:
  • Do not use commands like \tt because that's obsolete LaTeX2.09 syntax. The correct LaTeX2e syntax would be \ttfamily for the font style.


Thorsten
Post Reply