The desktop at home has some old TeX components from 2007 installed on it.
Trying to build a 2674-page PDF caused TeX to crash with the message "TeX capacity exceeded!" and a notice that [save size = 5000].
Googling around showed that the necessary file to change is texmf.cnf which find then showed to be at /usr/local/textlive/2007/texmf/web2c/texmf.cnf on my machine.
The first line that needed to be changed was this:
save_size = 5000 % for saving values outside current group %%% OLD
save_size = 50000 % for saving values outside current group %%% NEW
Rebuilding then caused TeX to fail later in the process with the same "TeX capacity exceeded!" message but pointer to the pool size. So the next line that needed to be changed was this:
pool_size = 1250000 %%% OLD
pool_size = 3250000 %%% NEW
(In both cases the values were taken from the newer (2009) TeX install on the laptop at home.)
Making the two changes above enabled the 2674-page PDF to build perfectly.
Note that now commands were necessary to make the texmf.cnf changes take effect. Just save the file and rerun TeX.
Sunday, December 30, 2012
Saturday, July 3, 2010
BibTeX author names
Articles with more than three or four authors present may present something of a bibliographic challenge. Consider "Association of polymorphisms in the CRP gene with circulating C-reactive protein levels and cardiovascular events" in JAMA 296(22). The article features 15 separate authors on the first page. But the coversheet JAMA provides at the front of the PDF provides only the first three authors plus 'et al.' for purposes of citation.
How to get BibTeX to play along?
The short answer:
APA-style BibTeX output looks like this:
Two tricks here.
First, the BibTeX author field only ever comprises a single string enclosed in double quotes. But note that the BibTeX author field may comprise arbitrarily many authors delimited by 'and'.
Second, the BibTeX author field recognizes the special phrase 'and others' as a directive to append 'et al.' to the end of the list of named authors in the bibliography. This matters because this would appear to be the only way to get BibTeX to list the names of only 3 of 15 authors of an article, with the 12 unnamed authors given only as 'et al.'.
How to get BibTeX to play along?
The short answer:
@Article{ Lange:2006,
title = "Association of polymorphisms ...",
author = "Lange, Leslie A. and
Carlson, Christopher S. and
Hindorff, Lucia A.
and others",
journal = "Journal of the American Medical Association",
year = "2006",
volume = "296",
number = "22",
pages = "2703--2711"
}
APA-style BibTeX output looks like this:
[Lange et al., 2006] Lange, L. A., Carlson, C. S., Hindorff,
L. A., et al. (2006). Association of polymorphisms in the
CRP gene with circulating C-reactive protein levels and
cardiovascular events. Journal of the American Medical
Association, 296(22):2703–2711.
Two tricks here.
First, the BibTeX author field only ever comprises a single string enclosed in double quotes. But note that the BibTeX author field may comprise arbitrarily many authors delimited by 'and'.
Second, the BibTeX author field recognizes the special phrase 'and others' as a directive to append 'et al.' to the end of the list of named authors in the bibliography. This matters because this would appear to be the only way to get BibTeX to list the names of only 3 of 15 authors of an article, with the 12 unnamed authors given only as 'et al.'.
Tuesday, January 13, 2009
Turning off the first page number in LaTeX
The standard command to turn off page numbering in LaTeX is
which fails to work for the first page.
The standard command to turn off page numbering for the first page is
which also fails to work for the first page unless you place the command immediately after
Taken from here.
\pagestyle{empty}
which fails to work for the first page.
The standard command to turn off page numbering for the first page is
\thispagestyle{empty}
which also fails to work for the first page unless you place the command immediately after
\maketitle.Taken from here.
Monday, May 12, 2008
LaTeX caption alignment
Captions usually center justify. The

Input without
caption package customizes caption alignment with the justification and singlelinecheck parameters of \captionsetup.
\documentclass[10pt]{article}
\usepackage{caption}
\captionsetup{justification=raggedright, singlelinecheck=false}
\begin{document}
\begin{table}[h]
\begin{tabular}{|ccccc|}
\hline
\textit{decimal} && \textit{binary} && \textit{musical} \\
\hline
&&&& \\
$\frac{1}{2^{-1}}$ &=& $\frac{10}{1}$ &=& \lily{c\breve*1/8} \\ [6pt]
$\frac{1}{2^{0}} $ &=& $\frac{1}{1}$ &=& \lily{c1*1/4} \\ [6pt]
$\frac{1}{2^{1}} $ &=& $\frac{1}{10}$ &=& \lily{c2*1/2} \\ [6pt]
$\frac{1}{2^{2}} $ &=& $\frac{1}{100}$ &=& \lily{c4} \\ [6pt]
$\frac{1}{2^{3}} $ &=& $\frac{1}{1000}$ &=& \lily{c8} \\ [6pt]
$\frac{1}{2^{4}} $ &=& $\frac{1}{10000}$ &=& \lily{c16} \\ [6pt]
\hline
\end{tabular}
\caption{Binary equivalences.}
\end{table}
\end{document}
Input without
\captionsetup and the caption package centers the caption at page middle, bad for narrow tables.
LaTeX guillemets
French guillemets are possible together with English open- and close-quotes. Use

