12

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 Packages for Encoding (Input AND Output) and Langauge Support
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}

% Change Layout with a User-Friendly Interface
\usepackage{geometry}

% Include Pictures with a User-Friendly Interface
\usepackage{graphicx}
\usepackage{float}

% Extended Math Support from the Famous 'American Mathematical Society'
\usepackage{amsmath}

% Just for Demonstration Purposes
\usepackage[math]{blindtext}

\begin{document}

\blinddocument
\blindmathpaper

\end{document}

Which leads to

enter image description here enter image description here

I am wondering which other packages are recommended nowadays by the specialists here in this community. I found the following packages and I think they are debatable candidates:

  • inputenx (Link)
  • xcolor (Link)
  • ragged2e (Link)
  • fixmath (Link)
  • fixltx2e (Link)
  • mathtools (Link)
  • caption (Link) and not the older caption2 (Link) as one could think
  • fancyhdr (Link)
  • biblatex/biber (Link) of course for larger documents

I didn't mention tikz on purpose. It's great but I don't consider it as a standard package for the average user.

Important for me is that packages like fixltx2e do normally not require to configure/code much or anything. Which is important for average users.

The class memoir (Link) and the koma-script classes (Link) are very important of course. But I want to discuss this without document classes.

I am looking for stable and good packages - not the newest ones. I want to use the information here to help students who are new to LaTeX.

And of course it's always a compromise between too much packages and not using the appropriate packages.

I think a collection/list of good packages (that you use very often) with a very brief description would be a good outcome of this question.

What do you think?


Reaction so far

  • 5
    I think this is basically a duplicate of What packages do people load by default in LaTeX – Alan Munn Mar 8 '15 at 13:06
  • 1
    I distribute my My One Page Dictatorial Guide to LaTeX Packages to my students. Since I'm a linguist, it includes lots of specialized packages for linguistics, but all of the basic packages are generic. – Alan Munn Mar 8 '15 at 13:17
  • 4
    I think you should use utf8 as input encoding. Note the biber understands utf8, unlike bibtex. mathtools is a highly recommendable extension of amsmath, and it's point less to load amsmath, since mathtools does it for you. Personally, I prefer to use titleps, from titlesec rather than fancyhdr (easier to customise, in my opinion). – Bernard Mar 8 '15 at 13:20
  • 1
    With the next LaTeX-update, you will have the fixltx2e updates by default. ;-) – Johannes_B Mar 8 '15 at 14:56
  • 2
    I like fancyhdr. (Just saying because it seems to be getting a hard time here.) I also almost always load cfr-lm (possibly to be expected). I wouldn't think xcolor was needed in a typical article. I always load babel and it is probably better to specify the variant of English for clarity. I also always load enumitem and microtype. But this is all very, very dependent on what you need. That a package is stable and good is no reason to load it if you don't need it. chemformula and siunitx may be excellent but I've never used them because I don't need them. – cfr Mar 8 '15 at 17:11
15
+25

I just ran a workshop on LaTeX for postgraduate students. Here is the list of packages which I recommended they all load in every document:

%

This is, I think, the right answer. This is not to say that I did not tell them about packages - I did. Nor is it to say that I made no recommendations - I did. But I made conditional recommendations. I wanted them to understand that packages extend LaTeX in particular ways. You load them if you need those extensions. I also made very few such recommendations.

This workshop was introductory. It assumed no prior experience with LaTeX. No participant had used LaTeX before. (One had used Scientific Word but had never seen LaTeX code.)

When I run the follow-up, I plan to recommend loading a small number of packages routinely. Right now, my planned list includes the following

  • babel with british or welsh or welsh,british passed to the document class;
  • inputenc with option utf8;
  • fontenc with option T1.

I will also, probably, give them a list of 'what if I want to...?' with suggested packages, and I may try to give them a list of discipline-specific packages, if I can manage it or if I can get people here to volunteer the information.

Why so minimal? Because the huge temptation is to add packages with abandon, and the result is a mess. Better to load fewer packages initially, as a beginner, and learn which ones you need later.

