diff options
author | Karl Berry <karl@freefriends.org> | 2009-10-09 22:55:11 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-10-09 22:55:11 +0000 |
commit | 4be9896a3192173699de340a9f0475654efedb3a (patch) | |
tree | da0e954012cd781f875c761c42f6a76e50e2f272 /Master/texmf-dist/doc/generic/FAQ-en/faq-t-g-wr.tex | |
parent | bd1227ad4919d2fbe17d63213bf48542f9c36f38 (diff) |
faq 3.19a update (9oct09)
git-svn-id: svn://tug.org/texlive/trunk@15725 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/FAQ-en/faq-t-g-wr.tex')
-rw-r--r-- | Master/texmf-dist/doc/generic/FAQ-en/faq-t-g-wr.tex | 367 |
1 files changed, 367 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/FAQ-en/faq-t-g-wr.tex b/Master/texmf-dist/doc/generic/FAQ-en/faq-t-g-wr.tex new file mode 100644 index 00000000000..935869ad543 --- /dev/null +++ b/Master/texmf-dist/doc/generic/FAQ-en/faq-t-g-wr.tex @@ -0,0 +1,367 @@ +% $Id: faq-t-g-wr.tex,v 1.2 2009/06/30 18:44:15 rf10 Exp $ + +\section{Things are Going Wrong\dots{}} + +\subsection{Getting things to fit} +\Question[Q-enlarge]{Enlarging \TeX{}} + +The \TeX{} error message `capacity exceeded' covers a multitude of +problems. What has been exhausted is listed in brackets after the +error message itself, as in: +\begin{quote} +\begin{verbatim} +! TeX capacity exceeded, sorry +... [main memory size=263001]. +\end{verbatim} +\end{quote} +Most of the time this error can be fixed +\emph{without} enlarging \TeX{}. The most common causes are unmatched braces, +extra-long lines, and poorly-written macros. Extra-long lines are +often introduced when files are transferred incorrectly between +operating systems, and line-endings are not preserved properly (the +tell-tale sign of an extra-long line error is the complaint +that the `|buf_size|' has overflowed). + +If you really need to extend your \TeX{}'s capacity, the proper method +depends on your installation. There is no need (with modern \TeX{} +implementations) to change the defaults in Knuth's \acro{WEB} source; +but if you do need to do so, use a change file to modify the values set in +module 11, recompile your \TeX{} and regenerate all format files. + +Modern implementations allow the sizes of the various bits of \TeX{}'s +memory to be changed semi-dynamically. Some (such as em\TeX{}) allow +the memory parameters to be changed in command-line switches when +\TeX{} is started; most frequently, a configuration file is read which +specifies the size of the memory. On \ProgName{web2c}-based systems, +this file is called \File{texmf.cnf}: see the documentation that comes +with the distribution for other implementations. Almost invariably, +after such a change, the format files need to be regenerated after +changing the memory parameters. + +\Question[Q-usepictex]{Why can't I load \PiCTeX{}?} + +\PiCTeX{} is a resource hog; fortunately, most modern \TeX{} +implementations offer generous amounts of space, and most modern +computers are pretty fast, so users aren't too badly affected by its +performance. + +However, \PiCTeX{} has the further unfortunate tendency to fill up +\TeX{}'s fixed-size arrays~--- notably the array of 256 `dimension' +registers. This is a particular problem when you're using +\File{pictex.sty} with \LaTeX{} and some other packages that also need +dimension registers. When this happens, you will see the \TeX{} error +message: +\begin{quote} +\begin{verbatim} +! No room for a new \dimen. +\end{verbatim} +\end{quote} +There is nothing that can directly be done about this error: you +can't extend the number of available \csx{dimen} registers without +extending \TeX{} itself. +\begin{wideversion} % hyper + \Qref{\eTeX{}}{Q-etex} and \Qref{Omega}{Q-omegaleph} both do this, as + does \Qref{MicroPress Inc's V\TeX{}}{Q-commercial}. +\end{wideversion} +\begin{narrowversion} + \eTeX{} and \ensuremath{\Omega}~--- \Qref[see questions]{}{Q-etex} + \Qref[and]{}{Q-omegaleph} respectively~--- both do this, as does + MicroPress Inc's V\TeX{}~--- \Qref{}{Q-commercial}. +\end{narrowversion} + +It's actually quite practical (with most modern distributions) to use +\eTeX{}'s extended register set: use package \Package{etex} (which +comes with \eTeX{} distributions) and the allocation mechanism is +altered to cope with the larger register set: \PiCTeX{} will now load. + +If you're in some situation where you can't use \eTeX{}, you need to change +\PiCTeX{}; unfortunately \PiCTeX{}'s author is no longer active in the +\TeX{} world, so one must resort to patching. There are two solutions +available. + +The \CONTeXT{} module \File{m-pictex.tex} (for \plaintex{} and +variants) or the corresponding \LaTeX{} \Package{m-pictex} package provide +an ingenious solution to the problem based on hacking the code of +\csx{newdimen} itself. + +Alternatively, Andreas Schell's \Package{pictexwd} and related +packages replace \PiCTeX{} with a version that uses 33 fewer +\csx{dimen} registers; so use \Package{pictexwd} in place of +\Package{pictex} (either as a \LaTeX{} package, or as a file to read +into \plaintex{}). + +And how does one use \PiCTeX{} anyway, given that the +manual is so \Qref*{hard to come by}{Q-docpictex}? +Fortunately for us all, the \ProgName{MathsPic} +system may be used to translate a somewhat different language into +\PiCTeX{} commands; and the \ProgName{MathsPic} manual is free (and +part of the distribution). \ProgName{MathsPic} is available either as +a \ProgName{Basic} program for \acro{DOS}, or as a \ProgName{Perl} +program for other systems (including Windows, nowadays). +\begin{ctanrefs} +\item[m-pictex.sty]Distributed as part of \CTANref{context-tmf} +\item[m-pictex.tex]Distributed as part of \CTANref{context-tmf} +\item[MathsPic]\CTANref{mathspic} +\item[pictexwd.sty]Distributed as part of \CTANref{pictex-addon} +\end{ctanrefs} + +\subsection{Making things stay where you want them} + +\Question[Q-floats]{Moving tables and figures in \LaTeX{}} + +Tables and figures have a tendency to surprise, by \emph{floating} +away from where they were specified to appear. This is in fact +perfectly ordinary document design; any professional typesetting +package will float figures and tables to where they'll fit without +violating the certain typographic rules. Even if you use the +placement specifier~\texttt{h} for `here', the figure or table will not be +printed `here' if doing so would break the rules; the rules themselves +are pretty simple, and are given on page~198, section~C.9 of the +\LaTeX{} manual. In the worst case, \LaTeX{}'s rules can cause the +floating items to pile up to the extent that you get an error message +saying \Qref*{``Too many unprocessed floats''}{Q-tmupfl}. +What follows is a simple checklist of things to do to solve these +problems (the checklist talks throughout about figures, but applies +equally well to tables, or to ``non-standard'' floats defined by the +\Package{float} or other packages). +\begin{itemize} +\item Do your figures need to float at all? If not, look at the + recommendations for ``\Qref*{non-floating floats}{Q-figurehere}'' +\item Are the placement parameters on your figures right? The + default (\texttt{tbp}) is reasonable, but you can reasonably change it (for + example, to add an \texttt{h}). Whatever you do, \emph{don't} + omit the `\texttt{p}': doing so could cause \LaTeX{} to believe that if you + can't have your figure \emph{here}, you don't want it + \emph{anywhere}. (\LaTeX{} does try hard to avoid being confused in + this way\dots{}) +\item \LaTeX{}'s own float placement parameters could be preventing + placements that seem entirely ``reasonable'' to you~--- they're + notoriously rather conservative. To encourage \LaTeX{} not to move + your figure, you need to loosen its demands. (The most important + ones are the ratio of text to float on a given page, but it's + sensible to have a fixed set that changes the whole lot, to meet + every eventuality.) +\begin{verbatim} +\renewcommand{\topfraction}{.85} +\renewcommand{\bottomfraction}{.7} +\renewcommand{\textfraction}{.15} +\renewcommand{\floatpagefraction}{.66} +\renewcommand{\dbltopfraction}{.66} +\renewcommand{\dblfloatpagefraction}{.66} +\setcounter{topnumber}{9} +\setcounter{bottomnumber}{9} +\setcounter{totalnumber}{20} +\setcounter{dbltopnumber}{9} +\end{verbatim} + The meanings of these + parameters are described on pages~199--200, section~C.9 of the + \LaTeX{} manual. +\item Are there places in your document where you could `naturally' + put a \csx{clearpage} command? If so, do: the backlog of floats is + cleared after a \csx{clearpage}. (Note that the \csx{chapter} + command in the standard \Class{book} and \Class{report} classes + implicitly executes \csx{clearpage}, so you can't float past + the end of a chapter.) +\item Try the \Package{placeins} package: it defines a + \csx{FloatBarrier} command beyond which floats may not pass. A + package option allows you to declare that floats may not pass a + \csx{section} command, but you can place \csx{FloatBarrier}s wherever + you choose. +\item If you are bothered by floats appearing at the top of the page + (before they are specified in your text), try the \Package{flafter} + package, which avoids this problem by insisting that floats should + always appear after their definition. +\item Have a look at the \LaTeXe{} \Package{afterpage} package. + Its documentation gives as an example the idea + of putting \csx{clearpage} \emph{after} the current page (where it + will clear the backlog, but not cause an ugly gap in your text), but + also admits that the package is somewhat fragile. Use it as a last + resort if the other possibilities below don't help. +\item If you would actually \emph{like} great blocks of floats at the + end of each of your chapters, try the \Package{morefloats} package; + this `simply' increases the number of floating inserts that \LaTeX{} + can handle at one time (from~18 to~36). +\item If you actually \emph{wanted} all your figures to float to the + end (\emph{e.g}., for submitting a draft copy of a paper), don't + rely on \LaTeX{}'s mechanism: get the \Package{endfloat} package to do + the job for you. +\end{itemize} +\begin{ctanrefs} +\item[afterpage.sty]Distributed as part of \CTANref{2etools} +\item[endfloat.sty]\CTANref{endfloat} +\item[flafter.sty]Part of the \LaTeX{} distribution +\item[float.sty]\CTANref{float} +\item[morefloats.sty]\CTANref{morefloats} +\item[placeins.sty]\CTANref{placeins} +\end{ctanrefs} + +\Question[Q-underline]{Underlined text won't break} + +Knuth made no provision for underlining text: he took the view that +underlining is not a typesetting operation, but rather one that +provides emphasis on typewriters, which typically offer but one +typeface. The corresponding technique in typeset text is to switch +from upright to italic text (or vice-versa): the \LaTeX{} command +\csx{emph} does just that to its argument. + +Nevertheless, typographically illiterate people (such as those that +specify double-spaced +\nothtml{thesis styles~--- }\Qref{thesis styles}{Q-linespace}) +continue to require underlining of us, so \LaTeX{} as distributed +defines an \csx{underline} command that applies the mathematical +`underbar' operation to text. This technique is not entirely +satisfactory, however: the text gets stuck into a box, and won't break +at line end. + +Two packages are available that solve this problem. The +\Package{ulem} package redefines the +\csx{emph} command to underline its argument; the underlined text thus +produced behaves as ordinary emphasised text, and will break over the +end of a line. (The package is capable of other peculiar effects, +too: read its documentation, contained within the file itself.) +The \Package{soul} package defines an \csx{ul} command (after which the +package is, in part, named) that underlines running text. + +Beware of \Package{ulem}'s default behaviour, which is to convert the +\csx{emph} command into an underlining command; this can be avoided by +loading the package with: +\begin{verbatim} + \usepackage[normalem]{ulem} +\end{verbatim} +Documentation of \Package{ulem} is in the package itself. +\begin{ctanrefs} +\item[ulem.sty]\CTANref{ulem} +\item[soul.sty]\CTANref{soul} +\end{ctanrefs} + +\Question[Q-widows]{Controlling widows and orphans} + +Widows (the last line of a paragraph at the start of a page) and +orphans (the first line of paragraph at the end of a page) interrupt +the reader's flow, and are generally considered ``bad form''; +\AllTeX{} takes some precautions to avoid them, but completely +automatic prevention is often impossible. If you are typesetting your +own text, consider whether you can bring yourself to change the +wording slightly so that the page break will fall differently. + +The page maker, when forming a page, takes account of +\csx{widowpenalty} and \csx{clubpenalty} (which relates to orphans!). +These penalties are usually set to the moderate value of \texttt{150}; this +offers mild discouragement of bad breaks. You can increase the values +by saying (for example) \csx{widowpenalty}\texttt{=500}; however, vertical +lists (such as pages are made of) typically have rather little +stretchability or shrinkability, so if the page maker has to balance +the effect of stretching the unstretchable and being penalised, the +penalty will seldom win. Therefore, for typical layouts, there are +only two sensible settings for the penalties: finite (150 or 500, it +doesn't matter which) to allow widows and orphans, and infinite (10000 +or greater) to forbid them. + +The problem can be avoided by allowing +the pagemaker to run pages short, by using the \csx{raggedbottom} +directive; however, many publishers insist on the default +\csx{flushbottom}; it is seldom acceptable to introduce stretchability +into the vertical list, except at points (such as section headings) +where the document design explicitly permits it. + +Once you've exhausted the automatic measures, and have a final draft +you want to ``polish'', you should proceed to manual measures. To +get rid of an orphan is simple: precede the paragraph with +\csx{clearpage} and the paragraph can't start in the wrong place. + +Getting rid of a widow can be more tricky. If the paragraph is a long +one, it may be possible to set it `tight': say \csx{looseness}\texttt{=-1} +immediately after the last word of the paragraph. If that doesn't +work, try adjusting the page size: +\cmdinvoke{enlargethispage}{\csx{baselineskip}} may do the job, and +get the whole paragraph on one page. Reducing the size of the page by +\cmdinvoke{enlargethispage}{-\csx{baselineskip}} may produce a +(more-or-less) acceptable ``two-line widow''. (Note: +\csx{looseness}\texttt{=1}, +increasing the line length by one, seldom seems to work~--- the looser +paragraph typically has a one-word final line, which doesn't look much +better than the straight widow.) + +\subsection{Things have ``gone away''} + +\Question[Q-oldfontnames]{Old \LaTeX{} font references such as \csx{tenrm}} + +\LaTeXo{} defined a large set of commands for access to the fonts +that it had built in to itself. For example, various flavours of +|cmr| could be found as \csx{fivrm}, \csx{sixrm}, \csx{sevrm}, +\csx{egtrm}, \csx{ninrm}, \csx{tenrm}, \csx{elvrm}, \csx{twlrm}, +\csx{frtnrm}, \csx{svtnrm}, \csx{twtyrm} and \csx{twfvrm}. +These commands were never documented, but certain packages +nevertheless used them to achieve effects they needed. + +Since the commands weren't public, they weren't included in \LaTeXe{}; +to use the unconverted \LaTeXo{} packages under \LaTeXe{}, you need +also to include the \Package{rawfonts} package (which is part of the +\LaTeXe{} distribution). + +\Question[Q-misssymb]{Missing symbol commands} + +You're processing an old document, and some symbol commands such as +\csx{Box} and \csx{lhd} appear no longer to exist. These commands were +present in the core of \LaTeXo{}, but are not in current \LaTeX{}. +They are available in the \Package{latexsym} package (which is part of +the \LaTeX{} distribution), and in the \Package{amsfonts} package +(which is part of the \acro{AMS} distribution, and requires \acro{AMS} +symbol fonts). +\begin{ctanrefs} +\item[AMS fonts]\CTANref{amsfonts} +\end{ctanrefs} + +\Question[Q-msxy]{Where are the \texttt{msx} and \texttt{msy} fonts?} + +The \FontName{msx} and \FontName{msy} fonts were designed by the +American Mathematical Society in the very early days of \TeX{}, for +use in typesetting papers for mathematical journals. They were +designed using the `old' \MF{}, which wasn't portable and is no longer +available; for a long time they were only available in 300dpi versions +which only imperfectly matched modern printers. The \acro{AMS} has +now redesigned the fonts, using the current version of \MF{}, and the +new versions are called the \FontName{msa} and \FontName{msb} +families. + +Nevertheless, \FontName{msx} and \FontName{msy} continue to turn up to +plague us. There are, of course, still sites that haven't got around +to upgrading; but, even if everyone upgraded, there would still be the +problem of old documents that specify them. + +If you have a \extension{tex} source that requests \FontName{msx} and +\FontName{msy}, the best technique is to edit it so that it requests +\FontName{msa} and \FontName{msb} (you only need to change the single +letter in the font names). + +If you have a \acro{DVI} file that requests the fonts, there is a package +of \Qref*{virtual fonts}{Q-virtualfonts} to map the old to the new series. +\begin{ctanrefs} +\item[msa and msb fonts]Distributed as part of \CTANref{amsfonts} +\item[virtual font set]\CTANref{msx2msa} +\end{ctanrefs} + +%%%???%%% spell-checked to here....zzzyx + +\Question[Q-amfonts]{Where are the \texttt{am} fonts?} + +One \emph{still} occasionally comes across a request for the \FontName{am} +series of fonts. The initials stood for `Almost [Computer] Modern', +and they were the predecessors of the Computer Modern fonts that we +all know and love (or hate)% +\begin{footnoteenv} + The fonts acquired their label `Almost' following the realisation + that their first implementation in \MF{}79 still wasn't quite right; + Knuth's original intention had been that they were the final answer. +\end{footnoteenv}. +There's not a lot one can do with these +fonts; they are (as their name implies) almost (but not quite) the +same as the \FontName{cm} series; if you're faced with a document that requests +them, all you can reasonably do is to edit the document. The +appearance of \acro{DVI} files that request them is sufficiently rare that +no-one has undertaken the mammoth task of creating a translation of +them by means of virtual fonts; however, most drivers let you have a +configuration file in which you can specify font substitutions. If you +specify that every \FontName{am} font should be replaced by its corresponding +\FontName{cm} font, the output should be almost correct. + |