讲义代码(2015-05-02)

讲义代码(2015-05-02)

我正在为 LaTeX 中级研讨会准备一份软件包推荐列表。我避免在入门研讨会上提供这样的列表,因为人们往往会在不真正理解原因的情况下添加软件包,但向对 LaTeX 有一定经验的用户提供这样的列表似乎是合适的。研讨会的参与者主要是各个学科的研究生。

讲义的一面会列出一般的软件包推荐,大多以条件形式列出。例如,“enumitem用于自定义列表”。另一面会根据学科列出更专业的软件包。这个问题只涉及讲义的第二面。

以下是我目前比较不平衡的列表。我试图遵守 2 个限制:

  • 软件包应该可以从 CTAN 获得,最好作为 TeX Live 和 MiKTeX 的一部分;
  • 该包应该与 LaTeX 格式和 pdfTeX 引擎兼容。

我应该添加、删除或修改什么?

我们同样欢迎对现有主题列表进行更改或对附加主题列表提出建议。

具体主题列表:

按主题分类的包

[显然,目前的不平衡在于逻辑学、语言学和人文学科的列表长度。它并非完全偏向逻辑学,这要归功于对这个问题的评论的回应!]

请注意mathtoolsamssymbntheorem列在讲义第一面的数学下,因为它们并不是专门针对数学家的。同样,tikzpgfplots列在图表下。显然这里有灰色区域,我知道我的分类相当随意。我更感兴趣的是确保关键包在列表中,并且我没有列出最好避免的东西。

以下是供参考的一般清单:

通用包裹

讲义代码(2015-05-02)

\documentclass[a4paper,welsh,british,twocolumn]{article}
\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage[tt=lining]{cfr-lm}
\usepackage{enumitem,geometry,url}
\usepackage{csquotes}
   \MakeAutoQuote{‘}{’}
   \MakeAutoQuote*{“}{”}
\geometry{scale=.9}
\setlength{\columnseprule}{0.4pt}
\urlstyle{sf}
\title{\LaTeX{} Package Recommendations}
\author{cfr}
\date{}
\pagestyle{empty}
\begin{document}
\pdfinfo{%
  /Title    (LaTeX Package Recommendations)
  /Subject  (LaTeX)
  /Keywords (LaTeX, package)}
\maketitle\thispagestyle{empty}
\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[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.
  \item[pgfplots] for plots of all kinds.
\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}
\appendix
\section{Biology}
\begin{pkgdescription}
  \item[texshade] for nucleotide and peptide alignments.
  Can process alignments in \textsc{msf}, \textsc{aln} and \textsc{fasta} formats.
\end{pkgdescription}
\section{Chemistry}
% Ref.: \url{}
\begin{pkgdescription}
  \item[chemformula] for formulae and reactions.
  \item[modiagram] for \lpack{tikz}-based molecular orbital diagrams.
  \item[mychemistry] for reaction schemes.
  The package depends on \lpack{chemfig} for \lpack{tikz}-based molecules.
  \item[tikzorbital] for \lpack{tikz}-based molecular orbitals, inc.\ s, p and d.
  \item[siunitx] for SI units.
\end{pkgdescription}
\section{Computer Science}
% Ref.: \url{}
\begin{pkgdescription}
  \item[algorithms] for pseudo-code.
  \item[algorithm2e] for floating pseudo-code.
  \item[listings] for source code.
  \item[minted] for highlighted source code.
\end{pkgdescription}
\section{Engineering}
% Ref.: \url{}
\begin{pkgdescription}
  \item[bloques] for simple \lpack{tikz}-based control diagrams.
  \item[circuitikz] for \lpack{tikz}-based electrical and electronic circuits.
  \item[siunitx] for SI units.
\end{pkgdescription}
\section{Humanities}
% Ref.: \url{}
\begin{pkgdescription}
  \item[bibleref] for referencing and indexing Bible verses.
  \item[classics] to cite classic works sensibly.
  \item[eledmac] for critical editions and \lpack{eledpar} for parallel texts.
  \item[ednotes] for critical editions of handwritten manuscripts.
  \item[edfnotes] for critical editions of printed texts with footnotes.
  \item[handout] for handouts consisting of textual excerpts.
  \item[poemscol] for critical editions of poetry.
  \item[schemata] for topical schemata of the kind sometimes used to illustrate conceptual structure e.g.~in Scholastic thought.
  \item[verse] for verse without annotations.
