Created custom macros (klab, krule) for published examples
This commit is contained in:
parent
b47edd1dae
commit
1f33a2ddc2
34
lbol.tex
34
lbol.tex
@ -35,6 +35,12 @@
|
|||||||
% \cfoot{Page \thepage}
|
% \cfoot{Page \thepage}
|
||||||
%\renewcommand{\footrulewidth}{0.5pt}
|
%\renewcommand{\footrulewidth}{0.5pt}
|
||||||
|
|
||||||
|
% Make a nice border and box for the tops of our examples
|
||||||
|
\newcommand\klab[3]{\vspace{#1}\noindent{}\hrulefill\fbox{\texttt{~#2~}}\hrulefill\vspace{#3}}
|
||||||
|
|
||||||
|
% Add an \hrule with space above and below
|
||||||
|
\newcommand\krule[2]{\vspace{#1}\hrule\vspace{#2}}
|
||||||
|
|
||||||
% Include sections and subsections in the TOC
|
% Include sections and subsections in the TOC
|
||||||
% \setcounter{tocdepth}{1}
|
% \setcounter{tocdepth}{1}
|
||||||
|
|
||||||
@ -218,7 +224,7 @@ For best results, stick to the hierarchical structure shown above, as this is al
|
|||||||
|
|
||||||
To start a new paragraph, simply skip a line. \LaTeX{} compresses white space, so if you are importing text from a text document, any lines that are adjacent to each other will be in the same paragraph. Additionally, multiple spaces will appear as a single space. For example, this code:
|
To start a new paragraph, simply skip a line. \LaTeX{} compresses white space, so if you are importing text from a text document, any lines that are adjacent to each other will be in the same paragraph. Additionally, multiple spaces will appear as a single space. For example, this code:
|
||||||
|
|
||||||
\begin{Verbatim}[frame=lines, numbers=left, label=White Space Example, breaklines=true, framesep=3mm]
|
\begin{Verbatim}[frame=lines, numbers=left, label=\fbox{White Space Example}, breaklines=true, framesep=3mm]
|
||||||
This is the first paragraph.
|
This is the first paragraph.
|
||||||
This text, although it is on a separate line, is also part of the first paragraph.
|
This text, although it is on a separate line, is also part of the first paragraph.
|
||||||
|
|
||||||
@ -230,9 +236,11 @@ Readers will not see
|
|||||||
spaces.
|
spaces.
|
||||||
\end{Verbatim}
|
\end{Verbatim}
|
||||||
|
|
||||||
\noindent{} renders like this: \\
|
\noindent{} renders like this:
|
||||||
\hrule
|
|
||||||
\vspace{2mm}
|
\klab{6pt}{White Space Example}{6pt}
|
||||||
|
%\vspace{2mm}
|
||||||
|
|
||||||
This is the first paragraph.
|
This is the first paragraph.
|
||||||
This text, although it is on a separate line, is also part of the first paragraph.
|
This text, although it is on a separate line, is also part of the first paragraph.
|
||||||
|
|
||||||
@ -242,8 +250,8 @@ This line is also in the second paragraph.
|
|||||||
Readers will not see
|
Readers will not see
|
||||||
all of these
|
all of these
|
||||||
spaces.
|
spaces.
|
||||||
\vspace{2mm}
|
|
||||||
\hrule
|
\krule{2mm}{0mm}
|
||||||
|
|
||||||
\section{Comments}
|
\section{Comments}
|
||||||
|
|
||||||
@ -294,7 +302,7 @@ If you didn't use that construction, you would need to put a \% in front of each
|
|||||||
|
|
||||||
For example, this code:
|
For example, this code:
|
||||||
|
|
||||||
\begin{Verbatim}[frame=lines, numbers=left, xleftmargin=5mm, label=Enumerate Example, framesep=3mm]
|
\begin{Verbatim}[frame=lines, numbers=left, xleftmargin=5mm, label=\fbox{Enumerate Example}, framesep=6mm]
|
||||||
\paragraph{The First Punic War}
|
\paragraph{The First Punic War}
|
||||||
\begin{enumerate}[noitemsep]
|
\begin{enumerate}[noitemsep]
|
||||||
\item Carthage and Rome
|
\item Carthage and Rome
|
||||||
@ -314,7 +322,8 @@ For example, this code:
|
|||||||
|
|
||||||
\noindent{} produces this output:
|
\noindent{} produces this output:
|
||||||
|
|
||||||
\vspace{2mm} \hrule \vspace{2mm}
|
\klab{0pt}{Enumerate Example}{0pt}
|
||||||
|
|
||||||
\paragraph{The First Punic War}
|
\paragraph{The First Punic War}
|
||||||
\begin{spacing}{0.7}
|
\begin{spacing}{0.7}
|
||||||
\begin{enumerate}[noitemsep]
|
\begin{enumerate}[noitemsep]
|
||||||
@ -340,7 +349,7 @@ Similar to the \texttt{enumerate} environment, the \texttt{itemize} environment
|
|||||||
|
|
||||||
As an example, we'll use the above example, but in a bulleted list:
|
As an example, we'll use the above example, but in a bulleted list:
|
||||||
|
|
||||||
\begin{Verbatim}[frame=lines, numbers=left, xleftmargin=5mm, label=Itemize Example, framesep=3mm]
|
\begin{Verbatim}[frame=lines, numbers=left, xleftmargin=5mm, label=\fbox{Itemize Example}, framesep=6mm]
|
||||||
\paragraph{The First Punic War}
|
\paragraph{The First Punic War}
|
||||||
\begin{itemize}[noitemsep]
|
\begin{itemize}[noitemsep]
|
||||||
\item Carthage and Rome
|
\item Carthage and Rome
|
||||||
@ -360,7 +369,8 @@ As an example, we'll use the above example, but in a bulleted list:
|
|||||||
|
|
||||||
\noindent{} produces this output:
|
\noindent{} produces this output:
|
||||||
|
|
||||||
\vspace{2mm} \hrule \vspace{2mm}
|
\klab{0pt}{Itemize Example}{0pt}
|
||||||
|
|
||||||
\paragraph{The First Punic War}
|
\paragraph{The First Punic War}
|
||||||
\begin{spacing}{0.7}
|
\begin{spacing}{0.7}
|
||||||
\begin{itemize}[noitemsep]
|
\begin{itemize}[noitemsep]
|
||||||
@ -384,7 +394,7 @@ As an example, we'll use the above example, but in a bulleted list:
|
|||||||
|
|
||||||
You can replace the bullets with any math symbol availabe in \LaTeX{} like this:
|
You can replace the bullets with any math symbol availabe in \LaTeX{} like this:
|
||||||
|
|
||||||
\begin{Verbatim}[frame=lines, numbers=left, xleftmargin=5mm, label=Bullets Example, framesep=3mm]
|
\begin{Verbatim}[frame=lines, numbers=left, xleftmargin=5mm, label=\fbox{Bullets Example}, framesep=6mm]
|
||||||
\begin{itemize}[noitemsep]
|
\begin{itemize}[noitemsep]
|
||||||
\item[$\Box$] First item
|
\item[$\Box$] First item
|
||||||
\item[$\aleph$] Second item
|
\item[$\aleph$] Second item
|
||||||
@ -394,6 +404,8 @@ You can replace the bullets with any math symbol availabe in \LaTeX{} like this:
|
|||||||
|
|
||||||
\noindent{} which produces this output:
|
\noindent{} which produces this output:
|
||||||
|
|
||||||
|
\klab{8pt}{Bullets Example}{0pt}
|
||||||
|
|
||||||
\begin{itemize}[noitemsep]
|
\begin{itemize}[noitemsep]
|
||||||
\item[$\Box$] First item
|
\item[$\Box$] First item
|
||||||
\item[$\aleph$] Second item
|
\item[$\aleph$] Second item
|
||||||
|
Loading…
Reference in New Issue
Block a user