Newer
Older
templates / xelatex / test.tex
Mark on 15 Nov 2016 2 KB Did stuff.
\include{preamble}

\usepackage{lipsum}
\usepackage{minted}

\def\PaperCode{INFOXYZ}
\def\PaperTitle{Paper Title}
\def\LabNum{Testing 123~--~}
\def\LabTitle{XeLaTeX Testing}

\begin{document}

\setcounter{secnumdepth}{-2}

{\LARGE\sffamily\bfseries \LabNum\LabTitle}

\section{What Fonts?}

Body text: \fontname\font\\
Mono: \texttt{\fontname\font}\\
Italics: \textit{\fontname\font}\\
Sans: \textsf{\fontname\font}\\
Bold: \textbf{\fontname\font}
\subsection{Sections: \fontname\font}

\section{Lorizzle Ipshizzle}

\lipsum[1-2]

\section{Font Flippage}

Here be regular text, \textit{and here be fancy text}, and here be \code{inline
code}, and here be \textbf{fat text}, and here be \textsf{less fancy text}.

Lora is a beefy font (which is why we are using 11pt instead of 12pt), so we
needed to scale up the size of the code font (Inconsolata) to match:
\\
\hspace*{1em}Height check (code):~  lll{\code{lll}lll  ooo\code{ooo}ooo mmm\code{mmm}mmm
ttt\code{ttt}ttt xxx\code{xxx}xxx\\
\hspace*{1em}Height check (Sans):~  lll{\textsf{lll}lll  ooo\textsf{ooo}ooo
mmm\textsf{mmm}mmm ttt\code{ttt}ttt xxx\textsf{xxx}xxx

Close enough.

\section{Ligatures}

Does our font have them?  If so, can we search for them, and copy \& paste them?
Lets find out with {\LARGE The fluffies!}  XeLaTeX seems to deal with ligatures
pretty well.  The Lora font doesn't seem to have them, but other fonts that I
have tried do, and it mostly works fine.  Some fonts however, like Roboto
Condensed do NOT work properly --- I suspect the font is at fault.  Look at that
--- we just tested the em dash too.

\newpage

\section{Code Blockage (listings)}

Before:
\begin{codeblock}[gobble=3]
	@Test
	public void testDaoSaveAndDelete() {
		// create product for testing
		Product savedProd = new Product(3, "name", "desc", "cat", 1.0, 2.0);

		// save the product using DAO
		dao.saveProduct(savedProd);

		// retrieve the same product via DAO
		Product retrieved = dao.findById(3);

		// delete the product via the DAO
		dao.delete(savedProd);

		// try to retrieve the deleted product
		retrieved = dao.findById(3);

		// ensure that the student was not retrieved (should be null)
		assertNull("Product should no longer exist", retrieved);
	}
\end{codeblock}
After.


\section{Code Blockage (minted)}

Before:
\begin{minted}[autogobble,tabsize=3]{java}
	@Test
	public void testDaoSaveAndDelete() {
		// create product for testing
		Product savedProd = new Product(3, "name", "desc", "cat", 1.0, 2.0);

		// save the product using DAO
		dao.saveProduct(savedProd);

		// retrieve the same product via DAO
		Product retrieved = dao.findById(3);

		// delete the product via the DAO
		dao.delete(savedProd);

		// try to retrieve the deleted product
		retrieved = dao.findById(3);

		// ensure that the student was not retrieved (should be null)
		assertNull("Product should no longer exist", retrieved);
	}
\end{minted}
After.

\end{document}