Questions tagged [best-practices]

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

Filter by
Sorted by
Tagged with
2 votes
1 answer
58 views

"Best practices" for typesetting historical or etymological notes in a mathematical text [closed]

When including historical or etymological notes in a mathematical text, what are the good options for typesetting them? As remarks? As footnotes? As paragraphs? As something else? I suppose that an ...
  • 1,709
0 votes
0 answers
82 views

BibLaTeX entries for parts of an encyclopedia published in tomes > volumes > fascicules

What would be a correct way to make BibLaTeX database entries for different levels of subdivision of Jules Molk's Encyclopédie des sciences mathématiques pures et appliquées? The problem is that it ...
  • 1,709
0 votes
0 answers
32 views

Should you use a single .bib file to generate various bibliographies?

I'm just getting comfortable with BibTex, and I have a question about best practices. It goes like this: Say I'm teaching a course. I give out an introductory handout at the beginning of the course, ...
  • 2,464
0 votes
0 answers
55 views

Prevent new command from eating following space [duplicate]

What is the proper way of preventing my new command from eating following space? I define it as follows: \newcommand\ISPPA{I\textsubscript{SPPA}} To use it in text as such: the \ISPPA{} for bla bla ...
  • 133
1 vote
1 answer
34 views

Listing something as table with one column

This is more a question on general design of something than a technical question. I want to list parameters that are used in a model. Since I have 7 parameters I think it wouldn't be readable if I ...
0 votes
2 answers
83 views

Which symbols should be used as placeholders for letters and numerical digits? [closed]

I need to generally describe the syntax of random alphanumeric sequences, say ACW3920 or 39B0Q8, and discuss certain cases, e. g. the first two digits being letters, or the sequence ending with BA, 87 ...
0 votes
2 answers
59 views

Mixing two types of paragraphs

This is a general question about typesetting paragraphs. I was wondering if it is good (or acceptable) practice to mix two different kinds of paragraph skips in a document, e.g. a "real" ...
1 vote
1 answer
79 views

Where do I find successor packages and task-related package recommendations? [closed]

As l2tabu already hasn't been updated in 6 years, is there any other place to get to know which packages became obsolete / superseded by which ones / have been improved by which ones? which packages ...
  • 851
6 votes
0 answers
256 views

Modern Idiomatic LaTeX

Following up on this answer by @egreg and this question specifically on LaTeX3, where can I find some reasonable documentation or discussion on writing modern idiomatic LaTeX for composing documents? ...
9 votes
2 answers
187 views

expl3 - rules for toplevel-macro's argument specifications if toplevel-macro of function doesn't process arguments but calls internal macros that do

The file expl3.pdf - "The expl3 package and LaTeX3 programming" explains how expl3 functions should be named, according to the scheme \⟨module⟩_⟨description⟩:⟨arg-spec⟩ or according to the ...
  • 24.4k
9 votes
1 answer
131 views

Expl3 - \cs_generate_variant:Nn / \exp_args:N... - Which method is preferable under which conditions?

If you need arguments preprocessed/expanded before TeX passes them to a macro, you can do two things in expl3: Use \cs_generate_variant:Nn for generating a variant of the macro where the arguments ...
  • 24.4k
3 votes
0 answers
81 views

What are some practical approaches to generally improving fluency and range of knowledge/skills in TeX?

Excuse me if this question is better fitted for another SE, as it is somewhat more of a meta question, but still on-topic. As a background, I'm an undergraduate Mathematics major in my final semester, ...
4 votes
2 answers
702 views

Is it okay to do $\bf Text$?

For a math report, we often use name of a category in bold letters, ie, Set. Out of laziness, i found that just writing $\bf Set$ seems to do the trick without apparent side effects. Is this okay to ...
1 vote
0 answers
53 views

How to know what variant expl3 functions to provide in a package?

