Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [best-practices]

A "best practice" is a technique or approach that TeXnicians recognize as giving better results than other approaches.

0
votes
0answers
46 views

List of Best CTAN packages [duplicate]

Some of the packages of CTAN are really good but not discovered by many. I recently encountered one of the good ones, namely latexindent, and I thought that would be great if everyone introduces the ...
2
votes
0answers
46 views

Is it common practice to insert images at the top of a page? [closed]

This is not a question about how to insert images at the top, but rather asking whether or not this is common practice. The template I've received from my university automatically inserts figures at ...
5
votes
2answers
144 views

What would you include in a short “What is LaTeX and why should I use it?” presentation

I will give a short coffee lecture (15 minutes) on LaTeX at our institution. Something like: "What is LaTeX and why should I use it? Getting started and avoiding pitfalls." The presentation will ...
2
votes
1answer
46 views

tex4ht (or tex4ebook) is not compatible with ^\mathbb, _\mathfrak, etc

To export many mathematical articles and surveys to Kindle from the LaTeX source code, I am trying to use tex4ebook. It seems to me that I still need to hack many LaTeX codes to finish the compilation,...
1
vote
1answer
44 views

Inspiration of how to quote an e-mail correspondence

I am looking for a good way to typeset a e-mail correspondence (maybe including multiple levels of quotations). In an e-mail program this may look like this: this or this one I am not looking of ...
3
votes
3answers
101 views

Alignment of terms within align environment

The solutions below require up-to-date versions of LaTeX When I tried to run the solutions below on my own machine I was not able to reproduce their results, but still got unwanted offsets. ...
1
vote
2answers
81 views

How should I split/break up large LyX files?

