Questions (Based on Beamer Slides):

  1. Code (Original: Beamer P.3 - Minimal):

    \documentclass{beamer}
    \begin{document}
    \begin{frame} % Removed \frametitle
    Hello, Beamer World!
    \end{frame}
    \end{document}

    Question: How will the slide appear compared to the original example, specifically regarding a title element?

  2. Code (Original: Beamer P.4 - Key Points):

    \begin{frame}{My Title} % Added title directly
    % Frame content...
    \framesubtitle{My Subtitle Here}
    \end{frame}

    Question: Besides the main title “My Title”, what additional labeled text element is added to this frame?

  3. Code (Original: Beamer P.5 - Title Page):

    % In Preamble:
    \title{My Presentation}
    \author{A. N. Author}
    \institute{} % Institute command is empty
    \date{\today}
    % In Body: \begin{frame} \titlepage \end{frame}

    Question: What piece of information, typically present on a title page defined this way, will be missing from the output?

  4. Code (Original: Beamer P.6 - Sections):

    \section{Methods}
    \subsection*{Data Collection} % Added asterisk
    % Frames...
    \subsection{Analysis}
    % Frames...

    Question: How will the “Data Collection” heading differ in appearance (specifically numbering and TOC entry) compared to the “Analysis” heading?

  5. Code (Original: Beamer P.9 - TOC Options):

    % In a frame:
    \tableofcontents[hideallsubsections]

    Question: What level of detail will be shown in the Table of Contents generated by this command?

  6. Code (Original: Beamer P.10 - Themes):

    % In Preamble:
    \usetheme{Berlin}
    \usecolortheme{whale} % Kept whale color theme

    Question: Which command primarily determines the overall layout structure (like sidebars, header style), and which primarily determines the color palette?

  7. Code (Original: Beamer P.12 - Font Themes):

    % In Preamble:
    \usetheme{Madrid}
    \usefonttheme[onlysmall]{serif} % Added [onlysmall] option

    Question: What is the effect of [onlysmall] when applying the serif font theme? Which text elements are likely affected?

  8. Code (Original: Beamer P.14 - Basic Elements):

    \textbf{\textit{Bold and Italic}}

    Question: Describe the combined visual style applied to the text “Bold and Italic”.

  9. Code (Original: Beamer P.16 - Fragile Frame):

    \begin{frame} % Removed [fragile]
    \frametitle{Code}
    \begin{verbatim}
    Code here...
    \end{verbatim}
    \end{frame}

    Question: What is likely to happen during compilation or in the output due to the missing [fragile] option on a frame containing verbatim?

  10. Code (Original: Beamer P.17 - Blocks):

    \begin{alertblock}{} % Empty title
    This is an important warning.
    \end{alertblock}

    Question: How will the appearance of this alertblock differ from one defined with a title like {Warning}?

  11. Code (Original: Beamer P.18 - Overlays):

    \begin{itemize}
      \item<1-> Always visible from step 1.
      \item<3-4> Visible only on steps 3 and 4.
      \item<5> Visible only on step 5.
    \end{itemize}

    Question: Describe the visibility of the second item (“Visible only on steps 3 and 4”) across overlay steps 2, 3, 4, and 5.

  12. Code (Original: Beamer P.23 - Pause):

    First sentence. % Removed \pause
    Second sentence appears immediately.
    \pause
    Third sentence.

    Question: How will the appearance of the first and second sentences differ in terms of overlay steps compared to the original example where \pause was between them?

  13. Code (Original: Beamer P.28 - Overlay Commands):

    \uncover<2>{Visible on Step 2}
    \only<3>{Visible on Step 3}

    Question: What is the key difference in how \uncover and \only affect layout space on steps where their content is not visible?

  14. Code (Original: Beamer P.32 - Columns):

    \begin{columns}[b] % Changed option from [T] or [c] to [b]
      \begin{column}{0.5\textwidth} Text A \end{column}
      \begin{column}{0.5\textwidth} Text B \\ (longer) \end{column}
    \end{columns}

    Question: How will the content in the two columns be vertically aligned relative to each other?

  15. Code (Original: Beamer P.34 - Notes):

    \begin{frame}{Concept}
      Main slide content.
      \note[item]{Remember detail X.} % Added [item] option
      \note[item]{Explain Y.}
    \end{frame}

    Question: How will the speaker notes likely be formatted when viewed (e.g., in pdfpc or with show notes option), due to the [item] option?

  16. Code (Original: Beamer P.36 - Handouts):

    % In Preamble:
    \documentclass[aspectratio=169]{beamer} % Changed option

    Question: What visual characteristic of the slides is primarily affected by the aspectratio=169 option?

  17. Code (Original: Beamer P.37 - Customization):

    % In Preamble:
    \setbeamercolor{frametitle}{fg=white, bg=darkred!80!black} % Changed color

    Question: Describe the color scheme (text color and background color) applied to the frame titles.

  18. Code (Original: Beamer P.38 - Customization):

    % In Preamble:
    \setbeamertemplate{itemize items}[square] % Changed symbol

    Question: What symbol will be used for first-level itemize lists instead of the default bullet?

