CS 189 L A TEX and Linux: Displaying Text

Similar documents
Indian T E X Users Group

CS 189 L A TEX and Linux: Text in Boxes

Indian T E X Users Group

Basic commands. Katja Barnickel

CS 189 L A TEX and Linux: Document Layout and Organization

L A TEX From The Ground Up

Useful L A TEX Commands

L A TEX for Psychological Researchers

Math 291: Lecture 4. Dr. Fagerstrom. Minnesota State University Moorhead web.mnstate.edu/fagerstrom

GROUP ASSIGNMENT. L A TEX Assignment 1/3

Basic L A TEX. what is LaTeX?

An Introduction to L A TEX

L A TEX Workshop. Don Brower

Introduction to LaTex 2ε. Based on The Not So Short Introduction to LaTeX 2ε by Tobias Oetiker et al., April 2001

A Brief Introduction to L A TEX

T E X and L A T E X Document preparation tools

Meeting One. Aaron Ecay. February 2, 2011

Introduzione a LaTex. Fabrizio Messina

L A TEX Workshop. An Introduction to L A TEX. Rakesh Jana Research Scholar Department of Mathematics IIT Guwhati

عمادة البحث العلمي جامعة الملك سعود

Introduction to L A TEX

A L A T E X quick start

A Short Introduction to L A TEX

Part - I : Short Course Typing Text

L A TEX minicourse. dstowell, mag, sar, scannell,... September Typeset by FoilTEX

simpletex Documentation

beginlatex /12/ : page #199

L A TEX: Online module 2

LAT E X week 2: Basics for Writing a Document

Essential L A TEX. Jon Warbrick Luis Rivera 1989/2014

LaTeX A Tutorial. Mohsen Alimomeni, 2010

Intro to LATEX I. Aaron Erlich POLS/CSSS 510, Why LATEX? Programming Document Structure Floats Tables Lists Math

About Downloads Basics Pictures Reference Help TeXer

Mikkel Madsen

Basic Text. M. R. C. van Dongen. ucc. LaTEX and Friends Basic Text Marc van Dongen.

L A TEX for Psychological Researchers

Using L A TEX. A numbered list is just that a collection of items sorted and labeled by number.

Introduction to L A T E X

Text typesetting guide

Outline. Installing LaTeX. Opening TeXShop. Intro to LaTeX. Intro to LaTeX interface Working with text Tabbing and tables Figures Math and equations

Formatting with LaTeX

A Beginner s guide to L A TEX for CSCA67/MATA67. Kohilan Mohanarajan

An Introduction to L A TEX

Basic Text Formatting with L A T E X

My LaTeX Document. July 7, Introduction 2

Introduction to LATEX

Typesetting Text. Spring 2013 TEX-Bit #1 Math 406

Appendix D CSS Properties and Values

Why is there money? Received Date; Received in Revised Form Date; Accepted Date

Title of Your Thesis: Subtitle of Your Thesis

Introduction to L A TEX

A Very Brief Introduction to L A T E X MAT 3535

LaTeX Seminar III: Environments and More Advanced Mathematical Typesetting

PHYS-4007/5007: Computational Physics

L A TEX Overview. Jiayi Liu. January 31, Colorado School of Mines

What is T E X? T E X and L A T E X Document preparation tools. Setting and casting type. What Knuth was setting. Setting and casting type

An Introduction to LATEX

The Name of the Game. An Introduction to LATEX. Why L A TEX? The Name of the Game

Introduction to LaTeX. M&S Talk Series August 16 th, 2016 AH Sheikh

Lecture 1. MA2730: Analysis I. Lecture slides for MA2730 Analysis I. Study and Assessment Components. MA L A TEX: topics for Lecture 1

Interdisciplinary Journal of Best Practices in Global Development Final Manuscript Preparation Guidelines

David Helmbold, October 2005, Revised October 2007

Setting Up Your Dissertation Format Using MS Word2000. Overview of the Process

Report - Extended Font Sizes

L A TEX. The Logo. Introduction to L A TEX. Overview. Primary Benefits. Kinds of Documents. Bill Slough and Andrew Mertz

