From the Linux and Unix Users Group at Virginia Teck Wiki
Jump to: navigation, search

LaTeX is a markup language and typesetting system for producing high-quality documents. The X symbol is supposed to represent the Greek character chi, making the proper pronunciation lah-tech or lay-tech.

Sample LaTeX Stub



\author{Hokie Hackman}
\title{My Favorite Class\\Homework 1}




Formatting Assignments

LaTeX is probably the best tool available for typesetting documents involving math. Below are some pointers on formatting school assignments.

Smaller Margins

The article class defaults to rather large margins. An easy way to make the margins smaller is to include the fullpage package.

Hello, and welcome to a paragraph that begins much closer than usual to the left side of the page.

Upper Right-Hand Corner

For some assignments you may be required to put your name, ID number, the date, or other elements at the top right-hand corner of the first page. The flushright environment can accomplish this.

Hokie Hackman\\
My Favorite Class\\

Nonsequential Enumerated Items

The enumerate environment is useful for numbered lists, and while the enumerate offers a quick way to change the counter for a whole list of sequential items, no extra package is necessary to number \items individually. Passing an argument to each \item is probably the easiest way to number homework problems that aren't sequential in LaTeX.

\item[4.10] What is $1+1$?

\[ 1+1=2 \]

\item[4.12] What are the first two prime numbers?

The first two prime numbers are two and three.

\item[4.25] In what year was the Free Software Foundation formed?

The FSF was founded in 1985.


Karnaugh Maps

There are a couple k-map packages available. We should document which one is better, and what it's packaged with (science?).

Spell Checking

The following command can be used to spell check (La)TeX documents.

aspell -c -t document.tex

Error Messages

  • The line with the bang (!) on it is the error message.
  • The number after l. is the line number where the error occurred.

Extra alignment tab has been changed to \cr

! Extra alignment tab has been changed to \cr.
<template> \egroup \endtemplate

This can happen when a line of your eqnarray is missing its endline mark: \\.

Missing $ inserted

! Missing $ inserted.
<inserted text>

This can happen when you leave out a closing inline equation mark: $.

Example LaTeX documents

Echarlie's Chem 1045 Lab report

% A Lab report of the style from the 2015/2016 lab manual, prepared by echarlie
% uses bibtex, and a number of features documented in the LaTeX wikibook
% Notice that copying this document Verbatim will result in Submission to Honour Court
% However, author releases it under CC-BY-SA as is standard for this wiki
% Contains all headers; ones not used in this report are commented out

%\usepackage{mhchem}  %Useful for Chem diagrams and eqns, if you need it

Applying Lab Learning and\\ Techniqes to Real-Life Applications:\\ Quantification
of Cranberry\\in Cranberry-Apple Juice


