[Code] Add better code snippets
This commit is contained in:
@@ -432,6 +432,7 @@ This outputs as
|
||||
\end{fullTable}
|
||||
|
||||
|
||||
|
||||
\subsection{Index}
|
||||
\textit{Included in \texttt{most} and up}
|
||||
|
||||
@@ -439,6 +440,8 @@ If you want to use index, add \verb|\prepareIndex| to the preamble. Using \verb|
|
||||
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
|
||||
|
||||
|
||||
|
||||
\newpage
|
||||
\subsection{Extras}
|
||||
\subsubsection{BibTeX}
|
||||
\textit{Included in \texttt{recommended} and up}
|
||||
@@ -454,3 +457,20 @@ Use \verb|\setupGlossary| in the preamble to prepare, then use the normal glossa
|
||||
\textit{Included in \texttt{full}}
|
||||
|
||||
No extra configs or commands provided by this one, simply an import for minted. Be sure to enable \texttt{shell-escape} for your compiler!
|
||||
|
||||
When \texttt{minted} is available via these helpers, you will also have access to the \texttt{codesnippet} macro:
|
||||
|
||||
\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}
|
||||
|
Reference in New Issue
Block a user