Questions:

  1. Code (Preamble):

    \usepackage{amsmath}
    \DeclareMathOperator{\Tr}{Tr}

    Code (Body):

    \[ \Tr(A) \]

    Question: How will Tr be typeset in the equation compared to simply typing Tr(A) inside math mode?

  2. Code:

    \begin{tabular}{@{} l c r @{}}
    \toprule
    Item & Qty & Price \\
    \midrule
    Apple & 5 & \$1.00 \\
    \bottomrule
    \end{tabular}

    Question: What is the effect of the @{\} specifiers in the tabular column definition?

  3. Code (Preamble):

    \usepackage{enumitem}
    \setlist[itemize,1]{label=\textbullet, leftmargin=*}
    \setlist[itemize,2]{label=\textendash}

    Code (Body):

    \begin{itemize} \item Level 1 \begin{itemize} \item Level 2 \end{itemize} \end{itemize}

    Question: Describe the labels (bullet points) used for the Level 1 and Level 2 items.

  4. Code:

    \section*{Acknowledgements}
    Thanks to everyone.

    Question: How does the output of \section* differ from \section?

  5. Code:

    See Figure~\ref{fig:graph} on page~\pageref{fig:graph}.

    Question: Besides the figure number provided by \ref, what additional information does \pageref provide?

  6. Code (Preamble):

    \usepackage[colorlinks=true, linkcolor=blue]{hyperref}

    Question: What visual characteristic will hyperlinks (like those created by \ref or \cite) have in the output PDF?

  7. Code (amsmath needed):

    \begin{equation}
    y = \alpha x + \beta \tag{Regression}
    \end{equation}

    Question: Instead of a standard number, what label or “number” will this equation have next to it?

  8. Code (Beamer):

    \begin{frame}<handout:0>
    \frametitle{Animation Details}
    Only visible in presentation mode.
    \end{frame}

    Question: What is the effect of the <handout:0> overlay specification on this frame when generating a handout version of the presentation?

  9. Code (TikZ needed):

    \draw[->, thick, red!50!black] (0,0) -- (1,1) node[midway, above] {$v$};

    Question: Describe the appearance of the drawn line, including its color, thickness, ending, and the label placed on it.

  10. Code:

    \vspace*{-\baselineskip}
    This text might overlap the previous line.

    Question: What is the primary effect of \vspace*{-\baselineskip} on the vertical positioning of the subsequent text?

  11. Code (Preamble):

    \usepackage{graphicx}
    \usepackage{adjustbox}

    Code (Body):

    \begin{adjustbox}{angle=90, center}
    \includegraphics{wide_image.png}
    \end{adjustbox}

    Question: How will the included image wide_image.png be oriented and positioned?

  12. Code (Beamer):

    \begin{itemize}
      \item<1-> Point 1
      \item<2-> Point 2 revealed later
      \item<3> Only on step 3
    \end{itemize}

    Question: Describe the visibility of “Point 1”, “Point 2 revealed later”, and “Only on step 3” across Beamer overlay steps 1, 2, 3, and 4.

  13. Code (Preamble):

    \usepackage{booktabs}
    \usepackage{multirow}

    Code (Body):

    \begin{tabular}{ll} \toprule
    Group & Value \\ \midrule
    \multirow{2}{*}{Alpha} & A1 \\
                           & A2 \\ \midrule
    Beta                   & B1 \\ \bottomrule
    \end{tabular}

    Question: How is the cell containing “Alpha” presented in relation to the rows containing “A1” and “A2”?

  14. Code (Preamble):

    \usepackage{amsmath}

    Code (Body):

    We use the notation $\vec{v} \cdot \mathbf{M}$.

    Question: Describe the visual difference between how \vec{v} and \mathbf{M} are likely typeset.

  15. Code (TikZ positioning library needed):

    \node (A) {Start};
    \node (B) [below=1cm of A] {Middle};
    \node (C) [right=of B] {End};

    Question: Describe the relative spatial arrangement of the nodes labeled “Start”, “Middle”, and “End”.

  16. Code (Preamble):

    \usepackage{pgfplots}
    \pgfplotsset{compat=1.18}

    Code (Body):

    \begin{axis}[xlabel=$x$, ylabel=$y$, xmode=log, ymode=log]
    \addplot coordinates {(1,1) (10, 100) (100, 10000)};
    \end{axis}

    Question: What kind of scaling will be used for the x-axis and y-axis in the resulting plot?

  17. Code:

    \begin{minipage}{0.6\textwidth}
    This text is confined to a box
    that is 60% of the text width.
    Line breaks will occur within it.
    \end{minipage}

    Question: What is the primary layout effect of the minipage environment on the enclosed text?

  18. Code (Preamble):

    \usepackage[backend=biber, style=authoryear]{biblatex}
    \addbibresource{references.bib}

    Code (Body):

    As shown by \textcite{Doe2022}...

    Question: How is the citation likely to appear integrated into the text (assuming the Doe2022 entry exists)?

  19. Code (Beamer):

    \setbeamertemplate{navigation symbols}{}

    Question: What common visual elements on Beamer slides are removed by this command?

  20. Code:

    \footnote{This is a footnote.}

    Question: Where will the text “This is a footnote.” typically appear in the compiled document, and how will it be marked in the main text?

  21. Code (TikZ calc library needed):

    \node (A) at (0,0) {}; \node (B) at (4,2) {};
    \draw (A) -- ($(A)!0.5!(B)$);

    Question: A line is drawn from node A. Where does the line end, relative to nodes A and B?

  22. Code:

    This is \phantom{invisible} space.

    Question: What is the visual output of \phantom{invisible}?

  23. Code (Preamble):

    \usepackage{cleveref} % Must be loaded late

    Code (Body):

    Refer to \cref{fig:main,fig:sub}.

    Question: Compared to using \ref twice, how might \cref present the reference to the two figures (assuming they exist and are figures)?

  24. Code (Preamble):

    \linespread{1.6} % Equivalent to \doublespacing in some packages

    Question: What visual aspect of the main document text does this command change?

  25. Code (amsmath needed):

    \[ \sum_{i=1}^\infty \frac{1}{i^2} = \frac{\pi^2}{6} \]

    Question: Describe the placement of the summation limits (i=1 and \infty) relative to the Sigma symbol ((\Sigma)).

  26. Code:

    \makebox[\textwidth][s]{Spread this text out}

    Question: How will the text “Spread this text out” be positioned horizontally within the line?

  27. Code (Beamer):

    \begin{frame}[fragile]
    \frametitle{Code Example}
    \begin{verbatim}
    function hello() {
      return "Hi!";
    }
    \end{verbatim}
    \end{frame}

    Question: Why is the [fragile] option often necessary for a Beamer frame containing a verbatim environment? What is the primary visual output of the verbatim block?

  28. Code (Preamble):

    \usepackage{booktabs}

    Code (Body):

    \begin{tabular}{lccc} \toprule
    & \multicolumn{2}{c}{Group A} & Group B \\
    \cmidrule(lr){2-3}
    Item & Val1 & Val2 & Val3 \\ \midrule
    X & 1 & 2 & 3 \\ \bottomrule
    \end{tabular}

    Question: Describe the horizontal line produced by \cmidrule(lr){2-3} and the effect of \multicolumn{2}{c}{Group A}.

  29. Code (TikZ needed):

    \path[fill=blue!20, draw=blue] (0,0) rectangle (2,1);

    Question: Besides drawing the outline, what other visual effect does this command apply to the rectangle?

  30. Code (Preamble):

    \usepackage{mathtools} % Loads amsmath

    Code (Body):

    $A \coloneqq B$

    Question: What specific symbol is generated by \coloneqq for defining A in terms of B?


End of Examination