latex_cheatsheet/sample.tex

134 lines
4.2 KiB
TeX
Raw Normal View History

2022-02-10 21:12:30 +00:00
\documentclass[a4paper]{article}
\usepackage[ngerman]{babel}
\usepackage{cheatsheet}
\cheatsheettitle{Cheatsheet Example}
\cheatsheetauthor{Robert Jeutter}
\begin{document}
\begin{multicols}{3}\scriptsize
2022-02-27 09:07:30 +00:00
This is a short overview of what the cheatsheet is capable of.
The cheatsheet will automatically count all pages and print that with the current page at the bottom. The title in the top left is your documents title.
For maximum space use every page can have three columns and the pageborders are reduced.
You can extend everything by modifying the ,,cheatsheet.sty''.
2022-02-14 17:26:56 +00:00
\section{Section}
\subsection{Subsection}
\subsubsection{Subsubsection}
\paragraph{Paragraph}
Some random text to show minimum space required. This is only an example, everybody who reads this does it to his own harm. We can write here a lot of stuff but it really is only for demonstration.
\section{Lists}
2022-02-10 21:12:30 +00:00
% use * to reduce required space
Item lists
\begin{itemize*}
\item This is
\item a small list
\item to show some
\item space
\end{itemize*}
Enumeration Lists
\begin{enumerate*}
\item This is
\item a small list
\item to show some
\item space
\end{enumerate*}
Description Lists
\begin{enumerate*}
\item[This] is a
\item[Small] list to
\item[Show] some space
\end{enumerate*}
2022-02-27 09:02:58 +00:00
\section{Icons}
There are currently two icons you can use
\begin{enumerate*}
\item \cmark $\quad\backslash$cmark
\item \xmark $\quad\backslash$xmark
\end{enumerate*}
2022-02-27 09:07:30 +00:00
And it can be used in lists too
2022-02-27 09:02:58 +00:00
\begin{itemize*}
\item[\cmark] Checkmark
\item[\xmark] Cross
\end{itemize*}
2022-02-10 21:12:30 +00:00
\columnbreak
\section{Boxes}
2022-02-14 17:26:56 +00:00
\note{Title}{This is a little but helpful note you can use to highlight informations}
2022-02-10 21:12:30 +00:00
2022-02-14 17:26:56 +00:00
\note{}{Not all notes need captions.}
2022-02-10 21:12:30 +00:00
2022-02-14 17:26:56 +00:00
\warning{Warning}{This is a warning box.}
2022-02-10 21:12:30 +00:00
2022-02-14 17:26:56 +00:00
\warning{}{This is a another warning.}
2022-02-10 21:12:30 +00:00
2022-02-14 17:26:56 +00:00
\important{Important}{This might be something important to remember!}
\important{}{Some important boxes don't need caption}
\headnote{Notes can have titles}{And a text below.}
\headnote{}{This note has no title}
\newtcbox{\mynewbox}[1][red]{on line,
arc=0pt,outer arc=0pt,colback=#1!10!white,colframe=#1!50!black,
boxsep=0pt,left=1pt,right=1pt,top=2pt,bottom=2pt,
boxrule=0pt,bottomrule=1pt,toprule=1pt}
\newtcbox{\xmybox}[1][red]{on line,
arc=7pt,colback=#1!10!white,colframe=#1!50!black,
before upper={\rule[-3pt]{0pt}{10pt}},boxrule=1pt,
boxsep=0pt,left=6pt,right=6pt,top=2pt,bottom=2pt}
Need to \lhigh{highlight} some \lhigh[green]{words} in your text? \rhigh{Now} possible in \rhigh[blue]{two different} styles.
\columnbreak
2022-02-10 21:12:30 +00:00
\section{Code}
\begin{lstlisting}
main(void){
for(int i=0; i<10; i++ ){
//do something here
x+= 2;
}
echo("The loop is finished")
}
\end{lstlisting}
\section{Tables}
\begin{tabular}{l|c|r}
2022-02-14 17:26:56 +00:00
Nr & Sign & Code \\\hline
1 & $\Omega$ & $\backslash$Omega \\
2 & $\Theta$ & $\backslash$Theta \\
3 & $\rho$ & $\backslash$rho
\end{tabular}
\begin{tabular}{L{0.1\linewidth}|R{0.8\linewidth}}\scriptsize
84 & \href{http://www.gutenberg.org/ebooks/84}{Frankenstein; Or, The Modern Prometheus by Mary Wollstonecraft Shelley} \\
6087 & \href{https://www.gutenberg.org/ebooks/6087}{The Vampyre; a Tale by John William Polidori} \\
696 & \href{https://www.gutenberg.org/ebooks/696}{The Castle of Otranto by Horace Walpole} \\
42 & \href{https://www.gutenberg.org/ebooks/42}{The Strange Case of Dr. Jekyll and Mr. Hyde by Robert Louis Stevenson}
2022-02-10 21:12:30 +00:00
\end{tabular}
\end{multicols}
2022-02-14 17:26:56 +00:00
\flashcard{Definition}{Your Question?}{Maybe a theme?}{This is the answer to your Question}
\flashcard{}{Minimal Example}{}{Here is very little text}
\flashcard{}{Print a List}{This could be a hint}{You can fully configure the back:
\begin{itemize}
\item Test
\item Two
\item Three
\end{itemize}
}
2022-02-10 21:12:30 +00:00
\end{document}