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

learn more… | top users | synonyms

4
votes
1answer
133 views

Should I load packages (for instance, all AMS packages) separately or all together?

I was reading some post here at SE and I noticed that many people load packages one by one. For example, \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amsthm} and so on. Usually, I load ...
14
votes
6answers
7k views

How should imaginary numbers be typeset?

I've never had to typeset complex numbers before and I'm finding that I'm uncertain about what best-practices are. My question is really about typesetting just i. (Hence my title referring to ...
6
votes
1answer
149 views

Recreating a square with fixed baseline and height (3d)

I am trying to recreate the following image, as close as possible. The point is that the circumference of the bottom, plus the height of the cube needs to be 30. Which gives 30 = 4x + h so I want ...
3
votes
1answer
716 views

Tag placement in split equation within alignment block

Whenever I have an equation that does not fit on a single line, I am using \begin{equation}\begin{split}...\end{split}\end{equation} as recommended in the AMS math guide. This gives me an equation ...
3
votes
1answer
306 views

Example figure placement

I am using the following code in an example file. \documentclass{book} \usepackage{graphicx} \usepackage{lipsum} \begin{document} \lipsum[1] \begin{figure}[h] ...
8
votes
1answer
5k views

Correct way to set margins

I set the margins of my document in this way using the geometry package \usepackage[left=2.5cm,top=3cm,right=2.5cm,bottom=3cm,bindingoffset=0.5cm]{geometry} Is it a correct way or does there exist ...
40
votes
3answers
7k views

What is the difference of \mathop, \operatorname and \DeclareMathOperator?

One sees all kind of versions in source files for defining something like a limit etc. So my question is which one serves what purpose. Is there any "best practice" in chosing one over the other?
5
votes
0answers
55 views

Review of algorithm-related packages? [duplicate]

Possible Duplicate: Print programs with its proper syntax Where can I find (if it exists) an updated review of the most relevant packages for handling with algorithms (pseudocode or code ...
39
votes
1answer
2k views

Difference between ref, varioref and cleveref. Decision for a thesis

How can one make a quick decision what the best "ref" for a thesis in pdflatex with hyperref is? After a few hours reading I do not know more than ref is used by everyone who does not know about ...
9
votes
2answers
166 views

Ensuring correct LaTeX compilation on different systems

I'm currently writing a document collaboratively and I need to make sure that the compilation is executed correctly on every possible system (e.g., that the document encoding - UTF-8 - is detected by ...
35
votes
2answers
2k views

Will cruft from a previous compile ever change the final look of my document

Ok, this has been bugging me for a while; Will cruft left over from a previous run of LaTeX ever change how my document looks? Would the following procedures ever give me different results: I ...
53
votes
2answers
9k views

When to use \par and when \\

What is the difference between \par and \\ and when should I use \par instead of \\?
13
votes
2answers
586 views

Why are these commands considered as bad practice?

I was reading LaTeX: Do not use these commands, but the author didn't explain why they are bad. Could anyone help me understand. \\ (except inside a special environment like tabular, array, or ...
55
votes
6answers
2k views

How bad for TeX is omitting braces {}, even if the result is the same?

Sometimes writing braces and omitting them produces the same result: \tilde{\psi} \mathrm{e}^{\mathrm{i} \pi} vs \tilde \psi \mathrm e^{\mathrm i \pi} Or (taken from Werner's comment below) ...
4
votes
3answers
202 views

Shorthand for variables lead to name clash

In formulas I need often the same constants and variables with lot of "make-up". I want to have readable and maintainable LaTeX code, so I thought about writing \newcommands like ...
6
votes
1answer
342 views

Newline, indentation, parskip - when to use what in what stylistic manner?

I intend to use scrbook. In real-life literature, English and German language, the text often looks like this: Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod ...
58
votes
2answers
1k views

Detecting unused packages in LaTeX document

I have quite a bad habit of copy-and-pasting my packages from one LaTeX document to another. Is there any way we can detect unused packages (i.e. \usepackage commands) so that they can be removed from ...
8
votes
1answer
357 views

Can I assume that the \ht+\dp of a strutbox == \baselineskip?

In Context, as long as the interline space is set through the proper interface, it is safe to assume that (tex.box.strutbox.height + tex.box.strutbox.depth) == tex.baselineskip.width. This relation is ...
4
votes
1answer
642 views

Shortcut commands for referencing floats

I always include the following commands in the preamble of my latex documents to make sure I refer to floats consistently in the text. I was wondering if the community had any thoughts about this, is ...
17
votes
1answer
216 views

Is there a right way to do combined conditionals in LaTeX3?

I have some LaTeX3 code and I want to add a new feature. This will involve choosing between various actions at a particular point. There are two choices to be made, and these choices are ...
10
votes
2answers
640 views

Are there any situtations where it is better to load a package after other code?

I always place all my packages immediately following the document class, followed by setting information (\hypersetup for example) and customization to my documents (header and footer customization ...
0
votes
1answer
2k views

How should I write arctanh? [duplicate]

Possible Duplicate: Define additional math operators to be typeset in roman If I want to use the function sin in LaTeX, I write $\sin x$ or $\sin(x+1)$. If I want to use the function ...
6
votes
3answers
247 views

Without using intersection method, can we find the following vector component?

Given that two vectors, i.e., green and red ones. The objective is to find the blue one such that the resultant of the green and blue ones is parallel to the red one and with the same direction as the ...
30
votes
4answers
1k views

How to make TikZ faster?

I have a long document containing plenty of TikZ figures and it is painfully slow to compile it. Is there any specific TikZ tips / good practices you could recommend me so that I can write figures ...
0
votes
1answer
178 views

Best way of representing logical statements

I have a number of statemts which describe the process of creating a data element which are intergrated within a "data manual". For example: IF ( ( heigth between 58 AND 76 ) AND ( BMI between 19 AND ...
5
votes
1answer
2k views

How to use classicthesis?

Once I discovered classicthesis I fell in love with the layout and used it for study reports and so on. In the first step I downloaded the sources and customized the settings in various files as ...
1
vote
1answer
348 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} -------- ...
18
votes
2answers
335 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} ...
16
votes
3answers
988 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
303 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 ...
19
votes
1answer
664 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
336 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
2k 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
341 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
609 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
570 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
261 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
846 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
841 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
179 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? ...
18
votes
1answer
741 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 ...
49
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
505 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
7k 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 ...
13
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
248 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
310 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
702 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 ...
8
votes
2answers
231 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 ...
60
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 ...