Course A, Part 1 Basic Formatting in L A TEX

Kozák Imre, Szeidl György FEJEZETEK A SZILÁRDSÁGTANBÓL

A Quick Guide to L A TEX

CSS. Lecture 16 COMPSCI 111/111G SS 2018

How to get started in L A TEX

The aaltoseries class

Introduction to Latex. A workshop by Dr. Ala Eshmawi

An Introduction to L A T E X

This is page i Printer: Opaque this. The Title of a Book. Dr. Author Jones. The Date

Guide to using L A TEX

Introduction to Web Tech and Programming

Essential La TE X. Jon Warbrick. January 21, omitted. In a document of this size it is not possible to include everything

CSS Lecture 16 COMPSCI 111/111G SS 2018

Without savetrees. An Example Document

Introduction to L A TEX

This is page i Printer: Opaque this. The Title of a Book. Dr. Author Jones. The Date

Introduction to L A TEX

Review Question 1. Which tag is used to create a link to another page? 1. <p> 2. <li> 3. <a> 4. <em>

19. Bulleted and Numbered Lists

Basics. Options. Commands

L A TEX Tutorial. 1 Introduction. 2 Running L A TEX. J. E. Rice. May 2010

What is LaTeX. Is a document markup language and document preparation system for the TeX typesetting program

A quick guide to L A TEX

DEMYSTIFYING THE FORMAT MAIN BODY *UPDATED AUG 12, 2010* USF

CLV Manual. How to Use CLV L A TEX Style. Odié N. Gementera SPI Publisher Services

Travels in TEX Land: Using the Lucida fonts

Microsoft Word 2007 Lesson 1

The Title of an Article with Extended Font Sizes

Introduction to LATEX2 "

units.sty nicefrac.sty

HTML/XML. HTML Continued Introduction to CSS

Workshop on LATEX 2ε. Asst. Prof. Dr. Kemal Bagzibagli Department of Economics. 20 May 2015

Web Site Design and Development Lecture 6

How to Prepare Your Paper in L A T E X for IOE Graduate Conference 2017

Introduction to Scientific Typesetting Lesson 11: Foreign Languages, Columns, and Section Titles

Transcription:

CS 189 L A TEX and Linux: Displaying Text (1) Robert S. Laramee Computer Science Department School of Physical Sciences Swansea University February 21, 2008 (1) Robert S. Laramee CS 189 LATEX and Linux: Displaying Text

Overview of Lecture Fonts and Sizes Font Changing Commands (2) Robert S. Laramee CS 189 LATEX and Linux: Displaying Text

Font Changing Commands Fonts and Sizes L A TEX chooses the appropriate font and font size based on the logical structure of the document (sections, footnotes,... ). To change fonts this, you can use the commands listed in the tables. The actual size of each font is a design issue and depends on the document class and its options. The tables provided show the absolute point size for these commands as implemented in the standard document classes. {\small The small and \textbf{bold} Romans ruled} {\Large all of great big \textit{italy}.} The small and bold Romans ruled all of great big Italy. One important feature of L A TEX 2ε is that the font attributes are independent. This means that you can issue size or even font changing commands, and still keep the bold or slant attribute set earlier. (3) Robert S. Laramee CS 189 LATEX and Linux: Displaying Text

Font Changing Commands Fonts Sizes Table: Font Sizes.: These are commands to change font size. \tiny \scriptsize \footnotesize \small \normalsize \large tiny font very small font quite small font small font normal font large font \Large \LARGE \huge \Huge larger font very large font huge largest (4) Robert S. Laramee CS 189 LATEX and Linux: Displaying Text

Font Changing Commands Fonts Sizes (Continued) Table: Absolute Point Sizes in Standard Classes: Mapping commads to point sizes size 10pt (default) 11pt option 12pt option \tiny 5pt 6pt 6pt \scriptsize 7pt 8pt 8pt \footnotesize 8pt 9pt 10pt \small 9pt 10pt 11pt \normalsize 10pt 11pt 12pt \large 12pt 12pt 14pt \Large 14pt 14pt 17pt \LARGE 17pt 17pt 20pt \huge 20pt 20pt 25pt \Huge 25pt 25pt 25pt Trivia: There are about 72.27 points per inch or about 28.45 per cm. (5) Robert S. Laramee CS 189 LATEX and Linux: Displaying Text

