25
The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@ifi.uio.no Version 2.12, 7th January 2019 Abstract This document contains the commented source of the lecnotes class, a modification of the report class intended for writing lecture notes. Contents 1 Introduction 3 1.1 Implementation decisions ....................... 3 2 Identification part 4 2.1 L A T E X2 ε requirements ......................... 4 2.2 Document class identification ..................... 4 3 Preliminary declaration part 4 4 Option part 4 4.1 Size options ............................... 4 4.2 Font options ............................... 5 4.2.1 The font option bera ...................... 5 4.2.2 The font option cm ....................... 5 4.2.3 The font option lucida .................... 6 4.2.4 The font option newcent ................... 6 4.2.5 The font option utopia .................... 6 4.3 Language options ............................ 6 4.4 Document length option ........................ 7 4.5 Footnote options ............................ 7 4.6 Unsupported options .......................... 7 4.7 Other options .............................. 7 4.8 Option processing ........................... 7 1

The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

  • Upload
    others

  • View
    13

  • Download
    0

Embed Size (px)

Citation preview

Page 1: The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

The lecnotes document class

Dag LangmyhrDepartment of Informatics

University of Oslo

[email protected]

Version 2.12, 7th January 2019

Abstract

This document contains the commented source of the lecnotes class, amodification of the report class intended for writing lecture notes.

Contents

1 Introduction 31.1 Implementation decisions . . . . . . . . . . . . . . . . . . . . . . . 3

2 Identification part 42.1 LATEX 2ε requirements . . . . . . . . . . . . . . . . . . . . . . . . . 42.2 Document class identification . . . . . . . . . . . . . . . . . . . . . 4

3 Preliminary declaration part 4

4 Option part 44.1 Size options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44.2 Font options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

4.2.1 The font option bera . . . . . . . . . . . . . . . . . . . . . . 54.2.2 The font option cm . . . . . . . . . . . . . . . . . . . . . . . 54.2.3 The font option lucida . . . . . . . . . . . . . . . . . . . . 64.2.4 The font option newcent . . . . . . . . . . . . . . . . . . . 64.2.5 The font option utopia . . . . . . . . . . . . . . . . . . . . 6

4.3 Language options . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64.4 Document length option . . . . . . . . . . . . . . . . . . . . . . . . 74.5 Footnote options . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74.6 Unsupported options . . . . . . . . . . . . . . . . . . . . . . . . . . 74.7 Other options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74.8 Option processing . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

1

Page 2: The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

5 Loading part 85.1 Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85.2 Font packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85.3 The float package . . . . . . . . . . . . . . . . . . . . . . . . . . . 85.4 The caption package . . . . . . . . . . . . . . . . . . . . . . . . . 85.5 The moreverb package . . . . . . . . . . . . . . . . . . . . . . . . . 85.6 The tocloft package . . . . . . . . . . . . . . . . . . . . . . . . . 8

6 Main part 96.1 Font macroes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96.2 Document parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

6.2.1 Forced page breaks . . . . . . . . . . . . . . . . . . . . . . . 96.2.2 Front matter . . . . . . . . . . . . . . . . . . . . . . . . . . 96.2.3 Main matter . . . . . . . . . . . . . . . . . . . . . . . . . . 106.2.4 Back matter . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

6.3 Chapter heads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106.3.1 Unnumbered chapters . . . . . . . . . . . . . . . . . . . . . 116.3.2 Chapter quotes . . . . . . . . . . . . . . . . . . . . . . . . . 11

6.4 Other section heads . . . . . . . . . . . . . . . . . . . . . . . . . . 116.4.1 Section numbering . . . . . . . . . . . . . . . . . . . . . . . 13

6.5 The title page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146.6 The abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146.7 Page layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146.8 Paragraph layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156.9 Display formulæ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156.10 Footnotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156.11 Page styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166.12 Figures and tables . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

6.12.1 Figure and table captions . . . . . . . . . . . . . . . . . . . 176.13 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176.14 Margins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186.15 Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

6.15.1 Enumeration lists . . . . . . . . . . . . . . . . . . . . . . . . 196.15.2 Itemized lists . . . . . . . . . . . . . . . . . . . . . . . . . . 19

6.16 Automatically generated tables . . . . . . . . . . . . . . . . . . . . 196.16.1 Table of contents . . . . . . . . . . . . . . . . . . . . . . . . 196.16.2 List of figures . . . . . . . . . . . . . . . . . . . . . . . . . . 216.16.3 List of tables . . . . . . . . . . . . . . . . . . . . . . . . . . 21

6.17 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216.18 Other modifications . . . . . . . . . . . . . . . . . . . . . . . . . . 21

6.18.1 Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216.19 The end . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

2

Page 3: The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

1 Introduction

This document describes lecnotes which is a LATEX document class designed forwriting lecture notes. It is based on the report class with the following modifica-tions:

• The class is designed for large pages (A4 or letter format) printed on bothsides and stapled together.

• The document class was designed with Lucida Bright as the main text font.(This font was chosen because it looks better at low quality printing thanComputer Modern, and because it contains a full set of mathematical sym-bols.) However, since not everybody has bought Lucida Bright, alternativeversions based on Bera, New Century Schoolbook, Utopia and ComputerModern are also available.

• Auxiliary text will be in Gill Sans for contrast. The alternative versions willuse Bera Sans, Avant Garde Gothic or Computer Modern Sans Serif.

• Since Lucida Bright is a heavier typeface than Computer Modern, otherfeatures like rules in tables are made correspondingly darker.

• There will be ample space for the students to make their notes.

• A facility is included for typesetting example code (for instance computerprograms) and automatically produce a list of these examples (like the listof figures).

1.1 Implementation decisions

Besides being used to produce lecture notes at my department, this documentclass is intented to serve as an example for others wanting to make their owndocument classes. This has following implications on the implementation:

• LATEX notation (such as \setlength or \newcommand) will be used whenpossible.

For tests, however, I will use the “\if. . . \fi” style of plain TEX; I find thismuch more readable than using the ifthen package.

• Explicit lengths (like “0pt”) will be used rather than symbolic names (like“0\@pt” or “\z@”).

• All internal names defined by this document class will start with “\lno@...”to avoid conflicts with other code.

This means that the class will not be optimal in terms of space and processingspeed, but the user is not likely to notice this.

3

Page 4: The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

2 Identification part

This part contains the header information with which every LATEX 2ε class shouldstart.

1 〈∗code〉

2.1 LATEX 2ε requirements

This is a LATEX 2ε document class, and, since it uses \MakeUppercase (see Sec-tion 6.11 on page 16), it must be a version from June 1995 or later.

2 \NeedsTeXFormat{LaTeX2e}[1995/06/01]

2.2 Document class identification

Time has now come to declare the class name:

