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

learn more… | top users | synonyms

0
votes
1answer
33 views

Properly writing an enumerated list in different lines within a sentence

My question is similar to this one but my items are bigger so I would like to write my items each in a different line. I am currently doing as follows The way to propose a solution that ...
3
votes
0answers
57 views

Pgfplots Boxplots with a thick line at the mean value

pgfplot produces nice looking plots, that have consistent look and feel. But sometimes you have a good reason to change that look, and I found it tricky to change style of an specific line, circle, ...
4
votes
1answer
46 views

Math symbol in section heading

I have a section heading which includes an epsilon. Furthermore I am using the "hyperref" package to create links in my PDF document. When compiling I get a strange warning that a math symbol is not ...
7
votes
2answers
154 views

Temporarily changing catcode of %

Scenario I have a bunch of TeX files which may be processed by an external filter. The filter is (unfortunately) immutable: it does a string replacement where, for example, %d is expanded to a ...
2
votes
0answers
27 views

Hanging indentation of source code within sentence a la Vim-LaTeX-Box

I've recently been playing with the LaTex-Box plugin for Vim and noticed the layout of the source code on their Github page: What interests me is the 2-space hanging indent within each sentence. ...
3
votes
1answer
66 views

Math symbols in text mode

I need to write a text which contains some math symbols. In detail those include \rightarrow, \forall and \exists. I know I can switch into math mode with the $ symbol, but I have quite a lot of text ...
1
vote
1answer
70 views

“Good” command names for typesetting matrices and vectors

I usually add \newcommand{\M}[1]{\bm{#1}} % Matrix \newcommand{\V}[1]{\boldsymbol{\mathbf{#1}}} % Vector to my preambles. Short command names because I use them very often. Is ...
2
votes
3answers
64 views

How to fit a table with long header cells in “S”-type columns?

Well fit tables in LaTeX is hard for me, and I don't know if there is a manual with good practices about it. I need to create a table with S columns contending numbers, but the header of those columns ...
1
vote
0answers
82 views

How should I write math? [closed]

I'm new to TeX and I would like to use it to write math (on a Mac). I've just downloaded MacTex and I'm wondering what's the recommended workflow. Am I supposed to write math in TeX macros/code and ...
4
votes
1answer
76 views

Issues with nesting \textbf and \textit

I am trying to format a text so that it is bold and italic at the same time. I am doing this by nesting the \textbf and \textit commands, what should be no problem according to ...
13
votes
2answers
179 views

Should expl3 code be used in packages intended to be compatible with multiple formats?

Maybe this question is just not a good idea in general, but, I'm curious. This could make package development simpler for some in the future. (Of course, this would not be forced on any package ...
8
votes
1answer
397 views

Is There Any Reason to Put Braces for Argument-less Commands (e.g. \int{})

Is there an reason/advantage for writing the integration (and other argumentless commands) as: \int{xdx} instead of \int xdx? I can see the first one gives a more comprehensible code, but are there ...
2
votes
1answer
67 views

Same pgfplots within standalone for usage in elsarticle and revtex4-1

Suppose I have created a plot with pgfplots for a scientific paper. However, for usual reasons the targeted journal is not certain. Possibly the plot has to be adjusted to match different journals ...
4
votes
2answers
136 views

‘Correct’ way of writing a function?

So for all these years, I have been writing a function f(x) as $\mathop{f}(x)$. But now that I begin to think about a correct way of writing a function, what should it be? Is it f(x) or ...
14
votes
2answers
255 views

How to define a wrapper to a command that takes an optional argument?

What is the proper way to define a wrapper to a command which takes an optional argument (such as \chapter)? I mean a wrapper, not a clone, such that we can inject code into the wrapper without ...
8
votes
2answers
320 views

Is this sacrificial command a good idea?

I have this command: \newcommand{\name}[1]{\edef\name{#1}} You first call it as in \name{Don} and afterwards you can refer to Don using \name. Is this an accetable way to express a constant that ...
1
vote
0answers
40 views

What are the “best practices” when writing a thesis in Latex? [duplicate]

I am starting to write my master thesis in latex. So far I have only written article-like texts, so this is my first big document. I would like to start with some good general good practices. ...
0
votes
1answer
58 views

How to Read/Edit tex files on an Ipad [duplicate]

I use LaTeX for writing books. I would like to extend my working environment and, I was wondering if it is possible to read (or much better - edit) tex files containing text only on an ipad? I know ...
6
votes
1answer
147 views

How can I make it easier to write LaTeX documents with elaborate mathematics?

I'm a severely visually handicapped student of mathematics. I wonder how I can speed up my latex document creation. I'm pasting below solution to a problem in a functional analysis book by Kreyszig. ...
13
votes
3answers
213 views

Which packages should I recommend to postgraduates in different academic disciplines?

I'm preparing a list of package recommendations for an intermediate workshop on LaTeX. I avoided providing such a list at the introductory workshop as the tendency is to then add packages without ...
2
votes
0answers
56 views

Policy to stress preferrable syntax

Question Assume someone wrote a LaTeX document using my package some time ago. I want to let him know that his code should be updated. The idea is to allow outdated syntax by the LaTeX compiler but ...
3
votes
0answers
26 views

What is the best approach regarding .cfg files for the LaTeX graphics bundle?

The manual for the 'graphics' LaTeX bundle includes instructions for setting up the right conditions for the use of colour and the inclusion of graphics in documents. For example, on page 2, it says ...
6
votes
1answer
136 views

Best practice for biblatex, biber, utf8 files

I use biblatex and biber. I used to use bibtex. So, when I first started writing .bib files I would have entries like this: @article{descartes, Author = {Descartes, Ren{\'{e}}} Title = ...
2
votes
2answers
56 views

How to put information about the tool used to generate the document into the LaTeX file?

I am writing a tool which will (as one of its features) generate LaTeX documents from some input format. I would like to put an unobtrusive piece of information about the tool in the generated file ...
1
vote
0answers
47 views

Indexing the result of a lengthy matrix computation

this question relates to a problem about style or maybe convention. I have a matrix $M$ which is the result of a lengthy matrix computation (in my case: a long chain of matrix additions and ...
0
votes
0answers
27 views

Tex File naming convention [duplicate]

Is it possible to number tex files? I'm avoiding it now but, I would like to order a list of files (chapters in a book) so that each chapter is easy to find. Will this cause a problem? I have in mind: ...
2
votes
1answer
99 views

Acronyms - Best practice to use during the text and create acronym page

I'm starting writing my PhD thesis in LaTeX however since I'm still at the beginning of the PhD I'm writing some pieces at the introduction, other at methods, sometimes the other way around. When I ...
10
votes
2answers
139 views

How to implement common layouts instead of misusing tabular environments?

Note: My hope is that this can become a general resource for "use a list instead" comments. If you have suggestions for improvement, please let me know. I often see comments such as This ...
9
votes
1answer
417 views

Best Practice (Packages) for a Standard Technical Article With Math and Figures

I am interested in your opinion regarding the recommend packages for a standard technical document (Engineering, Physics). I normally use the following header: \documentclass{article} % Basic ...
6
votes
1answer
72 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 ...
5
votes
1answer
75 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
27 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} ...
4
votes
1answer
99 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
157 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
46 views

Best attitude regarding \newtheorem? [closed]

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
2answers
226 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
261 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 ...
3
votes
1answer
525 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 ...
2
votes
1answer
50 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
110 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
101 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
61 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
166 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 ...
24
votes
2answers
426 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
67 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
169 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 ...
29
votes
4answers
2k 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
72 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
334 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?
29
votes
1answer
2k 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 ...