Update docs (mostly), fixes, etc
This commit is contained in:
BIN
docs/docs.pdf
Normal file
BIN
docs/docs.pdf
Normal file
Binary file not shown.
@@ -1,76 +1,58 @@
|
||||
\documentclass{article}
|
||||
|
||||
\usepackage{janishutz-helpers}
|
||||
\input{../janishutz-helpers.tex}
|
||||
|
||||
\setup{Docs - \LaTeX \hspace{0mm} helpers}
|
||||
|
||||
\begin{document}
|
||||
\startDocument
|
||||
\usetcolorboxes
|
||||
|
||||
\vspace{4cm}
|
||||
% ── Title page ──────────────────────────────────────────────────────
|
||||
|
||||
\vspace{2cm}
|
||||
\begin{center}
|
||||
\includegraphics[width=0.5\linewidth]{../assets/logo.jpg}
|
||||
\end{center}
|
||||
|
||||
|
||||
\vspace{5cm}
|
||||
\begin{center}
|
||||
\begin{Large}
|
||||
\textsc{Usage guide for Version 2.0.0}
|
||||
\end{Large}
|
||||
|
||||
\hlurl{https://git.janishutz.com/janishutz/latex}
|
||||
\end{center}
|
||||
|
||||
|
||||
% ── Table of contents ───────────────────────────────────────────────
|
||||
\newpage
|
||||
\printtoc{Aquamarine}
|
||||
|
||||
\newpage
|
||||
\section{Introduction}
|
||||
This set of \LaTeX files is designed to give you a good looking, pre-configured \LaTeX setup, which helps you get started much more quickly.
|
||||
|
||||
It has some configuration options already, but more are to come soon. If you have any suggestions as to what should be added, don't hesitate to open a support ticket at \url{https://support.janishutz.com?a=add} or contacting me via email to \texttt{development@janishutz.com}.
|
||||
|
||||
|
||||
\section{Breaking Changes}
|
||||
Please note that the regex provided below are for NeoVim and you may need to replace \verb|\(\)| with \verb|()|
|
||||
\subsection{Time complexity}
|
||||
The timecomplexity commands have been updated to require math environment. You can use the following regex to fix them
|
||||
|
||||
\verb|/ \\tc\([olt]\){\(.*)}\([, .\n]\)/ \$\\tc\1{\2}\$\3/g| (execute first)\\
|
||||
and \verb|/\\text{\\tc\([olt]\){\(.*\)}}/\\tc\1{\2}/g|
|
||||
|
||||
\subsection{Labels \& Environments}
|
||||
The counter environments can now be referenced (see \ref{sec:counters}).
|
||||
Due to the new requirements set out by that addition, it is now no longer possible to manually update the counters using
|
||||
\verb|\setcounter|.
|
||||
Use the below regex to replace all occurrences of \verb|\setcounter| with the new format.
|
||||
Please note that this will overwrite \textit{all} occurrences of \verb|\setcounter| with the specific old format with \verb|\setLabelNumber|:
|
||||
|
||||
\verb|/\\setcounter{\(.*\)s}/\\setLabelNumber{\1}/g| and \verb|/\\setcounter{all}/\\setLabelNumber{all}/g|
|
||||
|
||||
and for the \verb|\stepcounter| as well
|
||||
|
||||
\verb|/\\stepcounter{\(.*\)s}/\\stepLabelNumber{\1}| and \verb|/\\stepcounter{all}/\\stepLabelNumber{all}/g|.
|
||||
|
||||
|
||||
\section{Installation}
|
||||
You can install these helper files by downloading this repo and storing it to any location on your PC, remembering where that location is.
|
||||
|
||||
You may also install the VSCode snippets found in the vscode-snippets folder. These snippets provide autocompletion for many of the commands that this helper file provides.
|
||||
|
||||
|
||||
\input{./parts/usage.tex}
|
||||
|
||||
\input{./parts/custom-loader.tex}
|
||||
|
||||
% ┌ ┐
|
||||
% │ Reference │
|
||||
% │ Imports │
|
||||
% └ ┘
|
||||
\input{./parts/intro.tex}
|
||||
\input{./parts/usage.tex}
|
||||
|
||||
|
||||
% ── Reference ───────────────────────────────────────────────────────
|
||||
\input{./parts/reference/intro.tex}
|
||||
\input{./parts/reference/loading.tex}
|
||||
\input{./parts/reference/math.tex}
|
||||
\input{./parts/reference/cs.tex}
|
||||
\input{./parts/reference/style/intro.tex}
|
||||
\input{./parts/reference/style/spacing.tex}
|
||||
\input{./parts/reference/style/tcolorbox/default.tex}
|
||||
\input{./parts/reference/style/tcolorbox/counter.tex}
|
||||
\input{./parts/reference/style/tcolorbox/other.tex}
|
||||
\input{./parts/reference/style/descriptors.tex}
|
||||
\input{./parts/reference/tables-index.tex}
|
||||
\input{./parts/reference/extras.tex}
|
||||
|
||||
|
||||
\input{./parts/troubleshooting.tex}
|
||||
% \input{./parts/reference/extras.tex}
|
||||
%
|
||||
%
|
||||
% \input{./parts/troubleshooting.tex}
|
||||
|
||||
\end{document}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
\newsection
|
||||
\section{Custom Loader}
|
||||
You can create a custom loader by defining a \verb|load|\{\textit{string}\} macro (or any other, if you are aware you need to change that in your main file for it to work) that uses the \verb|\dir| command to resolve the custom parts.
|
||||
Take a look at the \texttt{/include.tex} file for inspiration on how to do it, if you also want it to do case distinction.
|
||||
|
||||
You can also include some the pre-built configs from the \texttt{dist/} folder.
|
||||
20
docs/parts/intro.tex
Normal file
20
docs/parts/intro.tex
Normal file
@@ -0,0 +1,20 @@
|
||||
\newpage
|
||||
\section{Introduction}
|
||||
This set of \LaTeX files is designed to give you a good looking, pre-configured \LaTeX setup, which helps you get started much more quickly.
|
||||
|
||||
There are quite a lot of configuration options, but it is likely that more are to come in the future.
|
||||
If you have any suggestions as to what should be added, don't hesitate to open a \hlhref{https://support.janishutz.com?a=add}{support ticket}\
|
||||
or contacting me via email to \texttt{development@janishutz.com}.
|
||||
|
||||
|
||||
\section{Breaking Changes}
|
||||
The current version is almost entirely incompatible with Version 1.X and you should familiarize yourself with the new commands.
|
||||
|
||||
The docs contain a section (section \ref{sec:migration}) on migrating from V1.X to V2.X
|
||||
|
||||
|
||||
\section{Installation}
|
||||
You can install these helper files by downloading this repo and storing it to any location on your PC, remembering where that location is.
|
||||
|
||||
You may also install the VSCode snippets found in the vscode-snippets folder. These snippets provide autocompletion for many of the commands that this helper file provides.
|
||||
|
||||
0
docs/parts/migration/00_intro.tex
Normal file
0
docs/parts/migration/00_intro.tex
Normal file
@@ -1,9 +1,7 @@
|
||||
\newpage
|
||||
\subsection{CS-Commands}
|
||||
These commands have to be executed inside math environment, except \verb|\timecomplexity| and \verb|\tc|.
|
||||
These commands have to be executed inside math environment
|
||||
\begin{itemize}
|
||||
\item \verb|\timecomplexity| Prints the word time complexity with a coloured box.
|
||||
\item \verb|\tc| Shorthand for \verb|\tct|. Deprecated
|
||||
\item \verb|\tct| Time complexity in $\tct{}$-notation (average case)
|
||||
\item \verb|\tco| Time complexity in $\tco{}$-notation (worst case / upper bound)
|
||||
\item \verb|\tcl| Time complexity in $\tcl{}$-notation (best case / lower bound)
|
||||
@@ -16,7 +14,7 @@ These commands have to be executed inside math environment, except \verb|\timeco
|
||||
\item \verb|\alphabetbool| Prints $\alphabetbool$
|
||||
\end{itemize}
|
||||
|
||||
\fhlc{Aquamarine}{Algorithms}
|
||||
\subsubsection{Algorithms}
|
||||
\begin{minted}{latex}
|
||||
\begin{algo}{functionName(A)}
|
||||
\Procedure{functionName}{$(A)$}
|
||||
@@ -30,3 +28,40 @@ These commands have to be executed inside math environment, except \verb|\timeco
|
||||
\State\Return "Hello World"
|
||||
\EndProcedure
|
||||
\end{algo}
|
||||
|
||||
|
||||
\subsubsection{Code}
|
||||
If you get compilation errors, be sure to enable \texttt{-shell-escape} for your compiler.
|
||||
\textit{(Note: Some newer versions of LaTeX do no longer require this and it is better to keep it turned off for security reasons, if it works without)}!
|
||||
|
||||
|
||||
\paragraph{Code inlined in tex file}
|
||||
\begin{minted}{latex}
|
||||
\begin{code}{language}
|
||||
//Code goes here
|
||||
\end{code}
|
||||
\end{minted}
|
||||
|
||||
This is nothing different than a wrapper for a minted environment with a box drawn around it.
|
||||
|
||||
Example (in python):
|
||||
|
||||
\begin{code}{python}
|
||||
def hello_world():
|
||||
print("hello world!")
|
||||
\end{code}
|
||||
|
||||
|
||||
\paragraph{Code in separate files}
|
||||
It is also possible to load code from a source file using the provided commands:
|
||||
\begin{itemize}
|
||||
\item \verb|\inputcode|\{\textit{language}\}\{\textit{file}\}, where \textit{language} is the programming language
|
||||
and \textit{file} is the file name of the file to be loaded, relative to the main tex file.
|
||||
\item \verb|\inputcodewithfilename|\{\textit{language}\}\{\textit{hidden-path}\}\{\textit{shown-path}\}, where \textit{language} is the programming language,
|
||||
\textit{hidden-path} is the part of the path you want to hide of the file to be loaded, relative to the main tex file
|
||||
and \textit{shown-path} is the displayed part.
|
||||
\end{itemize}
|
||||
\inlineexample
|
||||
\begin{minted}{latex}
|
||||
\inputcodewithfilename{python}{/start/of/path}{/shown/path/file.py}
|
||||
\end{minted}
|
||||
|
||||
@@ -1,42 +1,10 @@
|
||||
\newpage
|
||||
\subsection{Extras}
|
||||
\subsubsection{BibTeX}
|
||||
\textit{Included in \texttt{recommended} and up}
|
||||
|
||||
\section{BibTeX}
|
||||
Use \verb|\setupBiber|\{\textit{/path/to/your/bib/sources.bib file}\} in the preamble to prepare, then use \verb|\printbib| to print your bibliography.
|
||||
|
||||
To add more sources, simply use bibter's built-in macro \verb|\addbibresource|\textit{\{filepath\}}, which will load your \texttt{.bib} file.
|
||||
You need to use that inside the preamble as well.
|
||||
|
||||
|
||||
\subsubsection{Glossary}
|
||||
\textit{Included in \texttt{recommended} and up}
|
||||
|
||||
\section{Glossary}
|
||||
Use \verb|\setupGlossary| in the preamble to prepare, then use the normal glossary commands to add entries to the glossary. When you want to print it, use \verb|\printGlossary|.
|
||||
|
||||
\subsubsection{Minted}
|
||||
\textit{Included in \texttt{full}}
|
||||
|
||||
Be sure to enable \texttt{-shell-escape} for your compiler
|
||||
\textit{(Note: Some newer versions of LaTeX do no longer require this and it is better to keep it turned off for security reasons, if it works without)}!
|
||||
|
||||
When \texttt{minted} is available via these helpers, you will also have access to the \texttt{code} environment:
|
||||
|
||||
\begin{minted}{latex}
|
||||
\begin{code}{language}
|
||||
//Code goes here
|
||||
\end{code}
|
||||
\end{minted}
|
||||
|
||||
This is nothing different than a wrapper for a minted environment with a box drawn around it.
|
||||
|
||||
Example (in python):
|
||||
|
||||
\begin{code}{python}
|
||||
def hello_world():
|
||||
print("hello world!")
|
||||
\end{code}
|
||||
|
||||
If you want to print code inline, use \verb|\inlinecode|\textit{\{string\}}, which renders to \inlinecode{code}.
|
||||
|
||||
\textit{Caveat: This is not using the \texttt{verbatim} environment due to various limitations of that environment and instead is simply using} \verb|\texttt{}|, so you cannot use this to print \LaTeX-commands
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
\section{Full Command Reference}
|
||||
\subsection{Variables}
|
||||
\begin{itemize}
|
||||
\item \textit{scope}: \texttt{minimal}, \texttt{most}, \texttt{recommended}, \texttt{all} or \texttt{letter}
|
||||
\item \textit{string}: Any normal text
|
||||
\item \textit{boolean}: \texttt{true} or \texttt{false}
|
||||
\item \textit{math}: Any math input
|
||||
\item \textit{number}: Any non-negative integer, i.e. no commas
|
||||
\item \textit{color}: Any of the \texttt{dvipsnames} colours of \texttt{xcolor}
|
||||
\item \textit{langauge}: 2-character country code (currently only \texttt{de} and \texttt{en} supported)
|
||||
\item \textit{color}: Any of the \texttt{dvipsnames} colours of \texttt{xcolor} or as defined in the color config file
|
||||
\end{itemize}
|
||||
|
||||
|
||||
@@ -3,37 +3,54 @@
|
||||
\begin{itemize}
|
||||
\item \verb|\renewcommand{\authorTitle}|\{\textit{string}\} Change the author (in the title) for this document only
|
||||
\item \verb|\renewcommand{\authorHeaders}|\{\textit{string}\} Change the author (in the header) for this document only
|
||||
\item \verb|\renewcommand{\<descriptor>NamingDE}|\{\textit{string}\} Configure translations for descriptors on the fly (for DE)
|
||||
\item \verb|\renewcommand{\<descriptor>NamingEN}|\{\textit{string}\} Configure translations for descriptors on the fly (for EN)
|
||||
\item \verb|\setnumberingpreset|\{\textit{string}\}
|
||||
Change the numbering preset of definitions, lemmas, etc for this document.
|
||||
Value can be \texttt{off}, \texttt{separate}, \texttt{combined}.
|
||||
\item \verb|\renewcommand{<descriptor>numbering}|\{\textit{string}\}
|
||||
Change the numbering for an individual descriptor, passed as first argument.
|
||||
The second value can be \texttt{off}, \texttt{separate}, \texttt{combined} or \texttt{default}.
|
||||
If set to \texttt{default}, it will follow the \verb|\numberingpreset| setting.
|
||||
If you do not override it here, it will follow your global config as set in the config directory
|
||||
and if unset there, it will follow the \verb|\numberingpreset| setting.
|
||||
\item \verb|\renew|\{\textit{string}\} Change the format of the numbering of definitions, etc.
|
||||
The value can be set to any of the below
|
||||
\begin{itemize}[noitemsep]
|
||||
\item none = $<$section$>$.$<$number$>$
|
||||
\item section = $<$section$>$.$<$number$>$
|
||||
\item subsection = $<$section$>$.$<$subsection$>$.$<$number$>$
|
||||
\item subsubsection = $<$section$>$.$<$subsection$>$.$<$subsubsection$>$.$<$number$>$
|
||||
\item paragraph = $<$section$>$.$<$subsection$>$.$<$subsubsection$>$.$<$paragraph$>$.$<$number$>$
|
||||
\end{itemize}
|
||||
Changing this won't affect all of numbering prior to the command, only after. You can change this setting (and the ones above) at any point in the document
|
||||
\item \verb|\setcounter{descriptorShadeStrength}|\{\textit{number}\} Change the colour saturation of the inline descriptors
|
||||
\item \verb|\setcounter{shadeStrength}|\{\textit{number}\} Change the colour saturation of the \verb|\shade| command
|
||||
\item \verb|\loadGerman| Load german configuration. Needs to be in preamble and you may only use it once
|
||||
\item To change the font for the entire document, load the font package using \verb|\usepackage|, with the last occurrence of a font package determining the active one.
|
||||
Then select the type by using \verb|\setFontType|\textit{\{mono $|$ serif $|$ sans\}}.
|
||||
A list of fonts is available \color{Cyan}\href{https://www.overleaf.com/learn/latex/Font_typefaces#Reference_guide}{here}\color{black}.
|
||||
You may change the font only for a specific section, by enclosing \verb|\setFont| and the text that should be written in said typeface in curly braces.
|
||||
\end{itemize}
|
||||
\subsubsection{Letters}
|
||||
\begin{itemize}
|
||||
\item \verb|\renewcommand{\name}|\{\textit{string}\} Change the name (for letters) for this document only
|
||||
\item \verb|\renewcommand{\street}|\{\textit{string}\} Change the street (for letters) for this document only
|
||||
\item \verb|\renewcommand{\city}|\{\textit{string}\} Change the city (for letters) for this document only
|
||||
\item \verb|\renewcommand{\countrycode}|\{\textit{string}\} Change the country-code (for letters) for this document only
|
||||
\item \verb|\renewcommand{\theoremde}|\{\textit{string}\} Change the translation for theorem in German (usually either ``Satz'' or ``Theorem'')
|
||||
\item \verb|\setNumberingStyle|\{\textit{number}\} Change the numbering of definitions, lemmas, etc for this document. 0 = off, 1 = Separately, 2 = Combined (except for definition), 3 = Combined
|
||||
\item \verb|\setcounter{numberSubsections}|\{\textit{number}\} Change the format of the numbering of definition, lemma, etc.
|
||||
0 = $<$section$>$.$<$number$>$,\\
|
||||
1 = $<$section$>$.$<$subsection$>$.$<$number$>$,\\
|
||||
2 = $<$section$>$.$<$subsection$>$.$<$subsubsection$>$.$<$number$>$\\
|
||||
Changing this won't affect all of numbering prior to the command, only after. You can change this setting (and the one above) at any point in the document
|
||||
\item \verb|\setcounter{descriptorShadeStrength}|\{\textit{number}\} Change the colour saturation of the inline descriptors
|
||||
\item \verb|\setcounter{shadeStrength}|\{\textit{number}\} Change the colour saturation of the \verb|\shade| command
|
||||
\item \verb|\setLang|\{\textit{language}\} Change the language. Will automatically load babel in German. Can only be used once and only at the start of the document or in the preamble, as repeated usage leads to undefined behaviour
|
||||
\item To change the font for the entire document, load the font package using \verb|\usepackage|, with the last occurrence of a font package determining the active one.
|
||||
Then select the type by using \verb|\setFontType|\textit{\{mono $|$ serif $|$ sans\}}.
|
||||
A list of fonts is available \color{Cyan}\href{https://www.overleaf.com/learn/latex/Font_typefaces#Reference_guide}{here}\color{black}.
|
||||
You may change the font only for a specific section, by enclosing \verb|\setFont| and the text that should be written in said typeface in curly braces.
|
||||
\end{itemize}
|
||||
|
||||
\newpage
|
||||
\subsection{Setup, Loading \& Translation}
|
||||
\begin{itemize}
|
||||
\item \verb|\load|\{\textit{scope}\} Load the selected \textit{scope}
|
||||
\item \verb|\setup|\{\textit{string}\} Prepare the document with the \textit{string} being the title
|
||||
\item \verb|\setupCheatSheet|\{\textit{string}\} Prepare the document with smaller borders and no headers / footers. \textit{string} is the title
|
||||
\item \verb|\setupCheatSheet|[\textit{boolean}]\{\textit{string}\} Prepare the document with smaller borders and no headers / footers.
|
||||
The mandatory argument is the title, the optional argument will, if set to \texttt{true} use a landscape layout (default)
|
||||
and a horizontal layout if set to \texttt{false}.
|
||||
\item \verb|\setupBarebones|\{\textit{string}\} Minimal setup, only borders and title set
|
||||
\item \verb|\startDocument| Initialize the document. Has to be called after \verb|\begin{document}|
|
||||
\item \verb|\usetcolorboxes| Initialize tcolorboxes. In main body, if you want to use fancy boxes. (requires \texttt{most} or up)
|
||||
\item \verb|\translate|\{\textit{string}\}\{\textit{string}\} First \textit{string} is English, second \textit{string} is German. Switches automatically based on language selected
|
||||
\item \verb|\tr|\{\textit{string}\}\{\textit{string}\} Shorthand for \verb|\translate|
|
||||
\item \verb|\numberingOn| Turn on the numbering (will set back to config previously set by \verb|\setNumberingStyle|)
|
||||
\item \verb|\numberingOff| Turn off the numbering (if you want to temporarily not use it. Do not use \verb|\setNumberingStyle| for that)
|
||||
\item \verb|\numberingOn| Turn on the numbering (if previously turned off using \verb|\numberingOff| or set in the config)
|
||||
\item \verb|\numberingOff| Turn off the numbering (useful to temporarily turn off numbering)
|
||||
\end{itemize}
|
||||
|
||||
@@ -5,14 +5,13 @@ All these have to be executed in the math environment.
|
||||
\item \verb|\R| Prints $\R$. Same goes for \verb|\C| printing $\C$, etc.
|
||||
\item \verb|\floor|\{\textit{math}\} Round down symbol, e.g. $\floor{n}$
|
||||
\item \verb|\ceil|\{\textit{math}\} Round up symbol, e.g. $\ceil{n}$
|
||||
\item \verb|\hastoeq| or \verb|\mbeq| Has to equal symbol (non-standard), $\hastoeq$
|
||||
\item \verb|\Leftrightarrowequiv| Equivalence transformation symbol, $\Leftrightarrowequiv$.
|
||||
\item \verb|\Rightarrowequiv| Equivalence transformation symbol, $\Rightarrowequiv$.
|
||||
\item \verb|\Leftarrowequiv| Equivalence transformation symbol, $\Leftarrowequiv$.
|
||||
\item \verb|\defAs| Define as, i.e. $\defAs$
|
||||
\item \verb|\defEquiv| Define as, but with a two-sided implication instead of equality, i.e. $\defEquiv$
|
||||
\item \verb|\defImplies| Define as, but with one-sided implication, i.e. $\defImplies$
|
||||
\item \verb|\divides| Divider or divides symbol, e.g. $a \divides b$
|
||||
\item \verb|\divider| Divider or divides symbol, e.g. $a \divider b$
|
||||
\item \verb|\lcm| Least common multiple, $\lcm$
|
||||
\item \verb|\arcsinh| Inverse of hyperbolic sine, $\arcsinh$
|
||||
\item \verb|\arccosh| Inverse of hyperbolic cosine, $\arccosh$
|
||||
@@ -21,8 +20,10 @@ All these have to be executed in the math environment.
|
||||
\item \verb|\limni| Shortened limit notation for $n \rightarrow \infty$, $\displaystyle \limni$
|
||||
\item \verb|\liminfni| Shortened limit inferior notation for $n \rightarrow \infty$, $\displaystyle \liminfni$
|
||||
\item \verb|\limsupni| Shortened limit superior notation for $n \rightarrow \infty$, $\displaystyle \limsupni$
|
||||
\item \verb|\der|\{\textit{math}\} Derivative, $\displaystyle \der{x}$
|
||||
\item \verb|\dern|\{\textit{math}\}\{\textit{math}\} Higher derivative, $\displaystyle \dern{x}{2}$
|
||||
\item \verb|\diff|\{\textit{math}\} Derivative, $\displaystyle \diff{x}$
|
||||
\item \verb|\diffn|\{\textit{math}\}\{\textit{math}\} Higher derivative, $\displaystyle \diffn{x}{2}$
|
||||
\item \verb|\pardiff|\{\textit{math}\} Partial derivative, $\displaystyle \pardiff{x}$
|
||||
\item \verb|\pardiffn|\{\textit{math}\}\{\textit{math}\} Higher partial derivative, $\displaystyle \pardiffn{x}{2}$
|
||||
\item \verb|\elementstack|\{\textit{math}\}\{\textit{math}\} Stack two elements on top of eachother. Uses \verb|\genfrac| under the hood.
|
||||
Can be used for example in limits as an alternative to \verb|\atop| or \verb|\substack|.
|
||||
\end{itemize}
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
\newpage
|
||||
\subsubsection{Inline \& Shortened descriptors}
|
||||
\textit{Included in \texttt{most} and up}
|
||||
|
||||
See \ref{sec:counters} for a guide on how to change the current number.
|
||||
|
||||
\fhlc{Aquamarine}{Inline}
|
||||
\paragraph{Inline}
|
||||
\begin{tables}{ll}{Command & Output}
|
||||
\verb|\inlineex| & \inlineex \\
|
||||
\verb|\inlinedef| & \inlinedef \\
|
||||
\verb|\inlineexample| & \inlineexample \\
|
||||
\verb|\inlinedefinition| & \inlinedefinition \\
|
||||
\verb|\inlinetheorem| & \inlinetheorem \\
|
||||
\verb|\inlinelemma| & \inlinelemma \\
|
||||
\verb|\inlinecorollary| & \inlinecorollary \\
|
||||
@@ -18,10 +16,10 @@ See \ref{sec:counters} for a guide on how to change the current number.
|
||||
\verb|\inlineproof| & \inlineproof \\
|
||||
\end{tables}
|
||||
|
||||
\fhlc{Aquamarine}{Shortened}
|
||||
\paragraph{Shortened}
|
||||
\begin{tables}{ll}{Command & Output}
|
||||
\verb|\shortex| & \shortex \\
|
||||
\verb|\shortdef| & \shortdef \\
|
||||
\verb|\shortexample| & \shortexample \\
|
||||
\verb|\shortdefinition| & \shortdefinition \\
|
||||
\verb|\shorttheorem| & \shorttheorem \\
|
||||
\verb|\shortlemma| & \shortlemma \\
|
||||
\verb|\shortcorollary| & \shortcorollary \\
|
||||
@@ -31,45 +29,14 @@ See \ref{sec:counters} for a guide on how to change the current number.
|
||||
\verb|\shortremark| & \shortremark \\
|
||||
\verb|\shortproof| & \shortproof \\
|
||||
\end{tables}
|
||||
|
||||
\newpage
|
||||
|
||||
\fhlc{Aquamarine}{Inline (Named)}
|
||||
\begin{tables}{ll}{Command & Output}
|
||||
\verb|\fancyex|\{\textit{string}\} & \fancyex{Exercise} \\
|
||||
\verb|\fancydef|\{\textit{string}\} & \fancydef{Definition} \\
|
||||
\verb|\fancytheorem|\{\textit{string}\} & \fancytheorem{Theorem} \\
|
||||
\verb|\fancylemma|\{\textit{string}\} & \fancylemma{Lemma} \\
|
||||
\verb|\fancycorollary|\{\textit{string}\} & \fancycorollary{Corollary} \\
|
||||
\verb|\fancyproposition|\{\textit{string}\} & \fancyproposition{Proposition} \\
|
||||
\verb|\fancyfact|\{\textit{string}\} & \fancyfact{Fact} \\
|
||||
\verb|\fancyaxiom|\{\textit{string}\} & \fancyaxiom{Axiom} \\
|
||||
\verb|\fancyremark|\{\textit{string}\} & \fancyremark{Remark} \\
|
||||
\verb|\fancyproof|\{\textit{string}\} & \fancyproof{Proof} \\
|
||||
\end{tables}
|
||||
|
||||
\fhlc{Aquamarine}{Shortened (Named)}
|
||||
\begin{tables}{ll}{Command & Output}
|
||||
\verb|\compactex|\{\textit{string}\} & \compactex{Exercise} \\
|
||||
\verb|\compactdef|\{\textit{string}\} & \compactdef{Definition} \\
|
||||
\verb|\compacttheorem|\{\textit{string}\} & \compacttheorem{Theorem} \\
|
||||
\verb|\compactlemma|\{\textit{string}\} & \compactlemma{Lemma} \\
|
||||
\verb|\compactcorollary|\{\textit{string}\} & \compactcorollary{Corollary} \\
|
||||
\verb|\compactproposition|\{\textit{string}\} & \compactproposition{Proposition} \\
|
||||
\verb|\compactfact|\{\textit{string}\} & \compactfact{Fact} \\
|
||||
\verb|\compactaxiom|\{\textit{string}\} & \compactaxiom{Axiom} \\
|
||||
\verb|\compactremark|\{\textit{string}\} & \compactremark{Remark} \\
|
||||
\verb|\compactproof|\{\textit{string}\} & \compactproof{Proof} \\
|
||||
\end{tables}
|
||||
|
||||
|
||||
\subsubsection{Changing the counters}
|
||||
\label{sec:counters}
|
||||
\textit{Included in \texttt{most} and up}
|
||||
|
||||
\textit{Starting from the version of October 18, 2025, you may no longer use \texttt{$\backslash$setcounter} directly}
|
||||
|
||||
You may set the current number for the elements by setting their corresponding counter to the selected number.
|
||||
You can do this using \verb|\setLabelNumber|\{\textit{name of the environment}\}\{\textit{number}\},
|
||||
You can do this using \verb|\setLabelNumber|\{\textit{name of the environment}\}\{\textit{number}\},
|
||||
where you replace \textit{name of the environment} with one of the following:
|
||||
\texttt{definition}, \texttt{lemma}, \texttt{theorem}, \texttt{corollary}, \texttt{proposition}, \texttt{fact},
|
||||
\texttt{formula}, \texttt{axiom}, \texttt{example}, \texttt{remark}
|
||||
@@ -81,9 +48,9 @@ You may also use \verb|\stepLabelNumber|\{\textit{name of the environment}\} to
|
||||
|
||||
|
||||
\subsubsection{Referencing counters}
|
||||
\textit{Included in \texttt{most} and up, introduced on October 18, 2025}
|
||||
\hl{\textit{With recent overhaul has not been re-introduced yet, will be a feature again soon, with some changes}}
|
||||
|
||||
If you wish to reference a counter, you can do so by writing
|
||||
If you wish to reference a counter, you can do so by writing
|
||||
|
||||
\verb|\ref{<counter name>:<section>-<subsection>-<subsubsection>-<counter value>}|,
|
||||
|
||||
|
||||
@@ -1,17 +1,9 @@
|
||||
\newpage
|
||||
\subsection{Style}
|
||||
General styling commands. All other commands, except these ones require at least \texttt{most} to be the selected \textit{scope}
|
||||
\begin{itemize}
|
||||
\item \verb|\TODO| Print a highlighted \TODO
|
||||
\item \verb|\background|\{\textit{color}\}\{\textit{number}\}\{\textit{string}\} Print \background{ForestGreen}{50}{shaded text, with colour saturation}
|
||||
\item \verb|\shade|\{\textit{color}\}\{\textit{string}\} Print \shade{ForestGreen}{shaded text}
|
||||
\item \verb|\backdrop|\{\textit{string}\} Print \backdrop{text with gray backdrop}
|
||||
\item \verb|\fhlc|\{\textit{color}\}\{\textit{string}\} Print \fhlc{ForestGreen}{bold, underlined text in a coloured box}
|
||||
\item \verb|\fhl|\{\textit{string}\} Print \fhl{bold, underlined text in a white box}
|
||||
\item \verb|\printtoc|\{\textit{color}\} Print the table of contents (as seen on the first page). The normal \verb|\tableofcontents| still works as expected
|
||||
\item \verb|\smallhspace| Prints a 2mm hspace
|
||||
\item \verb|\mediumhspace| Prints a 5mm hspace
|
||||
\item \verb|\largehspace| Prints a 10mm = 1cm hspace
|
||||
\item \verb|\rmvspace| Removes some of the vertical whitespace printed by environments like \verb|align|
|
||||
\item \verb|\drmvspace| Removes some of the vertical whitespace printed by environments like \verb|align| (double the amount)
|
||||
\end{itemize}
|
||||
|
||||
80
docs/parts/reference/style/spacing.tex
Normal file
80
docs/parts/reference/style/spacing.tex
Normal file
@@ -0,0 +1,80 @@
|
||||
\subsubsection{Spacing}
|
||||
For spacing in math mode, prefer using the methods described \hlhref{https://www.overleaf.com/learn/latex/Spacing_in_math_mode}{here},
|
||||
for vertical spacing prefer the commands described below
|
||||
\begin{itemize}
|
||||
\item \verb|\smallhspace| Prints a 2mm hspace
|
||||
\item \verb|\mediumhspace| Prints a 5mm hspace
|
||||
\item \verb|\largehspace| Prints a 10mm = 1cm hspace
|
||||
\item \verb|\rmvspace|[\textit{number}] Removes an amount of vertical space. Should not be used unless can be avoided with general settings. Defaults to 0.5
|
||||
\end{itemize}
|
||||
|
||||
Vertical spacing config for the entire document. By default, the \LaTeX\ defaults are used.
|
||||
\begin{itemize}
|
||||
\item \verb|\noverticalspacing|
|
||||
\item \verb|\smallverticalspacing|
|
||||
\item \verb|\mediumverticalspacing| (approximately the same as the \LaTeX defaults)
|
||||
\item \verb|\largeverticalspacing|
|
||||
\end{itemize}
|
||||
You are of course free to redefine commands like \verb|\parskip|, etc to your liking, these commands are just provided for your convenience.
|
||||
See \hlhref{https://www.overleaf.com/learn/latex/\%5Cabovedisplayskip_and_related_commands}{here}\ for more details
|
||||
and \hlhref{https://latex-tutorial.com/latex-space/}{here for a good guide on spacing}.
|
||||
|
||||
To control paragraph spacing, see \hlhref{https://mirror.ox.ac.uk/sites/ctan.org/macros/latex/contrib/parskip/parskip.pdf}{here}\
|
||||
and \hlhref{https://www.overleaf.com/learn/latex/Articles/How_to_change_paragraph_spacing_in_LaTeX}{here}
|
||||
|
||||
To make use of \TeX's automatic wrapping of short alignment environments, use the \texttt{aligned}
|
||||
(or, if no alignment is needed, use the normal \verb|\[ <math> \]|) instead of the \texttt{align} environment for short equations.
|
||||
|
||||
\newpage
|
||||
Below a demonstration on the effects of the different settings:
|
||||
|
||||
\shade{Aquamarine}{No vertical spacing}\noverticalspacing
|
||||
|
||||
This is text:
|
||||
\[
|
||||
\int_{0}^{10} 4x^2 + 3x \cdot \frac{3 \ln(10)}{x^3} \dx x
|
||||
\]
|
||||
This is very long introductory text that exceeds the limit (same applies to long equations)
|
||||
\[
|
||||
\int_{0}^{10} 4x^2 + 3x \cdot \frac{3 \ln(10)}{x^3} \dx x
|
||||
\]
|
||||
Text following the equation (no paragraph break!)
|
||||
|
||||
|
||||
\shade{Aquamarine}{Small vertical spacing}\smallverticalspacing
|
||||
|
||||
This is text:
|
||||
\[
|
||||
\int_{0}^{10} 4x^2 + 3x \cdot \frac{3 \ln(10)}{x^3} \dx x
|
||||
\]
|
||||
This is very long introductory text that exceeds the limit (same applies to long equations)
|
||||
\[
|
||||
\int_{0}^{10} 4x^2 + 3x \cdot \frac{3 \ln(10)}{x^3} \dx x
|
||||
\]
|
||||
Text following the equation (no paragraph break!)
|
||||
|
||||
|
||||
\shade{Aquamarine}{Medium vertical spacing}\mediumverticalspacing
|
||||
|
||||
This is text:
|
||||
\[
|
||||
\int_{0}^{10} 4x^2 + 3x \cdot \frac{3 \ln(10)}{x^3} \dx x
|
||||
\]
|
||||
This is very long introductory text that exceeds the limit (same applies to long equations)
|
||||
\[
|
||||
\int_{0}^{10} 4x^2 + 3x \cdot \frac{3 \ln(10)}{x^3} \dx x
|
||||
\]
|
||||
Text following the equation (no paragraph break!)
|
||||
|
||||
|
||||
\shade{Aquamarine}{Large vertical spacing}\largeverticalspacing
|
||||
|
||||
This is text:
|
||||
\[
|
||||
\int_{0}^{10} 4x^2 + 3x \cdot \frac{3 \ln(10)}{x^3} \dx x
|
||||
\]
|
||||
This is very long introductory text that exceeds the limit (same applies to long equations)
|
||||
\[
|
||||
\int_{0}^{10} 4x^2 + 3x \cdot \frac{3 \ln(10)}{x^3} \dx x
|
||||
\]
|
||||
Text following the equation (no paragraph break!)
|
||||
@@ -1,6 +1,5 @@
|
||||
\newpage
|
||||
\fhlc{Aquamarine}{Counter-enabled}
|
||||
|
||||
\paragraph{Counter-enabled}
|
||||
These ones also have two settings, namely, you can change the counter behaviour and the inclusion of subsections in the numbering. See \ref{sec:perFileConf}.
|
||||
|
||||
See \ref{sec:counters} for a guide on how to change the current number and how to reference them.
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
\newpage
|
||||
\subsubsection{Tcolorboxes}
|
||||
\textit{Included in \texttt{most} and up}
|
||||
\paragraph{General boxes}
|
||||
These tcolorboxes can be created using the code displayed inside them.
|
||||
|
||||
Put \verb|\usetcolorboxes| right after \verb|\startDocument| (right after \verb|\begin{document}|) if you plan to use them.
|
||||
|
||||
\fhlc{Aquamarine}{General}
|
||||
\begin{terms}[]{Title here}
|
||||
\begin{minted}{latex}
|
||||
\begin{terms}[]{Title here}
|
||||
@@ -29,14 +27,6 @@ Put \verb|\usetcolorboxes| right after \verb|\startDocument| (right after \verb|
|
||||
\end{minted}
|
||||
\end{recall}
|
||||
|
||||
\begin{remarks}[]{Title here}
|
||||
\begin{minted}{latex}
|
||||
\begin{remarks}[]{Title here}
|
||||
|
||||
\end{remarks}
|
||||
\end{minted}
|
||||
\end{remarks}
|
||||
|
||||
\begin{usage}[]{Title here}
|
||||
\begin{minted}{latex}
|
||||
\begin{usage}[]{Title here}
|
||||
@@ -45,15 +35,6 @@ Put \verb|\usetcolorboxes| right after \verb|\startDocument| (right after \verb|
|
||||
\end{minted}
|
||||
\end{usage}
|
||||
|
||||
\begin{guides}[]{Title here}{Tutorial}
|
||||
\begin{minted}{latex}
|
||||
\begin{guides}[]{Title here}{Tutorial}
|
||||
% You can also change the right title on this one
|
||||
|
||||
\end{guides}
|
||||
\end{minted}
|
||||
\end{guides}
|
||||
|
||||
\begin{properties}[]{Title here}
|
||||
\begin{minted}{latex}
|
||||
\begin{properties}[]{Title here}
|
||||
|
||||
@@ -1,26 +1,9 @@
|
||||
\vspace{1cm}
|
||||
\fhlc{Aquamarine}{Language-Specific}
|
||||
\begin{conjugation}[]{Title here}
|
||||
\begin{minted}{latex}
|
||||
\begin{conjugation}[]{Title here}
|
||||
|
||||
\end{conjugation}
|
||||
\end{minted}
|
||||
\end{conjugation}
|
||||
\paragraph{Flexible}
|
||||
This tcolorbox has all the styles applied, but allows configuring the colour and both title boxes
|
||||
|
||||
\begin{forms}[]{Title here}
|
||||
\begin{minted}{latex}
|
||||
\begin{forms}[]{Title here}
|
||||
|
||||
\end{forms}
|
||||
\end{minted}
|
||||
\end{forms}
|
||||
|
||||
|
||||
|
||||
\fhlc{Aquamarine}{Flexible}
|
||||
\begin{general}[]{title}{second title}{red}
|
||||
This Tcolorbox is flexible and can take any main and secondary title, as well as any colour.\\
|
||||
This Tcolorbox is flexible and can take any main and secondary title, as well as any colour.
|
||||
|
||||
\begin{minted}{latex}
|
||||
\begin{general}[]{title}{second title}{red}
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
\newpage
|
||||
\subsection{Tables}
|
||||
\textit{Included in \texttt{most} and up}
|
||||
|
||||
You can set up nice looking tables using the \texttt{booktab} and \texttt{tabulary} environments.
|
||||
|
||||
\textit{New as of October 28 2025:} Tables and figures are now also numbered according to your settings
|
||||
@@ -24,16 +22,15 @@ This doesn't use the \texttt{table} environment, so no captions are possible, as
|
||||
\end{fullTable}
|
||||
\end{minted}
|
||||
|
||||
% TODO: Get it working again (generate new \thetable and \thefigure) for
|
||||
This outputs as
|
||||
|
||||
|
||||
\begin{fullTable}{ll}{Left & Right}{This is a caption}
|
||||
Left content & Right Content\\
|
||||
\end{fullTable}
|
||||
|
||||
|
||||
|
||||
\subsection{Index}
|
||||
\textit{Included in \texttt{most} and up}
|
||||
|
||||
If you want to use index, add \verb|\prepareIndex| to the preamble. Using \verb|\addIndexBold|\{\textit{string}\}, you can add entries to the index. They are printed in bold typeface in your document.
|
||||
Using \verb|\addIndex|\{\textit{string}\}, you can do the same, but the text remains normal and using \verb|\addIndexItalic|\{\textit{string}\}, it is printed in italics
|
||||
|
||||
@@ -5,9 +5,7 @@ You can type \texttt{latex-prepare} and press tab, if you have installed the VSC
|
||||
\begin{minted}{latex}
|
||||
\documentclass{article}
|
||||
|
||||
\newcommand{\dir}{~/path/to/helper} % TODO: Change your path here! No trailing slashes!
|
||||
\input{\dir/include.tex}
|
||||
\load{recommended} % TODO: Change the inclusion level (if necessary), see below
|
||||
\input{~/path/to/helpers/janishutz-helpers.tex} % TODO: Change your path here
|
||||
|
||||
\setup{Type your title here}
|
||||
|
||||
@@ -19,30 +17,26 @@ Type your \LaTeX here
|
||||
\end{document}
|
||||
\end{minted}
|
||||
|
||||
The \verb|\load| command takes one parameter, which can be one of the following:
|
||||
\begin{itemize}
|
||||
\item \texttt{minimal} Just the core styling and core functionality.
|
||||
\item \texttt{most} Includes Math, CS, Language and all styling.
|
||||
\item \texttt{recommended} The recommended setup. Includes BibTeX in addition to what is in most
|
||||
\item \texttt{all} If you want to also include glossaries or code with highlighting
|
||||
\item \texttt{letter} If you want to typeset a letter (see \ref{sec:letters})
|
||||
\end{itemize}
|
||||
|
||||
\subsection{Configuration}
|
||||
You can set a global config in config file in helper files directory. The file is located at
|
||||
You can set a global config in the config files in the helper files directory. They are located at
|
||||
|
||||
\texttt{/<path to helpers>/config/}.
|
||||
All config options are documented there.
|
||||
After changing them, run \texttt{build.sh} in the main directory.
|
||||
|
||||
Each of the options can also be overridden directly on a per-document
|
||||
(see \ref{sec:perFileConf}) basis using
|
||||
\mint{latex}|\renewcommand{\<command>}{<value>}|
|
||||
|
||||
\texttt{/<path to helpers>/config/config.tex}. All configs are documented there. Simply open that file using any text editor and edit your config.
|
||||
|
||||
\subsection{Letters}
|
||||
\label{sec:letters}
|
||||
Letters require a different setup compared to a normal \LaTeX document:
|
||||
|
||||
\begin{minted}{latex}
|
||||
\documentclass[12pt,a4paper]{scrlttr2}
|
||||
|
||||
\newcommand{\dir}{~/path/to/helper} % TODO: Change your path here! No trailing slashes!
|
||||
\input{\dir/include.tex}
|
||||
\load{letter}
|
||||
\input{~/path/to/helper/letter.tex} % TODO: Change your path here
|
||||
|
||||
\setkomavar{subject}{} % type your subject here
|
||||
\begin{document}\raggedright
|
||||
|
||||
Reference in New Issue
Block a user