A "best practice" is a technique or approach that TeXnicians recognize as giving better results than other approaches.

learn more… | top users | synonyms

1
vote
1answer
331 views

Should citations be used before or after equations?

Should I put citations before or after equations? For example: the following sequence \citep{----} \begin{equation} -------- \end{equation} or the following sequence \begin{equation} -------- ...
17
votes
2answers
319 views

Does a zero-length line with an arrow make sense? Is it a bug?

\documentclass[pstricks,border=12pt]{standalone} \usepackage{pstricks-add} \begin{document} \multido{\i=0+30}{12}{% \begin{pspicture}(-2,-2)(2,2) \pscircle{1} \pnode(1;\i){R} ...
15
votes
3answers
873 views

What are some best practices for the typography of tables and figures?

I put captions above my tables and below my figures. I use the booktabs package (and no vertical lines) for my tables. Do I show both tables and figures (graphs) for the same data? If so, in what ...
11
votes
1answer
297 views

Is it a good practice if we always locally precede \href with \sloppy?

Is it a good practice if we always locally precede \href with \sloppy as follows? if you are interested to know the details, please contact me at {\sloppy ...
18
votes
1answer
550 views

Write to logfile

I want to write some things to the log file. What is the best practice for this? Is it \message{} or \typeout{} or what?
8
votes
1answer
321 views

XeTeX: better using system fonts or packages?

I've recently switched to XeTeX. In my document I use this code to set the fonts: \usepackage[math-style=ISO,bold-style=ISO]{unicode-math} \usepackage{xunicode} \usepackage{fontspec} ...
5
votes
1answer
1k views

Update TikZ/PGF on mac

the TeXLive 2012 distribution on my Mac is shipped with TikZ version 2.10 - I want to use (try) the CVS (most updated beta(?) version). Here's what I've done so far: Downloaded the the TDS package ...
20
votes
1answer
314 views

Why are \@title, \@author, and \@date cleared during \maketitle?

(This is not a duplicate of How can I use @author, @date, and @title after maketitle?) I understand that \maketitle resets a bunch of macros, including \@title, \@author, \@date, and \maketitle ...
3
votes
1answer
586 views

Fonts too thin when A4 scaled down to A5 in printing

In my document I am using the same settings as in the MWE below. I need copies of the document in A4 and A5. Both have to be identical so I cannot optimise the appearance of both by using a4paper for ...
10
votes
2answers
481 views

Difference between draw=none and draw opacity=0 (also for fill=none and fill opacity=0)?

What is the difference between the TikZ key-value pairs draw=none and draw opacity=0? Are they functionally equivalent, or are there situations in which one should be preferred over another? ...
9
votes
1answer
241 views

What is best practice for aligning distinct arrays or tables side-by-side?

I have two related tables that could naturally be displayed side-by-side but don't have to be. However, it saves space to display them side-by-side rather than one atop the other. If I do so without ...
10
votes
1answer
741 views

What is the best practice for typesetting set-builder notation with a large number of membership criteria?

That is, I have something akin to the following right now: \documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \begin{document} We must have $(a^i,b^i,c^i) \in X^i(d) = \bigg\{(a,b,c) ...
11
votes
3answers
816 views

Reusing LaTeX code to achieve a consistent layout

What is the best approach to reusing the same layout for numerous tables, paragraphs etc. which share the same structure but different content? Is the best method to use custom commands/macros?
1
vote
1answer
168 views

Best practices with \titlespacing?

I think my titles are too close to the text as they are set by default, but when I try to modify the distance, my document does not look nice. What are the best practices for \titlespacing options? ...
17
votes
1answer
658 views

Best choice between using \\ or leaving space after each paragraph to end the paragraph

Here is the thing, I have always used a blank space between paragraphs in order to tell latex that there is a new paragraph. But there is someone I work with very often that keeps using \\ to break a ...
41
votes
3answers
1k views

Advantages and disadvantages of fully expandable macros

As I currently understand them, fully-expandable macros are analogous to pure/effect-free functions in functional programming. Correspondingly, things that are not expandable, such as \def, are ...
5
votes
1answer
461 views

Is there a default / official / standard Vim indentation file for TeX, or just best practices for TeX source indentation?

If you see here, the author mentions an "official version" of an indentation script from Johannes Zellner. The link is broken and while there are traces of Zellner all over the interwebs, I can't find ...
11
votes
2answers
6k views

\flushbottom vs \raggedbottom

I use \documentclass{book}. If I use \flushbottom, I get messages of the sort Underfull \vbox (badness 10000) has occurred while \output is active []. See question. These messages disappear when I ...
12
votes
1answer
1k views

Style question: serif or sans fonts in figure and chart text?

Question for you design-y types: I like to use a serif font for all my text (title, headings, body). What I'd like to know is whether you think that I should go with a serif or sans serif for text in ...
0
votes
1answer
242 views

eqnarray or equation for single-line equations?

Normally I would use \begin{equation}, of course. But I got a huge file (more than two hundred pages) where many equations are formatted like this: \begin{eqnarray} a = b + 1 % no & here! ...
4
votes
1answer
276 views

How to work with large projects

I am working on a project and i want to slim it down a litle so please help me with the following. I have a document structure like this: /DocumentRoot |-main.tex |-title.tex | |-/chapter-1 | ...
34
votes
2answers
648 views

Best practice for index construction — recommendations and references

I'm about to embark on something I've never done (at any rate, seriously) before: preparing an index for a ~200-page document. I have started, but I get the feeling "something's wrong". I know that I ...
7
votes
2answers
201 views

Using the correct indefinite article with acronyms and their full forms

I am using the acronym package so as to automatically expand acronyms when they are first used. For example, I can simply type \ac{RMS}, and LaTeX automatically expands this to "Resource Management ...
57
votes
5answers
3k views

What is best way to mention that a document has been typeset with TeX?

Is there any common way to mention that a document has been typeset by TeX? So non-TeXnicians (TeXperts) may become a little familiar with the TeX world. Update: It would be nice if one hero make a ...
27
votes
2answers
1k views

Order of subscript and superscript

If a mathematical symbol has both subscript and superscript, is there a best practice which should come first? I have seen both, for example $\sum_{t=0}^3$ and $\sum^3_{t=0}$. AFAIK they give ...
9
votes
1answer
448 views

Alternative ways to format the cases environment in display math-mode

The cases environment of amsmath package is useful for defining a function that takes different values in different regions. For example: \documentclass{article} \usepackage{amsmath} \begin{document} ...
7
votes
0answers
126 views

Recommendation for Collecting Feedback on Numerous Files [closed]

Before I go down the path of the solution I am thinking of, I thought I should solicit feedback/suggestions as others must have come across this situation before. Background: I have hundreds of ...
14
votes
2answers
459 views

How to format source to take advantage of VCS?

Building on What are good working practices for VCS with LaTeX documents?, are there best practices for formatting (La)TeX source files to take advantage of version-control systems? I keep my résumé ...
11
votes
3answers
3k views

a4paper, where should I declare it? In document class or geometry?

I currently have an article document class and I previously changed it to include printing on A4 paper: \documentclass[12pt, a4paper]{article} However, I had to change my margins to meet my ...
21
votes
2answers
354 views

When to use \, { } or ~ to prohibit gobbling of a space following a macro

There are various ways to ensure that a space after a macro is not gobbled and wondering how to decide which one to use. Are there cases where it matters which solution is used. ...
9
votes
1answer
835 views

Best practice for getting “If not foo” conditionals

So, here are two ways you might set things up such that \dostuff is done when foo is false. The "new conditional" method If you know when foo is going to be set, then after that do: \newif\ifnotfoo ...
14
votes
1answer
3k views

Differences and best practices: \onslide vs. \uncover, \onslide+ vs. \visible, \onslide* vs. \only?

Page 81 of the Beamer v3.20 user guide describes the behavior of the \onslide command. In particular, there are three forms when the optional text argument is given: \onslide⟨overlay ...
15
votes
3answers
951 views

en dash and em dash spacing

I've noticed that en dashes and em dashes run into certain numbers and letters, and I don't believe it's standard to use spaces with these. For example, if a 'b' comes before the dash or a '6' comes ...
25
votes
3answers
7k views

When is it appropriate to use \paragraph?

LaTeX provides seven sectioning commands: \part \chapter \section \subsection \subsubsection \paragraph \subparagraph. For most of the documents I write or come across, \subsubsection seems to be ...
10
votes
1answer
839 views

Where to place a two-page table of contents / list of figures?

In my Master's thesis, I use scrbook and start every chapter on odd pages. Now both my table of contents and list of figures span exactly two pages. My question is therefore more related to style and ...
3
votes
1answer
242 views

cleanest way to part answers from questions

I am still typesetting old exams, and I turn to you lads and lassies for help. At the moment I have most of the actual exams typed in, and is currently typing in answers for them. The problem I run ...
17
votes
1answer
595 views

How to write overlay-specification–aware macros that work w/o the beamer class

The LaTeX beamer class provides with \newcommand<> and \newenvironment<> an interface to define own commands that can deal with beamer's overlay specifications. Internally, commands ...
31
votes
4answers
4k views

Should I \mathrm the d in my integrals?

When writing an integral, it seems like something should be done to separate the "d", as in \int f(x) dx, so as not to confuse it with a variable. I've seen it left as-is, bolded, and straightened. ...
8
votes
2answers
520 views

best practice international template

I would like to have a template which can be internationalised (i.e. is suited for latin script languages) and uses the microtype package. I suppose that we therefore need the following packages: ...
36
votes
3answers
1k views

Who *doesn't* use e-TeX?

I was just browsing the new questions and noticed egreg's recent answer, in which he uses a certain extension from e-TeX and cautions the reader that it is not compatible with Knuth TeX. And so I ...
10
votes
3answers
172 views

What is the advantage of using \@testopt?

I discovered recently \@testopt in this question. I tried to understand the goal with the use of this macro, but in my research I discovered other macros like \@protected@testopt and even new packages ...
12
votes
2answers
602 views

Best practice to implement a boolean macro argument?

Sometimes I'd like a macro to depend on a boolean argument but I don't know about the best way to implement this. So far, I end up introducing a global (say) \newif\ifextra that is used inside the ...
9
votes
4answers
210 views

\verb in csquotes

The following code gives me an error: \documentclass[ngerman]{article} \usepackage{babel,csquotes} \begin{document} \enquote{\verb|foo|} \end{document} I guess this is the classic "you can't use ...
25
votes
5answers
9k views

How to best typeset “special” constants (complex unit i, Euler's number e,…)?

I'm trying to come up with a typographically appealing way to express "special" numbers such as the complex unit i = sqrt(-1) or Euler's number e. It has to be such that it cannot be confused with ...
5
votes
1answer
693 views

How to make the code of a circuitikz diagram more flexible?

I am a beginner in LaTeX, and TikZ, trying to use them for industrial documents. The sample code below (largely made with previous help) shows a circuit made with circuitikz. However I have now the ...
9
votes
2answers
751 views

What are some good examples of LaTeX Cayley diagrams?

I'm looking for some good examples of LaTeX code used to generate basic Cayley diagrams like this one: Ideally, I'd like for the examples to make it fairly clear how to modify or remove various ...
9
votes
1answer
345 views

How to make a CTAN package MiKTeX friendly?

I've heard that it is difficult to install my new statrep package using MiKTeX. The dtx file is self-extracting, but I think MiKTeX doesn't expect to work with a dtx file. Can someone provide a ...
14
votes
2answers
3k views

How to properly typeset footnotes/superscripts after punctuation marks?

I find the spacing of footnote marks after punctuation marks quite unsatisfactory, especially with sans serif fonts and compared to the spacing after letters. Example follows: I came up with a ...
4
votes
1answer
150 views

What is the proper way to format syntax within ConTeXt?

For some time, I have thought, perhaps mistakenly, that the precise placement or spacing around ConTeXt syntax was unimportant, e.g., under this assumption, all of these should produce the same ...
8
votes
1answer
1k views

List of symbols/abbreviations and macros

It's on my task list for a while now, and this post made me ask a follow up question which is, in my mind, a missing part when setting such a list. As an example, think of the standard notation of an ...