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

How to change typographic style when unicode characters are used instead of macros

When writing a manuscript or converting from other systems, I can come with Unicode characters for some punctuation marks: u'2026' for … (ellipsis) u'2014' for — (em-dash) u'00AB' for \guillemotleft ...
2
votes
2answers
47 views

Latex how to call subsubsections in text

I am writing a large text using Latex, where I use chapters, sections, subsections, subsubsections and paragraphs. My problem is that I would like to write, in my text, something like "this is ...
1
vote
0answers
9 views

Change cleverefs conjunction for one reference

What is the best practice to use a different conjunction for a single reference with cleveref? Background: I would like to produce something like "Theorem~1, Lemma~2 and [external reference]". If I ...
6
votes
1answer
127 views

“$a, b$” vs. “$a$, $b$”

I have two questions. Would you use Let $x, y$ and $z$ be real numbers. or Let $x$, $y$ and $z$ be real numbers. ? Which one is better? Would you use For $x, y\in\mathbb R$ we have ... or For $x$, ...
7
votes
2answers
78 views

Fixing overfull \hbox with mdframed containing an equation

When creating a boxed environment with mdframed, I ran into an issue with a line with an equation, that also happens to be the first line of a definition. Is there a way to fix the problem ...
4
votes
0answers
56 views

How do I share a beamer theme?

While working on my thesis, I customized a beamer theme with the corporate design of my university. Now I would like to share it with other students so they don't need to bother with recreating a nice ...
7
votes
3answers
210 views

Best practices in labeling (giving labels to equations, theorems, items, etc..)

Are there some Latex style guides with part dedicating to labeling? I want to use some persistent labeling scheme, but don't know any (except for uncertain one in my mind). What labeling scheme ...
6
votes
4answers
842 views

How to make a Born square?

The Born square is supposed to look like this: My attempt looks close enough, but the code is a bit unreadable because of the liberal \multicolumn usage. \documentclass{article} ...
8
votes
1answer
408 views

How to wrap pictures in lists in theorems with formulas?

I want text to flow pictures. @Bernard adviced me this way of doing it with formulas and theorems. Thanks him, it works great in many cases better than any other variants I have ever seen. I have ...
4
votes
1answer
100 views

Robust commands

What is the primary reason to \protect new definitions or macros, or use \DeclareRobustCommand rather than just \def? (Assuming one does not redefine things by accident.) If it is primarily to do with ...
35
votes
2answers
2k views

Finishing math with a period

I am new to this site and couldn't find this question after a quick search but it may have been asked before. This is possibly the most inconsequential issue one can have, but it has been bothering ...
5
votes
2answers
175 views

Using \big| and \right| versus \bigr\rvert and \right\rvert

Based on the answers to this question (about \bigl, \bigr, \big, etc.) and this question (about \lvert, \rvert, |, etc.), I would think that anytime one used a vert bar to delimit on the right they ...
1
vote
1answer
123 views

Table formatting - Best practice to get professional and consistent looking short and long tables

General Understanding Basically, what I'm trying to do is streamline the entire process of creating tables for one or possibly a number of scientif papers. The ultimate objective would be to find ...
15
votes
4answers
422 views

“Evaluated at” bar for derivatives: \Bigr, \biggr, or \left…\right?

I'm trying to determine if there is a best practice for typesetting the "evaluated at" bar for derivatives. The three possibilities I'm thinking of are shown in the code excerpt below: ...
1
vote
0answers
41 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 ...
5
votes
1answer
75 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
53 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
385 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 ...
29
votes
3answers
890 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
98 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
521 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
139 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
105 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
313 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
64 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
77 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
549 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
57 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
77 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
147 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
450 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
52 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
528 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
51 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. ...
15
votes
3answers
759 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
82 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
139 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
468 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
208 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
327 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
153 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
389 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
140 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
43 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
44 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 ...
6
votes
3answers
297 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
99 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
51 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
30 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
49 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 ...