Questions (Based on Caption/Citation/Booktabs Slides):

  1. Code (Original: Captions P.3 - Figure Env):

    \begin{figure}[p] % Changed placement specifier
    \centering
    \includegraphics[width=0.7\textwidth]{image}
    \caption{My Image}\label{fig:myimage}
    \end{figure}

    Question: What does the placement specifier [p] suggest LaTeX should try to do with this figure?

  2. Code (Original: Captions P.7 - Table Env):

    \begin{table}
    % \centering % Centering commented out
    \caption{Sample Data} \label{tab:data}
    \begin{tabular}{cc} Header1 & Header2 \\ Data1 & Data2 \end{tabular}
    \end{table}

    Question: How will the horizontal positioning of the table likely differ compared to the original example where \centering was present?

  3. Code (Original: Captions P.8 - Caption Package):

    % Preamble: \usepackage{caption}
    \captionsetup{labelsep=colon, font=small} % Changed labelsep
    % Inside figure: \caption{My figure}

    Question: How will the caption label (e.g., “Figure 1”) be separated from the caption text (“My figure”)?

  4. Code (Original: Captions P.10 - Labels):

    \caption{Table showing results}
    % \label{tab:results} % Label command commented out
    ...
    See Table~\ref{tab:results}.

    Question: What will happen during compilation regarding the \ref{tab:results} command, and what output will it likely produce?

  5. Code (Original: Captions P.12 - \pageref):

    The definition is on page \pageref*{sec:def}. % Added asterisk

    Question: How might the output of \pageref* differ from \pageref if hyperref is loaded?

  6. Code (Original: Captions P.15 - biblatex):

    % Preamble:
    \usepackage[backend=biber, style=numeric]{biblatex} % Changed style
    \addbibresource{references.bib}
    % Body: \cite{Knuth1986}

    Question: What format will the in-text citation for Knuth1986 likely take with the numeric style?

  7. Code (Original: Captions P.17 - Citing):

    According to \citeauthor{einstein1905} (\citeyear{einstein1905})...

    Question: Assuming the authoryear style, what specific pieces of information will \citeauthor and \citeyear extract from the einstein1905 bib entry?

  8. Code (Original: Captions P.18 - Compiling):

    % Assume references.bib changed, but only pdflatex is run once.
    pdflatex mydocument.tex

    Question: If the .bib file was updated, what is likely to be incorrect or missing in the mydocument.pdf after running only pdflatex once?

  9. Code (Original: Captions P.21/23 - Styles):

    % Preamble:
    \usepackage[backend=biber, style=reading]{biblatex} % Changed style

    Question: What kind of citation system (e.g., in-text author-year, numeric, footnote) does the reading style typically implement? (General knowledge based on context).

  10. Code (Original: Captions P.29 - \bibitem):

    \begin{thebibliography}{9} % Changed label width hint
    \bibitem[Ein05]{einstein} Albert Einstein (1905)...
    \end{thebibliography}

    Question: What aspect of the bibliography’s formatting does the {9} argument primarily influence?

  11. Code (Original: Captions P.37 - booktabs Example):

    \begin{tabular}{l|c|r} % Added vertical rules
    \toprule Header 1 & Header 2 & Header 3 \\ \midrule Data 1 & Data 2 & Data 3 \\ \bottomrule
    \end{tabular}

    Question: While booktabs discourages vertical rules, what visual elements will be added to the table structure by the | characters in the column specification?

  12. Code (Original: Captions P.40 - array Example):

    \begin{tabular}{>{\bfseries}l p{3cm} r} % Added formatting command
    \toprule Col1 & Col2 & Col3 \\ \midrule Text & Long text... & 123 \\ \bottomrule
    \end{tabular}

    Question: How will the content in the first column (l) be visually styled?

  13. Code (Original: Captions P.46 - multirow Example):

    \begin{tabular}{lll} \toprule Category & Subcat & Value \\ \midrule
    \multirow{-2}{*}{Category 1} & Subcat A & 10 \\ % Negative row span
    & Subcat B & 20 \\ \midrule ... \end{tabular}

    Question: How does specifying a negative number (-2) in \multirow change the direction the cell spans compared to a positive number?

  14. Code (Original: Captions P.50 - multicolumn):

    \begin{tabular}{lccc} \toprule
    \multicolumn{3}{l}{Spanning Left Header} & H4 \\ % Spans 3, left-aligned
    \midrule H1 & H2 & H3 & H4 \\ \midrule ... \end{tabular}

    Question: Describe the alignment and column span of the text “Spanning Left Header”.

