Adonis
作者
Nicholas Mamo
最近上传
1 年前
许可
Creative Commons CC BY 4.0
摘要
A no-frills, elegant LaTeX template with support for one-column and two-column layouts, and dark mode.
GitHub repository: https://github.com/NicholasMamo/adonis-template
\documentclass{adonis}
\usepackage{hyperref}
\usepackage{tabularx}
\usepackage{xurl}
% main details
\title{Adonis}
\subtitle{A LaTeX template}
\author{Nicholas Mamo \textsuperscript{1}}
% secondary details
\affiliation{\textsuperscript{1} Independent}
\correspondence{nicholasmamo@gmail.com}
\version{\today}
% headers
\runningauthor{Nicholas Mamo}
\runningtitle{Adonis: a LaTeX template}
\abstract{Academic writing does not have to be drab, and neither does the academic writing template.
Not in academia, however.
In academia, form normally follows function.
The { \upshape Adonis } template is my attempt to rectify that shortcoming.
I designed it as a no-frills but elegant template, built on the basic article template.
At its core, three principles: simplicity, readability and aesthetic.
This guide also plays three roles: to serve as an illustrative example, to guide you in using this template, and to document my changes.
}
\begin{document}
\maketitle
\section{Introduction}
The best way to appreciate a good template is to force yourself to write with a bad template.
This is the \textit{Adonis} template.
Its design stems from a personal experience.
I was writing a manuscript that I had been planning for months, about a project that I had been developing for years, and on a subject I adored.
And I dreaded every minute I spent drafting the manuscript.
It took a while until I realized why: the template felt entirely off-putting.
The template should elevate the writing, not diminish it.
In academia, however, form normally follows function.
Sometimes it feels like publishers deliberately diminish the form in a vain attempt to elevate the function: the words, the science, and nothing else.
Having a good writing environment matters.
To design the \textit{Adonis} template, I followed three principles:
\begin{itemize}
\item Simplicity, by which I mean several things.
I mean that I wanted the template to be simple for me to develop, lest it turn into an exercise in procrastination.
I also mean that it should be easy for you, the writer, to use and adapt.
Above all, I mean that it should be easy for your reader to consume.
\item Readability, by which I mean readability throughout the writing process.
The template should to make it easy to draft manuscripts, revise and read.
\item Aesthetic, by which I mean elegant.
Simple and readable \LaTeX{} templates abound, but when I looked, I found most to favour function over form.
\end{itemize}
The rest of this guide documents design considerations for the layout, typography and other elements.
\section{Layout}
The \textit{Adonis} template is based on the base \textit{article} template.
To use the template, you need to copy the \verb+adonis.cls+ class file to the same directory as your manuscript.
Then, specify the document class in the preamble:
\begin{verbatim}
\documentclass[twocolumn]{adonis}
\end{verbatim}
The paper dimensions are those of an A4 paper.
Many changes concern its layout, and most add white space.
The margins are wider, notably on the sides, but also at the top and bottom.
The extra space serves a dual purpose: an obvious aesthetic one, and a more functional one.
The wider margins afford margin notes more space, and thus gives them more prominence.
Unlike the \textit{article} template, \textit{Adonis} includes a header and a footer, albeit in small print.
The header shows the running author on the left and the running title on the right, while the footer shows the page number in the centre.
You can specify the running author and title as follows:
\begin{verbatim}
\runningauthor{Yours truly et al.}
\runningtitle{Short title}
\end{verbatim}
If you do not define them, the template uses the author and title fields instead.
\textit{Adonis} does not show the header and footer on the first page, which is already busy.
\subsection{Options}
The \textit{Adonis} template comes with optional directives to change how the manuscript looks.
By default, the template has one column and wide margins, but you can change both.
Remember that you can use multiple options, or none at all.
\subsubsection{Dark mode}
The dark mode sets a the page colour to a dark grey and the text to white to reduce eye strain during writing sessions.
To enable dark mode, pass the \texttt{dark} option to the \textit{Adonis} template:
\begin{verbatim}
\documentclass[dark]{adonis}
\end{verbatim}
\subsubsection{Legacy}
The legacy layout adds backwards compatibility for old packages.
Specifically, the legacy layout does not load the \texttt{notomath} package, which the template uses to render mathematical text.
Use the legacy layout on versions of TeX Live from before 2021, which do not include the package.
To enable the legacy layout, pass the \texttt{legacy} option to the \textit{Adonis} template:
\begin{verbatim}
\documentclass[legacy]{adonis}
\end{verbatim}
\subsubsection{Two columns}
The two-column layout gives the manuscript a conference paper-like look.
Since a two-column layout takes up more space, \textit{Adonis} reduces the margin sizes.
Part of the reclaimed margin size goes to the column separation to give the document a clean look and improve readability.
To enable the two-column layout, pass the \texttt{twocolumn} option to the \textit{Adonis} template:
\begin{verbatim}
\documentclass[twocolumn]{adonis}
\end{verbatim}
\subsubsection{Wide}
The default layout has wide margins, both to give the document a clean look and to reserve more space for margin notes.
If you require neither, you can reduce margin space and widen the text area by using the wide option:
\begin{verbatim}
\documentclass[wide]{adonis}
\end{verbatim}
\subsection{Front-matter}
\textit{Adonis} changes the \textit{article}'s front page to make a better first-impression.
The title is no longer centred nor justified, and in the two-column layout, it occupies only one column.
Moreover, to give the title more prominence, the template shrinks secondary information and moves some of it to the bottom of the page.
The template thus splits the front-matter into two parts, the main and secondary details.
\subsubsection{Main details}
The main details include three parts: the title, the author and the abstract.
To make the difference evident, the template gives the title a large font size and the author a smaller size, and italicizes the abstract.
A horizontal rule separates the abstract from the main content.
In the two-column layout, \textit{Adonis} also starts a new column after the abstract.
The white-space gives the template character and increases the separation between the abstract and the main text.
The title also appears slightly smaller in two-column layout, again due to the decreased space.
You can specify the title, subtitle, author and abstract using dedicated commands:
\begin{verbatim}
\title{Your title}
\subtitle{Your subtitle}
\author{Yours truly}
\abstract{\lipsum[0]}
\end{verbatim}
\subsubsection{Secondary details}
The rest of the front-matter details, including the affiliations, the date of publication and the correspondence, appear at the bottom of the page in small type.\footnote{
To keep the template as simple as possible, \textit{Adonis} does not match the author with the affiliations.
In other words, you need to link the author with the affiliations manually, such as by adding superscript numbers next to your authors and next to their affiliations.
}
The secondary details are separated from the abstract and main text by a horizontal rule.
The template only renders the secondary details if you fill them in explicitly, so if you need a quick-start, you can leave them out altogether.
You can specify the secondary details using dedicated commands:
\begin{verbatim}
\affiliation{Affiliation}
\correspondence{youremail@tld.com}
\version{\today}
\end{verbatim}
\section{Typography}
The second major change concerns the typography.
\textit{Adonis} uses the Source font family to improve readability: Source Serif Pro for the main text, and Source Sans Pro for headings.
All paragraphs are justified to give the document a clean look.
\textit{Adonis} uses the same font size as in the base \textit{article} template: 10pt.
Differently from it, however, \textit{Adonis} uses a larger line-height: 1.4.
Apart from the normal size, the template also defines the \texttt{tiny}, \texttt{footnotesize}, \texttt{small}, \texttt{large} and \texttt{huge} sizes.
Font sizes larger than normal use a smaller line-height: about 1.2.
Moreover, \textit{Adonis} makes some subtler changes.
For example, the template uses the semi-bold font-weight in place of the actual bold-weight when using \texttt{\textbackslash{}textbf}, which looks more subtle next to the regular font-weight.
The template also uses the \texttt{microtype} package to enable protrusion and expansion; the former lets punctuation bleed slightly into the margins, and the latter uses varying font widths to make the word-spacing more even.
\subsection{Math}
The Source Pro family does not have support for mathematical text.
Instead, \textit{Adonis} uses the Noto Serif font to render mathematical text.
For example, the following equation represents the golden ratio $\phi$, on which I based the page margins.
The font has a thickness much closer to Source Serif's than the default font.
\begin{equation}
\phi = \frac{1 + \sqrt{5}}{2}
\end{equation}
Note that the \texttt{notomath} package is only available from TeX Live 2021 onward.
To use the template on earlier versions, pass the \texttt{legacy} option to the document class:
\begin{verbatim}
\documentclass[legacy]{adonis}
\end{verbatim}
\subsection{Headings}
Unlike the rest of the text, headings use the Source Sans Pro family.
All headings have the same size as the text, but they have a semi-bold font-weight and a small-caps shape.
The different font serves to draw attention to headings, and thus make the manuscript easier to navigate.
\textit{Adonis} supports three heading levels.
\subsubsection{Section}
The section is the highest level in manuscripts.
Therefore \textit{Adonis} adds a hefty margin before them, such that sections leap out when scrolling.
\subsubsection{Subsection}
The subsection is the second-highest level in manuscripts.
Subsections have a smaller margin than sections so that they are not easily-mistaken for sections.
\subsubsection{Subsubsection}
The subsubsection is the third-highest level in manuscripts.
Differently from all other headings, the subsubsection has a run-in header, which means that the text starts on the same line as the heading—like this one.
This style encourages subsubsections not to have more than one paragraph.
\section{Other elements}
\begin{table*}[t!]
\begin{tabularx}{\linewidth}{ l l X }
\textbf{Version} & \textbf{Date} & \textbf{Changelog} \\ \hline
0.1 & April 16, 2023 & Initial release \\
0.2 & May 12, 2023 & Improved text readability, new math font and \texttt{legacy} option, dark mode, and miscellaneous layout changes \\
0.3 & November 5, 2023 & New subtitle and separator commands, more font sizes
\end{tabularx}
\caption{The template's version history.}
\label{"Table: version history"}
\end{table*}
In addition to the layout and typography, \textit{Adonis} also makes slight changes to other common \LaTeX{} elements:
\begin{itemize}
\item More padding to table cells and more space to rows, as shown in Table~\ref{"Table: version history"}
\item Smaller font size to margins such that they are not too prominent
\item A new \texttt{\textbackslash{}separator} element
\end{itemize}
\section{Conclusion}
I designed \textit{Adonis} to be as simple to use as possible.
The optional commands, for example, mean that you do not have to define everything at once; you can simply start writing.
To make the template easier to use, \textit{Adonis} also comes with a separate file, \texttt{quickstart.tex}, without text, commented-out commands and space to write.
I hope that you find this template to elevate both form and function, and that it proves it possible for the two to co-exist.
If you find any issues in \textit{Adonis}, or if you have suggestions to make it better, you can reach out to me at the email on the first page, or by opening an issue on the template's repository~\cite{repository}.
\begin{thebibliography}{5}
\bibitem{repository}
Adonis template. Nicholas Mamo (2023). \url{https://github.com/NicholasMamo/adonis-template}
\end{thebibliography}
\end{document}