Note that this is very different from the list of packages which I always, or almost always, load. Even if I cleaned up my code (which I should), that list would be a significant one. But I know why I load those packages, I'm aware that I load them, and I have at least some sense of some of the problems they may cause. I want custom page layouts and diagrams and finer-grained control over fonts and microtypography and fancy cross-references and other fiddly bits. Those are not, in my view, things which somebody who has just started to use LaTeX should be thinking about.

I realise that this is not the answer you want. It is, however, the answer which I think is correct. I may be wrong but, for whatever it is worth, that is what I recommend.

Perhaps I should also say that, if I had not been answering questions here for a while, my list of recommendations would have been much closer to the list of packages I use. That would, I think, have been a bad thing - indeed, I am convinced that it would have been a Bad Thing - and so I think that my answer is at least a minimally informed one.

EDIT

At the intermediate workshop I'm scheduled to run in June, I do plan to give students a conditional package list.

I would on NO account give this to students when introducing LaTeX.

Right now, my draft list looks as follows:

\documentclass[a4paper,welsh,british,twocolumn]{article}
\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage[tt=lining]{cfr-lm}
\usepackage{enumitem,geometry,url,fancyref}
\usepackage{csquotes}
   \MakeAutoQuote{‘}{’}
   \MakeAutoQuote*{“}{”}
\geometry{scale=.9}
\setlength{\columnseprule}{0.4pt}
\urlstyle{sf}
\title{\LaTeX{} Package Recommendations}
\author{cfr}
\date{}
\usepackage{fancyhdr}
\fancyhf{}
\renewcommand*\headrulewidth{0pt}
\fancyhf[cf]{%
  Find packages in the Comprehensive \TeX{} Archive Network (CTAN) at \url{ctan.org}.
  Browse by topic at \url{ctan.org/topic}.}
\pagestyle{fancy}
\begin{document}
\pdfinfo{%
  /Title    (LaTeX Package Recommendations)
  /Subject  (LaTeX)
  /Keywords (LaTeX, package)}
