5

I will give a short coffee lecture (15 minutes) on LaTeX at our institution. Something like: "What is LaTeX and why should I use it? Getting started and avoiding pitfalls."

The presentation will take place at our chemistry department, but there will be guests from other science departments as well. I am somewhat struggling to put something together that is meaningful yet not too daunting. Now I wonder how others would give such a lecture and what they would show.

10

Prof. van Duck would like to give his suggestion:

\documentclass{beamer}
\usefonttheme{professionalfonts} % using non standard fonts for beamer
\usefonttheme{serif} % default family is serif
\usetheme{Madrid}
\beamertemplatenavigationsymbolsempty
\setbeamersize{text margin left=30pt,text margin right=30pt} 
\title[\LaTeX{}: what and why]{What is \LaTeX{} and why should I use it?}
\author[Prof.\ van Duck]{Herr Professor Paulinho van Duck}
\institute[QU]{Quack University}

\usepackage{mathtools}
\usepackage{chemformula}
\usepackage{chemfig}
\usepackage{booktabs}
\usepackage{tikz}
\usepackage[most]{tcolorbox}
\tcbuselibrary{listings}
\lstdefinestyle{mylatex}{
    language={[LaTeX]TeX},
    basicstyle=\scriptsize\ttfamily,
    keywordstyle=\color{blue},
    breaklines=true,
    breakatwhitespace=true,
}
\newtcblisting{mylisting}{
    listing engine=listings,
    colback=blue!5!white,
    colframe=blue!75!black,
    halign upper=center,
    halign lower=center,
    %listing side text,
    %fontlower=\small,
    listing options={style=mylatex}
}

\begin{document}
    \begin{frame}
    \titlepage
\end{frame}
\begin{frame}
\frametitle{What is \LaTeX?}
It is a mix!
\begin{center}
    \begin{tikzpicture}
    \begin{scope}
    \fill[red!30!white, opacity=.5]   ( 90:1.2) circle (2);
    \fill[green!30!white, opacity=.5] (210:1.2) circle (2);
    \fill[blue!30!white, opacity=.5]  (330:1.2) circle (2);
    \end{scope}
    \node at ( 90:2)    {Typography};
    \node at ( 210:2)   {Design};
    \node at ( 330:2)   {Coding};
    \node [font=\Large] {\LaTeX};
    \end{tikzpicture}
\end{center}
{\scriptsize\hfill  
\href{http://latex-cookbook.net/cookbook/examples/venn/}{Venn diagram by 
Stefan Kottwitz}}
\end{frame}
\begin{frame}
\frametitle{Why should I use it?}
\begin{itemize}
\item Gorgeous results, incomparable with other tools
\item Easy referencing of any part of your documents and creation of ToC, ToF, 
etc.
\item Great bibliography management
\item Very convenient for scientific or linguistic writing
\end{itemize}
\vfill
\begin{tcolorbox}[
colframe=red,
title={Caution!}]
\LaTeX{} is not for people who want it all and now!
\end{tcolorbox}
\end{frame}
\begin{frame}[fragile]{Document structure}
\begin{lstlisting}[style=mylatex]
\documentclass{article}   % <--- document class
\usepackage{graphicx}     % <--- preamble
\usepackage{caption}

\begin{document}          % <--- body of the document
\section{A section}
Figure \ref{fig:mylabel}  % <--- text
is an example image.
\begin{figure}            % <--- environment
\centering            % <--- macro
\includegraphics{example-image}
\caption{\label{fig:mylabel}A caption}
\end{figure}
\end{document}
\end{lstlisting}
\end{frame}
\begin{frame}[fragile]
\frametitle{Professional tables}
\begin{mylisting}
% \usepackage{booktabs} in preamble
\begin{tabular}{lcr}
\toprule
First Name & Last Name & Gender \\
\midrule
Paulette & de la Quack & F \\
Paulinho & van Duck & M \\
\bottomrule
\end{tabular}
\end{mylisting}
\end{frame}
\begin{frame}[fragile]{Mathematical writing}
\begin{mylisting}
\[ax^2+bx+c=0\]
\[
x_{1,2}=\frac{-b\pm\sqrt{b^2-4ac}}{2a}
\]
\end{mylisting}
\end{frame}
\begin{frame}[fragile]{Chemical formulae}
\begin{mylisting}
%\usepackage{chemformula}
\ch{H2O}
\medskip

%\usepackage{chemfig}
\chemfig{H-[:30]O-[:150]H}
\end{mylisting}
\end{frame}
\begin{frame}[fragile]{Graphical drawing}
\begin{mylisting}
%\usepackage{tikz}
\begin{tikzpicture}[scale=.5]
\draw[->] (-4,0) -- (4,0) node[right] {$x$};
\draw[->] (0,-1.4) -- (0,4) node[above] {$f(x)$};
\draw[domain=-2.5:2,variable=\x,black,thick] plot ({\x},{(\x)^2+.5*(\x)-1}) 
node[below right] {$x^2+\frac{1}{2}x-1$};
\end{tikzpicture}
\end{mylisting}
\end{frame}
\end{document}

enter image description here enter image description here

  • Very nice. But, IMO, graphing should be done with pgfplots. To illustrate tikz it would be better to draw something other than a graph of an equation. – Peter Grill Dec 5 '18 at 4:34
  • 1
    @PeterGrill Thank you! Of course, these are only simple examples (see the chemical formula). Could you give me a suggestion of what to draw? – CarLaTeX Dec 5 '18 at 5:40
  • Any of the examples from Nice scientific pictures show off. But, one from this question with daily short code is Riemann sums of a monotonic real function, but this is also a graph!! But if the actual code is not need to be shown, then the images from there would serve as good examples. – Peter Grill Dec 5 '18 at 6:40
7

I have done similar stuff many times. I sell LaTeX to our graduate students and profs. I'd go for the big selling points which distinguish it from, say, what's done in Word.

  • For 3 minutes show couple of beautiful outputs. Give the audience time to absorb and explore what you show them.

  • Next 5 minutes: show the (big) effects of simple commands, like \tableofcontents, \printbibliography and perhaps \printindex, and emphasize that no formatting is done by hand. (Word cannot do table of contents)

  • For 3 minutes, explain how references and citations work: that clickable links are created when \ref or \cite are inserted, no formatting is needed for the references. Don't mention Biber or Bibtex, just say that the citations are not formatted by hand.

  • For 2 minutes show how simply changing the documentclass, the output changes.

  • Since this is chemistry department, you may want to end the talk by showing a simple chemical formula along with the code that creates it---again emphasizing that formatting is not done by hand.

  • 2
    However cumbersome MSWord can be, it still enables the author to automatically generate a ToC reference. – Ole Anders Dec 5 '18 at 3:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.