3 \ProvidesClass {lecnotes}[2019/01/07 LaTeX2e document class v2.12]

3 Preliminary declaration part

There are no preliminary declarations in this class.

4 Option part

This part declares the various options recognized by the class.

4.1 Size options

Only the 10pt size option is currently provided. It first defines various font sizes.Each font size consists of two definitions: \lno@...@sz is the type size itself, and\lno@...@ln is the baseline to baseline distance.

4 \DeclareOption{10pt}{

5 \def \lno@abstr@id@sz {14} \def \lno@abstr@id@ln {0}

6 \def \lno@caption@lab@sz {9} \def \lno@caption@lab@ln {0}

7 \def \lno@caption@text@sz{10} \def \lno@caption@text@ln{11}

8 \def \lno@chap@id@sz {20} \def \lno@chap@id@ln {0}

9 \def \lno@chap@num@sz {30} \def \lno@chap@num@ln {0}

10 \def \lno@chap@txt@sz {30} \def \lno@chap@txt@ln {30}

11 \def \lno@chapquo@auth@sz{10} \def \lno@chapquo@auth@ln{12}

12 \def \lno@chapquo@text@sz{10} \def \lno@chapquo@text@ln{12}

13 \def \lno@xample@line@sz {5} \def \lno@xample@line@ln {0}

14 \def \lno@footnote@num@sz {7} \def \lno@footnote@num@ln {0}

15 \def \lno@page@bot@sz {12} \def \lno@page@bot@ln {0}

16 \def \lno@page@top@sz {11} \def \lno@page@top@ln {0}

17 \def \lno@sec@num@sz {14} \def \lno@sec@num@ln {0}

18 \def \lno@ssec@num@sz {12} \def \lno@ssec@num@ln {0}

19 \def \lno@sssec@num@sz {11} \def \lno@sssec@num@ln {0}

4

Page 5: The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

20 \def \lno@para@num@sz {10} \def \lno@para@num@ln {0}

21 \def \lno@spara@num@sz {9} \def \lno@spara@num@ln {0}

22 \def \lno@sec@txt@sz {17} \def \lno@sec@txt@ln {18}

23 \def \lno@ssec@txt@sz {14} \def \lno@ssec@txt@ln {15}

24 \def \lno@sssec@txt@sz {12} \def \lno@sssec@txt@ln {12}

25 \def \lno@para@txt@sz {11} \def \lno@para@txt@ln {11}

26 \def \lno@spara@txt@sz {10} \def \lno@spara@txt@ln {10}

27 \def \lno@title@author@sz{17} \def \lno@title@author@ln{17}

28 \def \lno@title@title@sz {25} \def \lno@title@title@ln {25}

Note that not all these sizes are the standard ones supported by all LATEX systems;see Section 5.2 on page 8.

This option also defines the standard vertical space to insert between para-graphs, and an empty vertical space with the same stretch and shrink:

29 \def \lno@parskip {12pt plus 4pt minus 2pt}

30 \def \lno@noskip {0pt plus 4pt minus 2pt}

31 }

The other standard size options are not used:

32 \DeclareOption{11pt}{\ClassWarningNoLine{lecnotes}{Option

33 ‘11pt’ not supported.}}

34 \DeclareOption{12pt}{\ClassWarningNoLine{lecnotes}{Option

35 ‘12pt’ not supported.}}

4.2 Font options

There are currently five font options.

4.2.1 The font option bera

If you haven’t got the Lucida fonts, the best alternative (in my opinion) is Bera.Math support is provided by the arevmath package, and auxiliary text will be inBera Sans.

36 \DeclareOption{bera}{

37 \AtEndOfClass{\RequirePackage{bera,arevmath}}

38 \def \lno@alt@font {fvs}

39 \def \lno@l@font {m} \def \lno@eb@font {b}

40 }

4.2.2 The font option cm

As with all the standard LATEX document classes, the Computer Modern font isthe default; auxiliary text is set in Computer Modern Sans Serif.

41 \DeclareOption{cm}{

42 \def \lno@alt@font {cmss}

43 \def \lno@l@font {m} \def \lno@eb@font {bx}

44 }

5

Page 6: The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

4.2.3 The font option lucida

As mentioned, this document class was designed to be used with Lucida Brightwith auxiliary text in Gill Sans. The user can select this by giving the class optionlucida.

45 \DeclareOption{lucida}{

46 \AtEndOfClass{\RequirePackage{lucidabr}}

47 \def \lno@alt@font {pgs}

48 \def \lno@l@font {l} \def \lno@eb@font {eb}

49 }

4.2.4 The font option newcent

Not all users have Lucida Bright installed, but most will have New Century School-book. This font is better suited for lecture notes than Computer Modern, particu-larly when used with the math fonts of mathpazo and auxiliary text set in AvantGarde Gothic.

50 \DeclareOption{newcent}{

51 \AtEndOfClass{\RequirePackage{mathpazo,newcent}}

52 \def \lno@alt@font {pag}

53 \def \lno@l@font {m} \def \lno@eb@font {b}

54 }

4.2.5 The font option utopia

An even better alternative is Utopia, as implemented in the fourier package. Aux-iliary text is in Avant Garde Gothic.

55 \DeclareOption{utopia}{

56 \AtEndOfClass{\RequirePackage{fourier}}

57 \def \lno@alt@font {pag}

58 \def \lno@l@font {m} \def \lno@eb@font {b}

59 }

4.3 Language options

Presently, the lecnotes class only supports four language options. The sole effectof these options is to provide correct spelling of the words “example” and “list ofexamples”.

60 \DeclareOption{american}{%

61 \def \lno@xample@name {Example}

62 \def \lno@xamplelist@name {List of Examples}}

63 \DeclareOption{english}{\ExecuteOptions{american}}

64 \DeclareOption{norsk}{%

65 \def \lno@xample@name {Eksempel}

66 \def \lno@xamplelist@name {Eksempler}}

67 \DeclareOption{nynorsk}{%

68 \def \lno@xample@name {Eksempel}

69 \def \lno@xamplelist@name {Eksempel}}

6

Page 7: The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

70 \DeclareOption{UKenglish}{\ExecuteOptions{american}}

71 \DeclareOption{USenglish}{\ExecuteOptions{american}}

4.4 Document length option

If document is quite long, i.e., has very many chapters and sections, the layout ofthe table of content must be adapted to this.

72 \newif\iflno@long \lno@longfalse

73 \newif\iflno@verylong \lno@verylongfalse

74 \DeclareOption{long}{\lno@longtrue}

75 \DeclareOption{verylong}{\lno@verylongtrue}

4.5 Footnote options

There is often interesting information to be found in the footnotes in lecture notes.Students sometimes read the footnotes first and want to find the reference on thepage. To make that easier, the writer can specify option boxfn which indicatesthat footnote numbers are set in a box so they are easier to spot.

