[OS X TeX] LaTeXiT 1.3.1(Panther version) font question
Pierre Chatelier
pierre.chatelier at club-internet.fr
Fri Jul 22 08:53:27 EDT 2005
Hi,
> So it seems that \normalfont is the solution to my problem of fonts
> that would be not used in boxes prior to \begin{document}
But now, I realize that there is another problem... In text mode,
LaTeXiT does not care of \newlines and \\
I suppose it is still related to the boxes...
How can I make newlines in such boxes ?
\documentclass[10pt]{article}
\pagestyle{empty}
\usepackage{geometry}
\usepackage{graphicx}
\newsavebox{\latexitbox}
\newcommand{\latexitscalefactor}{3.600000}
\newlength{\latexitwidth}
\newlength{\latexitheight}
\newlength{\latexitdepth}
\setlength{\topskip}{0pt}
\setlength{\parindent}{0pt}
\setlength{\abovedisplayskip}{0pt}
\setlength{\belowdisplayskip}{0pt}
\normalfont
\begin{lrbox}{\latexitbox}
foo\newline %%%%%%%%%<-----------the text is here, newlines are not
taken in account
bar\newline
wiz\newline
toto
\end{lrbox}
\settowidth{\latexitwidth}{\scalebox{\latexitscalefactor}{\usebox
{\latexitbox}}}
\settoheight{\latexitheight}{\scalebox{\latexitscalefactor}{\usebox
{\latexitbox}}}
\settodepth{\latexitdepth}{\scalebox{\latexitscalefactor}{\usebox
{\latexitbox}}}
\newwrite\foo \immediate\openout\foo=\jobname.sizes \immediate\write
\foo{\the\latexitdepth (Depth)}
\immediate\write\foo{\the\latexitheight (Height)}
\addtolength{\latexitheight}{\latexitdepth}
\addtolength{\latexitheight}{0.720000 pt}
\addtolength{\latexitheight}{0.000000 pt}
\addtolength{\latexitwidth}{0.000000 pt}
\immediate\write\foo{\the\latexitheight (TotalHeight)} \immediate
\write\foo{\the\latexitwidth (Width)}
\closeout\foo \geometry{paperwidth=\latexitwidth,paperheight=
\latexitheight,margin=0pt,left=0.000000 pt,top=0.000000 pt}
%%%%%%%%%%%%the document is here %%%%%%%%%%%
\begin{document}
\scalebox{\latexitscalefactor}{\usebox{\latexitbox}}
\end{document}
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
More information about the MacOSX-TeX
mailing list