Font Changing Commands Font Styles Table: Font Styles: Use these commands to change the style of font \textrm{...} roman \textsf{...} sans serif \texttt{...} typewriter \textmd{...} medium \textbf{...} bold face \textup{...} upright \textit{...} italic \textsl{...} slanted \textsc{...} Small Caps \emph{...} emphasized \textnormal{...} document font Here is \emph{emphasized text}. Here is emphasized text. Curly braces play a significant role. They are used to build groups. Groups limit the scope of most L A TEX commands. (6) Robert S. Laramee CS 189 LATEX and Linux: Displaying Text

Font Changing Commands Font Styles (Continued) The font size commands also change the line spacing, but only if the paragraph ends within the scope of the font size command. The closing curly brace } should therefore not come too early. If you want to activate a size changing command for a whole paragraph of text or even more, you might want to use the environment syntax for font changing commands. \begin{large} This is not true. But then again, what is these days \ldots \end{large} This is not true. But then again, what is these days... This will save you from counting lots of curly braces. (7) Robert S. Laramee CS 189 LATEX and Linux: Displaying Text

The environments flushleft and flushright generate paragraphs that are either left- or right-aligned. The center environment generates centred text. If you do not issue \\ to specify line breaks, L A TEX will automatically determine line breaks. \begin{flushleft} This text is \\ left-aligned. \LaTeX{} is not trying to make each line the same length. \end{flushleft} This text is left-aligned. L A TEX is not trying to make each line the same length. (8) Robert S. Laramee CS 189 LATEX and Linux: Displaying Text

(Continued) \begin{flushright} This text is right-\\ aligned. \LaTeX{} is not trying to make each line the same length. \end{flushright} This text is rightaligned. L A TEX is not trying to make each line the same length. \begin{center} At the centre \\ of the earth \end{center} At the centre of the earth (9) Robert S. Laramee CS 189 LATEX and Linux: Displaying Text

The quote environment is useful for quotes, important phrases and examples. A typographical rule of thumb for the line length is: On average, no line should be longer than 66 characters. This is why L A TEX pages have such large borders by default and also why multicolumn print is used in newspapers. There are two similar environments: the quotation and the verse environments. The quotation environment is useful for longer quotes going over several paragraphs, because it indents the first line of each paragraph. The verse environment is useful for poems where the line breaks are important. The lines are separated by issuing a \\ at the end of a line and an empty line after each verse. (10) Robert S. Laramee CS 189 LATEX and Linux: Displaying Text

(Continued) \begin{flushleft} \begin{verse} Humpty Dumpty sat on a wall:\\ Humpty Dumpty had a great fall.\\ All the King s horses and all the King s men \\ Couldn t put Humpty together again. \end{verse} \end{flushleft} Humpty Dumpty sat on a wall: Humpty Dumpty had a great fall. All the King s horses and all the King s men Couldn t put Humpty together again. (11) Robert S. Laramee CS 189 LATEX and Linux: Displaying Text

The itemize environment is suitable for simple lists, the enumerate environment for enumerated lists, and the description environment for descriptions. \begin{enumerate} \item This is the first item on an enumerated list. \begin{itemize} \item This is the first item on a (nested) itemized list. \item This is the 2nd item on a (nested) itemized list. \end{itemize} \item This example illustrates nested lists. \begin{description} \item[1st] Here is the first item in a description. \item[2nd] Here is the second item in a description. \end{description} \end{enumerate} (12) Robert S. Laramee CS 189 LATEX and Linux: Displaying Text

(Continued) 1. This is the first item on an enumerated list. This is the 1st item on a (nested) itemized list. This is the 2nd item on a (nested) itemized list. 2. This example illustrates nested lists. 1st Here is the first item in a description. 2nd Here is the second item in a description. Tip: Use indenting whenever nesting is used.. Tip: Notice how similar this is to HTML. (13) Robert S. Laramee CS 189 LATEX and Linux: Displaying Text

