Skip to main content

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
1 vote
0 answers
36 views

In a multiline equation, how to align from the right in a second-level split?

I have a long equation, where I want to divide the expression into 4 parts, 2 of which are & aligned, and the other two are child to the former, and should be aligned from the right. I am nesting ...
Donn's user avatar
  • 11
14 votes
2 answers
2k views

Is it bad style to write x^2, 2^\frac{1}{2} and 2^\sqrt{2}?

Is it considered bad style to write: x^2, 2^\frac{1}{2} and 2^\sqrt{2} (without curly brackets around the superscript) instead of: x^{2}, 2^{\frac{1}{2}} and 2^{\sqrt{2}}? The same for subscripts.
David Scherfgen's user avatar
0 votes
0 answers
46 views

BibLaTex - Reference format for multiple ISSNs (print + digital)

What is the best / standard approach to creating a bibilography entry for a journal with print and digital editions (with an ISSN, and eISSN number, respectively). Should I create a new field for ...
Not Dr Jeff's user avatar
5 votes
3 answers
415 views

Treatment of expl3 variables - registers versus macros

In expl3 some variables are implemented as TeX registers (dim, skip, muskip, int) while others are implemented as macros (tl, str, clist, fp, bitset, etc.) (Relevant: interface3.pdf section "...
User23456234's user avatar
  • 1,886
1 vote
0 answers
52 views

Good practises for writing equation-heavy thesis in LaTeX

I'm starting to write my PhD thesis in LaTeX using the yathesis documentclass for french thesis. I will write lots of equations, with many different symbols and I like the idea of referencing them ...
mayonnaise's user avatar
0 votes
0 answers
40 views

Leave blank lines in expl3 packages for better code clarity

Leaving empty lines in the code of a package is usually not recommended. But for packages written with expl3 new lines, as spaces, are ignored. So, could blank lines be safety used to aerate the code ...
jlab's user avatar
  • 3,986
1 vote
1 answer
115 views

What should go into file.def and what into file.bbx?

My biblatex styles bundle consists of a standard.bbx file and some .bbx, .cbx, .dbx and .lbx files (the bundle provides different citation styles; therefore standard.bbx contains common code of the ...
matteofg's user avatar
  • 175
1 vote
1 answer
107 views

Braces in l3keys

In many cases, the braces surrounding values to keys in l3keys are omitted when defining keys, even when the keys themselves have n-,c-, or e-type arguments, which normally require braced arguments. ...
User23456234's user avatar
  • 1,886
3 votes
0 answers
131 views

Best practices for setting package options mid-document

I am currently working on a package where the user can set the package options mid-document or within a local group. Currently, the user can do this via the user commands \set<package>keys or \...
User23456234's user avatar
  • 1,886
3 votes
1 answer
149 views

"Label multiply defined" with new cross-referencing properties

When recording multiple different properties (see texdoc ltproperties-doc or online) for the same label, warnings are issued. I am not able to record all properties at the same time (some must be ...
meide's user avatar
  • 1,175
4 votes
1 answer
116 views

Using the new cross-referencing properties

I'm looking into the new property system (see texdoc ltproperties-doc or online) but have an issue when referencing unknown labels. \NeedsTeXFormat{LaTeX2e}[2023/11/01] \documentclass{article} \begin{...
meide's user avatar
  • 1,175
11 votes
2 answers
579 views

Why are these sentences in Libertine so cramped and what can I do about it?

Recently I was writing a document in LaTeX using Linux Libertine. Overall I love this font, but I found a strange case of italicized text where there is almost no space between the word of and a ...
user134824's user avatar
5 votes
1 answer
292 views

When should we use \cs_new...nopar?

I ask about some of the best practices for programming expl3 code. Section 4 of interface3.pdf describes functions that define new control sequences that prohibit \par in their function parameters (#1,...
User23456234's user avatar
  • 1,886
0 votes
1 answer
91 views

best practise when combining standalone tex-files with latxmk

I am currently not sure how to best define my workflow and would like some advice on how to best proceed. Maybe I am just overlooking something obvious. Assuming the following tinker.tex file: \...
Cube707's user avatar
  • 404
1 vote
1 answer
54 views

What is the correct/best way to control the optional arguments of an environment so they can be easily edited later

Edit: I would like to know what the best practice is for creating a method to edit the desired optional arguments of all instances of an environment from one location. Motivation: So I'm using minted ...
GBR6000's user avatar
  • 56
0 votes
0 answers
69 views

Is it possible to compile without reloading every packages each time?

To compile my document (even a little one), my computer needs to load a lot of packages. During compilation (with pdflatex) I can see in the terminal that most of the compiling time is used to load ...
Tobard's user avatar
  • 1,211
1 vote
1 answer
188 views

Should math papers be hand written before using LaTeX? [closed]

When I'm not writing a math paper, I write way faster by typing directly into a word processor. I form and revise sentences faster on the screen then I can on paper. But typesetting math is slower ...
Ryan Hubscher's user avatar
1 vote
1 answer
90 views

Is italic correction different in different fonts?

I am reading Knuth's The TeXbook and in Chapter 4, he talks about italic correction \/. He always uses it in the scope of the preceding font, for instance: {\sl slanted\/} words {\it italics\/} for `{...
Atom's user avatar
  • 665
3 votes
0 answers
149 views

General (dis)advantages of ways to define new commands

I have a question about the many ways to define a new command. I looked through the web and TeX.SE but couldn't find a complete answer (only some partly answers like, here, here, here, or here). I ...
lukeflo's user avatar
  • 1,597
1 vote
0 answers
30 views

Citing articles in languages different from that of the journal

Journals in languages other than the current lingua franca of science will sometimes publish articles in a language other than their main one. For example, “Normierte Ringe” by Israel Gelfand (on ...
Alex Shpilkin's user avatar
0 votes
2 answers
72 views

Which way to alter commands is more robust/sustainable

I have a general question. If I'm writing a .cls file (or a package file, as well), what's the best way to edit standard commands like \section which are defined by the used standard class or latex....
lukeflo's user avatar
  • 1,597
2 votes
1 answer
158 views

Tikz: Drawing "random" paths in TikZ

I am working on Graph Theory and I have to draw paths that seem quite random such as the ones on the 1st image. I have created the paths P,Q on the 2nd image using the code below. However, it seems ...
Giannis Tsagkaropoulos's user avatar
0 votes
1 answer
51 views

Best way to indicate that some lines are left out

Assume I wrote a class myclass in Matlab with many properties and methods, and now I want to display its most important properties (foo and bar), the headers of its most important methods (myclass ...
Οὖτις's user avatar
  • 2,927
0 votes
1 answer
71 views

Should one put nested exponents in-line, or displayed as an equation?

(I didn't immediately see this question already asked, but perhaps it has, since it seems an obvious question to me!) This is more of a typographical/style/best-practices question, but I am wondering ...
pyridoxal_trigeminus's user avatar
3 votes
1 answer
167 views

How can we typeset a multi-line expression with both an equation number and a comment?

What is your favourite way of typesetting (multi-line) mathematical expression (with an equality or inequality symbol in the middle) that needs to have both a number and a comment? Here, a comment ...
Saptam's user avatar
  • 127
1 vote
0 answers
69 views

Text in my included tikz grahics should have the same font size as my main text

I have a problem with the graphics and plots in my Latex document. I create all the plots and graphics with tikz in a seperate Latex standalone File, which produces pdf files. Then I include these pdf ...
Jayzin's user avatar
  • 11
0 votes
0 answers
27 views

How to get the value of the document title? [duplicate]

In the attempt of reproducing the layout of a book, I need to use the title of the book in one of the headings. Specifically, using fancyhdr, I'd do something like this \fancyhead[CE]{\scshape \...
Enlico's user avatar
  • 2,612
0 votes
0 answers
103 views

Best practices for \cite and \citep

Imagine that \cite{webb2004oscillations}) and \citep{webb2004oscillations}) yield, respectively Webb and Owen, 2004 (Webb and Owen, 2004) When writing a paper, what is the best practice to cite this ...
sam wolfe's user avatar
  • 257
11 votes
1 answer
399 views

Best practice for dtx workflow

I'm sorry, if this question isn't appropriate here, since it asks (at least partly) for opinions. However, there exists a "best-practices" tag, and I believe, the answer could be of public ...
Matthias's user avatar
  • 731
2 votes
1 answer
542 views

Best practice: Add hand-written annotations during Beamer presentation

I prepare my presentations using Beamer, making also use of overlays. Now, my slides contain a lot of illustrations/diagrams, which I'd like to draw into the slides during my presentation using my ...
Bubaya's user avatar
  • 2,549
2 votes
1 answer
74 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 ...
Alexey's user avatar
  • 2,161
0 votes
0 answers
55 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, ...
crmdgn's user avatar
  • 2,628
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 ...
Anna's user avatar
  • 837
1 vote
1 answer
147 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 ...
Hjokvilla's user avatar
0 votes
2 answers
2k 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 ...
MulticolMetallurgist's user avatar
0 votes
2 answers
486 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" ...
Jan Joswig's user avatar
0 votes
1 answer
99 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 ...
Suuuehgi's user avatar
  • 942
7 votes
0 answers
441 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? ...
gaelicWizard's user avatar
9 votes
2 answers
223 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 ...
Ulrich Diez's user avatar
  • 29.7k
9 votes
1 answer
175 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 ...
Ulrich Diez's user avatar
  • 29.7k
3 votes
0 answers
119 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, ...
pyridoxal_trigeminus's user avatar
4 votes
2 answers
1k 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 ...
Carla only proves trivial prop's user avatar
1 vote
0 answers
68 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 \...
David Purton's user avatar
  • 26.4k
1 vote
0 answers
229 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{...
zetyty's user avatar
  • 777
1 vote
1 answer
160 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 ...
Matteo Raffaelli's user avatar
4 votes
1 answer
131 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\...
DDS's user avatar
  • 9,768
4 votes
2 answers
350 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 ...
IsaKEKW's user avatar
  • 547
6 votes
1 answer
2k 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 ...
Sirion's user avatar
  • 245
5 votes
1 answer
293 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} \...
L.J.R.'s user avatar
  • 11.3k
0 votes
0 answers
16 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 ...
user3284214's user avatar

1
2 3 4 5
16