\end{pkgdescription}
\section{Linguistics}
% Ref.: \url{www.essex.ac.uk/linguistics/external/clmt/latex4ling}
\begin{pkgdescription}
  \item[gb4e] for examples, glosses etc.
  \item[expex] for enhanced examples, glosses etc.
  \item[leipzig] for standard and custom glossing abbreviations.
  \item[ot-tableau] for optimality-theoretic tableaux.
  \item[qtree] for syntactic trees without \lpack{tikz}.
  \item[forest] for enhanced \lpack{tikz}-based syntactic trees.
  \item[stmaryrd] for semantics brackets.
  \item[tikz-dependency] for \lpack{tikz}-based dependency graphs.
  \item[tipa] for IPA fonts.
\end{pkgdescription}
\section{Logic}
Ref.: \url{www.latexforlogicians.net}
\begin{pkgdescription}
  \item[algorithms] for algorithms.
  \item[gene-logic] for better spacing of maths symbols.
  \item[bussproofs] for natural deduction/Gentzen sequent proofs.
  \item[prftree] a newer alternative to \lpack{bussproofs}.
  \item[lplfitch] for ‘Fitch’-style proofs.
  \item[logicproof] for ‘Fitch’-style proofs with boxed sub-proofs.
  \item[natded] for Jaśkowski-/Kalish-Montague-style proofs.
  \item[qtree] for tree proofs without \lpack{tikz}.
  \item[forest] for enhanced \lpack{tikz}-based tree proofs.
  \item[tikz-cd] for \lpack{tikz}-based commutative diagrams.
  \item[turnstile] for turnstiles of all kinds.
\end{pkgdescription}
\section{Physics}
% Ref.: \url{}
\begin{pkgdescription}
  \item[feyn] for inline Feynman diagrams.
  \item[feynmp] or \lpack{feynmf} for Feynman diagrams.
  \item[siunitx] for SI units.
\end{pkgdescription}
\section{}
% Ref.: \url{}
\begin{pkgdescription}
  \item[]
\end{pkgdescription}
\end{document}

答案1

以下是最终版本,2016 年 7 月更新:

\pdfminorversion=7
\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)}
\pdfcatalog{%
  /URL      ()
  /PageMode /UseOutlines}   % other values: /UseNone, /UseOutlines, /UseThumbs, /FullScreen
%[openaction <actionspec>]
\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|.
  \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 customise title and use document metadata after \verb|\maketitle|.
  \item[titlesec] for custom sectioning and \lpack{titleps} for headers/footers.
\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[threeparttablex] 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[placeins] to control float placement.
  \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}
\appendix
\newcommand*\seesci{\emph{See also \fref{sec:sci}.}}
\section{Biology}
\seesci
\begin{pkgdescription}
  \item[bracketkey] for bracketed identification keys.
  \item[dichokey] for dichotomous identification keys.
  \item[shipunov] for identification keys, classification lists and more.
  \item[texshade] for nucleotide and peptide alignments.
  Can process alignments in \textsc{msf}, \textsc{aln} and \textsc{fasta} formats.
  \item[textopo] for shaded membrane protein topology plots.
\end{pkgdescription}
\section{Chemistry}
\seesci
% Ref.: \url{}
\begin{pkgdescription}
  \item[chemfig] for reaction schemes and \lpack{tikz}-based molecules.
  \lpack{chemformula} and \lpack{mhchem} are alternatives.
  \item[chemformula] for formulae and reactions.
  \item[mhchem] for formulae and equations.
  Includes \lpack{hpstatement} (H and P Statements) and \lpack{rsphrase} (R and S Phrases).
  \item[modiagram] for \lpack{tikz}-based molecular orbital diagrams.
  \item[tikzorbital] for \lpack{tikz}-based molecular orbitals, inc.\ s, p and d.
\end{pkgdescription}
\section{Computer Science}
\emph{See also sections \ref{sec:logic} and \ref{sec:sci}.}
% Ref.: \url{}
\begin{pkgdescription}
  \item[algorithms] for pseudo-code.
  \item[algorithm2e] for floating pseudo-code.
  \item[listings] for source code.
  \item[minted] for highlighted source code.
  \item[pgf-umlcd] and \lpack{pgf-umlsd} for \lpack{tikz}-based UML diagrams.
  \item[sa-tikz] for \lpack{tikz}-based switching architectures.
\end{pkgdescription}
\section{Engineering}\label{sec:eng}
\emph{See also sections \ref{sec:phys} and \ref{sec:sci}.}
% Ref.: \url{}
\begin{pkgdescription}
  \item[bloques] for simple \lpack{tikz}-based control diagrams.
  \item[circuitikz] for \lpack{tikz}-based electrical and electronic circuits.