I have a large LyX file that sometimes gets slow (the output PDF is over 1600 pages with figures, etc.). (Indeed, with LyX 2.3.x it is somehow unbearable and buggy for me, and so I have stuck with 2.2....
2
votes
1answer
56 views

What are the most commonly used colors for References and Cites?

Here's a little excerpt from the thesis I'm working on: The LaTeX template was provided by my university, and it defaulted to superscript brackets with blue numbers for cites and red for anything ...
2
votes
1answer
86 views

Software Architecture and xtemplate

When writing a package, there may be the situation that several things need to interact to make a complete product. When using xtemplate, I can define each part as an object. This means that the ...
4
votes
1answer
55 views

Making Environments Using xtemplate

The examples for xtemplate show how to make document commands, but I haven’t seen anything involving environments. If I were to define an environment using xtemplate, what would the best approach be? ...
2
votes
2answers
117 views

When writing a paper, is it more advisable to write $1/(2n)$ or $\frac{1}{2n}$ in line with text?

I have lots of doubts (questions) on how to best present my findings. I'm not sure if most writers use the horizontal $1/(2n)$ to keep the line narrow, or the vertical $\frac{1}{2n}$, which widens ...
4
votes
1answer
84 views

If a package is loaded automatically, should I still load it manually if I explicitly need its features?

Many packages are loaded as prerequisites by other packages that internally use some of this package’s features. If I need to use a specific package, and this packages is already loaded by another ...
3
votes
2answers
119 views

$x_1, \dotsc, x_n$ vs. $x_1$, $\dots$, $x_n$

For example, if I want to say something like Let x_1, ..., x_n be real numbers. should I use Let $x_1, \dotsc, x_n$ be real numbers. or Let $x_1$, $\dots$, $x_n$ be real numbers. Note that if ...
0
votes
0answers
41 views

Having a clean and organized Header (Using Texshop)

Good morning, I'd like to ask the following question about having a good and organized page in latex. I'm not very good because i just starte but I already wrote about 496 lines. Maybe i'm not ...
2
votes
0answers
104 views

Best Practices Compilation in Math Mode [closed]

I consider myself a relatively experienced latex user. I am looking for best practices for math mode in LaTeX. Looking around the exchange I couldn't find a post that captures this question broadly. ...
0
votes
0answers
42 views

best practice for consistent text snippets [duplicate]

In a book document I must assure that the same text (a few lines) appears at several places, despite editing. Using the text editor to include the same text snippet does not guarantee consistency in ...
7
votes
1answer
122 views

Package option vs setup command

Traditionally, LaTeX packages will use package options (I mean the options in \usepackage[...]{package}) for setup. However, I have noticed in some modern packages, e.g. siunitx, unicode-math, ctex, ...
3
votes
1answer
217 views

LaTeX convention how to indent source?

I am new at LaTeX and I am asking myself at the moment if there is a convention how to indent the source code. For example: \begin{itemize} \item erstes Stichwort \item zweites Stichwort \end{...
1
vote
0answers
43 views

scalebox or new font switch to create specific font size?

I want to set a small portion of text in a font size not covered by the standard font switches and found two ways to do so: Define a new font switch: \newcommand\newfs{\fontsize{48}{60}\selectfont}, ...
0
votes
1answer
54 views

Correct hyphen/style to use in bullet lists

I have several lists in my thesis document that look like this: \begin{itemize}[nosep] \item 0x0000 - free cluster \item 0xFFFF - last cluster of the file (still including file data) \...
2
votes
1answer
101 views

What is the difference between url and xurl?

Like I understood adds xurl better line breaking to url. Right, or is one of it obsolete? When not, what should I use in which case? Thank you for your help and effort in advance!
1
vote
1answer
102 views

What is the difference between inputenc and inputenx?

Like I understood covers inputenx more cases as inputenc. Right, or is one of it obsolete? When not, what should I use in which case? I use pdfTeX version 3.14159265-2.6-1.40.19 (and MiKTeX). Thank ...
0
votes
1answer
58 views

My solution to small brackets and missing delimiter (. inserted) error

Problem: \begin{equation} \begin{split} S_{2(n+1)}^{(1)}=\frac{2}{\Gamma(n+1)}\int_{0}^{G}dxx^{2n+1}[-1+\\ +n_{1}(\frac{\pi}{\alpha})^{3/2}\sideset{}{'}\sum_{l}e^{-k_{l}^{2}a^{2}/...
0
votes
0answers
59 views

When (and why) to use manual kerning for mathematical content?

I recently asked here, a question about the choice of OpenType Unicode fonts for my PhD thesis. After considering the comments and answers to the question, I decided to use Libertinus for both text ...
5
votes
1answer
134 views

Should there be paragraph break between a leading text and itemized list?

What is the right convention for rendering itemized-lists? Is it like this without any paragraph break between the previous line and the list? \documentclass{article} \begin{document} There are 10 ...
9
votes
3answers
111 views

Any way to bundle some variables in an OOP-like object in LaTeX?

I would very much like to have one object encapsulate a bunch of data, and then pass that object to a function. For example, a figure might have an URL to a file, a caption, and a width. In Python, ...
5
votes
4answers
188 views

Unwanted spaces in user defined structures and the uses of % [duplicate]

This question arise from my recent activity on user defined commands of various kind. In the answer to a recently posed question, @egreg pointed out to me the importance of not forgetting a % after ...
4
votes
1answer
116 views

Manage full and short versions of a paper

Say you have written an article of 25 pages. It is pretty common that you submit a short version (12 pages) of your article to a conference and have the full version uploaded somewhere or attached as ...
2
votes
2answers
131 views

Proofs of several parts of a theorem or of equivalent definitions

Often in mathematical texts there are theorems which either consist of several parts or state several equivalent conditions. When proving the theorem you make an own paragraph for each part of the ...
0
votes
0answers
80 views

How to update my own packages?

At the moment I am starting to organize my documents a little bit better. For this reason I want to externalize some of my code into packages. Some of these are rather stable but some have to be ...
4
votes
1answer
240 views

Best Practice: always use \fussy for Drafts and \sloppy for Finals?

I use \documentclass{scrbook} along with \usepackage{microtype} and \usepackage{hyphenat} [adding new words as necessary] for superior typesetting. During edits, I see overfull boxes in the Draft ...
11
votes
1answer
304 views

Biblatex's bibmacros, bibliography drivers, formats - patch or redefine?

xpatch offers a series of patching commands specific to support patching of biblatex's bibmacros, bibliography drivers and field/names/list formats (not citation commands though, as far as I grasped). ...
1
vote
0answers
108 views

Best LaTeX practices for writing “N objects”, and so on [closed]

Q1: If I want to write in a mathematical article, the following sentence: Consider N real numbers $x_i$... Q2: Is it better practice to write "$N$" or simply "N"? Similarly, if one is writing: Let $...
0
votes
0answers
74 views

Should the comma betwen multiple elements of the same set be in math mode? [duplicate]

I often need to write statements like $a, b \in A$. Is this preferable to $a$, $b \in A$? I think there are arguments for both. Supporting the second: this is supposed to be shorthand for $a \in A$ ...
1
vote
2answers
335 views

Why does scaling not apply to node and how to correctly scale a node in TikZ? [duplicate]

The following code and its output shows that although the line drawn is scaled, the rectangle node is not scaled. \documentclass{article} \usepackage{tikz} \begin{document} \section*{Without Scaling}...
10
votes
1answer
551 views

Why should we use arrows.meta instead of arrows?

From the TikZ-PGF Manual, Section 16.1: Remark: The libraries arrows and arrows.spaced are deprecated. Use arrows.meta instead/additionally, which allows you to do all that the old libraries ...
1
vote
1answer
58 views

Standard way to read parameters from header in pgfplots

Suppose I have experimental data that I want to read from a file with parameters in the header. What is the standard way to read the parameters and make them available as tex macros. Consider the ...
4
votes
1answer
173 views

LaTeX3 document class: coffins versus LaTeX2e style

Context: I'm currently setting a small journal. For that I wrote a expl3-based document class. It's expected that articles start at the same height of the page every time (that also means the same ...
0
votes
1answer
76 views

Best practice to do a table and a longtable in landscape mode over the full width of the page [duplicate]

I would like to know what is the best practice to do a table and a longtable in landscape mode over the full width of the page by resizing automatically my columns. Indeed: I would like to use a ...
4
votes
2answers
394 views

Long table with X column for usage with glossaries

Question: I am searching for a way to use X columns in combination with multipage tables in a custom written glossary style. Update According to Nicola Talbot's comment, I have created the following ...
5
votes
1answer
75 views

What is the most elegant way to reference a named proposition using cross-references with cleveref and amsthm?

I have a document in which I have a named proposition, which I wish to reference by its acronym. Since it is named, it ought not be numbered. Still, I'd like to reference it using a cross-reference, ...
2
votes
2answers
96 views

writing newcommands, user interface advice request

I'd like to develop some good habits in LaTeX coding. I understand I'm in the novice category and I'm interested to hear advice. We have a legacy document header that was created by some MS Word ...
4
votes
1answer
352 views

How to make a header/footer-template for all classes?

I would like to create many documents that all have the same (and also respectively specific) header and footer, no matter which class they are (all of them probably custom classes). Also, creating ...
57
votes
8answers
4k views

Why should you avoid using (complex) templates?

This question is intended to be something reference-like to point users of complex templates they do not fully understand to. After having read What is a template? it should be clear what a template ...
3
votes
1answer
125 views

best practice: native table or inserted figure

I have a relatively small table of data I would like to insert into my thesis. Is it better to natively create a table, or to externally create the figure and insert it?
6
votes
1answer
118 views

Programming convention in LaTeX: top-to-bottom or bottom-to-top?

When writing a package, should one use the top-to-bottom approach or bottom-to-top? For example, the following two methods (in expl3 syntax) % Top-to-bottom \NewDocumentCommand \foo {m} { \...
3
votes
1answer
459 views

Aesthetically, which font should I use when I want to use Euler Math fonts?

So the question is of an aesthetics "best practice" type. I know that I shouldn't use Euler math fonts with the standard Computer Modern, and I'm struggling to find a suitable typeface where I can use ...
1
vote
1answer
169 views

Spacing between columns in the amsmath's cases environment

As most of you may already know, the amsmath package provides a cases environment. As the example in the user guide indicates, the typical usage of the environment is to construct a formula with ...
2
votes
1answer
96 views

Why prefer the letter @ in command names? [duplicate]

I am editing a class-file (extension .cls) created by several authors to format a thesis according to my university standards. In that file, there are many command (re)definitions. For example, the ...
7
votes
1answer
125 views

Token list vs control sequence in LaTeX3

In LaTeX3, should I use a token list or a (none argument) control sequence? For example, I need to use a macro for some format like \itshape, so which one is better? \tl_new:N \l__mydoc_format_tl \...