Questions tagged [best-practices]
A "best practice" is a technique or approach that TeXnicians recognize as giving better results than other approaches.
790 questions
10
votes
1
answer
382
views
Memorizing inconsistent key names in pgfplots
I absolutely love tikz and pgfplots, and I am really thankful for what their authors have built. I regularly am surprised and in awe by what people can accomplish in them. Also, both of them have ...
11
votes
1
answer
775
views
tagged pdf math book: best practices
I want to learn the correct way of writing a tagged math book.
Is my current structure sufficient? If not, how can I improve this skeleton?
What packages must I sacrifice in the name of tagging?
In my ...
7
votes
2
answers
368
views
when is it sensible to use names for expl3 variables with non-spec type suffixes?
Snippet from fontspec's documentation:
Semi-colon-lists Not a real data structure but sensible to name accordingly.
163 \tl_new:N \g_@@_rawfeatures_sclist
164 \tl_new:N \l_@@_pre_feat_sclist
Is it1? ...
3
votes
0
answers
87
views
Externalising l3draw pictures with memoize
Note that I just got this to minimally work, so do not take the claims below without a spade or so of salt.1 In particular, 'works' is employed in a sense likely to deviate significantly from ordinary ...
4
votes
2
answers
164
views
Is it better to nest figure environments inside proof environments, or leave them separate?
This is a situation I often find myself in. I have a long (multiple paragraphs, maybe 1/2 a page to a page of output text, so quite likely to contain a page break) proof environment. In the middle of ...
1
vote
0
answers
84
views
A better way to organise packages?
How can I build a single .sty file, from multiple packages that are organised into separate folders?
I am building a template for my dissertation project, including a .sty file to avoid overcrowding ...
0
votes
1
answer
160
views
What’s the cleanest way to manage notation that changes throughout a LaTeX document?
I'm writing a technical/mathematical document where the meaning or form of certain symbols evolves across sections. For example, a symbol like \( P \) might represent a probability measure in one part,...
3
votes
0
answers
230
views
How to copy&paste unformatted text from TeX?
Despite the unequivocal superiority of TeX, one utility of Word (or other word processors such as OpenOffice/LibreOffice) is that either formatted or unformatted text can be easily exported. For ...
5
votes
1
answer
185
views
What is a good typesetting practice for a metric convention in relativity?
When working in relativistic physics, one can choose between defining the Minkowski metric as being diagonal with entries (-1, +1, +1, +1), or with (+1, -1, -1, -1). It is common to state your chosen ...
7
votes
3
answers
381
views
How can I adhere to the best practices when handling math for TikZ with Lua?
I use pgfmath for making 3D illustrations with TikZ, but want to convert it to Lua.
I was informed that many people do not adhere to the most "bureaucratic" approach when incorporating Lua ...
1
vote
1
answer
122
views
Better method of defining new `mdframed` styles and environments
Apologies if the title wasn't clear; I didn't know any better wording.
On to the problem. I wanted to create coloured border boxes for my notes and I stumbled upon this answer which worked for me. I ...
3
votes
0
answers
220
views
Is there a guide with updated summaries of latex best practices? If not, would it be useful?
Often, one may find great answers discussing how to achieve a certain goal in Latex that were extremely useful in a certain period of time. But as the maintenance of packages stops, or new ones ...
1
vote
0
answers
82
views
Latex packages naming practice: font(s), color(s), etc
I am wondering if there is a standard accepted practice regarding the naming of latex packages in particular regarding the use of plurals. Let's say I am writing packages that contain many commands ...
5
votes
0
answers
114
views
Guides and best practices for journal design
There's no shortage of resources on book design, both tool-agnostic and TeX-specific. Some fairly comprehensive ones I have relied on in the past include A Few Notes on Book Design by Peter Wilson, ...
3
votes
1
answer
109
views
Using dimens in floating point expressions
In my testing with l3benchmark, wrapping dimens and dimen expressions within a floating point expression is always faster with \dim_to_decimal:n than with \dim_to_fp:n. Yet, in kernel code, ...