Changing Label Style You can change the label styles for items. The labels for itemize have the names \labelitemi \labelitemii \labelitemiii \labelitemiv The labels for enumerate have the names \labelenumi \labelenumii \labelenumiii \labelenumiv There s one for each level of nesting, with \labelitemi being the first. (14) Robert S. Laramee CS 189 LATEX and Linux: Displaying Text

Changing Label Style (Continued) These commands may be altered with the \renewcommnas, e.g.,: \renewcommand{\labelitemi}{+} \renewcommand{\labelitemii}{++} Can be used to produce: + Item 1. ++ List 2, Item 1 ++ List 2, Item 2 + Item 2. + Item 3. If the new labels are to apply to the whole document, the redefining commands should be included in the preamble. Otherwise they are valid only within the environment in which they appear. (15) Robert S. Laramee CS 189 LATEX and Linux: Displaying Text

Changing Label Style with Counters There is a counter for each enumerate level, named enmi, enmii, enmiii, and enmiv. The value of a counter can be prnited using one of the commands: \arabic for Arabic numerals (1,2,3,... ) \roman for Lowercase Roman numerals (i,ii,iii,... ) \Roman for Uppercase Roman numerals (I,II,III,... ) \alph for Lowercase letters (a,b,c,... ) \Alph for Uppercase letters (A,B,C,... ) For example, \Roman{xyz} prints the current value of the counter xyz in upper case Roman numerals. In addition to the counters listed above, here are some exmples with the page counter: This is page: \arabic{page}. In Roman: \Roman{page} This is page: 16. In Roman: XVI (16) Robert S. Laramee CS 189 LATEX and Linux: Displaying Text

Changing Label Style with Counters (Continued) These counters, together with the counter style commands, can be used in the redefinitions of the label commands. For example, to change the second-level label to Arabic numerals followed by.), we can use: \renewcommand{\labelenumii}{\arabic{enumii}.)} This redefines \labelenumii to the value of counter enumii printed in Arabic, plus the characters.). In other words like: 1.), 2.), 3.).... All the numbering levels may be changed in this way. It is even possible to include more than one counter: \renewcommand{\labelenumii}{\alph{enumi},\arabic{enumii}} This produces the value of the counter enumi as a capital letter followd by the value of counter enumii as a number for every call to \item. The result looks like: A.1, A.2,..., B.1, B.2,..... Tip: You can make slight alterations to these commands for the assessed coursework. (17) Robert S. Laramee CS 189 LATEX and Linux: Displaying Text

Printing Literal Text: Verbatim Text that is enclosed between \begin{verbatim} and \end{verbatim} will be directly printed, as if typed on a typewriter, with all line breaks and spaces, without any L A TEX command being executed. Within a paragraph, similar behavior can be accessed with \verb+ \emph{text} + The + is just an example of a delimiter character. You can use any character except letters, * or space. Many L A TEX examples in this lecture are typeset with this command. \begin{verbatim} 10 PRINT "HELLO WORLD "; 20 GOTO 10 \end{verbatim} (18) Robert S. Laramee CS 189 LATEX and Linux: Displaying Text

Printing Literal Text: Verbatim (Continued) 10 PRINT "HELLO WORLD " on \today; 20 GOTO 10 The starred version of the verbatim environment emphasizes the spaces in the text The verb command can be used in a similar fashion with a star: \verb* like this like this The verbatim environment and the \verb command may not be used within parameters of other commands. (19) Robert S. Laramee CS 189 LATEX and Linux: Displaying Text

Acknowledgments We thank the authors of, A Not So Short Guide to L A TEX, namely, Tobias Oetiker, Hubert Partl, Irene Hyna and Elisabeth Schlegl, for valuable contributions to this lecture material. We also thank the authors of, A Guide to L A TEX Fourth Edition, namely, Helmut Kopka and Patrick W. Daly for valuable contributions to this lecture material. (20) Robert S. Laramee CS 189 LATEX and Linux: Displaying Text