LaTeX document does not contain :
- (a)\documentclass{article}
- (b)\begin{document}
- (c)\end{document}
- (d)\documentstyle{article}
Correct — D, (d) \documentstyle{article}. That documentstyle command is the one of the four that a LaTeX document does not contain, because it belongs to a version of LaTeX that was replaced more than thirty years ago. LaTeX is a document preparation system written by Leslie Lamport on top of Donald Knuth's TeX typesetting engine, and it went through a change of generation in 1994. In the older LaTeX 2.09, the first line of every file declared the layout with the documentstyle command, and variations such as font size or two-column setting were passed to it in square brackets. LaTeX2e, the version released in June 1994 and the one everybody has used since, retired that command: the first line now uses documentclass, the bracketed options stay with it, and anything extra is loaded afterwards by usepackage commands in the preamble. The word 'style' survives in LaTeX only for other purposes, such as bibliography styles and page styles, never as the opening declaration of a file. So the skeleton of every modern LaTeX file is exactly the other three options, in this order: the documentclass line, which opens the preamble and fixes the overall layout; then begin followed by document in braces, which closes the preamble and opens the body; and finally end followed by document in braces, which closes it. Anything typed after that closing line is ignored. Options (a), (b) and (c) are therefore all present in a LaTeX document and option (d) is not, which makes (d) the answer to a stem asking what a LaTeX document does NOT contain. One qualification, which is the kind of detail that separates a candidate who has used LaTeX from one who has only read about it: a modern LaTeX installation will still process a file that begins with the old command, but only by dropping into a backwards compatibility mode intended for rescuing documents written before 1994, and it announces that with a warning. That is an obsolete-file rescue, not part of the language a new document is written in. Note how the item is printed: it is set as a statement ending in a colon rather than as a question, and the word 'not' is in bold italics. Read the whole line before the options — a candidate who reads only 'LaTeX document contains' will pick option (a) with confidence and lose the mark.
- (a)\documentclass{article} — This is the first command of every LaTeX2e file, so a LaTeX document does contain it and it cannot answer a negative stem. It names the document class, which fixes the overall design — margins, sectioning commands, whether chapters exist, how the title is set. The standard classes are article, report, book, letter and slides; 'article' is the one printed here and is used for short pieces with sections but no chapters, while 'report' and 'book' add chapters. Options such as a font size or a paper size go in square brackets before the braces. Everything between this line and the start of the body is the preamble.
- (b)\begin{document} — This opens the document environment and marks the end of the preamble, so it is present in every LaTeX file and is not what the file lacks. Everything the reader will actually see is typed after it. It is one instance of the general LaTeX pattern in which a named region is opened by begin and closed by end with the same name in braces — the same construction gives itemize lists, tabular tables, figures and equations. Placing ordinary text before this line is one of the commonest beginner errors, because the preamble accepts only declarations.
- (c)\end{document} — This closes the document environment and is the last meaningful line of every LaTeX file, so again it is contained in a LaTeX document rather than absent from it. It is the matching half of option (b): the begin and end pair must balance, and a missing one is the cause of the familiar error in which the compiler reaches the end of the file still expecting something. Text typed after this line is discarded silently, which is occasionally used as a crude way of parking a draft paragraph out of the way.
LaTeX is a markup-based document preparation system rather than a word processor: the author types plain text mixed with commands, and a compiler turns that source into a typeset file. The structure of the source is fixed and small. A file opens with a documentclass declaration; the region between that line and the opening of the document body is the preamble, where packages are loaded with usepackage, the title, author and date are declared, and any custom commands are defined; the body then runs between the begin and end of the document environment. Commands start with a backslash, arguments that are required go in braces, and optional arguments go in square brackets. The generational split matters for exam purposes: LaTeX 2.09 opened files with documentstyle and pushed extra features into its bracketed options, whereas LaTeX2e separated the two concerns — documentclass for the design, usepackage for added capability. Because scientific and mathematical writing settled on LaTeX for equations, tables and bibliographies, the skeleton of a LaTeX file is standard knowledge in any office that produces technical reports.
The EO/AO computers block covers office and productivity software beyond the obvious spreadsheet and presentation questions, and LaTeX appears as a recognition item: does the candidate know the shape of a source file. Nothing has to be computed. The habit rewarded is knowing the minimal working skeleton of the tools in the syllabus — for LaTeX, the three lines in options (a), (b) and (c) — because an odd-one-out becomes trivial once the skeleton is memorised. The item is also a reading test: it is printed as a statement rather than a question, with 'not' in bold italics, and the negative has to be carried through to the options.
- LaTeX was written by Leslie Lamport on top of Donald Knuth's TeX engine.
- LaTeX2e, released in 1994, replaced the LaTeX 2.09 documentstyle declaration with documentclass.
- A minimal LaTeX file is three lines: the documentclass declaration, the begin of the document environment, and its end.
- The preamble is everything between the documentclass line and the opening of the document body; packages are loaded there with usepackage.
- Standard document classes include article, report, book, letter and slides.
- Required arguments to a LaTeX command are enclosed in braces and optional ones in square brackets.
- Environments are opened and closed by begin and end with the same name — itemize, tabular, figure and equation follow the same pattern.
- Text placed after the end of the document environment is ignored by the compiler.
- Reading the stem as an affirmative and choosing the documentclass line, which is the command a LaTeX file certainly does contain.
- Believing the obsolete documentstyle command is simply an alternative spelling of documentclass; it belongs to LaTeX 2.09 and survives only in a compatibility mode.
- Forgetting that begin and end of the document environment must both be present and must match.
- Confusing the document class with a page style or a bibliography style, which are separate and later declarations.
Software recognition questions in EO/AO papers ask for the minimal skeleton of a tool, the file extension it produces, or the odd command out of a list. LaTeX, HTML and spreadsheet formulae are the three that recur. For each, learn the smallest complete example by heart, since almost every question in the family is answerable by comparing an option against that example.
No directly related past PYQ was found.
- practice — not a real PYQ
In a LaTeX file, the region between the document class declaration and the beginning of the document environment is called the :
- (a)Header
- (b)Preamble
- (c)Front matter
- (d)Prologue
Answer(b) Preamble
- practice — not a real PYQ
In LaTeX, an additional package is loaded by the command :
- (a)usepackage
- (b)documentstyle
- (c)include
- (d)addpackage
Answer(a) usepackage