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
0answers
60 views

What are the recommended tools (other than LaTex) for academicians and professionals? [closed]

I am not sure if this sort of question is allowed or not, but I thought it was better to try than not. The reason I am asking this here is because I want the answer from the sort of person who uses ...
8
votes
4answers
272 views

What is the easiest way to generate a compact bibliography?

In a beamer presentation I want to use the \nocite{*} macro, so all entries in the bib file will be included, regardless whether I actually cited an entry or not. However, this yields a rather long ...
4
votes
1answer
54 views

Improve legibility in a siunitx table

I am a rather basic user of LaTeX, so please be kind. ;) I am using the siunitx package to align numbers on tables, and this is a rather similar question to this one: Centering table column titles ...
2
votes
1answer
62 views

How to separate definitions from the following text?

Using the definition theorem style from amsthm does not enable the reader to separate between text that belongs to the definition and the text following it. Example: \documentclass{scrbook} ...
4
votes
2answers
111 views

Manipulate a LaTeX2e counter with LaTeX3

I have some expl3 code where I want to manipulate a counter which is defined by a package using LaTeX2e code. If I want to manipulate the counter foo, I could either mixing up LaTeX2e code with ...
4
votes
1answer
56 views

Commenting out all blank lines not TeXnically necessary?

This is a follow-up to this question on commenting out empty lines vs. \noindent. Given that I have now begun commenting out lines surrounding environments like this: \documentclass{article} ...
17
votes
2answers
326 views

Difference between commenting out empty lines and \noindent?

My question is similar to this one but I understand the behavior described there and am interested in best practices in cases like the following. Typically, when ending an environment like quote in ...
4
votes
1answer
29 views

Custom Compilation Messages

Is there a way to create custom compilation messages? For example \msg{Compiling Chapter 1} \input{chapter1.tex} \msg{Finished chapter compilation}
0
votes
0answers
39 views

Practically, where to put \index?

I use vim-latex. For the sake of SyncTeX, I usually format my paragraphs into separate lines, using a customized gqip. I used to put \index after the term to be indexed, as suggested here. For ...
4
votes
0answers
34 views

Is there a good reason to define helper macros second? [duplicate]

As a mathematician, my training is to define my terms before I use them. As a computer programmer, I recognize that there are sometimes good reasons to call a method/function/procedure before its full ...
11
votes
2answers
247 views

How to typeset a file path?

I would like to properly typeset a file path, e.g. C:\Program Files\Some program\bin\executable.exe The first problem I encountered was that LaTeX tries to treat \Program as a command. I tried ...
2
votes
1answer
56 views

Best practive for managing the same bibliography files across several machines?

If you are/have using/used the same bibliography files across several machines (say a laptop and a desktop machine) of yours... How did you solve the problem of consistency? With a version control ...
4
votes
1answer
111 views

Is there a preferred capitalization style for reference types in BibTeX/biblatex?

When looking at examples of reference lists, I've seen three capitalization styles used for reference types in .bib files: @misc @Misc @MISC I notice the all-lowercase style appears to be the most ...
4
votes
0answers
111 views

Fonts: Is there any scientific proof about the choice? [closed]

It is common knowledge that the more you work with TeX, the more likely you are to make changes in the basic format so as to fit it in your needs. Of course, one of the most important things that ...
8
votes
3answers
216 views

Inline math or \textit for author defined math constants?

