Viva Voce Questions and Answers -
LaTeX Lab (BCSL456D)
What is LaTeX?
LaTeX is a markup language used for high-quality document preparation, especially in
academia, engineering, and publishing. It is widely used for typesetting technical and
scientific documents that include complex mathematics, figures, tables, citations, and
more.
Why Use LaTeX?
• Professional Formatting: Ensures consistent layout and typography.
• Mathematical Precision: Handles complex equations elegantly.
• Structured Writing: Encourages organized content (sections, figures,
references).
• Focus on Content: You write content; LaTeX takes care of the formatting.
• Cross-platform: Works on Windows, macOS, and Linux.
What is TeXmaker?
TeXmaker is a free, open-source LaTeX editor that combines:
• An editor (for writing code),
• A PDF viewer (for output preview),
• Tools to compile LaTeX code and check errors.
Basic Viva Questions and Answers
General LaTeX Questions
1. Q: What is LaTeX?
A: LaTeX is a document preparation system used to create high-quality documents
with typeset formatting.
2. Q: What file extension is used for LaTeX files?
A: .tex
3. Q: Which command begins the LaTeX document body?
A: \begin{document}
4. Q: How do you create a section in LaTeX?
A: Using \section{Section Name}
5. Q: What is the purpose of \maketitle?
A: It generates the title, author, and date specified in the preamble.
TeXmaker-Specific Questions
1. Q: What is TeXmaker used for?
A: It is an integrated LaTeX editor for writing, compiling, and previewing .tex files.
2. Q: How do you compile a document in TeXmaker?
A: Click the “Quick Build” button or press F1.
3. Q: What does the Log panel in TeXmaker show?
A: It displays compilation messages, including errors and warnings.
4. Q: Can TeXmaker automatically preview PDF output?
A: Yes, it shows the PDF output in a built-in viewer.
5. Q: What is the use of syntax highlighting in TeXmaker?
A: It improves readability by coloring commands, text, and environments
differently.
Experiment 1: Sections, Header, Footer
• Q: What is the purpose of \usepackage{fancyhdr}?
• A: It is used to customize the header and footer of the document.
• Q: What does \lipsum do in LaTeX?
• A: It generates dummy text for placeholder content.
• Q: How do you display the page number in the footer?
• A: By using \rfoot{\thepage} inside fancyhdr.
• Q: Can you place both header and footer in LaTeX?
• A: Yes, using fancyhdr, you can define both.
• Q: Which command starts a new section in LaTeX?
• A: \section{Section Title}.
Experiment 2: Abstract/Summary
• Q: How do you define an abstract section without numbering?
• A: Use \section*{Abstract}.
• Q: Can you add multiple paragraphs in the abstract?
• A: Yes, by using separate lines or commands like \vspace.
• Q: What is the purpose of \maketitle?
• A: It prints the title, author, and date on the document.
• Q: What does the \lipsum package provide?
• A: Dummy text paragraphs for demonstration.
• Q: How do you suppress numbering for sections?
• A: By using the asterisk version: \section*{}.
Experiment 3: Title Page
• Q: Which package is used to include images like logos?
• A: \usepackage{graphicx}.
• Q: What command is used to include an image?
• A: \includegraphics{filename}.
• Q: How do you adjust the image size in LaTeX?
• A: Use the scale or width option in \includegraphics.
• Q: How is spacing added between elements?
• A: Using \vspace{}.
• Q: Which environment is used to center content in the title page?
• A: \begin{center}...\end{center}.
Experiment 4: Certificate Page
• Q: How do you insert blank spaces in LaTeX?
• A: Using \underline{\hspace{length}}.
• Q: What is \thispagestyle{empty} used for?
• A: To remove headers and footers on that page.
• Q: Can LaTeX align elements side-by-side?
• A: Yes, using the tabular environment.
• Q: What command sets the geometry of the page?
• A: \usepackage{geometry} and \geometry{}.
• Q: How do you create a signature area?
• A: With \underline{\hspace{length}} and labels.
Experiment 5: Tables
• Q: What is \multicolumn used for?
• A: To merge multiple columns in a table header.
• Q: How do you draw horizontal lines in tables?
• A: Using \hline.
• Q: What is the purpose of \renewcommand{\arraystretch}?
• A: To increase spacing between table rows.
• Q: How do you make headers span multiple rows?
• A: Use \multirow.
• Q: Which package is required for multirow and multicolumn?
• A: \usepackage{multirow}.
Experiment 6: Side-by-side Graphics (Subfigure)
• Q: Which package is used for subfigures?
• A: \usepackage{subcaption}.
• Q: What is the purpose of \includegraphics?
• A: To include an image in the document.
• Q: How do you place images side-by-side in LaTeX?
• A: By using the subfigure environment inside a figure.
• Q: What does \hfill do between subfigures?
• A: It creates horizontal space between figures.
• Q: What is the role of \caption{} inside a subfigure?
• A: To provide a caption for the specific image.
Experiment 7: Mathematical Equations
• Q: Which package is used to write equations?
• A: \usepackage{amsmath}.
• Q: How do you align equations in LaTeX?
• A: Using the align environment from amsmath.
• Q: What does \notag do?
• A: Suppresses the equation number.
• Q: Can you write multiple equations using align?
• A: Yes, each line is treated as a separate equation.
• Q: How are square roots and fractions written?
• A: Using \sqrt{} and \frac{} respectively.
Experiment 8: Theorems and Lemmas
• Q: Which package defines theorem-like environments?
• A: \usepackage{amsthm}.
• Q: How do you create a theorem in LaTeX?
• A: Using \newtheorem and the \begin{theorem} block.
• Q: Can definitions and lemmas share the same numbering?
• A: Yes, using the same counter as theorem.
• Q: What is the purpose of [theorem] in \newtheorem{definition}[theorem]{Definition}?
• A: To share numbering with the theorem environment.
• Q: Can we add multiple theorem environments?
• A: Yes, like theorem, definition, lemma, and corollary.
Experiment 9: Citations and Bibliography
• Q: Which package is used for citations?
• A: \usepackage{cite}.
• Q: What file format is used for storing bibliography?
• A: .bib file.
• Q: How do you refer to a bibliography file?
• A: Using \bibliography{filename}.
• Q: Which command styles the bibliography?
• A: \bibliographystyle{}.
• Q: Can citations be displayed inline?
• A: Yes, using \cite{key} in the text.
Experiment 10: Tree Diagram using TikZ
• Q: Which package is used to draw diagrams?
• A: \usepackage{tikz}.
• Q: What command starts a TikZ diagram?
• A: \begin{tikzpicture}...\end{tikzpicture}.
• Q: How do you specify hierarchy levels?
• A: Using tikzstyle with level distance and sibling distance.
• Q: Can TikZ create both horizontal and vertical trees?
• A: Yes, by changing the grow direction.
• Q: What is the role of child { node {} }?
• A: It defines a child node in the tree structure.
Experiment 11: Algorithms using algorithmic
• Q: Which packages are used to present algorithms?
• A: \usepackage{algorithm}, \usepackage{algpseudocode}.
• Q: How do you write procedures?
• A: Using \Procedure{} and \EndProcedure.
• Q: What is the use of \If and \EndIf?
• A: To define conditional logic in algorithms.
• Q: What does \State do in an algorithm?
• A: It adds a statement in the algorithm block.
• Q: Can loops be defined in algorithm?
• A: Yes, using \For...\EndFor.
Experiment 12: Report and Article
• Q: Which document class is used for reports?
• A: \documentclass{report}.
• Q: What command creates a title in a report?
• A: \maketitle.
• Q: How do you add chapters in LaTeX?
• A: Using \chapter{}.
• Q: What command adds a table of contents?
• A: \tableofcontents.
• Q: What are common sections in a report?
• A: Introduction, Methods, Results, Discussion, Conclusion.