A "best practice" is a technique or approach that TeXnicians recognize as giving better results than other approaches.
14
votes
1answer
3k views
How to properly code a TeX file, or at least avoid `badness 10000`
I'm coding a TeX file and although the .pdf is correctly rendered, I'm using "stone age" tools to code it. As some examples, I use \\ to leave a line space between two paragraphs, or \noindent in ...
12
votes
4answers
1k views
Working with templates
I have just read the wonderful article LaTeX templates and realized that I have tried to practice this approach but there is one technical aspect which I don't know how to tackle. I am talking about ...
6
votes
2answers
127 views
What documentation visually explains the various available commands to control the vertical distance between two lines of text?
I have a title page containing several lines of text, e.g.:
Series
Title
Author
Institution
I would like to fine-tune the distances between the lines, however, I do not understand which tools ...
16
votes
1answer
508 views
Vertical position of punctuation following fractions in display-style equations
Assuming that one wants punctuation in equations, what is the best way to adjusting the vertical position of the punctuation if it follows a fraction? I am using Palatino and Euler here (which I ...
5
votes
2answers
331 views
Order of appendices
I'm not sure whether it fits on TeX.SE or some other SE site, but anyways:
I wonder whether there's a good standard on the order of the common appendices when writing the thesis. I have in mind the ...
7
votes
3answers
485 views
What is the correct way to delineate directories in Lua?
I have been experimenting with some Lua code to list directories and provide them to the TeX engine.
I have been using the Lua File System (lfs) module.
The first part list the current directory ...
2
votes
1answer
167 views
Looking for macros to typeset syntax in more conventional way
I want to create a note about PSTricks and I need macros to typeset syntax in more conventional way that is adopted by most computer scientists. For example, I need a pair of > and < but they ...
10
votes
2answers
887 views
Best practices for spacing regarding fractions and roots?
My problem is that I am about to write a longer mathematical text, and it will be filled with integrals. Integrals tend to be filled with pesky fractions, square roots and what not.
Personally I feel ...
11
votes
2answers
380 views
\expandafter within a \begingroup … \endgroup [duplicate]
Possible Duplicate:
What does \begingroup\expandafter…\endgroup do?
In many of Heiko Oberdiek's packages one sees this type of construction:
...
19
votes
3answers
588 views
Modifying .sty files?
Yesterday I did some changes in the layout of my TeX document. I couldn't accomplish the changes until I opened the .sty files and modified some of their code. I am sure this is not the best idea. For ...
6
votes
2answers
629 views
Figures in Latex: TikZ vs. eps
I usually use TikZ to generate graphics in LaTeX, but a new coauthor suggested to use Inkscape and EPS files for our graphics. He thinks that we should avoid using additional packages. I never thought ...
0
votes
2answers
105 views
Indexing some notions twice?
I'm making an Index of defined notions for my thesis (it's partly algebraic so there are dozens of notions defined through the whole text) and I think on how to index notions like trace of a Mobius ...
10
votes
2answers
1k views
What is the preferred way of defining a TikZ constant?
I'm drawing a TikZ figure and am going to need a couple of constant that I could easily change between compilations, e.g. a main radius, a proportion, a number of lines, etc. What is the preferred way ...
28
votes
3answers
1k views
Teaching LaTeX and friends
Similar questions on how to teach LaTeX have been posted here already, but I would like to give them a slightly different touch:
Has anybody experience with teaching LaTeX in relation with other ...
8
votes
0answers
271 views
As a professional LaTeX community, how can we promote proper version control? [closed]
This is a tricky question and I'm not sure how to go about being a proponent of forward thinking/change in a system that is a little over 30 years old (to most middle aged/older scientists).
How can ...
7
votes
2answers
238 views
amsmath nobreakdash definition to allow normal hyphenation
In the amsmath package documentation it is written:
\newcommand{\n}[1]{$n$\nobreakdash-\hspace{0pt}}
The last example
shows how to prohibit a linebreak after the hyphen but allow normal
...
21
votes
3answers
532 views
Managing hundreds of separate components in a large document
I am making a workbook containing hundreds activities. Each activity appears as its own section and generally contains instructions, spaces to write or draw, and sometimes illustrations or diagrams to ...
10
votes
2answers
357 views
How frequently should one update packages?
When programming, I take some care regarding updating of external dependencies, to be sure that my code isn't affected. With LaTeX (I'm using MikTeX), it seems harder to know when I should update ...
8
votes
2answers
345 views
Best way to part answers from solutions?
Now, if anyone could change the title into something better that would be great =)
I am writing a rather long document, which contains plenty of integrals. I have a big list
of integrals sorted in a ...
6
votes
2answers
332 views
How to install system wide packages without requiring an ls-R database (with texlive)?
Question
How can I install packages for system-wide use, but without requiring the ls-R database to be updated?
Background
The texlive documentation indicates that user specific packages should be ...
8
votes
5answers
606 views
How do I get function argument parenthesis to position correctly?
I'm having trouble with the appearance of parentheses representing function arguments. They appear to far away from the function name.
For example the code
...
3
votes
1answer
95 views
Style when mixing arguments/methods from a computer program with text and math
I'm working on a document that is a cross of user's guide and a technical manual. I describe a system which has variables that I handle normally, then introduce an R package that I've written which ...
12
votes
2answers
608 views
LaTeX cookbook?
Has anyone written, or is anyone working on, a LaTeX cookbook? Specifically, a guide to writing intermediate/advanced LaTeX macros and solutions to other common tasks?
I found a handful of resources ...
4
votes
1answer
3k views
typesetting modulus operator, as in remainder
Is there a standard way to typeset the modulus operator (as in arithmetic remainder)? The percent sign (%) is often used by programming languages and mathematicians tend to use mod, but because of the ...
4
votes
1answer
145 views
Version number for a bundle
I need some advice. I am going to bundle a package of mine (lets say its named foo, currently v2.0a) with two not yet released packages (therefore both v0.1).
I am unsure which version number the ...
10
votes
1answer
386 views
Best practice: LaTeX constants for possibly changing repeatedly used symbol
Say I'm writing a long document and I want to use the letter $n$ to stand for dimension e.g. in $\mathbb R^n$ all over the paper. Late in the writing process I realize that I want $n$ to stand for ...
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 ...
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 ...
2
votes
2answers
942 views
Best practice for quoting a website
How should I quote a website? E.g. I'm using the android reference.
Here is my BibTeX entry:
@ELECTRONIC{Google2012,
author = {Google},
month = {01},
year = {2012},
title = {Android ...
50
votes
3answers
53k views
“Correct” way to bold/italicize text?
Is either of these considered better/more readable/more "proper"/more conventional than the other for making text bold? If so, what is the reason?
I like my text \textbf{bold}
versus:
I like my ...
1
vote
1answer
551 views
How do you organize bibtex citations?
I use JabRef sofar on multiple files, each for a specific topic and then include all the needed (mostly all of them) at the end of file with a single line:
\bibliography{bib/foo,bib/bar,..}
...
13
votes
3answers
3k views
When should \cdot be used to indicate multiplication?
Is this purely personal style, or are the generally accepted guidelines? Clearly, when dealing with numbers either $2 \cdot 2$ or $2 \times 2$ is needed, but within formulae where an absence of an ...
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 ...
77
votes
5answers
3k views
Best practice on organising your preamble
I am putting together a large document and my preamble is unwieldly and disorganised. What order does it make sense to load packages. Obviously, hyperref goes last, apart from things that have to go ...
19
votes
3answers
705 views
As a devoted LaTeX user, how do I most effectively use software which is *not* TeX-based?
I realize that this question is heretical here and may even be off topic but I cannot think of another place to ask.
I am an enthusiastic LaTeX user. I use it for even the briefest communications, ...
0
votes
2answers
433 views
Best practices for cross-references with hyperref
I want to reference some parts of my document. At the moment I read that there are several options. When clicking on a cross-reference one should get to the right part of the document.
The first ...
24
votes
3answers
3k views
Why not use vertical lines ('|') in a tabular?
My question is a follow-up to the answer to a follow-up question, to be found here. ;)
I'd like to know why one would advise against using vertical lines (via |) in a tabular (i.e. in ...
7
votes
4answers
306 views
Short version of \emph and non standard code
The question regarding short version of \emph yielded brand new options for me and I should add impressive ones. However, the method suggested there results with non-standard code on the one hand but ...
12
votes
1answer
189 views
One path or several paths for a tikzpicture?
Perhaps the title of my question is not fine (let me know).
I try to finish a document about the best practices when programming with TikZ. I remark in several answers that a lot of users like to use ...
5
votes
2answers
648 views
Displaying acronyms, abbreviations, and units
I use the acronym package for displaying acronyms, such as "KFC". As most of the acronyms are common knowledge, I use \acs{kfc}, which only presents the short form. Also, the siuntix package can be ...
7
votes
1answer
727 views
Folder structure of your work
Users,
I am using LaTeX for homework at university. By now, I had always other programs generating some files, that I used in my LaTeX-document. For example MATLAB generated some graphs, Inkscape ...
27
votes
4answers
975 views
References for learning how to check for typesetting problems
The following thread discusses a number of tasks one must accomplish to finish up a document: What are the finishing touches you put to a document?
Did the original author of TeX make such small ...
24
votes
4answers
1k views
When to use math mode?
In my document, the numbers inside math mode appear differently than those numbers out. Sometimes, I have numbers like "10 squared" within a paragraph, so it seems useful to use $10^2$. However, maybe ...
13
votes
5answers
531 views
Placing many conditionals in a series
I frequently need to do something like this:
IF x < 1, DO a
ELSE IF x < 2, DO b
ELSE IF x < 3, DO c
ELSE, DO d
Using etoolbox, I end up nesting a lot of ifnumless, like this:
...
19
votes
4answers
895 views
Anti-LaTeX…in LaTeX
LaTeX makes things more legible by following certain rules, and there is a strong emphasis among LaTeX users on obeying typographical conventions to make things more legible.
What happens when we ...
39
votes
4answers
5k views
When not to use \ensuremath for math macro?
I have gotten into the habit of using \ensuremath around math components in every macro that I define, so that I can use the same macro inside and outside of math mode. But egreg's comments in ...
7
votes
3answers
915 views
Good LaTeX preambles for math thesis
Can someone provide me an example of a nice preamble to write a math thesis?
I am currently using
\documentclass[12pt]{article}
\topmargin -15mm
\textheight 24truecm
\textwidth 16truecm
...
10
votes
2answers
200 views
Is babel a proper place to reset document layout?
The babel package, when called with some language options, changes global document layout. For exapmle,
\usepackage[french]{babel}
forces first paragraph after sectioning command to be intented, ...
18
votes
2answers
536 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 ...
8
votes
2answers
459 views
Which is the preferred command for equations in LaTeX?
While browsing some of the older questions I learned that I should not use $$. I also learned that I blamed LaTeX for obscure error messages that can be prevented by using \( and \). I started to ...