Wondering if people here have a thought on what the best practice is here (if it matters). I used to use baskerville (well, the baskervald package) as my main font and charter as my math font (since ...
5
votes
3answers
116 views

When to break lines? [duplicate]

I am very new to LaTeX. A newline in the input file does not mean anything to LaTeX. An empty line in the input file means a new paragraph. Trouble is, when I view my sources with different text ...
36
votes
4answers
2k views

How does your mind bend \expandafter to its will?

Expansion is often cited as one of the most arcane aspects of TeX, more akin to witchcraft than to something easily picked up by the newcomer. There are many great questions and great answers about ...
5
votes
2answers
143 views

What packages are useful for (secondary school) teachers?

I'm trying to bring LaTeX to some of my colleague-teachers (in secondary schools, pupils 12->18 years old). They all seem quite reluctant to change. So I'm trying to collect some quick-win ...
4
votes
1answer
102 views

Difference between renewing commands before and after \begin{document}

I was wondering what could be reasons for differences when I redefine control sequences in the preamble or after \begin{document}? For example, this code typesets abcd when compiled by any of ...
3
votes
2answers
123 views

Simplify how I write my address in documents

Often when writing letters and articles, I need to print my address at the beginning or end of the document. I do this in the following ugly way: \documentclass{article} \begin{document} \noindent My ...
6
votes
4answers
446 views

How is the spirit of LaTeX different from writing in MS-Word? [closed]

I am learning the use of LaTeX by porting an 12-page LibreOffice Writer file to a set of pdflatex input files. The ability to separate the source in different files and later generate a single output ...
20
votes
1answer
172 views

What date should I specify in the optional argument of \NeedsTeXFormat?

Subsection 4.1 of LaTeX2e for class and package writers contains the following passage: \NeedsTeXFormat {⟨format-name⟩} [⟨release-date⟩] This command tells TeX that this file should be ...
3
votes
1answer
90 views

Way to remember LaTeX commands

I'm new to LaTeX but have already read so much about it. Now, as I write my first long document, I notice that my head can't process all of this new information ;) For example creating a float - and I ...
3
votes
1answer
56 views

Legend on every page

This is both a style question as well as a latex question: What is the preferred method of providing a legend for about 30 figures having a similar or the same legend in a thesis? Is it desirable ...
3
votes
0answers
33 views

Multiple \usepackage vs comma separated package names [duplicate]

What, if anything, is the difference between \usepackage{foo,bar} and \usepackage{foo} \usepackage{bar}
0
votes
1answer
85 views

Why is scaling text evil?

The TikZ & PGF manual says that It is possible to transform nodes, but, by default, transformations do not apply to nodes. The reason is that you usually do not want your text to be scaled ...
52
votes
4answers
3k views

Defining custom commands is bad style?

