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

Open two tex files [closed]

I used to open two separate tex files, it's very useful, e.g. to cut and paste, compare, etc... When upgrading to El Capitan (I use a MAC) I cannot do that any more. When I try to open a second tex ...
3
votes
1answer
50 views

Visualize which \if this \fi associates to

For example, I use macros \ifbook and \ifslide. Because both can be closed by /fi, it's easy to lose track which /if* this particular /fi points to. They can be nested too, which makes things harder. ...
2
votes
1answer
43 views

Solitary ü problem

I am writing an article in english using the LaTeX package by Acta Acustica for proper formatting corresponding to journal demands. In all the text there is only one umlaut ("Brüel & Kjaer ...
5
votes
2answers
269 views

Best Practice: Package for Mathematical Documents - amsmath and Beyond

I am aware that best practice questions are not always appreciated since there there's not "one size that fits all". I am going to give a LaTeX introduction for phd students at my company. All ...
28
votes
3answers
769 views

When to use TeX vs LaTeX for package writing

So I got into the whole idea of learning plain TeX (or what I think is plain TeX) and it's been very fun and rewarding. I also started writing some macros/packages for my personal use for now. Since ...
8
votes
2answers
84 views

How can I explain the concept of “separation of contents and presentation” to a “computer-illiterate” LaTeX user?

My friend is a grad student in mathematics and describes himself as being "computer-illiterate." He uses LaTeX to write papers but he writes (for example) a set is called $\mathit{regular}$ if [...] ...
15
votes
1answer
495 views

productivity tools

I am using latex to write a mathematically dense document which has several hundred differential forms and products. There must be better ways than just typing out the whole equations line by line. ...
3
votes
1answer
126 views

Math command that works in text and math mode

The command \newcommand{\rsim}{\text{$\overset{r}{\sim}$ }} works in text and math mode. That said, the workaround looks somewhat ugly, as text mode and math mode are summoned for a single ...
2
votes
1answer
94 views

Automatic style guide for LaTeX?

Is there some kind of automatic test to check for best practice according to some sort of style guide in LaTeX, or will there be any in near future? For python we have pep8, pyflakes, pyflint, and ...
3
votes
2answers
292 views

Is using \\[.5 \baselineskip] bad practice?

I've developed the habit of using \\[.5\baselineskip] to indicate that a part of a bigger argument ended in that line. I found this quite helpful to structure bigger arguments. By now, I start ...
3
votes
1answer
58 views

Which informations belong on every page [closed]

I finished my first thesis last summer and I was wondering: "What can I do better next time?". Since I'm a fan of simple styles, I thought about maybe removing content from the header (I placed the ...
1
vote
0answers
66 views

How to fill the calendar from an excel file

I am creating a calendar with marked dates of influential personalities births and deaths with one sentence of description like "the death of mr. XY in YEAR". The "input" is an Excel file containing ...
24
votes
3answers
527 views

Best Practice: Match different Journal specifications

In most cases one does not write papers for one journal exclusively. Changing your code to match all specifications takes a lot of afford and time. There is a wide variety of question referring to ...
2
votes
1answer
32 views

\bibentry producing dashes for authors with custom bst

I made a custom .bst file using makebst and chose the option for producing a long dash for repeated author names in the bibliography (option nmdash,nmd-3). (I'm using bibtex with natbib and ...
9
votes
1answer
70 views

\@ifnextchar breaks kerning when expanded

I've defined a macro for an initialism (abbreviation) with periods, making sure that an end-of-sentence period is not printed twice: \gp prints "G.P." and \gp. prints "G.P." Here's an M.W.E.: ...
9
votes
1answer
136 views

Which one should be used: `newcommand` or `sbox`

Suppose I want to use an element numerous times, which is the best way to go at it (I chose a tikz-drawn arrow, because that is what made me think of the question, but I suppose it could be anything, ...
15
votes
1answer
444 views

Use of spaces for readability

Is there a reason to use the style like: \def\xx{foo} \let\yy = \xx instead of: \def \xx{foo} \let \yy = \xx I'm new to TeX, but everyone seems to prefer the former, while I think the latter ...
2
votes
1answer
50 views

How can I minimise errors arising from TikZ pictures involving too large dimensions?

What general strategies are available for minimising the occurrence of errors concerning too large dimensions in PGF/TikZ? The following is an example but I'm less interested in a fix for this ...
1
vote
0answers
294 views

LaTeX vs InDesign [closed]

I've been using LaTeX for a while (even tough I'm far from being a pro), and I would like to ask expert users whether they prefer LaTeX or InDesign. Obviously, one is open source and the other not. ...
1
vote
1answer
41 views

xparse command definition vs \newcommand [duplicate]

Maybe my question is too broad, but I'd really like to know: what is best to use (and why) between xparse command definition (e.g. \NewDocumentCommand) and LaTeX "standard" definitions (e.g. ...
14
votes
3answers
646 views

align vs. equation: Which way is typograpically preferred?

The main differences between align and equation are the spaces and that align cannot be used with split, as far as I know. What would be, from a typographic point of view, the preferred practice? ...
2
votes
1answer
79 views

Proper way to linebreak

When not doing tables, it's \\ or to leave a blank line. I heard a few times that \\ should be avoided whenever possible. Thus, any doc with a bunch of different-line formulas would have lots of empty ...
1
vote
1answer
117 views

How to typeset a proof via structural induction

Structural induction differs from "mathmatical" induction in the number of cases: While mathmatical induction requires exactly two cases, structural induction may require many more. A proof via ...
3
votes
4answers
419 views

Beginning Thesis [closed]

I am a graduate student in statistics and am about to begin writing my thesis, having finished my analyses and theoretical work. I have used LyX in the past and am well versed in knitr and have some ...
5
votes
1answer
168 views

Empty/blank lines in LaTeX code

I hope this question is in order here although it rather asks for a "best practice" than for some "solution". I am wondering to what extent blank/empty lines in the code (I am using pdflatex) should ...
6
votes
4answers
312 views

Soft question - popularizing LaTeX for a class (of musicians)

I am afraid that this is close to be "off topic" of the site. If so, I will gladly close it. I need to popularize LaTeX for a class. There will be a special (non-optional) class about LaTeX basics to ...
3
votes
2answers
99 views

How to format long and large tables in a thesis?

In my master's thesis I have a lot of tables, large and long; what's the best practice to fit them ? It would be fine split the longer table in multiple pages? what about the larger ones? any ...
7
votes
2answers
363 views

Is it better to write the subscript or the superscript first (e.g. x_a^i vs x^i_a)?

Is it better to write subscripts or superscripts first (e.g. $x_a^i$ vs $x^i_a$)?
9
votes
2answers
135 views

Enforcing or encouraging use of the most up-to-date version of a class

Background I maintain a thesis class for my university. The class changes more frequently that I would like based on the whims of the university thesis office who clearly have little else to occupy ...
2
votes
0answers
37 views

Adding default \skew to math accents

Out of corporate design reasons I should use Helvetica for my documents. I could simply ignore this, as most people do ;-) But out of fun I just combined ideas taken from sfmath and beamer to make ...
2
votes
0answers
42 views

Where should protected white spaces be used for numbers?

Protected whitespaces are used to prevent linebreaks in certain positions. For example: I have watched a movie which consisted of exactly 1.2 million images. is much worse to read than I have ...
3
votes
2answers
202 views

What are reasons to use BibTeX instead of Biblatex?

Given the rich set of features that Biblatex offers over BibTeX et al., one has to wonder why the latter is being used at all. Legacy code aside (which seems to be easy enough to adapt, anyway) the ...
7
votes
2answers
93 views

What should an BibTeX entry for a Stack Exchange post look like?

On (some?) science SE sites, we can get BibTeX code for citing posts. This is what this can look like: @MISC{30073, TITLE = {Cutting equal sticks from different sticks}, AUTHOR = {Erel ...
2
votes
1answer
44 views

Effective way to anonymise interviewee identities for academic research

I'm looking for an efficient way to anonymise interviewee identities using a pseudonym list. Academic and teaching case studies often use direct quotation from interviews and observational data. In ...
1
vote
0answers
26 views

How to get help on texlive installed from distro repository?

I am quite a newbie in TeX community. Previously, I had a TexLive installation from a DVD, and It did work pretty good. Now, I am on another machine with disk space constraint. So I chose to stay with ...
1
vote
1answer
45 views

Automatic numbering in multiple documents

When typesetting something like exercise sheets, I have a seperate document for every sheet (because of performance reasons while compiling; sometimes also because I compile some sheets not with ...
3
votes
1answer
83 views

What to use for itemize/enumerate/description type question

I have a lemma in which I want to say something like this: Let f be a function which satisfies either (A) f=0 and f is continuous, or (B) f=1 and f is well-defined. Then f is good. ...
6
votes
1answer
82 views

Renaming \d for differentials

I know this question might sound dangerously like asking for an opinion, but I nevertheless give it a try. Since I never used the "underdot accent" \d I renamed it to get a differential in math mode ...
1
vote
0answers
28 views

Is there any difference between math mode and text mode for numbers? [duplicate]

Take the sentence: "The answer is 42". Is there any difference between The answer is $42$. and The answer is 42. In the final PDF I cannot see any difference. Does it make a difference whether I ...
2
votes
0answers
34 views

(Is it wrong to) Use commands to begin and end equations (?) [duplicate]

I'm helping a professor write the second edition of his book, so I'm working with a lot of "old" code and bad practices. Something I've found is that he has defined macros for beginning and ending ...
10
votes
1answer
289 views

Rule of thumb for synchronizing/updating Tex distributions

Some companies will not update their tex distribution regularly. What is a practical length of time to allow to pass before failing to resynchronize Tex Live or Miktex could reasonably become a ...
11
votes
2answers
366 views

Which is better practice: rendering figures on the fly, or importing them as images?

I've come to a philosophical quandary with respect to my use of LaTeX for scientific writeups. At first I tried to render all figures in LaTeX at compile-time, for example making a graph using ...
0
votes
1answer
105 views

Properly writing an enumerated list in different lines within a sentence

My question is similar to this one but my items are bigger so I would like to write my items each in a different line. I am currently doing as follows The way to propose a solution that ...
3
votes
0answers
148 views

Pgfplots Boxplots with a thick line at the mean value

pgfplot produces nice looking plots, that have consistent look and feel. But sometimes you have a good reason to change that look, and I found it tricky to change style of an specific line, circle, ...
5
votes
1answer
170 views

Math symbol in section heading

I have a section heading which includes an epsilon. Furthermore I am using the "hyperref" package to create links in my PDF document. When compiling I get a strange warning that a math symbol is not ...
7
votes
2answers
207 views

Temporarily changing catcode of %

Scenario I have a bunch of TeX files which may be processed by an external filter. The filter is (unfortunately) immutable: it does a string replacement where, for example, %d is expanded to a ...
3
votes
1answer
107 views

Hanging indentation of source code within sentence a la Vim-LaTeX-Box

I've recently been playing with the LaTex-Box plugin for Vim and noticed the layout of the source code on their Github page: What interests me is the 2-space hanging indent within each sentence. ...
4
votes
1answer
141 views

Math symbols in text mode

I need to write a text which contains some math symbols. In detail those include \rightarrow, \forall and \exists. I know I can switch into math mode with the $ symbol, but I have quite a lot of text ...
1
vote
1answer
128 views

“Good” command names for typesetting matrices and vectors

I usually add \newcommand{\M}[1]{\bm{#1}} % Matrix \newcommand{\V}[1]{\boldsymbol{\mathbf{#1}}} % Vector to my preambles. Short command names because I use them very often. Is ...
2
votes
3answers
94 views

How to fit a table with long header cells in “S”-type columns?

Well fit tables in LaTeX is hard for me, and I don't know if there is a manual with good practices about it. I need to create a table with S columns contending numbers, but the header of those columns ...