diff --git a/docs/docs.pdf b/docs/docs.pdf index 545418c..7825863 100644 Binary files a/docs/docs.pdf and b/docs/docs.pdf differ diff --git a/docs/docs.tex b/docs/docs.tex index ff28495..43f0105 100644 --- a/docs/docs.tex +++ b/docs/docs.tex @@ -32,4 +32,6 @@ You may also install the VSCode snippets found in the vscode-snippets folder. Th \input{./parts/reference.tex} +\input{./parts/troubleshooting.tex} + \end{document} diff --git a/docs/parts/reference.tex b/docs/parts/reference.tex index fa11b79..cc41477 100644 --- a/docs/parts/reference.tex +++ b/docs/parts/reference.tex @@ -68,6 +68,22 @@ These commands have to be executed outside the math environment. \item \verb|\tcl| Time complexity in \tcl{}-notation (best case / lower bound) \end{itemize} +\fhlc{Aquamarine}{Algorithms} +\begin{minted}{latex} +\begin{algo}{functionName(A)} + \Procedure{functionName}{$(A)$} + \State\Return "Hello World" + \EndProcedure +\end{algo} +\end{minted} + +\begin{algo}{functionName(A)} + \Procedure{functionName}{$(A)$} + \State\Return "Hello World" + \EndProcedure +\end{algo} + +\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} diff --git a/docs/parts/troubleshooting.tex b/docs/parts/troubleshooting.tex new file mode 100644 index 0000000..e427ae3 --- /dev/null +++ b/docs/parts/troubleshooting.tex @@ -0,0 +1,27 @@ +\newsection +\section{Troubleshooting} +\subsection{pgfkeys: Don't know mainboxstyle} +You have most likely forgotten about \verb|\usetcolorboxes| after \verb|\startDocument|. + +\subsection{Missing headers \& footers} +You have most likely forgotten about \verb|\startDocument| after \verb|\begin{document}|, or you are using \verb|\setupbarebones| or \verb|\setupexams|. + +You can easily distinguish from simply looking at the PDF. If the title is missing too, it's the first one, if it is there, it is most likely the second. + +\subsection{Undefined commands} +You have most likely loaded a too small \textit{scope} + +\subsection{Lots of errors and no compile} +You have most likely selected a non-existant \textit{scope} in the \verb|\load| function. You can verify by searching the \texttt{.log} file for any mention of \texttt{INVALID CONFIG SPECIFIED, NOTHING LOADED!} + +\subsection{Minted} +\texttt{minted} is a syntax highlighting library. It can cause issues when running, as it needs extra configuration for the compiler. + +\subsubsection{You must invoke LaTeX with the -shell-escape flag} +You have set the \textit{scope} to \texttt{full}, which loads the \texttt{minted} package for code highlighting. You will need to configure your latex compiler to use \texttt{-shell-escape} if you want to use it. If you do not plan to use it, simply switch to a smaller \textit{scope}. + +\subsubsection{You must have pygmentize installed} +Your host system is lacking the \texttt{pygmentize} package or you have not added the \texttt{pip} path to your \$PATH. This is also the reason as to why the \texttt{-shell-escape} flag has to be set, as minted needs to access external libraries (namely \texttt{pygmentize}) to do the syntax highlighting. + +\subsection{Any other error} +Ensure that you are not missing any closing brackets or a math environment is still open. If nothing helps, contact support at \url{https://support.janishutz.com} \ No newline at end of file diff --git a/include.tex b/include.tex index c6604ba..7858ca6 100644 --- a/include.tex +++ b/include.tex @@ -31,7 +31,7 @@ \typeout{[CustomLaTeXHelperLoader]: Loading config letter} \input{\dir/dist/letter.tex} \else - \typeout{[CustomLaTeXHelperLoader]: NO CONFIG SPECIFIED, NOTHING LOADED!} + \typeout{[CustomLaTeXHelperLoader]: INVALID CONFIG SPECIFIED, NOTHING LOADED!} \fi \fi \fi diff --git a/main/style/cs.tex b/main/style/cs.tex index e69de29..5b45175 100644 --- a/main/style/cs.tex +++ b/main/style/cs.tex @@ -0,0 +1,25 @@ +% ▄▄ +% ▄▄█▀▀▀█▄█ ██ ▄█▀▀▀█▄█ ██ +% ▄██▀ ▀█ ██ ▄██ ▀█ +% ██▀ ▀ ▄██▀██▄▀████████▄█████▄ ▀████████▄▀███ ▀███ ██████ ▄▄█▀██▀███▄███ ▀███▄ ▄██▀██▀███ ▄▄█▀██▀████████▄ ▄██▀██ ▄▄█▀██ +% ██ ██▀ ▀██ ██ ██ ██ ██ ▀██ ██ ██ ██ ▄█▀ ██ ██▀ ▀▀ ▀█████▄█▀ ██ ██ ▄█▀ ██ ██ ██ ██▀ ██ ▄█▀ ██ +% ██▄ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀▀▀▀▀ ██ ▄ ▀███ ██ ██▀▀▀▀▀▀ ██ ██ ██ ██▀▀▀▀▀▀ +% ▀██▄ ▄▀██▄ ▄██ ██ ██ ██ ██ ▄██ ██ ██ ██ ██▄ ▄ ██ ██ ███▄ ▄ ██ ██▄ ▄ ██ ██ ██▄ ▄██▄ ▄ +% ▀▀█████▀ ▀█████▀▄████ ████ ████▄ ██████▀ ▀████▀███▄ ▀████ ▀█████▀████▄ █▀█████▀ █████▀▄████▄ ▀█████▀████ ████▄█████▀ ▀█████▀ +% ██ +% ▄████▄ + +\usepackage{forest} +\tikzset{algpxIndentLine/.style={draw=lightgray}} +\algrenewcommand{\alglinenumber}[1]{#1} + +\newenvironment{algo}[1]{ + \begin{algorithm} + \begin{spacing}{1.2} + \caption{\textsc{#1}} + \begin{algorithmic}[1] +}{ + \end{algorithmic} + \end{spacing} + \end{algorithm} +} \ No newline at end of file