I recently received this in a e-mail from my professor Good LaTeX style would preclude creating any of your own commands, counters, etc. (Most journals would reject submissions with user-defined ...
3
votes
0answers
129 views

Typesetting programming packages/libraries in LaTeX

When referring to programming packages/libraries (such as matplotlib for example) within a LaTeX document should one typeset it to denote it as a package/library name? Such as using \texttt{}?
11
votes
1answer
151 views

Code improvement on a title page design

I am designing a new title page to post in the topic Showcase of beautiful title page done in TeX but am having some issues with the code I wrote. I don't like and I know it can be improved. In ...
22
votes
2answers
399 views

Multi-line options with the `\usepackage` command

When including a package using the \usepackage command that has a lot of options, are there: Any restrictions on how the options can be split across multiple lines? Any best practices for formatting ...
8
votes
1answer
50 views

Potential side-effects associated with a dash in a package/class name?

Common practice for naming packages and classes seems to be, using regex-like notation: [a-z][a-z0-9]* In other words, the name usually starts by a lowercase letter, followed by any sequence of ...
8
votes
1answer
72 views

Fixed position for pgfplot area

I use pgfplots to generate graphics for a beamer presentation. The graphics are placed on consecutive slides. This works great, but the graphic position is slightly moving from slide to slide, which ...
5
votes
1answer
93 views

Library of reusable equations

I want to do something that sounds simple. I want to create an external file where I will store my equations. Then I would like to be able to these equations and input them in a document without ...
4
votes
1answer
62 views

Font formatting order

I want to set my chapterprefix font for scrbook class. This is what I want to do: \setkomafont{chapterprefix}{\centering\Huge\rmfamily\mdseries\scshape} However, as I was writting it, I asked ...
5
votes
1answer
108 views

“Flatten” macros prior to sharing LaTeX file

Is there a way/an existing tool to process a LaTeX source document such that for a given list of macro definitions (using \newcommand), calls to those macros are replaced by their expanded version? ...
5
votes
0answers
186 views

best practice to include (standalone precompiled) graphics

I know that several people have asked about how to include plots and graphics (created by tikz and pstricks) into a latex document. What is the best way to include Matlab graphics? Including ...
44
votes
4answers
1k views

What is the advantage of using the notation 'fig:' in the \label {}?

Reading manuals I always find figure labeled as \label{fig:name}. I wonder where is the advantage of using this notation with fig:instead to start with the name it self. If in my document I have only ...
1
vote
1answer
157 views

Best practices in organizing BibDesk files

How many BibDesk files? I am using LaTeX (and BibDesk) for research only (i.e., to write papers, book chapters, dissertation, etc.), therefore I need to cite an overlapping selection of references ...
13
votes
3answers
485 views

Always \textrm, never \rm? A counterexample?

Let us see the following code: \documentclass{article} \begin{document} \newtheorem{theorem}{Theorem} \begin{theorem} TFAE \begin{itemize} \item[(i)] $0<1$; \item[(ii)] $1>0$. \end{itemize} ...
14
votes
1answer
109 views

Should babel package call be placed at the end of the preamble?

I remember to have read few year ago1 that babel line2 should be placed at the end of the preamble in order to avoid problems with other packages. (I believe hyperref package should also be placed at ...
2
votes
0answers
59 views

How to backup custom fonts and packages

I'm about to format my computer but I have installed a lot of TeX fonts and some useful TeX packages. I'd like to backup them, especially the fonts, because it took me a long long time to install but ...
13
votes
4answers
307 views

How do I tell which version of a command to use?

So LaTeX has a lot of commands that do very similar things. Often this is a result of some of these being old. For example: $x^2$ vs \(^2\); As I understand it, the second example is the more modern ...
10
votes
3answers
290 views

Empty line (in code) before enumerate environment

I like my code to look like this: \documentclass{article} \begin{document} \begin{enumerate} \item test text \begin{enumerate} \item 1 \item 2 \item 3 \item 4 \item 5 ...
3
votes
1answer
55 views

The actual source of pst-plot?

In the comment to answer to his question Labels with \psplot Svend Tveskæg writes: The newest version of pst-plot can be found at http://texnik.dante.de/tex/generic/pst-plot/pst-plot.tex. Is it the ...
4
votes
1answer
179 views

Doubts for customize classicthesis

I downloaded the classicthesis from its site and I was analysing the contents of the class, the manual, examples and all that. But I have few doubts yet about how to customize well the classic thesis ...
3
votes
0answers
96 views

Long vs. short labels for cross-references

@DavidCarlisle argued in his answer that there is no need to use very long labels and it is actually a misuse! In my dissertation I find myself using very long labels all over the place. For the same ...
6
votes
1answer
107 views

Why to use [T2A, T1] when [T2A] is enough?

I am writing some seminar in Cyrillic for university \documentclass[a4paper,14pt]{extarticle} \usepackage[T2A,T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{droid} ...
6
votes
0answers
58 views

How to mimic LINQ's query method for macro's key-value?

Inspired by LINQ's query method, such as deck.Take(randomCount) .Where (card => card.Suit == "Hearts") .Skip(2) .Take(5) .OrderBy (card => card.FaceValue); The deck which is ...
4
votes
1answer
57 views

Should I use \documentclass[12pt]{article} with \Large or \documentclass{article} with \LARGE?

So, I'm working on making some cards, and they need to have nice, large, clear text. So I've set the text to be \LARGE. Then I was thinking, am I doing bad things to the font by over-enlarging it? It ...
12
votes
1answer
372 views

Use of \midrule in booktabs table

Are there any formal guidelines/suggestions on the use of \midrule inside a booktabs table with just rows of identically formatted data? The booktabs manual is very specific about vertical rules, ...