\maketitle\thispagestyle{fancy}
\newlist{pkgdescription}{description}{1}
\setlist[pkgdescription]{font=\bfseries\ttfamily}
\newcommand*\lpack[1]{\texttt{\bfseries #1}}
\section{General}
You should almost always use:
\begin{pkgdescription}
  \item[babel] Pass \verb|welsh,british| to your class.
  \item[inputenc] Load with option \verb|utf8|; \verb|\input{ix-utf8enc.dfu}|.
  \item[fontenc] Load with option \verb|T1|.
  \item[textcomp]
  \item[microtype]
\end{pkgdescription}
\section{Document Layout}
If you are using a standard class (e.g.\ \lpack{article}, \lpack{book} or \lpack{report}):
\begin{pkgdescription}
  \item[geometry] to change page dimensions.
  \item[fancyhdr] for custom headers/footers.
  \item[footmisc] for customised footnotes.
  \item[titling] to use document metadata after \verb|\maketitle|.
\end{pkgdescription}
\section{Mathematics}
\begin{pkgdescription}
  \item[mathtools] for enhanced \lpack{amsmath}.
  \item[amssymb] for more symbols, scripts.
  \item[ntheorem] for enhanced theorem environments.
\end{pkgdescription}
\section{Quotes \& Quoting}
\begin{pkgdescription}
  \item[csquotes] for context- and language-sensitive quotations and quotation marks. Recommended if using \lpack{biblatex}.
\end{pkgdescription}
\section{Citations \& Bibliographies}
\begin{pkgdescription}
  \item[biblatex] Load with option \verb|backend=biber|.
\end{pkgdescription}
\section{Cross-Referencing}
\begin{pkgdescription}
  \item[fancyref] for enhanced cross-references.
  \item[cleverref] for enhanced cross-references.
\end{pkgdescription}
\section{Lists}
\begin{pkgdescription}
  \item[enumitem] for custom lists.
  \item[glossaries] for glossaries and lists of acronyms.
\end{pkgdescription}
\section{Tables}
\begin{pkgdescription}
  \item[array] for enhanced tabular environments.
  \item[booktabs] for professional quality tables.
  \item[longtable] for multi-page tables.
  \item[tabularx] for tables with specified width.
  \item[threeparttable] for tables with notes.
  \item[multirow] for cells spanning multiple rows.
\end{pkgdescription}
\section{Floats}
\begin{pkgdescription}
  \item[caption] to customise captions.
  \item[float] more options for floats.
  \item[subcaption] for sub-figures, sub-tables and sub-captions.
  \item[floatrow] for aligned sub-figures.
  \item[rotating] to rotate floats.
\end{pkgdescription}
\section{Hyperlinks}
\begin{pkgdescription}
  \item[hyperref] for hyperlinks.
  \item[bookmark] for enhanced bookmarks.
\end{pkgdescription}
\section{Images \& Colour}
\begin{pkgdescription}
  \item[graphicx] to load external images.
  \item[xcolor] for colour.
\end{pkgdescription}
\section{Diagrams}
\begin{pkgdescription}
  \item[tikz] for diagrams.
  \emph{Many} specialised extensions available.
  \item[pgfplots] for plots.
  Includes \lpack{pgfplotstable} for data tables.
\end{pkgdescription}
\section{External Data}
\begin{pkgdescription}
  \item[datatool] for data manipulation.
  \item[textmerg] for merging text.
\end{pkgdescription}
\section{Version Control}
\begin{pkgdescription}
  \item[svn-multi] for use with \verb|subversion|.
  \item[gitinfo2] for use with \verb|git|.
\end{pkgdescription}
\end{document}

EDIT

I've decided to add a second page with discipline-specific packages. Hence, turnstile and forest have been removed from my general list. The above now represents the first page which lists general packages. The next page is currently the subject of this question and so I'm removing that part of the code from here, since it is not relevant to the core of this question anyway.

Here is the first page of the handout:

general package recommendations for intermediate users

Thanks to ManuelKuehner for adding screen shots from an earlier version of this answer.

  • I really like this answer, and I agree with it almost completely. I also realize from your comments about my dictatorial guide that you took mine to be much more of a "you must load these packages" list, whereas I intended it to be much more like your "what if I want to..." list. So I'll adjust my wording accordingly. Thanks. (Also, my use of 'dictatorial' is reflecting the fact that I don't justify my choices; I don't require my students to use anything (or LaTeX at all, for that matter.)) – Alan Munn Apr 4 '15 at 3:58
  • @cfr Thanks a lot for your thoughts. And indeed, that's not the answer I was looking for. I assume we just have different opinions and/or experiences on the subject. I upvote it of course - since it is a good answer - but I won't award it with the bounty :) (no hard feelings, ok?! :). And thanks for mentioning the 'forest' package. – Dr. Manuel Kuehner Apr 4 '15 at 7:37
  • 2
    @cfr -- since you incorporate amsmath with mathtools, you should do the same with amsfonts` -- it is loaded by amssymb. – barbara beeton Apr 5 '15 at 3:12
  • 1
    @cfr basically I don't like it because it provides the H specifier but also because it has far less options when declaring a new float. – clemens Jun 9 '15 at 14:40
  • 1
    @cfr maybe it's not necessary to change it. Certainly not just because I don't like float... :) – clemens Jun 12 '15 at 22:17
0

Some of the packages and commands I use:

\usepackage{amsmath}
\usepackage[utf8]{inputenc}
\usepackage[croatian]{babel}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{biblatex}
\DeclareMathOperator{\tg}{tg}
\DeclareMathOperator{\ctg}{ctg}
\newcommand{\R}{\mathbb{R}}
\newcommand{\F}{\mathbb{F}}
  • 1
    Welcome to TeX.SE! And why do you use them? What is the advantage? Why best practice? As it stands that is more a comment ... – Mensch Nov 18 '17 at 23:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.