More text features

2.4 More text features

Next, we produce the following note:

September 12, 2006 From the desk of George Gr¨ atzer

October 7–21 please use my temporary e-mail address:

George Gratzer@yahoo.com

14 Chapter 2 Typing text

Type in the source file, without the line numbers. Save it as note2.tex in your work folder (note2.tex can be found in the samples folder—see page 4):

1 % Sample file: note2.tex

2 \documentclass{sample}

4 \begin{document}

5 \begin{flushright}

6 \today

7 \end{flushright}

8 \textbf{From the desk of George Gr\"{a}tzer}\\[22pt]

9 October~7--21 \emph{please} use my

10 temporary e-mail address:

11 \begin{center}

12 \texttt{George\_Gratzer@yahoo.com}

13 \end{center}

14 \end{document} This note introduces several additional text features of L A TEX: The \today command (in line 6) to display the date on which the document is typeset

(so you will see a date different from the date shown above in your own typeset document).

The environments to right justify (lines 5–7) and center (lines 11-13) text. The commands to change the text style, including the \emph command (line 8) to

emphasize text, the \textbf command (line 9) for bold text, and the \texttt com- mand (line 12) to produce typewriter style text.

These are commands with arguments. In each case, the argument of the com- mand follows the name of the command and is typed between braces, that is, between { and }.

The form of the L A TEX commands: Almost all L A TEX commands start with a backslash ( \ ) followed by the command name. For instance, \textbf is a command and textbf is the command name. The command name is terminated by the first non- alphabetic character , that is, by any character other than a–z or A–Z. So textbf1 is not a command name, in fact, \textbf1 typesets as 1. (Let us look at this a bit more closely. \textbf is a valid command. If a command needs an argument and is not followed by braces, then it takes the next character as its argument. So \textbf1 is the command \textbf with the argument 1, which typesets as bold 1: 1.) Note that command names are case sensitive. Typing \Textbf or \TEXTBF generates an error message.

The multiple role of hyphens: Double hyphens are used for number ranges. For example, 7--21 (in line 9) typesets as 7–21. The punctuation mark – is called an en

2.4 More text features

dash . Use triple hyphens for the em dash punctuation mark—such as the one in this sentence.

The new line command, \\ (or \newline): To create additional space between lines (as in the last note, under the line From the desk. . . ), you can use the \\ command and specify an appropriate amount of vertical space: \\[22pt]. Note that this com- mand uses square brackets rather than braces because the argument is optional. The distance may be given in points (pt), centimeters (cm), or inches (in). (There is an analogous new page command, \newpage, not used in this short note.)

Special rules for special characters (see Section 2.1), for accented characters and for some European characters. For instance, the accented character ¨a is typed as \"{a}. Accents are explained in Section 5.4.7 (see also the tables in Section C.2).

When you need to know more about typing text than we have discussed here, see Chapters 5 and 6. See also Appendix C, where all text symbols are organized into tables. Recall that we also have the SymbolTables.pdf in the samples folder.

CHAPTER

Typing math

While marking up text in L A TEX is easy, marking up math is less intuitive because math formulas are two-dimensional constructs and we have to mark them up with

a one-dimensional string of characters. However, even the most complicated two- dimensional formula is made up of fairly simple building blocks. So by concentrating on the building blocks—selectively, just learn the ones you need—you can get started with math quickly.

Dokumen yang terkait

c. Bridging Teknik memanjat pada celah vertikal yang lebih besar (gullies). Caranya dengan menggunakan kedua tangan dan kaki sebagai pegangan pada kedua celah tersebut. Posisi badan mengangkang kaki sebagai tumpuan dibantu juga tangan sebagai penjaga kese

0 1 10

2. Marah: adalah kunci setiap kejahatan. Nabi saw. telah berpesan pada seseorang untuk menjauhi sikap marah dengan sabda beliau: "Janganlah engkau marah". Beliau mengulanginya berkali-kali. (H.R Bukhari). - Kebersihan Hati

2 5 14

Object Oriented Programming dengan Delphi (

1 4 75

E volusi dan aplikasi sistem informasi berbasis komputer

1 8 18

b. Data Manipulation Language (DML) : Digunakan untuk memanipulasi data dengan menggunakan perintah : select, - SISTEM BASIS DATA 1.rar (7,386Kb)

1 3 15

Hubungan Pola Asuh Orang Tua dan Kesiapan Psikologis Anak dengan Kebersihan Toilet Traning pada Anak Usia Prasekolah di Paud Ab-Arisalah Kota Lubuklinggau

0 1 8

Hubungan Pengetahuan dsn Sikap dengan Tindakan Hygiene Penjual makanan Jajanan di Lingkungan Sekolah Dasar Kaamatan Baturaja Timur Kabupaten Ogan Komering UIU Tahun 2013 A. Gani

1 3 14

Faktor faktor yang berhubungan dengan manfaatan Posyandu lansia oleh kelompok usia lanjut didesa Kemalara dalam wilayah kerja Puskesmas Kemalaraja OKU Tahun 2013. Saprianto, M.Kes

3 3 21

Korelasi umur, pekerjaan, dan keberadaan kontainer dengan kejadian penyakit malaria di desa simpang Martapura wilayah Kabupaten Ogan Komering Ulu Selatan tahun 2014 – A. Gani

0 0 18

Pengaruh Ekstrak Daun Jambu Biji (Psidiu Guajava Linn) dan Ekstrak daun Teh Hijau (Camelia Sinensis) terhadap Pertumbuhan Escherichia Coli In Vitro dan Perbandingannya dengan Kotrimoksazol

2 16 20