76 \DeclareOption{boxfn}{\def \@makefnmark {\lno@boxfnmark}}

Option stdfn gives standard footnote numbers; this is the default.

77 \DeclareOption{stdfn}{\def \@makefnmark {\lno@stdfnmark}}

We must keep a reference to the standard footnote mark definition macro.

78 \let \lno@stdfnmark = \@makefnmark

4.6 Unsupported options

Not all options from the report class are supported:

79 \DeclareOption{notitlepage}{\ClassWarningNoLine{lecnotes}{Option

80 ‘notitlepage’ not supported.}}

81 \DeclareOption{oneside}{\ClassWarningNoLine{lecnotes}{Option

82 ‘oneside’ not supported.}}

83 \DeclareOption{titlepage}{\ClassWarningNoLine{lecnotes}{Option

84 ‘titlepage’ not supported.}}

85 \DeclareOption{twocolumn}{\ClassWarningNoLine{lecnotes}{Option

86 ‘twocolumn’ not supported.}}

4.7 Other options

All remaining options are just passed on to the report class:

87 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}

4.8 Option processing

Now that all options have been declared, we may process them. The four optionscm, 10pt, stdfn, and american are the default choices.

88 \ExecuteOptions{cm,10pt,stdfn,american}

89 \ProcessOptions \relax

7

Page 8: The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

5 Loading part

Since lecnotes is based on report class, that class must be loaded. The twoside

option is always used.

90 \LoadClass[twoside]{report}

5.1 Calculation

The calc package makes calculations much more readable.

91 \RequirePackage{calc}

5.2 Font packages

Irrespective of the chosen font, we will want symbols like bullets to come fromthat font. The textcomp package takes care of that.

92 \RequirePackage{textcomp}

Since we use some non-standard font sizes, the type1cm package is required.

93 \RequirePackage{type1cm}

5.3 The float package

Since we are to define our own kind of float (see Section 6.13 on page 17), we needthe float package:

94 \RequirePackage{float}

5.4 The caption package

The caption package is very useful when it comes to adapting the captions theway we want them.

95 \RequirePackage[format=hang]{caption}

5.5 The moreverb package

Typesetting examples (see Section 6.13 on page 17) is based on the moreverb

package.

96 \RequirePackage{moreverb}

5.6 The tocloft package

This package is very useful when modifying the table of contents and the tablesof figures and tables.

97 \RequirePackage{tocloft}

8

Page 9: The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

6 Main part

This part contains the class itself.

6.1 Font macroes

Auxiliary text like chapter headings, footnotes numbers, etc, is set in a diffent fontfamily for contrast. This is implemented by defining the macro \lno@alt@font

when handling package options; see Section 4.2 on page 5.Not all fonts have l (light) and eb (extra bold) variants, so \lno@l@font and

\lno@eb@font define what should really be used. These are defined by packageoptions; see Section 4.2 on page 5.

The macro \lno@font is used whenever something is to be set in the alterna-tive font. Its optional parameter #1 is used for additional font specification, like\bfseries; parameter #2 is the font size to be used.

