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
47 views

How to remove the white space on the top of the following table?

How to remove the white space on the top of the following table? \documentclass[preview,border=0pt,varwidth]{standalone} \usepackage[table]{xcolor} \usepackage{array} \usepackage{longtable} ...
14
votes
3answers
110 views

Defining Extensible macros

Question: For a macro that has only one parameter, are there any issues with defining it as follows: \NewDocumentCommand{\MyMacro}{% s% #1 = starred variant (*** unused as of yet ...
8
votes
3answers
168 views

Parallel lines on a grid and circle best practices?

I am a TeX/LaTeX noob, but I am learning rapidly. I am about to attempt to draw the following figure using LaTeX/TeX/TikZ I already have a, (I think) good working knowledge of how to draw circles, ...
3
votes
2answers
52 views

Table layout: cells with short and long text

I've been fiddling with a table layout where some cells contain very little text while others may need multiple lines, and I can't seem to get it readable and nice-looking. MWE: ...
4
votes
1answer
23 views

Vertical alignment of the `aligned` environment in table cells

I think most people will agree that the vertical alignment in the table cells below is less than ideal--especially if I want to remove the \cmidrule to be more in line with accepted "best practices" ...
14
votes
3answers
924 views

How to typeset the symbols for charged particles?

Maybe this question will seem trivial, but I was wondering how you people typeset symbols for charged particles? I was thinking here in particular about the electron, the proton and the neutron. This ...
9
votes
1answer
77 views

Organizing images for multiple latex files

This is kind of a soft question. In my work, I generate a lot of images (graphs with data, sketches of the experimental system, etc..) which I later use in various latex files (papers, beamer ...
118
votes
8answers
4k views

Are \( and \) preferable to dollar signs for math mode?

Along the lines of Why is \[ ... \] preferable to $$?, what reasons are there (if any) to favor \( ... \) over $ ... $?
25
votes
2answers
433 views

Coordinating the work of Biblatex style authors

I am not sure whether this is an admissible question. If it is not, please close it. The problem Biblatex opens up the realistic possibility of highly complex citation systems such as those used in ...
0
votes
1answer
2k views

What are the most popular LaTeX packages? [duplicate]

Possible Duplicate: What packages do people load by default in LaTeX? As subject. What are the most popular LaTeX packages?
7
votes
2answers
111 views

How to parse optional arguments without keyval?

The current implementation only supports rounding with the specified digits in the optional arguments. \documentclass{beamer} \usepackage{multido} \usepackage{pstricks} \usepackage[nomessages]{fp} % ...
8
votes
0answers
158 views

Best practice for typesetting physical quantities using siunitx

Consider the following example. Code \documentclass{article} \usepackage{amsmath} \usepackage[ locale=DE, output-product=\cdot, product-units=single % I use this option a lot in the document, ...
2
votes
0answers
36 views

How to throw an error and abort the compilation for the following scenario? [duplicate]

Objectives: I want to throw exceptions (or error messages) when the following illegal code is invoked. \const[c,any]{temp}{\f[\i]} \const[others]{temp}{\f[\i]} Minimal Working Example: I cannot ...
1
vote
1answer
68 views

What causes this error? [closed]

After seeing Herbert's answer, apparently this problem should not occur if I realized the first row of the following code should be \documentclass{beamer}. Problems often come from not knowing what I ...
4
votes
1answer
42 views

How to implement a constant declarating macro to behave differently in preamble and pspicture?

The example below is extremely trivial just to illustrate the problem in the simplest way. \documentclass{beamer} \usepackage[nomessages]{fp} % constants declarator \def\LoadConstants{}% to load ...
6
votes
2answers
123 views

Is usage of \ell instead of l in math mode best practice?

Is usage of \ell instead of l in math mode best practice?
4
votes
1answer
109 views

How to know the line width of enumeration in two column document prior to entering the enumeration?

I want to populate the following lengths just once prior to entering the enumeration (or perhaps prior to entering the document environment) to free me from worrying whether or not the ...
2
votes
1answer
41 views

How to prevent preview from discarding my PostScript constants defined in the preamble?

Considerations: I have to use beamer document class to create a step-by-step tutorial. I have to use preview package to trim everything outside pspicture. Using standalone document class is not ...
41
votes
11answers
2k views

How to practice LaTeX?

With many programming languages, you have the opportunity of practicing the language by doing problems or developing programs that will do certain things. With LaTeX, however, you can't exactly do ...
3
votes
2answers
134 views

Professional slashbox alternative

Suppose I have the following table which lists conversion rules, where rows denote the input and columns denote the output type (so, for example, the conversion int8_t -> int16_t would use b, while ...
68
votes
4answers
2k views

Techniques and packages to keep up with good practices

Question What techniques and packages are there to keep up with good practices? What I already know I already know of the following packages for this kind of purpose: ...
5
votes
1answer
71 views

Best practice for typesetting Knuth's up-Arrow notation

What's the best practice to typeset Knuth's up-Arrow notation? \uparrow and \upuparrow are relation symbols (according to unimath-symbols.pdf). But in Knuth's up arrow notation, these should be a ...
8
votes
1answer
74 views

Best Practice for creating user-defined command names

I want to let the users of a package define the name of command into which some unique content will be stuffed, so that they can then recall that content using the command name that they prefer. Is ...
3
votes
1answer
85 views

\twosides in KOMA - Why is my titlepage not centered

I'm using scrbook with the twosidesoption, and BCOR=10mm. The title page, being an odd page, has a large margin on the right, and a small margin on the left. I'm currently using the following to make ...
4
votes
1answer
43 views

Using \@-ified punctuation while using \frenchspacing

After reading this very informative TeX.SE thread about spacing and punctuation, I was left wondering about an issue that didn't seem to be addressed: using \frenchspacing together with the modified ...
2
votes
1answer
58 views

Which one is recommended to split, continue and align a long equation?

In my investigation, the outputs are identical as follows. Version 1: Using aligned. \begin{align*} \framebox[6cm]{Top LHS}\\ \framebox[5cm]{Middle LHS}\\ \framebox[4cm]{Bottom LHS} &= \! ...
11
votes
3answers
63 views

What to consider when naming labels to prevent errors?

This question is inspired by Umlauts in label and a quote from an answer to How to automatically add \! in subscripts? However the best is to avoid _ in labels. I already name all my labels with ...
0
votes
2answers
55 views

If \section is followed by a \subsection, should there be nothing in between? [closed]

If \section is followed by a \subsection, should there be nothing in between? 2.1 The art of the bla some text 2.1.1 The details of bla blaaaa 2.1.2 Further details of bla blaaaaaaaaaa Is ...
0
votes
0answers
44 views

How to define a custom formatting “style”? [closed]

Within the tablenotes of threeparttable I'd like to manually include a source like so: Source: Rumors of Oz, 2013 (unpublished / forthcoming). so that "Source" is either in \textit{Source} or ...
14
votes
4answers
572 views

Good typesetting practice for long equations

I have the following (quite horrible) equation in my thesis: \begin{align*} \frac{\partial^2}{\partial t_1^2} f(t_0,t_1) = ( \delta+2t_0+2t_1)^{\alpha( w-t_0+t_1 )-1} \cdot \bigl( ...
9
votes
1answer
380 views

How should one maintain and update a MiKTeX installation?

Every once in a while after updating MiKTeX, the installation gets into an inconsistent state. This might be a problem with the packages (an example is described in this question), but sometimes ...
24
votes
6answers
4k views

Footnotes in tables?

I would like to have footnotes in tables, but the \footnote command does not work inside a table environment. Googling one finds that this is a frequently asked question, at least in the UK. That ...
38
votes
5answers
922 views

Why use a package to typeset units?

I've seen a lot of posts about different packages for typesetting units and their relative strengths and weaknesses. Most posts seem to agree that the siunitx package is the most up to date package, ...
17
votes
1answer
225 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?
30
votes
2answers
1k views

Why should the minimal class be avoided?

In a comment to my answer to Drawing a rectangle along the border of a circle, Peter Grill said that he read that the minimal class should not be used for a Minimal Working Example. I wonder why, and ...
21
votes
2answers
743 views

The TeXbook: Spiral or hard-cover binding?

I would like to purchase Donald Knuth's TeXbook, and I have noticed that there are two versions available. One is a spiral-bound edition, usually sold by itself. The other is a hard-cover edition, ...
12
votes
2answers
313 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é ...
9
votes
3answers
228 views

Are there any downsides to using macros to avoid typing accents?

As a native English speaker, I am not used to many words with accents on them, so I find it somewhat difficult to keep the various accents straight in my head, and moreso to also remember the TeX ...
8
votes
2answers
124 views

How to make this pgfkeys code more compact and streamlined?

I have just managed to create my first command with pgfkeys. I defined a command \myset, whose purpose is to make (for example) \myset[big]{abc} correspond to \bigl\{abc\bigr\} Part of my goal ...
19
votes
2answers
319 views

Is it okay for a command to slurp more arguments than it is passed to?

Is it okay for a control sequence \foo to include another control sequence \slurp which slurps more arguments than \foo actually passes to it? For example, is it okay to do this: ...
35
votes
6answers
1k views

Efficient ways to anonymize a document

Many academic journals practice double-blind peer review which means that the author is required to blind their document by removing any references that can reveal the author's identity. How can I ...
3
votes
1answer
60 views

How to use commands in table specs, and still support array package?

For a package, I want to write code that creates tables, where the exact type of table is configurable (tabular, longtable, tabularx, ... [Update: David rightly remarked that formats like tabularx ...
8
votes
4answers
370 views

git LaTeX and branches workflow

I'm getting more and more comfortable with git, and I'm learning how to use it with my LaTeX documents. However, I'm not at all a git wizard and thus I'm looking for further advices. One can find many ...
3
votes
0answers
57 views

Best Practices For Including A Version Controlled File Across All Projects? [duplicate]

I am getting started with WinEdt 7.1 and TEX in general on a windows platform. I have a file where I've defined custom commands. Its current contents are: \newcommand{\avgE}{\bar{E}} ...
30
votes
7answers
856 views

Should I place \title, \author, \date in the preamble or after \begin{document}?

The motivation for this question Forgive me if this looks very basic to you but nobody has pointed out to me yet until now in a comment to a question that the \title command (and thus the other two ...
15
votes
2answers
327 views

Best practice for hyperref link colours?

I'm using the hyperref package with the option colorlinks=true. However, I'm not happy with the default link colours: for instance, citation links appear in a flamboyantly bright green that hurts my ...
40
votes
5answers
4k views

Good practice on spacing

In various places, in passing, I've seen mention of various good practices regarding well-behaved spacing in LaTeX. For example, Dr. Who should really be written Dr.\ Who or Dr.~Who to get the right ...
18
votes
2answers
537 views

What are good working practices for VCS with LaTeX documents?

I am interested in using a VCS to track changes as I write short LaTeX documents in my daily research. Essentially, I use LaTeX as a whiteboard for developing ideas, and then I have documents to ...
37
votes
3answers
2k views

Are there any coding style guidelines for LaTeX?

I have been using LaTeX for a long time now, but still all my document files look a bit messy. Now I want to get rid of this bad habit and get some order into my code. That is why I am wondering ...
17
votes
2answers
198 views

Does a single \path for drawing a series of geometrical objects make the compilation more efficent?

The TikZ syntax is so liberal (as mentioned in the documentation) that makes me a bit confused with which I have to adopt. Best practice is really my main consideration in coding anything. I have no ...

1 2 3 4 5 6