diff options
author | Norbert Preining <norbert@preining.info> | 2021-03-12 03:00:41 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-03-12 03:00:41 +0000 |
commit | cf09e33d4f54e872c7090def0ad41b06fb559cdb (patch) | |
tree | 45e43abe52fa306171e09b1c8375ce2cd808017a /macros/unicodetex/latex/minimalist/minimalist-doc-en.tex | |
parent | 8379a45cf223651b1c06ebf5c680db900d83c6a5 (diff) |
CTAN sync 202103120300
Diffstat (limited to 'macros/unicodetex/latex/minimalist/minimalist-doc-en.tex')
-rw-r--r-- | macros/unicodetex/latex/minimalist/minimalist-doc-en.tex | 242 |
1 files changed, 242 insertions, 0 deletions
diff --git a/macros/unicodetex/latex/minimalist/minimalist-doc-en.tex b/macros/unicodetex/latex/minimalist/minimalist-doc-en.tex new file mode 100644 index 0000000000..219c749f09 --- /dev/null +++ b/macros/unicodetex/latex/minimalist/minimalist-doc-en.tex @@ -0,0 +1,242 @@ +%! TEX program = xelatex +\PassOptionsToPackage{dvipsnames}{xcolor} +\documentclass{einfart} + +\linenumbers % Enable line numbers + +%%================================ +%% TeX logo and URL +%%================================ +\usepackage{hologo} +\usepackage{url} + +%%================================ +%% For typestting code +%%================================ +\usepackage{listings} +\definecolor{lightergray}{gray}{0.99} +\lstset{language=[LaTeX]TeX, + keywordstyle=\color{RoyalBlue}, + basicstyle=\ttfamily, + commentstyle=\color{ForestGreen}\ttfamily, + stringstyle=\rmfamily, + showstringspaces=false, + breaklines=true, + frame=leftline, + backgroundcolor=\color{lightergray}, + flexiblecolumns=true, + escapeinside={(*}{*)}, + % numbers=left, + numberstyle=\scriptsize, stepnumber=1, numbersep=5pt, + firstnumber=last, +} +\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$} +\lstset{morekeywords=% + {CreateTheorem,proofideanameCN,cref,dnf,needgraph,UseLanguage, + linenumbers,nolinenumbers,subsection,maketitle + } +} +\lstnewenvironment{code}% +{\LocallyStopLineNumbers% +\setkeys{lst}{columns=fullflexible,keepspaces=true}% +} +{\ResumeLineNumbers} + +\providecommand{\minimalist}{\textsf{minimalist}} +\providecommand{\einfart}{\textsf{einfart}} +\providecommand{\einfartfast}{\textsf{einfartfast}} +\providecommand{\simplivre}{\textsf{simplivre}} +\providecommand{\simplivrefast}{\textsf{simplivrefast}} + +%%================================ +%% Main text +%%================================ +\begin{document} + +\title{\minimalist{}, document-class series with simple and clear design\thanks{Corresponding to: \texttt{\minimalist{} 2021/03/11}}} +\author{Jinwen} +\date{March 2021, Beijing} + +\maketitle + +\begin{abstract} + The \minimalist{} class series includes \einfart{} for typesetting articles, \simplivre{} for typesetting books, and two corresponding ``fast'' versions. My original intention in designing this series was to write drafts and notes that look simple but not shabby. + + These document-classes support three languages: English, French, and Chinese, and these three languages can be switched seamlessly in a single document. Due to the usage of custom fonts, they need to be compiled with \hologo{XeLaTeX} or \hologo{LuaLaTeX}. + + Finally, this documentation is typeset using \einfart{}. You can think of it as a short introduction and demonstration. +\end{abstract} + +\tableofcontents + +\section{On the naming and differences of these document-classes} +\einfart{} is taken from German word ``einfach'' (``simple''), combined with the first three letters of ``artikel'' (``article''). + +\simplivre{} is taken from French words ``simple'' and ``livre'' (for ``book''). + +\einfartfast{} and \simplivrefast{} are faster but slightly rougher version of \einfart{} and \simplivre{}. The main differences are: +\begin{itemize} + \item Use simpler math font configuration; + \item Do not use hyperref; + \item Do not use tikz; + \item Use polyglossia instead of babel to support multiple languages. (Using polyglossia will increase the compilation speed slightly, but the current compatibility with Chinese is not perfect. When it becomes more stable, I will consider fully switching to polyglossia) +\end{itemize} + +During the writing stage of your document, it is recommended to use the ``fast'' version to speed up compilation and improve the smoothness of your writing experience. At the end, you can remove the ``fast'' mark to get the final version. + +\section{Some instructions} + +There is no indentation at the beginning of each paragraph, but there will be a half-line space between each two paragraphs. like this --- + +Here is the next paragraph. + +\subsection{Theorem and reference} + +Environments such as definitions and theorems have been pre-defined and can be used directly, for example: + +\begin{code} + \begin{definition}[Strange things] \label{def: strange} ... +\end{code} + +will produce +\begin{definition}[Strange things]\label{def: strange} + This is the definition of some strange objects. +\end{definition} + +There is approximately an one-line space before and after the theorem environment. There will be a symbol to mark the end of the environment. + +When referencing, you can directly use clever reference \lstinline|\cref{(label name)}|. For example, \lstinline|\cref{def: strange}| will be displayed as: \cref{def: strange}. + +\subsection{Define a new theorem-like environment} + +First define the name of this environment in the language used: \lstinline|\(name of environment)(language name)|. Where \lstinline|(language name)| can be \lstinline|EN|, \lstinline|FR|, \lstinline|CN|, etc., and then define this environment in one of the following four ways: +\begin{itemize} + \item \lstinline|\CreateTheorem*{(name of environment)}| + \item \lstinline|\CreateTheorem{(name of environment)}[(numbered like)]| + \item \lstinline|\CreateTheorem{(name of environment)}<(numbered within)>| + \item \lstinline|\CreateTheorem{(name of environment)}| +\end{itemize} + +\def\proofideanameEN{Idea} +\CreateTheorem*{proofidea} + +For example, +\begin{code} + \def\proofideanameEN{Idea} + \CreateTheorem*{proofidea} +\end{code} +defines an unnumbered environment \lstinline|proofidea|, which supports using in the English context, and the effect is as follows: + +\begin{proofidea} + ... +\end{proofidea} + +\subsection{Draft mark} + +You can use \lstinline|\dnf| to mark the unfinished part. For example: +\begin{itemize} + \item \lstinline|\dnf|: \quad \dnf + \item \lstinline|\dnf<Still need ...>|: \quad \dnf<Still need ...> +\end{itemize} + +Similarly, there is \lstinline|\needgraph| : +\begin{itemize} + \item \lstinline|\needgraph|: \needgraph + \item \lstinline|\needgraph<About ...>|: \needgraph<About ...> +\end{itemize} + +\subsection{Language configuration} +You can use \lstinline|\UseLanguage{(name of language))}| at any time to change the language, Language names include Chinese, English, French (the case of the first letter is arbitrary, for example, ``chinese'' is also acceptable). With this, the effects of various commands and environments will also change accordingly. + +For example, after using \lstinline|\UseLanguage{French}|, the theorem and the draft mark will be displayed as: + +\UseLanguage{French} +\begin{theorem}[Inutile]\label{thm} + Un théorem en Français. \dnf +\end{theorem} + +When referenced, the name of the theorem always matches the language of the region in which the theorem is located, for example, the definition of the beginning is still displayed in English in the current French mode: \cref{def: strange} and \cref{thm}。 + +\UseLanguage{English} + +\subsection{On the line numbers} +Line numbers can be turned on and off at any time. \lstinline|\linenumbers| is used to enable the line numbers, and \lstinline|\nolinenumbers| is used to disable them. For the sake of beauty, the title, table of contents, index and some other elements are not numbered. + +\subsection{On the footnotes in the title} +In \lstinline|\section| or \lstinline|\subsection| , if you wish to add footnotes, you can only: +\begin{itemize} + \item first write \lstinline|\mbox{\protect\footnotemark}|, + \item then add \lstinline|\footnotetext{...}| afterwards。 +\end{itemize} +This is a disadvantage brought about by the underline decoration of the title. + +\subsection{On the fonts} +\einfart{} and \simplivre{} use Palatino Linotype as the English font, FounderType's YouSong and YouHei Simplified as the Chinese fonts, and partially use Neo Euler as the mathematical font: +\begin{itemize} + \item English main font. \textsf{English sans serif font}. + \item 中文主要字体,\textsf{中文无衬线字体} + \item Math demonstration: \( \alpha, \beta, \gamma, \delta, 1,2,3,4, a,b,c,d \), \[\mathrm{li}(x)\coloneqq \int_2^{\infty} \frac{1}{\log t}\,\mathrm{d}t \] +\end{itemize} + +Among them, Neo Euler can be downloaded at \url{https://github.com/khaledhosny/euler-otf}. + +Other fonts are not free, you need to purchase and use them on yourself (you can check the details on FounderType's website: \url{https://www.foundertype.com} ). + +When the corresponding font is not installed, the font that comes with TeXlive will be used instead, and the experience might be reduced. + +\section{Document templates} + +\singlespacing +\LocallyStopLineNumbers +\begin{minipage}{0.4\textwidth} +\begin{code} +%! TEX program = xelatex +\documentclass{einfartfast} + +\linenumbers +\UseLanguage{French} + +\begin{document} + +\title{Titre} +\author{Nom} +\date{03 / 2021, Lieu} + +\maketitle + +%% Texte ici + +\end{document} +\end{code} +\end{minipage} +% +\hfill +% +\begin{minipage}{0.4\textwidth} +\begin{code} +%! TEX program = xelatex +\documentclass{einfartfast} + +\linenumbers +\UseLanguage{Chinese} + +\begin{document} + +\title{标题} +\author{姓名} +\date{2021年3月,地点} + +\maketitle + +%% 正文部分 + +\end{document} +\end{code} +\end{minipage} +\par +\ResumeLineNumbers + +\bigskip +(\lstinline|\UseLanguage| can be placed either in the preamble or in the body part, and can be used repeatedly as needed) + +\end{document} |