This question stems from a bug report to my package, pdfoverlay. The function in question is: \cs_new_protected:Nn \pdfoverlay_set_pdf:n { \file_if_exist:nTF { #1 } { \str_gset:Nn \...
  • 23.9k
1 vote
0 answers
53 views

How to achieve cross-referencing in glossary entries properly?

Usually, I define some glossary entries fields (as name, text, symbol fields) by another glossary entry like below (the compressor_motor entry is define with the compressor entry): \newglossaryentry{...
1 vote
1 answer
76 views

Aligning multiline formula to the right of equal sign

I would like to align a multiline formula to the right of an equal sign, as suggested by the AMS Style Guide (see below screenshot from p. 118). I am not able to reproduce the same behavior. Here is ...
  • 335
3 votes
2 answers
117 views

A Non-Uniformly Spaced Display of \ldots. is Produced When Using Fontspec

Consider the following code which I compile with Lualatex: \documentclass{book} %\usepackage{fontspec} \begin{document} \LARGE Some words\ldots. % ellipsis and period without fontspec %Some words\...
  • 5,723
4 votes
2 answers
261 views

Which environment should I use to align my equations to the left?

I would like to know the "best" environment to align equations to the left. I already use fleqn at the beginning of my document and $\begin{aligned} ... \end{aligned}$ when I write equations ...
  • 189
5 votes
1 answer
452 views

Best practices for typesetting pseudocode

I need to typeset the pseudocode of several pieces of code in latex. I found in this answer a good overview of the three main packages available to render pseudocode. In the following I will adopt the ...
  • 235
5 votes
1 answer
185 views

Command hooks vs package hooks, which is better?

In designing hook interfaces for my package. I found out that I have two methods of defining hooks: \documentclass{article} \begin{document} \section*{Method 1: Use Command Hooks} \...
  • 8,953
0 votes
0 answers
15 views

How to get different counting lables for different grouped pictures?

I was thing something along these lines: blabla picture of a gold fish Fish 1: gold fish blabla picture of a dog Mammal 1: dog blabla picture of a shark Fish 2: shark blabla picture of a horse Mammal ...
2 votes
2 answers
71 views

Table best practice - how to combine multiple semi related tables

What is the best practice when it comes to tables that semi-correlate context-wise? I've got the problem, that currently the tables take a large space from my work, but are also required. What would ...
  • 31
1 vote
0 answers
53 views

Current best practices for cross-reference packages

Until now, I have only used the hyperref packages for cross references. Occasionally, someone mentioned other packages like varioref, cleverref or zref, which offer superior functionality compared to ...
  • 1,701
0 votes
0 answers
34 views

When to use tabularx vs. tabular? [duplicate]

As mentioned in the title, I was wondering if anyone can point me to a guide on when to use tabularx and when to use tabular (or tabular*). Based on my limited knowledge and posts like LaTeX tables ...
4 votes
1 answer
97 views

Removing math italic correction: Should kern stay outside or go inside of subscript field?

Sometimes it is desirable to remove the automatic italic correction appended after a math object (e.g., any ordinary math letter, the integral sign, etc.) while in math mode. Applications include: ...
  • 9,348
1 vote
1 answer
310 views

Why I can't use \unit command in siunitx?

Most of the time I work with siunitx package I need to specify only units like: "give the answer in psia". For achieving this every time I try with \unit{\watt} (W for example) but it ...
2 votes
1 answer
72 views

How to use str_foldcase in the preamble without generating a missing begin document error

Edit Thanks to @PhelypeOleinik for pointing out the problem wasn't the \str_foldcase itself but the switch statement bodies trying to typeset text before the document has begun. The cognitive overload ...
  • 153
1 vote
0 answers
44 views

What could go wrong with putting a tikzmark node around an existing box just before unboxing it?

I've an idle thought on how to use the dastardly tikzmark TikZ library to put nodes around pre-packaged boxes, specifically (but not limited to) the boxes that the awesome AMSMath packages use when ...
1 vote
2 answers
68 views

best practices for passing arguments to commands or macros

I implemented some commands/macros recently and I'm thinking about reducing the number of arguments given to a command/macro. Basically, until now I have created some macros with xparse or \cs_new:N ...
6 votes
2 answers
596 views

How to decide if a comma or punctuation between math mode content should be inside math mode or in text mode?

Which of the two is the preferred way of writing LaTeX code that has punctuation between math mode content? Example 1: Therefore the solutions to the given equation are \( 2 \), \( 4 \), \( 6 \), \( 8 ...
  • 2,937
4 votes
1 answer
95 views

Proof environments inside statements - is it harmful or is it OK?

I discovered that a student of mine uses constructs like \begin{theorem} ...a statement... \begin{proof} ...proof of that statement... \end{proof} \end{theorem} My first reaction was ...
6 votes
2 answers
811 views

Difference between \footnote and the pair \footnotemark and \footnotetext

Note: DG's answer is the practical solution for the problem, but I recommend you to also see David Carlisle's answer since it talks about the problem. I searched about this for a while, but I couldn'...
  • 496
8 votes
2 answers
863 views

LaTeX Convention for displaymath

I'm interested in where the convention for using the backslash-bracket (\[ ... \]) for math display environments originates. I really can't stand slash-bracket notation because most people write it on ...
1 vote
2 answers
88 views

math operator spacing when used with delimiter modifiers such as \left \right, \big \Big etc

I noticed that using any delimiter modifiers like \left( \right) or \big( \Big( etc after a math operator like \cos inserts a small horizontal space. This question suggests that one simply not use ...
  • 1,607
2 votes
2 answers
91 views

Aligning multiline formula: Break within fences and AMS style

I have a rather long formula and I would like to align it in accordance with AMS Style Guide (see below screenshot from page 119). I am not able to reproduce this behavior. Here is a minimal working ...
  • 335
5 votes
2 answers
221 views

How can I add line breaks to the end of a macro?

I want to simplify the writing of this content, which should appear tabulated. I've written two macros to indent and colored ℣ and ℟. And I want to avoid having to always write \par at the end of each ...
  • 443
1 vote
0 answers
61 views

What's a good way to add a non tex table from external file?

I'm seeking for your advice and ideas regarding a way to add all my tables in the pdf file as non tex files. The goal is to make it harder (much harder) for someone to edit the way the tables look in ...
  • 153
2 votes
3 answers
263 views

Should I use cdots or ldots for an enumerated product?

What would be typografically right? a_1 \cdot a_2 \cdots a_n or a_1 \cdot a_2 \cdot \ldots \cdot a_n
  • 385
3 votes
1 answer
66 views

Should you use bibtex entries from the source?

I wish to cite this article. A bibtex entry can be downloaded directly, which is as follows: @inbook{Kleinhenz2017, author = {Julie E. Kleinhenz and Aaron Paz}, title = {An {ISRU} propellant ...
  • 155
1 vote
2 answers
136 views

siunitx: share the same value with two different units

If I have two different constants share the same value at some condition, what is the better way to aesthetically present this information than typing the two units after each other? For example, I ...
  • 8,839
3 votes
1 answer
96 views

How do I add the value of a token list with braces in LaTeX?

In my LaTeX3 code, I frequently find myself wanting to add the value of one token list (or other variable) to another but surrounded by braces (a common use case is where I'm constructing a command to ...
9 votes
1 answer
2k views

Can I temporarily disable the @@ replacement in LaTeX3?

I'm trying to write my L3 packages using good practice, which I understand involves using @@ in defining command and variable names which then get replaced by the module name (Section 3.2.2 in texdoc ...
2 votes
1 answer
57 views

Is this the best way to label the lanthanides using chemnum?

I want to label a series of compounds with the lanthanides, i.e. 10la and I'm using the chemnum package. The manual gives some hints about this, saying you could do \newcmpdcounterformat{arabic}{\@...
  • 17.4k
0 votes
1 answer
813 views

Templates or tutorials for creating a title page

I am relatively new to Latex. I am writing my thesis in Latex, which has been (as you know) so much more convenient than a word processor. I am using \documentclass[oneside,11pt]{book} along with the ...
  • 1,167
7 votes
1 answer
412 views

Is it bad practice to replace a^{-1} with a user-defined command?

I've recently started doing my homework in LaTeX, so I'm still very new to this world. One of the things I don't very much like doing is typing out ^{-1} everytime I want the inverse of something, so ...
  • 185
1 vote
1 answer
440 views

Best practises: How to write the category R-mod

What are the best practises for writing the category R-mod of modules over the ring R? Importantly, how should I write the dash? Is a text mode dash my only option, or is there a math mode workaround? ...
  • 11.3k
0 votes
0 answers
78 views

LaTeX exercises

Recently I've learning more about LaTeX and I would like to know where can I found exercises and documents to replicate in order to improve my skills.
2 votes
2 answers
79 views

What is the best approach to align equations in order to organize common terms in a equation? (aligned vs array) [closed]

This question is about opinions and experiences of users. What is the best approach to align equations in order to organize common terms in a equation? What is preferable in the particular case ...
  • 3,669
7 votes
0 answers
240 views

Redefining Commands: Safety and Best Practices

There's plenty of questions on this site about redefining specific commands, but I couldn't find a more general, comprehensive question about the safety and best practices of redefining commands in ...
  • 1,986
9 votes
3 answers
1k views

Best practice for plots (pgfplots, gnuplot, etc.)

I am writing a fairly large article with a lot of different plots. They range from simple ones like abs(x) or x^2 to high-polynomials with their first and second derivative, and nonlinearities (...
  • 267

1
2 3 4 5
15