\end{pkgdescription}
\section{Humanities}
% Ref.: \url{}
\begin{pkgdescription}
  \item[bibleref] for referencing and indexing Bible verses.
  \item[classics] to cite classic works sensibly.
  \item[reledmac] for critical editions and \lpack{reledpar} for parallel texts.
  \item[ednotes] for critical editions of handwritten manuscripts.
  \item[edfnotes] for critical editions of printed texts with footnotes.
  \item[handout] for handouts consisting of textual excerpts.
  \item[poemscol] for critical editions of poetry.
  \item[schemata] for topical schemata of the kind sometimes used to illustrate conceptual structure e.g.~in Scholastic thought.
  \item[verse] for verse without annotations.
\end{pkgdescription}
\section{Linguistics}
% Ref.: \url{www.essex.ac.uk/linguistics/external/clmt/latex4ling}
\begin{pkgdescription}
  \item[gb4e] for examples, glosses etc.
  \item[expex] for enhanced examples, glosses etc.
  \item[leipzig] for standard and custom glossing abbreviations.
  \item[ot-tableau] for optimality-theoretic tableaux.
  \item[qtree] for syntactic trees without \lpack{tikz}.
  \item[forest] for enhanced \lpack{tikz}-based syntactic trees.
  \item[stmaryrd] for semantics brackets.
  \item[tikz-dependency] for \lpack{tikz}-based dependency graphs.
  \item[tipa] for IPA fonts. But consider Xe\LaTeX{} or Lua\LaTeX.
\end{pkgdescription}
\section{Logic}\label{sec:logic}
Ref.: \url{www.latexforlogicians.net}
\begin{pkgdescription}
  \item[algorithms] for algorithms.
  \item[gene-logic] for better spacing of maths symbols.
  \item[bussproofs] for natural deduction/Gentzen sequent proofs.
  \item[prftree] a newer alternative to \lpack{bussproofs}.
  \item[lplfitch] for ‘Fitch’-style proofs.
  \item[logicproof] for ‘Fitch’-style proofs with boxed sub-proofs.
  \item[natded] for Jaśkowski-/Kalish-Montague-style proofs.
  \item[qtree] for proof trees without \lpack{tikz}.
  \item[prooftrees] for enhanced \lpack{forest}/\lpack{tikz}-based proof trees.
  \item[tikz-cd] for \lpack{tikz}-based commutative diagrams.
  \item[tikz-inet] for \lpack{tikz}-based interaction nets.
  \item[turnstile] for turnstiles of all kinds.
\end{pkgdescription}
\section{Physics}\label{sec:phys}
\emph{See also sections \ref{sec:eng} and \ref{sec:sci}.}
% Ref.: \url{}
\begin{pkgdescription}
  \item[feyn] for inline Feynman diagrams.
  \item[feynmp] or \lpack{feynmf} for Feynman diagrams.
\end{pkgdescription}
\section{Sciences}\label{sec:sci}
% Ref.: \url{}
\begin{pkgdescription}
  \item[miller] for Miller indices.
  \item[siunitx] for SI units.
\end{pkgdescription}
\section*{Additional Symbols}\label{sec:symbols}
\begin{pkgdescription}
  \item[comprehensive] provides a more-or-less comprehensive list.
  \item[adforn,adfarrows,adfbullets] for ADF symbol fonts.
  \item[dictsym] for dictionary symbols.
  \item[marvosym] for assorted symbols.
  \item[pifont] for Zapf Dingbats.
  \item[wasysym] for the symbol font \texttt{wasy}.
\end{pkgdescription}
\end{document}

最终版本的方案建议

此外,我还有一份列出字体包的讲义和一份双面字体样本,我创建了这些样本来展示许多可用的字体。我刚刚更新了大卫·卡莱尔的数学符号列表尽管我的版本的合法性可能值得怀疑,因为 David 没有根据 CTAN 的数据库指定许可证。

答案2

作为一名应用数学家/计算机科学人员,我需要绘制(大量!)数据系列、绘制表达式给出的函数以及排版数字表(通常带有额外的自动生成的后处理)。绘图包括二维函数的曲面或轮廓图。

pgfplotspgfplotstable在这些应用上表现出色,许多人(不仅仅是应用数学家)利用它来简化他们的生活。

http://pgfplots.sourceforge.net/

免责声明:我写了pgfplotspgfplotstable

编辑我看到您已经pgfplots在“图表”下引用了。不过,对于那些必须处理数值表及其后处理的人来说,两者的结合可能是一个不错的建议。

答案3

miller.sty 在晶体化学/晶体学中非常有用。

asymptote.sty 用于合并渐近线图形。

相关内容