Questions (Based on Subfigure/amsmath/NewEnv Slides):

  1. Code (Original: Subfig P.2 - Subfigure):

    \begin{figure}[htbp]
    \begin{subfigure}[t]{0.48\textwidth} ... \end{subfigure} % Top alignment
    \hfill
    \begin{subfigure}[b]{0.48\textwidth} ... \end{subfigure} % Bottom alignment
    \caption{Main Figure}
    \end{figure}

    Question: How will the two subfigures be vertically aligned relative to each other due to the [t] and [b] options?

  2. Code (Original: Subfig P.5 - Inline/Display):

    Consider $\lim_{x \to 0} \frac{\sin x}{x} = 1$.

    Question: In inline math, where are the limits (x \to 0) of the \lim operator typically placed relative to the operator name “lim”?

  3. Code (Original: Subfig P.8 - align):

    \begin{align}
    f(x) &= (x+a)(x+b) & g(x) &= (x+c)^2 \label{eq:two} \\ % Two align points
    &= x^2 + (a+b)x + ab & &= x^2 + 2cx + c^2 \nonumber
    \end{align}

    Question: How does having two alignment points (&) per line affect the layout of these equations compared to having only one alignment point after the =?

  4. Code (Original: Subfig P.10 - gather):

    \begin{gather*} % Added asterisk
    a^2 + b^2 = c^2 \\
    e^{i\pi} + 1 = 0
    \end{gather*}

    Question: What is the effect of the asterisk in gather* compared to gather regarding equation numbering?

  5. Code (Original: Subfig P.12 - multline):

    \begin{multline*} % Added asterisk
    x = a + b + c + d + e + f + g + h + i \\
    + j + k + l + m + n + o + p + q \\
    + r + s + t + u + v + w + y + z
    \end{multline*}

    Question: How does multline* differ from multline in terms of output?

  6. Code (Original: Subfig P.14 - split):

    \begin{align} % Changed surrounding env from equation to align
    \begin{split}
    H_c &= \frac{1}{2n} \sum ... \\ % Still one number for the split
        &= \text{Something simpler}
    \end{split}
    \label{eq:split_in_align}
    \end{align}

    Question: Since split is now inside align instead of equation, how many equation numbers will this entire block receive?

  7. Code (Original: Subfig P.16 - Matrices):

    \[ \mathbf{M} = \begin{vmatrix} a & b \\ c & d \end{vmatrix} \] % Changed matrix type

    Question: What type of delimiters (brackets/bars) will enclose the matrix elements when using vmatrix?

  8. Code (Original: Subfig P.18 - cases):

    \[ f(x) =
    \begin{cases}
    x^2, & x \ge 0 \\
    0, & x < 0 \quad \text{(Otherwise)} % Added text after condition
    \end{cases}
    \]

    Question: How will the text “(Otherwise)” be positioned relative to the condition x < 0?

  9. Code (Original: Subfig P.20 - nonumber):

    \begin{gather}
    y = mx + c \label{eq:line} \\
    E = mc^2 \notag \\ % Used \notag synonym
    F = ma \label{eq:force}
    \end{gather}

    Question: Which of these three equations will not receive an equation number?

  10. Code (Original: Subfig P.22 - amssymb):

    $\mathcal{R} \approx \mathfrak{R}$ % Different fonts used

    Question: Describe the visual style of the letters R produced by \mathcal{R} and \mathfrak{R} respectively.

  11. Code (Original: Subfig P.24 - amsthm):

    % Preamble: \usepackage{amsthm}, \newtheorem{thm}{Theorem}
    % Body:
    \begin{thm}[Pythagoras] % Added optional argument
    $a^2+b^2=c^2$.
    \end{thm}

    Question: In addition to the standard theorem label (e.g., “Theorem 1”), what text will appear associated with this theorem instance?

  12. Code (Original: Subfig P.31 - newenvironment):

    % Preamble:
    \newenvironment{codeblock}[1][Code] % Added optional argument with default
      {\begin{block}{#1}\ttfamily}
      {\end{block}}
    % Body:
    \begin{codeblock}[Python Example] ... \end{codeblock}

    Question: What title will the created block environment have?

  13. Code (Original: Subfig P.35 - newenvironment args):

    % Preamble:
    \newenvironment{mybox}[2] % Two mandatory args
      {\par\textbf{#1:} #2}
      {\par}
    % Body:
    \begin{mybox}{Note}{Remember this.}

    Question: Describe how the two arguments (“Note” and “Remember this.”) are used to format the output within the mybox environment.

  14. Code (Original: Subfig P.40 - renewenvironment):

    % Preamble: Assume \newenvironment{oldenv}{BEGIN}{END} exists
    \renewenvironment{oldenv}{\textit{New BEGIN}}{\textit{New END}}
    % Body:
    \begin{oldenv} Content \end{oldenv}

    Question: What code is executed at the beginning and end of the oldenv environment after the \renewenvironment command is processed?

Questions (Based on TikZ & PGFPlots Slides):

  1. Code (Original: TikZ P.4 - Libraries):

    % Preamble:
    \usepackage{tikz}
    % \usetikzlibrary{positioning} % Library NOT loaded
    % Body:
    \node (A) {A}; \node (B) [right=of A] {B}; % Positioning syntax used

    Question: What is likely to happen during compilation due to using the right=of A syntax without loading the required TikZ library?

  2. Code (Original: TikZ P.8 - Paths):

    \draw (0,0) rectangle ++(2,1); % Used relative rectangle syntax

    Question: A rectangle is drawn starting at (0,0). Where is the opposite corner located?

  3. Code (Original: TikZ P.9 - Curves):

    \draw (0,0) .. controls +(1,1) and +(-1,1) .. (2,0); % Relative controls

    Question: How are the coordinates for the Bezier control points specified (absolute or relative to start/end points)?

  4. Code (Original: TikZ P.12 - Nodes):

    \draw (0,0) -- (2,0) node[pos=0.75, below] {Almost end}; % Changed position

    Question: Where along the line segment from (0,0) to (2,0) will the text “Almost end” be placed?

  5. Code (Original: TikZ P.15 - Shapes):

    \node[shape=circle, draw, minimum size=1cm] at (1,1) (C) {}; % Empty node text
    \draw (0,0) -- (C.north); % Connect to anchor

    Question: What is drawn at (1,1), and where does the line from (0,0) connect to it?

  6. Code (Original: TikZ P.18/20 - Styling):

    \draw[line width=1pt, blue, densely dotted] (0,0) -- (3,0); % Changed style

    Question: Describe the thickness, color, and line style of the drawn segment.

  7. Code (Original: TikZ P.21 - Node Styling):

    \node [shape=rectangle, rounded corners=3pt, fill=yellow!30, draw=black] {Box};

    Question: Describe the appearance of the node’s border corners, its background, and its outline.

  8. Code (Original: TikZ P.23 - Scopes):

    \begin{scope}[shift={(1,1)}, rotate=45]
      \draw (0,0) rectangle (1,1);
    \end{scope}

    Question: What two geometric transformations are applied to the rectangle drawn within the scope?

  9. Code (Original: TikZ P.25 - tikzset):

    % Preamble: \tikzset{my style/.style={draw=red, thick}}
    % Body:
    \draw [my style, blue] (0,0) -- (1,1); % Override color

    Question: What will be the final color and thickness of the line drawn?

  10. Code (Original: TikZ P.33 - Relative Coords ++):

    \draw (1,1) + (1,0) -- +(0,1); % Used + instead of ++

    Question: A line starts relative to (1,1) at (2,1). Where does it end, relative to the original point (1,1) or the intermediate point (2,1)?

  11. Code (Original: TikZ P.36 - Anchors):

    \node[draw] (A) at (0,0) {A}; \node[draw] (B) at (3,0) {B};
    \draw (A.30) -- (B.150); % Connect using angles

    Question: The line connects points on the borders of nodes A and B. How are these specific points determined?

  12. Code (Original: TikZ P.40 - Positioning Example):

    % Tikzpicture preamble: node distance=1cm
    \node (A) {A};
    \node (B) [right=1.5cm of A] {B}; % Specific distance override

    Question: What is the horizontal distance between the borders of node A and node B?

  13. Code (Original: PGFPlots P.8 - Expression Plot):

    \begin{axis}[xlabel=$t$, ylabel={$y(t)$}]
    \addplot[domain=0:6.28, samples=100, red] {sin(deg(x))}; % Use deg(x)
    \end{axis}

    Question: The domain is specified from 0 to approx (2\pi). What function is being plotted, and what does deg(x) likely do?

  14. Code (Original: PGFPlots P.13 - Plot From File):

    % Assumes mydata.dat has columns X_Val, Y_Val, Error
    \addplot+[error bars/.cd, y dir=both, y explicit]
      table [x=X_Val, y=Y_Val, y error=Error] {mydata.dat};

    Question: Besides plotting the (X_Val, Y_Val) points, what additional visual element is added to each point using the y error=Error and error bars/... options?


End of Examination