98 \newcommand{\lno@font}[2][]{\normalfont

99 \fontfamily{\lno@alt@font}%

100 \fontsize{\csname lno@#2@sz\endcsname}%

101 {\csname lno@#2@ln\endcsname pt}#1\selectfont }

6.2 Document parts

The lecture notes need to treat front matter differently, so private versions of the\frontmatter, \mainmatter and \backmatter similar to those found in the book

class are needed.

6.2.1 Forced page breaks

The \lno@cleardoublepage macro is just like \cleardoublepage except that wewant the blank pages inserted by it to have page style plain:

102 \newcommand{\lno@cleardoublepage}{\lno@clearpage

103 \ifodd\c@page \else \null\thispagestyle{plain}\newpage \fi }

\clearpage is a link to either the standard \clearpage macro or the newly defined\lno@cleardoublepage; it is redefined for each document part. Consequently, weneed a link to the standard \clearpage macro.

104 \let \lno@clearpage = \clearpage

6.2.2 Front matter

\frontmatter The front matter is just like the back matter except that it uses roman pagenumbers.

105 \newcommand{\frontmatter}{\backmatter

106 \pagenumbering{roman}}

9

Page 10: The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

6.2.3 Main matter

\mainmatter The main part of the document has a few special features:

• There will be some vertical space between the paragraphs to make it easierfor the students to make notes.

• Each chapter will start on a right-hand page.

107 \newcommand{\mainmatter}{\lno@cleardoublepage

108 \let \clearpage = \lno@cleardoublepage

109 \pagenumbering{arabic}%

110 \setlength{\parskip}{\lno@parskip}\setlength{\parindent}{0pt}}

The default is main matter:

111 \mainmatter

6.2.4 Back matter

\backmatter The back matter will be more like the standard report class.

112 \newcommand{\backmatter}{\clearpage

113 \let \clearpage = \lno@clearpage

114 \setlength{\parskip}{0pt}\setlength{\parindent}{2em}}

6.3 Chapter heads

The chapter head is completely redefined because of the chapter quotation andthe different fonts:

115 \renewcommand{\@makechapterhead}[1]{%

116 \global\@topnum=\z@ \@afterindentfalse

117 \vspace*{-40pt}

118 \vbox to 90pt{\raggedleft

119 \parbox{0.4\textwidth}{\raggedright

120 \lno@font[\fontseries{\lno@l@font}\slshape]{chapquo@text}%

121 \lno@chapquo@text\par

122 \raggedleft

123 \lno@font[\fontseries{\lno@l@font}]{chapquo@auth}%

124 \lno@chapquo@auth}

125 \vss }

126 \nochapterquote

127 {\setlength{\parindent}{0pt}\raggedright

128 \lno@font[\bfseries]{chap@id}\@chapapp\space

129 \lno@font[\fontseries{\lno@eb@font}]{chap@num}\thechapter\par

130 \vspace{5pt}

131 \lno@font[\bfseries]{chap@txt}#1\par

132 \vspace{20pt}

133 }}

10

Page 11: The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

6.3.1 Unnumbered chapters

The appearance of the *-ed version is similarly redefined. Note, however, that wewant all chapters—even the unnumbered ones—in the table of contents using aspecial style named lno@xchapter; this is further explained in Section 6.16.1 onpage 20.

134 \renewcommand{\@makeschapterhead}[1]{%

135 \markboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}%

136 \refstepcounter{lno@xchapter}%

137 \addcontentsline{toc}{lno@xchapter}{#1}%

138 \global\@topnum=\z@ \@afterindentfalse

139 \vspace*{10pt}

140 {\setlength{\parindent}{0pt}\raggedright

141 \lno@font[\bfseries]{chap@txt}#1 \par

142 \vspace{20pt}

143 }}

To make this work properly with the hyperref package, the unnumbered chaptersare numbered according to a special counter named lno@xchapter.

144 \newcounter{lno@xchapter}

145 \def \toclevel@lno@xchapter {0}

6.3.2 Chapter quotes

\chapterquote The chapter head can contain a short quotation; this is specified using the\chapterquote macro with three parameters: the optional #1 is the quotationmark (including the space, if any), #2 is the quotation itself and #3 is the author.The macro just remembers these.

146 \newcommand{\chapterquote}[3][--- ]{%

147 \def \lno@chapquo@text {#2}\def \lno@chapquo@auth {#1#3}}

\nochapterquote \nochapterquote erases the quote from memory. This is called automatically by\chapter to ensure that a given quote only appears once.

148 \newcommand{\nochapterquote}{%

149 \def \lno@chapquo@text {}\def \lno@chapquo@auth {}}

Initially, no quote has been defined.

150 \nochapterquote

6.4 Other section heads

The section heads are slightly modified:

• The text is in the alternate font.

• The section number sticks into the left margin.

11

Page 12: The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

The vertical spacing is also modified as \parskip is no longer zero.The commands \section, \subsection, \subsubsection, \paragraph and

\subparagraph are defined using \@startsection.

151 \renewcommand{\section}{\@lno@display@true

152 \@startsection{section}{1}{0pt}%

153 {2.5ex plus 1ex minus 0.2ex}{-0.5\baselineskip}%

154 {\lno@font[\bfseries]{sec@txt}}}

155 \renewcommand{\subsection}{\@lno@display@true

156 \@startsection{subsection}{2}{0pt}%

157 {2ex plus 0.8ex minus 0.2ex}{-0.70\baselineskip}%

158 {\lno@font[\bfseries]{ssec@txt}}}

159 \renewcommand{\subsubsection}{\@lno@display@true

160 \@startsection{subsubsection}{3}{0pt}%

161 {1.50ex plus 0.6ex minus 0.2ex}{-0.85\baselineskip}%

162 {\lno@font[\bfseries]{sssec@txt}}}

163 \renewcommand{\paragraph}{\@lno@display@false

164 \@startsection{paragraph}{4}{0pt}%

165 {1.0ex plus 0.4ex minus 0.2ex}{-1em}%

166 {\lno@font[\bfseries]{para@txt}}}

167 \renewcommand{\subparagraph}{\@lno@display@false

168 \@startsection{subparagraph}{5}{0pt}%

169 {0ex plus 0.2ex}{-1em}%

170 {\lno@font[\bfseries]{spara@txt}}}

The standard command \@startsection has one serious drawback: it is im-possible to define a negative afterskip space, since a negative value is used toselect a run-in heading rather than a display heading. To remedy this, I haveredefined \@sect (and \@xsect which is called by \@sect) to use a global flag\if@lno@display@ instead.

171 \newif \if@lno@display@

Here come the redefined versions of \@sect. It is just like the original, except forthe test.

172 \def\@sect#1#2#3#4#5#6[#7]#8{%

173 \ifnum #2>\c@secnumdepth

174 \let\@svsec\@empty

175 \else

176 \refstepcounter{#1}%

177 \protected@edef\@svsec{\@seccntformat{#1}\relax}%

178 \fi

179 \@tempskipa #5\relax

180 \if@lno@display@

181 \begingroup

182 #6{%

183 \@hangfrom{\hskip #3\relax\@svsec}%

184 \interlinepenalty \@M #8\@@par}%

185 \endgroup

186 \csname #1mark\endcsname{#7}%

187 \addcontentsline{toc}{#1}{%

188 \ifnum #2>\c@secnumdepth \else

12

Page 13: The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

189 \protect\numberline{\csname the#1\endcsname}%

190 \fi

191 #7}%

192 \else

193 \def\@svsechd{%

194 #6{\hskip #3\relax

195 \@svsec #8}%

196 \csname #1mark\endcsname{#7}%

197 \addcontentsline{toc}{#1}{%

198 \ifnum #2>\c@secnumdepth \else

199 \protect\numberline{\csname the#1\endcsname}%

200 \fi

201 #7}}%

202 \fi

203 \@xsect{#5}}

And here is the modified \@xsect:

204 \def\@xsect#1{%

205 \@tempskipa #1\relax

206 \if@lno@display@

207 \par \nobreak

208 \vskip \@tempskipa

209 \@afterheading

210 \else

211 \@nobreakfalse

212 \global\@noskipsectrue

213 \everypar{%

214 \if@noskipsec

215 \global\@noskipsecfalse

216 {\setbox\z@\lastbox}%

217 \clubpenalty\@M

218 \begingroup \@svsechd \endgroup

219 \unskip

220 \@tempskipa #1\relax

221 \hskip -\@tempskipa

222 \else

223 \clubpenalty \@clubpenalty

224 \everypar{}%

225 \fi}%

226 \fi

227 \ignorespaces}

Note that there are no *-ed versions of \section, etc; this is a deliberate choice.

6.4.1 Section numbering

The section numbers are placed in the left margin:

228 \renewcommand{\@seccntformat}[1]{%

229 \llap{\csname lno@s@#1\endcsname \hspace{6pt}}}

The number should also be in the alternate font:

13

Page 14: The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

230 \newcommand{\lno@s@section}{%

231 \lno@font[\fontseries{\lno@eb@font}]{sec@num}\thesection}

232 \newcommand{\lno@s@subsection}{%

233 \lno@font[\fontseries{\lno@eb@font}]{ssec@num}\thesubsection}

234 \newcommand{\lno@s@subsubsection}{%

235 \lno@font[\fontseries{\lno@eb@font}]{sssec@num}\thesubsubsection}

236 \newcommand{\lno@s@paragraph}{%

237 \lno@font[\fontseries{\lno@eb@font}]{para@num}\theparagraph}

238 \newcommand{\lno@s@subparagraph}{%

239 \lno@font[\fontseries{\lno@eb@font}]{spara@num}\thesubparagraph}

We want everything down to the level of \subsubsections numbered:

240 \setcounter{secnumdepth}{3}

6.5 The title page

The title page must be redesigned to use the alternate fonts. This is done by thequick hack of redefining \LARGE and \large. Also, the page following the title isalways blank.

241 \let \lno@maketitle = \maketitle

242 \renewcommand{\maketitle}{\begingroup

243 \def \LARGE {\lno@font[\bfseries]{title@title}}%

244 \def \large {\lno@font[\bfseries]{title@author}}%

245 \lno@maketitle

246 \null \thispagestyle{empty}\newpage

247 \endgroup }

6.6 The abstract

The abstract must be slightly redefined to have the word ‘Abstract’ (or equivalent)in the alternate font. This is done by redefining \abstractname. The \parskip

and \parindent are set to the same values as the main text.

248 \let \lno@abstract = \abstract

249 \let \lno@endabstract = \endabstract

250 \def \abstract {\begingroup

251 \let \lno@abstractname = \abstractname

252 \def \abstractname {{\lno@font[\bfseries]{abstr@id}%

253 \lno@abstractname}}%

254 \setlength{\parskip}{\lno@parskip}\setlength{\parindent}{0pt}%

255 \lno@abstract }

256 \def \endabstract {\lno@endabstract \endgroup}

6.7 Page layout

This document class will extend the text area vertically:

257 \addtolength{\topmargin}{-0.5cm}

258 \addtolength{\textheight}{2cm}

14

Page 15: The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

Horizontally, however, the text area will remain unchanged; longer lines wouldresult in markedly poorer readability.

6.8 Paragraph layout

In a lecture note, one will not need the same high parameter settings for linebreaking that other document styles require.

259 \pretolerance = 2000 \tolerance = 6000 \hbadness = \tolerance

Since lecnotes pages have more strech than usual, we can increase the penaltyfor club and widow lines.

260 \widowpenalty = 1500 \displaywidowpenalty = 750

261 \clubpenalty = 1500

6.9 Display formulæ

Since \parskip is no longer zero, we must also redefine the spacing above andbelow display formulæ. We want the standard inter-paragraph space above andbelow every fomula, except the very short ones.

262 \setlength{\abovedisplayskip}{\lno@parskip}

263 \setlength{\abovedisplayshortskip}{\lno@noskip}

264 \setlength{\belowdisplayskip}{0pt}

265 \setlength{\belowdisplayshortskip}{0pt}

Note that \belowdisplay*skip is set to zero, as there will always be inter-paragraph space there.

The standard definitions of \normalsize, \small, and \footnotesize modify\*display*skip, so they must be redefined to avoid that. (At the same time, weremove the modification of the list parameters which are no longer required.)

266 \renewcommand\normalsize{\@setfontsize\normalsize\@xpt\@xiipt}

267 \renewcommand\small{\@setfontsize\small\@ixpt{11}}

268 \renewcommand\footnotesize{\@setfontsize\footnotesize\@viiipt{9.5}}

Only one problem now remains: we want the same amount of vertical spacebelow a display formula irrespective of whether it is followed by a blank line ornot. The best way that I found to achieve that, is to insert a \par below everydisplay formula.1

269 \everydisplay = {\aftergroup\par}

6.10 Footnotes

As the lecnotes class uses no indentation in the main text, the footnotes shoulddo the same. Also, there should be some vertical space between paragraphs in thesame footnote.

270 \renewcommand{\@makefntext}[1]{\leavevmode

271 \setlength{\parskip}{0.6\baselineskip}%

272 \llap{\@makefnmark \hspace*{3pt}}#1}

1This trick modifies \everydisplay, but hopefully no imported package will do the same.

15

Page 16: The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

Instead we want some vertical space between footnotes on the same page:

273 \setlength{\footnotesep}{1.4\baselineskip}

Also, since the lecnotes class has a “darker” look than the standard classes, thefootnote rule should be thicker and longer2:

274 \renewcommand{\footnoterule}{%

275 \hrule width 0.618\columnwidth height 0.8pt \relax

276 \vspace*{-0.8pt}}

If the user has specified so, boxed footnote markers will be used.

277 \newcommand{\lno@boxfnmark}{\mbox{\hspace*{0.1em}%

278 \setlength{\fboxsep}{1.0pt}\setlength{\fboxrule}{0.6pt}%

279 \raisebox{0.7pt}{%

280 \fbox{\lno@font[\bfseries]{footnote@num}\@thefnmark}}%

281 \hspace*{0.1em}}}

6.11 Page styles

The lecnotes class uses a page style of its own. It is called lecnotes and has thefollowing features:

• The top text on lefthand pages contains the chapter number and its namein capitals.

• The righthand top text gives the section number and name, also in capitals.

• The bottom text gives the page name in the outside margin.

282 \newcommand{\ps@lecnotes}{%

283 \def \@oddfoot {\hfil

284 \rlap{\hspace*{15pt}%

285 \lno@font[\fontseries{\lno@l@font}]{page@bot}\pagename\space

286 \thepage}}%

287 \def \@evenfoot {%

288 \llap{\lno@font[\fontseries{\lno@l@font}]{page@bot}\pagename\space

289 \thepage \hspace*{15pt}}\hfil}%

290 \def \@oddhead {\hfil

291 \underline{\makebox[\textwidth][r]{%

292 \lno@font[\fontseries{\lno@l@font}]{page@top}\rightmark\strut}}}%

293 \def \@evenhead {%

294 \underline{\makebox[\textwidth][l]{%

295 \lno@font[\fontseries{\lno@l@font}]{page@top}\leftmark\strut}}}%

296 \def \chaptermark ##1{%

297 \markboth{\MakeUppercase{\@chapapp} \thechapter\hspace{2em}%

298 \MakeUppercase{##1}}%

299 {}}%

300 \def \sectionmark ##1{%

301 \markright{\thesection\hspace{1em}\MakeUppercase{##1}}}%

302 }

2The length of the rule is√5−12

of the text width; this is the famous “golden ratio” which issupposed to give a particularly pleasing effect.

16

Page 17: The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

This is the default page style:

303 \pagestyle{lecnotes}

The \chapter command contains an implicit call on \pagestyle{plain}, sothis page style must be redefined. It will be just like lecnotes, but with no toptext.

304 \renewcommand{\ps@plain}{\ps@lecnotes

305 \def \@oddhead {}\def \@evenhead {}}

6.12 Figures and tables

Floating material may not appear at the bottom of the page; on the other handwe allow more floats on a page than usual.

306 \setcounter{topnumber}{3} \setcounter{bottomnumber}{0}

307 \setcounter{totalnumber}{3}

308 \renewcommand{\topfraction}{0.80}

309 \renewcommand{\textfraction}{0.20}

310 \renewcommand{\floatpagefraction}{0.75}

6.12.1 Figure and table captions

The caption package is used to typeset the captions. The alternate typeface willbe used.

311 \renewcommand{\captionfont}{\lno@font{caption@text}}

312 \renewcommand{\captionlabelfont}{\lno@font[\bfseries]{caption@lab}}

313 \setcaptionmargin{0.1\textwidth}

6.13 Examples

Examples (typically of computer code) are likely to occur frequently in lecturenotes, at least in my field (computer science). These are treated as a special kindof floats:

314 \floatstyle{plain}

315 \newfloat{example}{tp}{loe}[chapter]

316 \floatname{example}{\lno@xample@name}

We must also modify the standard figure and table environments to look likethe example environment:

317 \restylefloat{figure} \restylefloat{table}

\examplefile We can now declare the command \examplefile which reads a code file and placesit in an example environment. It has two parameters: #1 is the file name, and #2

is the caption to use.

318 \newcommand{\examplefile}[2]{\begin{example}

319 \setlength{\lno@tempa}{(\textwidth -

320 \widthof{\texttt{~\fbox{ \textbf{#1} }~}})/2}

321 \hbox{\lno@ex@dbl@line\hss

322 \texttt{~\fbox{ \textbf{#1} }~}%

17

Page 18: The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

323 \hss\lno@ex@dbl@line}

324 \vspace{6pt}

325 {\renewcommand{\baselinestretch}{0.9}\footnotesize

326 \listinginput{1}{#1}}

327 \vspace{5pt}

328 \hrule height 0.4pt

329 \vspace{2pt}

330 \hrule height 1pt \relax

331 \renewcommand{\rmdefault}{\lno@alt@font}\rmfamily

332 \caption{#2}

333 \end{example}}

This code includes the double horizontal lines before and after the example. Theseare drawn using the TEX command \hrule since the \rule of LATEX is imple-mented using \vrule. The length \lno@tempa is used to compute the line lengths.

334 \newlength{\lno@tempa}

335 \newcommand{\lno@ex@dbl@line}{%

336 \vbox{\hrule width \lno@tempa height 1pt

337 \vspace{2pt}%

338 \hrule width \lno@tempa height 0.4pt}}

The line numbers used in the example listing must be the right size and font.

339 \renewcommand{\listinglabel}[1]{\llap{\lno@font{xample@line}%

340 \the#1\hspace*{1em}}}

\listofexamples Finally, we can define \listofexamples which works just like \listoffigures

and \listoftables.

341 \newcommand{\listofexamples}{\begingroup

342 \setlength{\parskip}{1pt plus 1pt}%

343 \renewcommand{\rmdefault}{\lno@alt@font}\rmfamily

344 \listof{example}{\lno@xamplelist@name}%

345 \endgroup }

6.14 Margins

The report style has ample margins, and this has been kept in the lecnotes classsince the students are likely to make notes in the margin and need space for that.3

The printed area is, however, moved 1 cm towards the outer edge; the reason forthis is that lecture notes are typically stapled.

346 \addtolength{\evensidemargin}{-1cm}

347 \addtolength{\oddsidemargin}{1cm}

6.15 Lists

The spacing in lists is slightly changed. There will be no extra space before thefirst item and after the last one because we now have a non-zero \parskip.

348 \setlength{\itemsep}{0pt plus 1pt}

3Remember Fermat and his theorem?

18

Page 19: The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

349 \setlength{\parsep}{0.618\parskip plus 1pt}

350 \setlength{\partopsep}{0pt}

351 \setlength{\topsep}{0pt}

We must also modify the various \listn so that they don’t redefine these values.

352 \renewcommand{\@listi}{\leftmargin = \leftmargini}

353 \renewcommand{\@listii}{\leftmargin = \leftmarginii

354 \labelwidth = \leftmarginii \advance \labelwidth by -\labelsep}

355 \renewcommand{\@listiii}{\leftmargin = \leftmarginiii

356 \labelwidth = \leftmarginiii \advance \labelwidth by -\labelsep}

357 \renewcommand{\@listiv}{\leftmargin= \leftmarginiv

358 \labelwidth = \leftmarginiv \advance \labelwidth by -\labelsep}

359 \renewcommand{\@listv}{\leftmargin = \leftmarginv

360 \labelwidth = \leftmarginv \advance \labelwidth by -\labelsep}

361 \renewcommand{\@listvi}{\leftmargin = \leftmarginvi

362 \labelwidth = \leftmarginvi \advance \labelwidth by -\labelsep}

We assume list level 1 to be the default:

363 \let \@listI = \@listi

364 \@listi

6.15.1 Enumeration lists

The outer level markers are modified here:

365 \def \labelenumi {\theenumi)}

6.15.2 Itemized lists

All four levels are changed here; the purpose of the change is to make the marksheavier.

366 \renewcommand{\labelitemi}{\lno@square}

367 \renewcommand{\labelitemii}{\lno@opensq}

368 \renewcommand{\labelitemiii}{\ensuremath{\ast}}

369 \renewcommand{\labelitemiv}{\ensuremath{\bullet}}

The two outer levels use a closed and an open square that must be defined.

370 \newcommand{\lno@square}{%

371 \vrule height 1.1ex width 1ex depth -.1ex \relax }

372 \newcommand{\lno@opensq}{\begingroup

373 \setlength{\fboxsep}{0pt}\setlength{\fboxrule}{1pt}%

374 \raisebox{0.1ex}{\fbox{\rule{0pt}{0.8ex}\rule{0.8ex}{0pt}}}

375 \endgroup }

6.16 Automatically generated tables

6.16.1 Table of contents

The table of contents is to be printed in the alternate font; this is easiest handledby temporarily redefining \rmdefault.

376 \let \lno@toc = \tableofcontents

19

Page 20: The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

377 \def \tableofcontents {\begingroup

378 \renewcommand{\rmdefault}{\lno@alt@font}\rmfamily

379 \lno@cleardoublepage \lno@toc \cleardoublepage

380 \endgroup }

Allow for wider page numbers:

381 \iflno@verylong

382 \cftsetpnumwidth{2.8em}\cftsetrmarg{3.5em}

383 \else \iflno@long

384 \cftsetpnumwidth{2.4em}\cftsetrmarg{3.25em}

385 \else

386 \cftsetpnumwidth{2.0em}\cftsetrmarg{3.0em}

387 \fi\fi

If we have a long document, we also want more space for the section numbers atall levels as well as the lists og tables and functions:

388 \iflno@verylong

389 \setlength{\cftchapnumwidth}{1.9em}

390 \setlength{\cftsecindent}{1.9em}

391 \setlength{\cftsecnumwidth}{3.1em}

392 \setlength{\cftsubsecindent}{5.0em}

393 \setlength{\cftsubsecnumwidth}{4.4em}

394 \setlength{\cftfignumwidth}{3.1em}

395 \setlength{\cfttabnumwidth}{3.1em}

396 \else \iflno@long

397 \setlength{\cftchapnumwidth}{1.7em}

398 \setlength{\cftsecindent}{1.7em}

399 \setlength{\cftsecnumwidth}{2.7em}

400 \setlength{\cftsubsecindent}{4.4em}

401 \setlength{\cftsubsecnumwidth}{3.8em}

402 \setlength{\cftfignumwidth}{2.7em}

403 \setlength{\cfttabnumwidth}{2.7em}

404 \fi\fi

Finally, I want to stretch the table vertically ever so slightly.

405 \setlength{\cftparskip}{1pt plus 1pt}

Unnumbered chapters The unnumbered chapters should also be in the tableof contents; they should appear just like the chapters, but with less vertical space.This is handled by defining a special chapter list style called lno@xchapter; seealso Section 6.3.1 on page 11.

406 \newcommand*\l@lno@xchapter[2]{%

407 \addpenalty{-\@highpenalty}%

408 \vskip 0.2em \@plus\p@

409 \setlength\@tempdima{1.5em}%

410 \begingroup

411 \parindent \z@ \rightskip \@pnumwidth

412 \parfillskip -\@pnumwidth

413 \leavevmode \bfseries

414 \advance\leftskip\@tempdima

20

Page 21: The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

415 \hskip -\leftskip

416 #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par

417 \penalty\@highpenalty

418 \endgroup}

6.16.2 List of figures

The \listoffigures command is modified in exactly the same manner as\tableofcontents.

419 \let \lno@lof = \listoffigures

420 \def \listoffigures {\begingroup

421 \renewcommand{\rmdefault}{\lno@alt@font}\rmfamily

422 \clearpage \lno@lof \clearpage

423 \endgroup }

6.16.3 List of tables

The \listoftables command is modified in the same way as \tableofcontents.

424 \let \lno@lot = \listoftables

425 \def \listoftables {\begingroup

426 \renewcommand{\rmdefault}{\lno@alt@font}\rmfamily

427 \clearpage \lno@lot \clearpage

428 \endgroup }

6.17 Index

\indexfile The command \indexfile is used to read the index file (if one has been created).The only change is to modify the typeface.

429 \newcommand{\indexfile}[1]{\cleardoublepage

430 \begingroup

431 \markboth{\MakeUppercase{\indexname}}%

432 {\MakeUppercase{\indexname}}%

433 \renewcommand{\rmdefault}{\lno@alt@font}\rmfamily

434 \InputIfFileExists{#1}{\clearpage}{}

435 \endgroup }

6.18 Other modifications

A few other minor modifications were thought appropriate.

6.18.1 Rules

In keeping with the “darker” look of the lecnotes class, the rules in framed boxesand tables are somewhat thicker than usual:

436 \setlength{\fboxsep}{3pt} \setlength{\fboxrule}{0.6pt}

437 \setlength{\arrayrulewidth}{0.8pt}

To match this, extra spacing is added to each table row:

438 \renewcommand{\arraystretch}{1.2}

21

Page 22: The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

6.19 The end

And that was all.

439 〈/code〉

22

Page 23: The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

Index

Numbers written in italic refer to the page where the corresponding entry is de-scribed; numbers underlined refer to the code line of the definition; numbers inroman refer to the code lines where the entry is used.

Symbols\@evenfoot . . . . . . . 287\@evenhead . . . 293, 305\@listI . . . . . . . . . . 363\@listi . . . 352, 363, 364\@listii . . . . . . . . . 353\@listiii . . . . . . . . 355\@listiv . . . . . . . . . 357\@listv . . . . . . . . . . 359\@listvi . . . . . . . . . 361\@lno@display@false

. . . . . . . . 163, 167\@lno@display@true .

. . . . 151, 155, 159\@makechapterhead . 115\@makefnmark 76–78, 272\@makefntext . . . . . . 270\@makeschapterhead . 134\@oddfoot . . . . . . . . 283\@oddhead . . . . 290, 305\@pnumwidth 411, 412, 416\@seccntformat 177, 228\@sect . . . . . . . . . . . 172\@setfontsize . 266–268\@startsection 152,

156, 160, 164, 168\@svsec 174, 177, 183, 195\@svsechd . . . . 193, 218\@topnum . . . . . 116, 138\@xsect . . . . . . 203, 204

A\abovedisplayshortskip

. . . . . . . . . . . 263\abovedisplayskip . 262\abstract . . . . 248, 250\abstractname . 251, 252\addcontentsline . .

. . . . 137, 187, 197\addpenalty . . . . . . . 407\arrayrulewidth . . . 437\arraystretch . . . . . 438\ast . . . . . . . . . . . . . 368

B\backmatter . . . 105, 112\baselinestretch . . 325\belowdisplayshortskip

. . . . . . . . . . . 265\belowdisplayskip . 264\bullet . . . . . . . . . . 369

C\caption . . . . . . . . . 332\captionfont . . . . . . 311\captionlabelfont . 312\cftchapnumwidth . .

. . . . . . . . 389, 397\cftfignumwidth 394, 402\cftparskip . . . . . . . 405\cftsecindent . 390, 398\cftsecnumwidth 391, 399\cftsetpnumwidth . .

. . . . 382, 384, 386\cftsetrmarg . . . . . .

. . . . 382, 384, 386\cftsubsecindent . .

. . . . . . . . 392, 400\cftsubsecnumwidth .

. . . . . . . . 393, 401\cfttabnumwidth 395, 403\chapterquote . . . . . 146\cleardoublepage . .

. . . . . . . . 379, 429\clearpage . . . . . . .

. 104, 108, 112,113, 422, 427, 434

\clubpenalty . . . . . .. . . . 217, 223, 261

D\displaywidowpenalty

. . . . . . . . . . . 260

E\else . 103, 175, 188,

192, 198, 210,222, 383, 385, 396

\end . . . . . . . . . . . . . 333\endabstract . . 249, 256\evensidemargin . . . 346\everydisplay . . . . . 269\everypar . . . . 213, 224\examplefile . . . . . . 318

F\fboxrule . 278, 373, 436\fboxsep . . 278, 373, 436\fi . . . . . . 103, 178,

190, 200, 202,225, 226, 387, 404

\floatname . . . . . . . 316\floatpagefraction . 310\floatstyle . . . . . . . 314\footnoterule . . . . . 274\footnotesep . . . . . . 273\footnotesize . 268, 325\frontmatter . . . . . . 105

H\hbadness . . . . . . . . 259

I\if@lno@display@ . .

. . . . 171, 180, 206\if@noskipsec . . . . . 214\iflno@long 72, 383, 396\iflno@verylong . . .

. . . . . 73, 381, 388\ifnum . . . . 173, 188, 198\ifodd . . . . . . . . . . . 103\ignorespaces . . . . . 227\indexfile . . . . . . . 429\indexname . . . 431, 432\InputIfFileExists . 434\interlinepenalty . 184\itemsep . . . . . . . . . 348

L\l@lno@xchapter . . . 406\labelenumi . . . . . . . 365\labelitemi . . . . . . . 366

23

Page 24: The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

\labelitemii . . . . . . 367

\labelitemiii . . . . . 368

\labelitemiv . . . . . . 369

\labelsep . . . . 354,356, 358, 360, 362

\labelwidth . . . 354,356, 358, 360, 362

\LARGE . . . . . . . . . . . 243

\large . . . . . . . . . . . 244

\lastbox . . . . . . . . . 216

\leftmargin 352, 353,355, 357, 359, 361

\leftmargini . . . . . . 352

\leftmarginii . 353, 354

\leftmarginiii 355, 356

\leftmarginiv . 357, 358

\leftmarginv . . 359, 360

\leftmarginvi . 361, 362

\leftskip . . . . 414, 415

\listinginput . . . . . 326

\listinglabel . . . . . 339

\listof . . . . . . . . . . 344

\listofexamples . . . 341

\listoffigures 419, 420

\listoftables . 424, 425

\lno@abstr@id@ln . . . 5

\lno@abstr@id@sz . . . 5

\lno@abstract . 248, 255

\lno@abstractname .. . . . . . . . 251, 253

\lno@alt@font . . . . .. 38, 42, 47, 52,57, 99, 331, 343,378, 421, 426, 433

\lno@boxfnmark . 76, 277

\lno@caption@lab@ln . 6

\lno@caption@lab@sz . 6

\lno@caption@text@ln 7

\lno@caption@text@sz 7

\lno@chap@id@ln . . . . 8

\lno@chap@id@sz . . . . 8

\lno@chap@num@ln . . . 9

\lno@chap@num@sz . . . 9

\lno@chap@txt@ln . . 10

\lno@chap@txt@sz . . 10

\lno@chapquo@auth .. . . . 124, 147, 149

\lno@chapquo@auth@ln 11

\lno@chapquo@auth@sz 11

\lno@chapquo@text .. . . . 121, 147, 149

\lno@chapquo@text@ln 12\lno@chapquo@text@sz 12\lno@cleardoublepage

. 102, 107, 108, 379\lno@clearpage . . . .

. . . . 102, 104, 113\lno@eb@font . . . . . .

. . . 39, 43, 48,53, 58, 129, 231,233, 235, 237, 239

\lno@endabstract . .. . . . . . . . 249, 256

\lno@ex@dbl@line . .. . . . 321, 323, 335

\lno@font 98, 120, 123,128, 129, 131,141, 154, 158,162, 166, 170,231, 233, 235,237, 239, 243,244, 252, 280,285, 288, 292,295, 311, 312, 339

\lno@footnote@num@ln 14\lno@footnote@num@sz 14\lno@l@font 39, 43, 48,

53, 58, 120, 123,285, 288, 292, 295

\lno@lof . . . . . 419, 422\lno@longfalse . . . . 72\lno@longtrue . . . . . 74\lno@lot . . . . . 424, 427\lno@maketitle 241, 245\lno@noskip . . . . 30, 263\lno@opensq . . . 367, 372\lno@page@bot@ln . . 15\lno@page@bot@sz . . 15\lno@page@top@ln . . 16\lno@page@top@sz . . 16\lno@para@num@ln . . 20\lno@para@num@sz . . 20\lno@para@txt@ln . . 25\lno@para@txt@sz . . 25\lno@parskip . . . . . .

. 29, 110, 254, 262\lno@s@paragraph . . 236\lno@s@section . . . . 230\lno@s@subparagraph 238

\lno@s@subsection . 232\lno@s@subsubsection

. . . . . . . . . . . 234\lno@sec@num@ln . . . 17\lno@sec@num@sz . . . 17\lno@sec@txt@ln . . . 22\lno@sec@txt@sz . . . 22\lno@spara@num@ln . 21\lno@spara@num@sz . 21\lno@spara@txt@ln . 26\lno@spara@txt@sz . 26\lno@square . . . 366, 370\lno@ssec@num@ln . . 18\lno@ssec@num@sz . . 18\lno@ssec@txt@ln . . 23\lno@ssec@txt@sz . . 23\lno@sssec@num@ln . 19\lno@sssec@num@sz . 19\lno@sssec@txt@ln . 24\lno@sssec@txt@sz . 24\lno@stdfnmark . . 77, 78\lno@tempa . . . . . . .

. 319, 334, 336, 338\lno@title@author@ln 27\lno@title@author@sz 27\lno@title@title@ln 28\lno@title@title@sz 28\lno@toc . . . . . 376, 379\lno@verylongfalse . 73\lno@verylongtrue . 75\lno@xample@line@ln 13\lno@xample@line@sz 13\lno@xample@name . .

. . . 61, 65, 68, 316\lno@xamplelist@name

. . . 62, 66, 69, 344

M\mainmatter . . . 107, 111\maketitle . . . 241, 242

N\newcounter . . . . . . . 144\newfloat . . . . . . . . 315\newpage . . . . . 103, 246\nobreak . . . . . 207, 416\nochapterquote . . .

. . . . 126, 148, 150\normalsize . . . . . . . 266\numberline . . . 189, 199

24

Page 25: The lecnotes document class - dag.at.ifi.uio.nodag.at.ifi.uio.no/public/doc/lecnotes.pdf · The lecnotes document class Dag Langmyhr Department of Informatics University of Oslo dag@i

O

\oddsidemargin . . . . 347

P

\pagenumbering 106, 109

\paragraph . . . . . . . 163

\parfillskip . . . . . . 412

\parindent 110, 114,127, 140, 254, 411

\parsep . . . . . . . . . . 349

\parskip . . 110, 114,254, 271, 342, 349

\partopsep . . . . . . . 350

\penalty . . . . . . . . . 417

\pretolerance . . . . . 259

\protected@edef . . . 177

\ps@lecnotes . . 282, 304

\ps@plain . . . . . . . . 304

R

\raggedleft . . . 118, 122

\raggedright . . . . . .. . . . 119, 127, 140

\refstepcounter 136, 176

\restylefloat . . . . . 317

\rightskip . . . . . . . 411

\rmdefault 331, 343,378, 421, 426, 433

\rmfamily . 331, 343,378, 421, 426, 433

\rule . . . . . . . . . . . . 374

S

\section . . . . . . . . . 151

\setbox . . . . . . . . . . 216

\setcaptionmargin . 313

\slshape . . . . . . . . . 120

\small . . . . . . . . . . . 267

\subparagraph . . . . . 167

\subsection . . . . . . . 155

\subsubsection . . . . 159

T\tableofcontents . .

. . . . . . . . 376, 377\textbf . . . . . . 320, 322\textfraction . . . . . 309\textheight . . . . . . . 258\texttt . . . . . . 320, 322\theenumi . . . . . . . . 365\theparagraph . . . . . 237\thesubparagraph . . 239\thesubsection . . . . 233\thesubsubsection . 235\thispagestyle 103, 246\toclevel@lno@xchapter

. . . . . . . . . . . 145\tolerance . . . . . . . 259\topfraction . . . . . . 308\topmargin . . . . . . . 257\topsep . . . . . . . . . . 351

W\widowpenalty . . . . . 260

25