Helpful Links and Tidbits

students were encouraged to post links to interesting and helpful LaTeX resources


 
backref is an option in the hyperref package. It adds ‘backlink’ text to the end of each item in the bibliography, as a list of section numbers. pagebackref adds ‘backlink’ text to the end of each item in the bibliography, as a list of page numbers. See http://www.tug.org/applications/hyperref/manual.html for details.
Comments
(0 Comments / 0 New)
Average rating:
(0 Ratings)
 
I found a good discussion of PGFplots pros and cons. If you want to create a pie chart, here's an example: http://www.texample.net/tikz/examples/pie-chart/ I'm with Chandru on this one -- stick to MATLAB and import or convert it using Inkscape.
Comments
(0 Comments / 0 New)
Average rating:
(0 Ratings)
 
By default, JabRef will do string substitution in the formatted preview of each bibliography entry that appears at the bottom when you click on the entry. However, it will not do the substitution in the one-line summary that shows for each entry in the table.

One advantage of using these (aside from reduced typing, which may not be a big deal if you fill in entries from the web) is that you can define one way of writing the title for all entries, and then it's easy to change the way you write it if you choose to. For example, you might start with Journal of the Optical Society of America A and then decide later that you want to write it as Journal of the Optical Society of America, Pt. A.

BTW, BibTeX distinguishes among required fields, optional fields, and ignored fields. Required fields are always used in the standard citations, optional fields are used for some citation styles, and ignored fields are simply ignored by BibTeX even though they are handy in keeping up with auxiliary info in the .bib database.
Comments
(0 Comments / 0 New)
Average rating:
(0 Ratings)
 
I checked some of my LaTeX files, and I ordinarily put the \label command inside the caption to make sure the \label is associated with the caption and not something else:

\caption{\label{fig:stuff}This is a cool figure.}

works for me.
Comments
(0 Comments / 0 New)
Average rating:
(0 Ratings)
 
In addition to the amsmath package, you should include both amssymb and stackrel packages in your preamble.
Comments
(0 Comments / 0 New)
(0 Ratings)
 

As a followup to the "boxes" homework, I just thought I'd post a few comments and variations generated by some other students' homeworks and some extra reading.

As a few of you noticed, LaTeX can do some mysterious out-of-the-blue things as far as line-to-line and side-to-side spacing, particularly when using different box structures. Variation creeps in and I cannot see the reason looking at various blocks of LaTeX scripting.

Here is the original code which generated the boxing exercise from the homework:

% ORIGINAL EXERCISE KEY FOLLOWS:
\center{\frame {
\parbox[c]{.8\textwidth} {
\makebox[.8\textwidth][r]{
to the right}\par
\makebox[.8\textwidth][s]{
s p r e a d}\par
\center{\framebox[1.1\width]{Guess I'm
framed now! AND centered!!}} \par
\framebox[\width][c]{I get it,
I am exactly as wide as the text.} \par
\framebox[.8\textwidth][l]{never
mind, so am I \hfill
Can you read this?}
}
}
}

You'll notice, looking at the original homework document, that some non-ideal spacing occurs on the right of the enclosing box, etc. However, use of the \parbox environment enforces in-paragraph line spacing even when the \par call is used to end a line. This would help some of your homeworks where line-to-line spacing appeared to vary intermittently between paragraph-to-paragraph and in-paragraph spacing.

An alternative is to use the "framed" package, such as:

% HERE IS AN ALTERNATIVE USING THE ``FRAMED PACKAGE''
\begin{framed}
\centering{
\makebox[.8\textwidth][r]{
to the right}\\
\makebox[.8\textwidth][s]{ s p r e a d} \\[1ex]
\center{\framebox[1.1\width]{Guess I'm
framed now! AND centered!!}} \\
\framebox[\width][c]{I get it,
I am exactly as wide as the text.} \\
\framebox[.8\textwidth][l]{never
mind, so am I \hfill
Can you read this?}
}
\end{framed}

The drawback is that the "framed" package will draw a frame from margin to margin -- you won't have any further control over that. For further reading, here is a page on the "framed" package, which also supports shadowed frames:

http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=framed
Comments
(0 Comments / 0 New)
(0 Ratings)
 
This looks interesting: http://www.phillme.de/cms/node/14
Comments
(0 Comments / 0 New)
Average rating:
(0 Ratings)
 
A question arose about the value of the \mbox command. Probably the most common use is in equations, where the argument to \mbox needs to be treated as plain text.

The basic behavior of \mbox is that whatever is in the argument (\mbox{this is the argument}) will not be broken across lines.

Here's a tip mentioned in Lamport's LaTeX book. If you want to define an often-used command that will appear in both equations and text, you can use an \mbox to make it work:

\newcommand{\gm}{$\Gamma_I$} can be used as a formatted math Gamma character in text just by putting \gm\ in the text. However, it can't be used in math mode because math mode would be turned off by the first $ in the command substitution above. So, you can do this:

\newcommand{\gm}{\mbox{$\Gamma_I$}}

This isolates the equation inside an \mbox, which allows it to be used in math mode or ordinary text.
Comments
(0 Comments / 0 New)
Average rating:
(0 Ratings)
 
Here is an article on the meaning of em. It's essentially the width of capital M but not really. Read it and weep. BTW, apparently, ex is the height of a lowercase x in the current font.
Comments
(0 Comments / 0 New)
Average rating:
(0 Ratings)
 

This set includes the solution for setting paragraph indents, and some others:

\setlength{\topmargin}{0in}
\setlength{\headheight}{0in}
\setlength{\headsep}{0in}
\setlength{\textheight}{7.7in}
\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\parindent}{0.25in}
\setlength{\parskip}{0.25in}
Comments
(0 Comments / 0 New)
(0 Ratings)
 
http://miktex.org/2.8/issues

LaTeX terminates with "GUI framework cannot be initialized" if invoked from TeXnicCenter (1.0 Stable Release Candidate 1). This happens when a missing package needs to be installed and the pop-up window cannot be displayed.

Remedy: start MiKTeX Options and choose either Yes or No (but not "Ask me first") for the option "Install missing packages on-the-fly".
Comments
(0 Comments / 0 New)
Average rating:
View All Reviews
(1 Ratings)
 
This has been a pretty good reference for what little I have done with LaTeX:

http://en.wikibooks.org/wiki/LaTeX
Comments
(0 Comments / 0 New)
Average rating:
View All Reviews
(2 Ratings)