Five lines above give a minimal example.
babel together with \og and \fg.
\documentclass[10pt]{article}
\usepackage[french]{babel}
\begin{document}
L\`a dans \textit{Le marteau sans ma\^itre,
\og Artisanat furieux \fg} o\`u se trouve \dots
\end{document}
Five lines above give a minimal example.
Tuesday, May 6, 2008
LaTeX landscape
Rendering LaTeX in landscape means mucking with
Make sure the LaTeX source starts with something like
dvips and ps2pdf on most systems. These four lines work under OSX.
`which latex` foo.tex
`which dvips` -Ppdf -t landscape foo.dvi
`which ps2pdf` foo.ps
open foo.pdf
Make sure the LaTeX source starts with something like
\documentclass[landscape,letterpaper]{article} and make sure the which subshells return real applications.
LaTeX line "justification"
Start with
\hyphenpenalty=10000 to forbid hyphenation (almost) completely and you'll get fully-justified lines (which is good) and -- sometimes -- words that extend beyond the right margin (which is unacceptable). Add \tolerance=10000 and LaTeX will "tolerate" interword spacing and flush both left and right margins again.
Tuesday, April 22, 2008
Leopard and MacTeX
Leopard's on the MacBook. TeXShop still loads and runs. But typesetting in the TeXShop GUI complains about
The solution was to (re)install MacTeX from the site. The catch being that the
latex2pdf missing. So some underlying MacTeX components went missing in the upgrade from Tiger to Leopard.The solution was to (re)install MacTeX from the site. The catch being that the
.dmg is 744M.
Tuesday, April 15, 2008
Mixed French, German & English LaTeX
Unicode characters enter easily into any LaTeX document using

So multilingual LaTeX documents require two things. The LaTeX
inputenc correctly. But different languages style and space punctuation and other typographic elements differently. The LaTeX babel package and the \selectlanguage command account for typographic differences between languages.
\documentclass[10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[german, french, english]{babel}
\begin{document}
\begin{enumerate}
\item \selectlanguage{english} Taken together ...
\item \selectlanguage{french} Cette combinaison ...
\item \selectlanguage{german}Zusammen ...
\end{enumerate}
\end{document}

So multilingual LaTeX documents require two things. The LaTeX
inputenc and babel packages. And repeated calls to the \selectlanguage command inline.Tabloid landscape in LaTeX
The
CTAN offers other page sizing packages.
geometry package initializes LaTeX tabloid landscape documents in one line.
\documentclass[10pt]{article}
\usepackage[papersize={17in, 11in}]{geometry}
\begin{document}
This document is in tabloid landscape.
\end{document}
CTAN offers other page sizing packages.
Using LaTeX setstretch
LaTeX single spaces text by default.

LaTeX offers different line spacing options. The

The sort of scaling factor mirrors the idea of single- and double-spacing but differs from type leading.
\documentclass[10pt]{article}
\begin{document}
`Curiouser and curiouser!' cried Alice ...
\end{document}

LaTeX offers different line spacing options. The
setspace package implements \setstretch.
\documentclass[10pt]{article}
\usepackage{setspace}
\setstretch{1.4}
\begin{document}
`Curiouser and curiouser!' cried Alice ...
\end{document}

The sort of scaling factor mirrors the idea of single- and double-spacing but differs from type leading.
Setting LaTeX docs to Palatino
LaTeX documents set text by default in the Computer Modern Roman, Computer Modern Sans Serif and Computer Modern Monospaced font families.

The

Prebuilt packages like
\documentclass[10pt]{article}
\begin{document}
\begin{list}{ }{ }
\item Whan that Aprille with his Shoures soote ...
\item \textsf{Whan that Aprille with his Shoures soote ...}
\item \texttt{Whan that Aprille with his Shoures soote ...}
\end{list}
\end{document}

The
palatino package changes all three font families.
\documentclass[10pt]{article}
\usepackage{palatino}
\begin{document}
\begin{list}{ }{ }
\item Whan that Aprille with his Shoures soote ...
\item \textsf{Whan that Aprille with his Shoures soote ...}
\item \texttt{Whan that Aprille with his Shoures soote ...}
\end{list}
\end{document}

Prebuilt packages like
palatino do not exist for all fonts.Friday, April 11, 2008
Invoking lilypond-book
A minimal
A minimal
The
Process
Invoking
Note that invoking
LaTeX file contains these four lines.
\documentclass[10pt]{article}
\begin{document}
hello!
\end{document}
A minimal
lilypond-book file contains these seven lines.
\documentclass[10pt]{article}
\begin{document}
hello!
\begin{lilypond}
\new Staff { c'4 }
\end{lilypond}
\end{document}
The
lilypond context inserts in .tex documents directly.Process
lilypond-book docs like this.
lilypond-book --pdf --output=out test.tex
cd out
pdflatex test.tex
open test.pdf
Invoking
lilypond-book with the --pdf option tells lilypond-book to generate a postprocessed version of test.tex named test.tex together with a number of helper files necessary to create some final .pdf.Note that invoking
lilypond-book with the --pdf option does not tell lilypond-book to create a .pdf directly; further processing with pdflatex is still required.
Subscribe to:
Posts (Atom)
