Files
latex/docs/parts/usage.tex
Janis Hutz a0c104e092
Some checks failed
Update docs / build_docs (push) Failing after 3m2s
[Docs] Update usage
2026-02-23 09:55:13 +01:00

56 lines
1.6 KiB
TeX

\newsection
\section{Usage}
You can type \texttt{latex-prepare} and press tab, if you have installed the VSCode snippets, or copy over this code snippet:
\begin{minted}{latex}
\documentclass{article}
\input{~/path/to/helpers/janishutz-helpers.tex} % TODO: Change your path here
\setup{Type your title here}
\begin{document}
\startDocument
Type your \LaTeX here
\end{document}
\end{minted}
\subsection{Configuration}
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>}|
\subsection{Letters}
Letters require a different setup compared to a normal \LaTeX document.
Be also aware that the usual commands featured by the helpers are \textit{not} available when using the letter helpers.
\begin{minted}{latex}
\documentclass[12pt,a4paper]{scrlttr2}
\input{~/path/to/helper/letter.tex} % TODO: Change your path here
\setkomavar{subject}{} % type your subject here
\begin{document}\raggedright
% below, type the address, being careful not to remove the backslashes
\begin{letter}{Company \\ Name \\ Address \\ CH-Place}
\opening{Intro}
Your text
\closing{Kind regards} % Your closing sentence
\end{letter}
\end{document}
\end{minted}
If you are using the snippets, you can type \texttt{latex-letter} and press tab.