{{	\centering
	{\large \bfseries \labtitle \par}
	\vspace{8 pt}
	{\normalsize John V. Doe and Jane K. Dee \par}
	{\normalsize Submitted to: Wadsworth Longbottom \par} %Your TA
	{\normalsize \it CHEM 1045, Experiment 10 \par}
	{\normalsize \it \today \par}	
	\vspace{6 pt}
	\begin{picture}(6.5, .5)
	\put(0, 0){\line(1, 0){6.5}}
	\par \vspace{8 pt}

		{\normalsize \it Honour Code Signature: \hspace{8pc }} %SIGN YOUR NAME


\begin{abstract} %This isn't a good abstract, but the format is correct: single spaced

	Students determined the percentage cranberry juice in a cranberry-apple juice mixture.
	Spectrophotometry concepts were used to prepare a calibration curve, and from this, and
	knowledge of the absorbtion of apple juice, the concentration of cranberry juice in
	the juice mixture was determined to be about 9.042\%, with all effects of the apple
	juice neglected due to increased complexity.


\baselineskip = 24pt

In this lab, students calculated the total percentage of cranberry juice in a cranberry-apple
mixture. Students used concepts of spectrophotometry and dilution to prepare a calibration
curve, against which the absorbtion spectrum of the cranberry-apple juice is compared, following
the Beer-Lambert law. Students
also use knowledge of light to determine whether the apple juice present contributes to the
deep red colour of the cranberry-apple juice.
The spectrophotometric techniques used differ from those used in other labs: this
spectrophotometer determines the absorbance at a range of wavelengths and presents this data
as a graph, making it easy to determine the maximum absorbance and compare those of two different

	\subsection*{\underline{\normalsize \rm Procedure:}}

	First, 20\% solutions of the cranberry juice and the apple juice are prepared for
	testing: 100 mL of the cranberry dilute is produced, and about 50 mL of the apple
	dilute is prepared. The absorbtion spectra of both are measured with the
	spectrophotometer, recording the absorbance at the wavelenght of highest
	absorption ($\lambda _{\mathrm{max}}$) for cranberry.
	A calibration curve is prepared, using dilutions of 4\%, 8\%, 12\%, and 16\%
	cranberry prepared from the 20\%, along with the 20\% sample already prepared.
	The absorbance of each at $\lambda _{\mathrm{max}}$ is used to create a calibration

	Finally, measure the absorbance of the cranberry-apple juice at $\lambda _{\mathrm{max}}$
	and determine the concentration of cranberry juice in the cranberry-apple juice mixture.

	\subsection*{\underline{\normalsize \rm Data:}}

	\begin{table}[h] %A table with a caption; good style for presenting data
		\begin{tabular}{ c c c }
			\multicolumn{3}{c}{\bf Measured Absorption at 510 nm}\\
			Juice & Concentration (\%) & Absorption\\
			Cranberry	& 4	& 0.329\\
			Cranberry	& 8	& 0.557\\
			Cranberry	& 12	& 0.744\\
			Cranberry	& 16	& 1.007\\
			Cranberry	& 20	& 1.400\\
			Apple		& 20	& 0.137\\
			Cran-Apple	& Unknown& 0.604\\
		\caption{Absorption of standard solutions and the unknown sample}

	\begin{figure}[h] %A graph (PDF generated from SVG in Inkscape; SVG generated by LibreOffice from collected data)
		\caption{\centering Graph made from Table \ref{tab:Conc} showing straight-line\\
					relation of calibration curve absorbance}

%        \subsection*{\underline{\normalsize \rm Observations:}}

\vfill\eject %this creates a new page

\section{Results and Discussion}
	\subsection*{\underline{\normalsize \rm Results and Discussion:}}

	The apple juice has one-tenth the absorbance of the cranberry juice at 510 nm, and
	therefore, for this calculation, can be assumed negligible: it increases the complexity
	without being a significant source of error. Based on the colour of the apple
	juice, I am surprised it contributes any significant absorbtion at 510 nm, deep in the
	green spectrum, to anything at all.

	However, since it does contribute some absorbance, this will result in a high
	concentration of cranberry compared to the actual value, since cranberry would then not
	be the only source of colour and absorption at that wavelength.

	The cranberry juice absorbs very little outside of the 510 nm wavelength, resulting in
	its profoundly red colour (if green is absorbed, red -- opposite green on the colour
	wheel -- is not absorbed). Apple juice has a yellow hue, indicating most of the absorption
	happens in the purple spectrum. This is why the apple juice has a low affect on the
	absorbtion of the cranberry-apple juice.
	\subsection*{\underline{\normalsize \rm Sample Calculations:}}

	Concentration of the unknown can be directly calculated using known absorbances and the
	calibration curve (figure \ref{fig:cal}) slope:
	$$f(x) = \mathrm{absorbance} = 0.604$$
	$$x = \mathrm{concentration}$$
	$$f(x) = 0.0668x $$
	$$\frac{0.604\,abs}{0.0668\,\cfrac{abs}{\%}} = 9.042 \%\,\mathrm{cranberry\,juice}$$
	If the absorbance of the apple juice is accounted for, then one-eleventh of the
	absorbance is caused by the apple juice, or:
	$$\frac{10}{11} * 9.042 \%\,\mathrm{cranberry+apple\,juice} = 8.22\%$$
	While this is a non-negligible difference, this is also based on
	assumptions of accuracy for
	the value of absorbance of apple juice at $\lambda _{\mathrm{max}}$, basically
	a two-point calibration curve, and the assumption that the apple juice is at the
	same concentration, which is not a valid assumption.

	\subsection*{\underline{\normalsize \rm Experimental Uncertainty:}}

	The largest source of error in results is the compexity of calculating the exact
	concentration of cranberry, by accounting for apple juice and other additives in the
	cranberry-apple juice.


This lab exposed students to the Beer-Lambert law, and honed skills of using spectrophotometry,
calibration curves, dilution concepts, and general laboratory technique. The final concentration
of cranberry in the cranberry-apple juice was determined to be about 9.042\%, neglecting all
effects of the apple juice on absorbtion spectrum.

\bibliography{HumanUnreadable,savedrecs} %this part is autogenerated from .bib files named there, in the ASC format
                                         %Should be named references; Should be numbered like a section (but that is hard)

\section*{Supporting Information} %Not numbered
        \subsection*{\underline{\normalsize \rm Answers to Post-Laboratory Questions:}}

	\item The carrot juice in this cranberry-apple juice has pigmentation which absorbs a
		broader spectrum than cranberry juice alone does. This juice will be darkest if
		the carrot juice absorbed in the red spectrum, however, presuming it absorbs in
		the blue spectrum (opposite orange on the colour wheel), the juice would absorb
		a large block in what are traditionally described as ``cool colours'', thus
		the juice will appear as a very dark red-orange.

	\item In this article, Polish researchers Wiczkowski et al. studied the effect of
		fermentation of cabbage on human antioxidant capacities. Their research focused
		on the effects of fermentation on the presence of anthocyanins, which they then
		concluded is correlated to human antioxidant capacities. It was determined that
		bioavailability of anthocyanin was 10\% higher in fresh cabbage, and consequently
		antioxidant capacities of the humans eating the fresh cabbage was higher than that
		of those consuming the fermented cabbage\cite{cabbage}.