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

learn more… | top users | synonyms

6
votes
1answer
51 views

Define \keys_filter:nnnN without modifying core functions

I would like to define a function \keys_filter:nnnN which would do the very same thing as \keys_set_filter:nnnN but without the setting. I realized that the setting is realized by a core function ...
3
votes
0answers
41 views

what are pitfalls when using doi as bibtexkey?

A very common scheme for bibtexkeys is FirstauthornameYYYY like Bohr1922. This scheme is not well suited for collaborating in teams because of collisions (Bohr1922a vs. Bohr1922b if there were many ...
1
vote
0answers
26 views

How to put some "\usepackage''s into one package? [duplicate]

Since I learnt to use LaTeX 1 month ago, I have never used other software. But every time I begin to write a latex file, I will have to type: \documentclass{article} \usepackage{geometry} ...
0
votes
0answers
32 views

Makefile for compiling complicated LaTeX project [on hold]

I have the following structure of my LaTeX project: Thesis/ |--head.tex |--ch01.tex |--ch02.tex |--ch03.tex |--ch04.tex |--Makefile |--Figs/ |--fig1 | |--file1.dat ...
4
votes
1answer
64 views

Color functional groups in chemfig syntax

I want to color simple functional groups in organic molecules using the chemfig package. I've come up with a solution that achieves what I want (MWE), but I find it very cumbersome. I thought it could ...
3
votes
2answers
103 views

What is the best way to encode diacritical marks with the default input encoding?

Suppose, I want to write a word with diacritical marks, say fïbęj, and I cannot use Unicode or similar but instead I have to keep maximum compatibility for all sorts of situations. If I am not very ...
1
vote
0answers
41 views

Best attitude regarding \newtheorem?

In amsthdoc, the documentation of amsthm, it is written: It is natural to handle [lemmas, propositions, axioms, corollaries, conjectures, definitions, remarks, and so forth] as LATEX environments, ...
12
votes
3answers
201 views

Assertions in Latex

I am writing a long latex document and use many macros for defining mathematical symbols. I would like to ensure that there is no clash in the notation. For example, something like ...
4
votes
2answers
108 views

How to organize large documents in small nested folders

Preamble I am writing a large document and I would like to keep it well structured not only in terms of source code (I am aware of commands like \input and include, as well as the standalone ...
2
votes
1answer
79 views

Usage of mathbb versus mathds

Blissfully unaware of mathds for years I have used $\mathbb{Z},\mathbb{Q}$ and so on. No one has complained but is there a best practice on choosing between mathbb and mathds for these? There has ...
1
vote
1answer
33 views

Command containing babel shorthand not expanding [duplicate]

Greetings to the distinguished gathering of TeXperts! My problem is: if a macro is defined with a babel shorthand containing the quote mark (") as an active character, it does not expand when ...
2
votes
1answer
68 views

Pretty Printing is not pretty at PythonTeX ?

I try make LaTeX document with PythonTeX and this my MWE : \documentclass{article} \usepackage{pythontex} \begin{document} \section{Perhitungan Pangkat} \paragraph{} SymPy dapat melakukan ...
2
votes
0answers
79 views

Is \aa or å preferred?

This question is about all the non-ascii characters, å is only as an example. I know you can type the character å two ways: \usepackage[utf8]{inputenc} ... Some text with a speciål character. or ...
3
votes
1answer
56 views

Update l2tabu and translation?

The document l2tabu gives overview about the sins in latex: obsolete commands, packages, bad style. However this document in it's most recent (german) Version is from 2011, the last translated ...
9
votes
1answer
144 views

Subscript equivalent of ' for \prime?

I am working through the TeXbook and I came across the section (pg. 130) where ' and \prime are discussed. Knuth mentions that TeX treats \prime as a large symbol that appears only in superscripts ...
23
votes
2answers
277 views

Should I load eTeX and/or fixltx2e by default

So, inspired by Fixing LaTeX2e I've been wondering: Should I be loading fixltx2e and/or eTeX by default? Typically I start my documents as %Page layout here \documentclass[letterpaper, ...
2
votes
0answers
52 views

Loading order in .sty file [closed]

With help from egreg, I have the following collection of packages and macros in the file standardopsaetning.sty: \NeedsTeXFormat{LaTeX2e}[2014/05/01] \ProvidesPackage{standardopsaetning}[2015/01/04 ...
6
votes
1answer
156 views

Future of the commands used by pdfTeX, pdfLaTeX and related engines making use of the pdf-extension

I'm currently in the process of building a class file with preferrably a best practice setup of the macros. My current paradigm is to write all macros in (plain) TeX, since I find it contradictory to ...
24
votes
4answers
1k views

Most useful/important (La)TeX commands/environments

A friend of mine asked me why I use LaTeX instead of Word/OpenOffice etc. (no, this is not going to be a question like 'Word vs. LaTeX') I showed him some of the showcases here on TeX.SX, some of my ...
2
votes
0answers
71 views

Questions From a LaTeX Beginner [duplicate]

I am an undergraduate studying mathematics. I am currently in the process of writing my first paper for submission to an academic journal. While learning about the process of submitting a paper it ...
4
votes
4answers
320 views

How to break a product of three polynomials

I have $$(1+x+x^2+x^3+x^4+x^5+x^6)(1+x^2+x^4+x^6+x^8+x^{10})(1+x^5+x^{10}+x^{15}+x^{20})$$ but is too long to fit the page. How to break this?
25
votes
1answer
917 views

Does LaTeX really perform worse than Word? [closed]

A new study in PLOS ONE1 concludes that even novice MS Word users perform better than expert LaTeX users in document creation. I have read the article and I feel like I have identified some flaws in ...
14
votes
0answers
129 views

What is “the” LUA root for context packages?

As package author, I want to write a LUA module which can be found by both lualatex and context. The lualatex prototype works reasonably and I am convinced that this will also be true if I release ...
3
votes
3answers
116 views

advanced search in tex files

Is there a way to perform advanced search queries within tex-files? What I mean by "advanced search query" is all queries that cannot be performed with only a single search term. For example, it is ...
6
votes
1answer
67 views

Package versioning and backward compatibility

The third major curse of computer programming is backward compatibility. You have to fix bugs which will unavoidably be found. Some syntax is not really a good idea, and has to be modified to be less ...
6
votes
6answers
1k views

PhD dissertation: templates vs scratch

I am still getting my feet wet with LaTeX (starting to read 'LaTeX for complete novices'). I have decided to use LaTeX for writing my dissertation. As I begin I was wondering if it would be better to ...
14
votes
1answer
236 views

What is the recommended way to respond to bug reports for font packages where the bug is caused by characters missing from fonts?

I received a bug report for ebgaramond-maths. Although the issue is clearly caused by my package in one sense, it is not clear to me whether there is anything which I should do about it beyond ...
2
votes
0answers
36 views

Adding prefix to TikZ node and coordinate names

This question is somewhat related to my search for a good practice to include TikZ stuff in my documents. Suppose a document (book) with a lot of formulas and equations which you have decorated with ...
4
votes
1answer
106 views

Strange preamble for a thesis or this is normal?

I have a somewhat strange template that I should use for submit my dissertation for the speciality. I put the code as a minimal working example for you to see: ...
2
votes
4answers
74 views

How to label my references so I know how to refer to them?

I’m currently writing my master thesis and I have a lot of papers to cite. I’m not able to find a good way of giving shortcuts (names) for the papers when I cite them. Can you recommend a naming ...
2
votes
0answers
81 views

Best practice for including standalone commented equations with tikz

I'm writing a document where there are some equations which I'm commenting with hf-tikz package. It needs two LaTeX compilations in order to get the right coordinates and to draw everything in the ...
11
votes
1answer
287 views

Demonic correspondence: Best practices when defining devils in TiKZ

tikzsymbols defines a series of symbols which can be used in text (or nested in larger pictures) and which can be customised in various ways e.g. scaling size, choice of colours etc. For example: ...
5
votes
3answers
130 views

In tikz, is it possible to define a node and set its position later?

I'm trying to draw a diagram and my code is getting too cluttered and difficult to read. For code style purposes, is it possible to define a node in one place and mess with its positioning later? ...
28
votes
1answer
420 views

Best Practices for Lua Modules

In the Lua world Lua Modules are installed using LuaRocks. With LuaTeX these modules are normally installed in the scripts folder (under MikTeX windows). What tools are available for downloading and ...
6
votes
0answers
106 views

Letterspacing via microtype vs fontspec (in LuaLaTeX)

I've just realised that I can get somewhat similar letterspacing effects using either the microtype or fontspec packages; for example: \documentclass{article} \usepackage{fontspec} ...
2
votes
3answers
137 views

What is the best way to handle bibliographies which include a lot of online sources?

This question arises from discussion of my earlier question about URLs and BibTeX, I am looking for a solution that works smoothly with primarily web-based references. I have .bib files which contain ...
2
votes
1answer
56 views

The code of figures at the end of file, indeed

This question is connected with How to put figures at the end of pdf file. As one can see from @cfr's and mine comments, I hoped, that it was a question, how to put a code of figures, wich are lying ...
29
votes
2answers
259 views

How do I gracefully retire a package?

I maintain a LaTeX package which is obsolete. All its useful commands are provided by other packages, possibly with different syntax, but still the point is there is no reason for anyone to use my ...
2
votes
0answers
207 views

Column Space and Null Space of a Matrix [closed]

What are the notational best-practices for typesetting the column space and null space of a matrix A? Let's see how some of the different options look: Column Space: $col(\mathbf(A))$ ...
4
votes
1answer
69 views

Avoid accidental \\*

When you write in LaTeX some like: A\\ % *A You expect see the asterisk before of the second character, as usual in any text. However, the above chunk is equivalent to write: A\\* % A ...
14
votes
1answer
365 views

In tex file ascii characters only : if so should I encode the file in ascii? Or is utf-8 better used anyway?

This is a best practices question. Should I encode tex files in ascii or should I use utf-8? Is either preferred for a reason (ANY reason) in the case where ascii characters and nothing else appear ...
5
votes
1answer
70 views

In a package or parasitic class, when is it better to redefine a command and when is it better to define a new one?

When I'm working on a document for which I need special layout, I tend initially to accumulate a very long preamble. At some point, if I need to reuse similar layout regularly, I decide that I really ...
15
votes
1answer
416 views

How often do you commit when you use a version control system for your own LaTeX documents? Why? [closed]

I'd like learn about your practices and why you commit the way you do. Whether the practice is just "good" or "better" than another one is of course debatable but this topic could be really helpful ...
1
vote
0answers
18 views

How to define a bold font style for \emph text [duplicate]

Recently, I wanted to set all my \emphasized text to bold, because I think the default Italic of \emph is not distinctly emphasized. But I haven't found a solution for it. Please give me some idea. ...
4
votes
2answers
319 views

Double tagged equations?

In the following example the inequality (2.26) is obtained in the environment equation, but the equations (2.27) and (2.28) by dirty tricks, destroying the structure of the document. This is because ...
6
votes
1answer
266 views

Typesetting mathematical constants

Is there any command for typesetting constants in mathematical formulas? I would imagine something similar to \operatorname or \DeclareMathOperator, but for constants. I want the constant to be ...
13
votes
3answers
511 views

Best practice - how can I get my whole document (including math) to only use font X with LuaLaTeX and fontspec?

Considering one uses math symbols in a document, it is desirable to have them all displayed in the serif font one is using for text, or in basically any font x one would like to use for this sort of ...
5
votes
2answers
114 views

Suggestions to a better preamble for creating a handbook

The following is the preamble I was given to work with to create a student handbook. I believe there are a few things that are not right. The document compiles well but I am looking for suggestions of ...
11
votes
0answers
124 views

Customizing names of auxiliary file: safe practices?

I maintain a package (morewrites) which requires a temporary auxiliary file to function (written and read right away). This auxiliary file is currently named \jobname.mw, and a user has asked me to ...
2
votes
1answer
183 views

Best practices - How should one go about drawing lots of rectangular (=similar) shapes?

This is rather general inquiry, with intent to find out how to go about this the best way with the less time-consuming the better. How would you draw a graphics with lots of rectangles (or other ...