LaTeX Spacing Tricks

2y ago
16 Views
2 Downloads
216.04 KB
22 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Sasha Niles
Transcription

MathLATEX Spacing TricksK. Cooper2012

MathBoxes and glueBoxesInviolable space required by some typsetting elementCould be one letterHas baseline, height, width, and depthTricks for slanted styles

MathBoxes and glueGlueBoxes are pasted together with glueStretchable/shrinkable spaceLetters get glued together . . .Words are then glued togetherThen lines.Note that spaces are uniform horizontally & verticallyThe glue stretches to ll the allotted spaceThe glue stretches to ll the space

MathModesModesHorizontal Mode form letters into words, words intolines, lines into paragraphs.Vertical Mode divide paragraphs into lines and formthese, math, and other objects into pages.Math Mode ObviousSubtleties: Internal vertical mode, restricted horizontalmode, display math modeHorizontal mode, restrictedhorizontaland now back to horizontal modemode,

MathModesModes MatterSometimes important to know what mode TEX is in\hspace takes place in horizontal mode\vspace delayed until vertical mode takes over

MathModesExample\indent\vspace{.5in} At the indentation of this sentence,\TeX\ went into horizontal mode. There is somedisplay math mode here too: \vspace{.5in}x {\pm} -\frac{b}{2a}\pm\frac{\sqrt{b 2-4ac}}{2a}. \TeX\ typesets the entireparagraph into lines, but can only use the \tc{vspace}commands when in vertical mode, putting the linestogether into a page.

MathModesExampleAt the indentation of this sentence, TEX went into hori-zontal mode. There is some display math mode here too: b2 4acb.x 2a2aTEX typesets the entire paragraph into lines, but can onlyuse the \vspace commands when in vertical mode, puttingthe lines together into a page.

MathLine and paragraph spacingSpacesBasic space is \xy : backslash-spaceProvides a stretchable space, i.e. extra glueThere are four extra spaceshere.There are four extra spaces here. This line is only forcomparison. Observe that the four extra spaces took upthe space of three characters.Use for a xed-width unbreakable space, e.g. for usein names: K. D. Cooper

MathLine and paragraph spacingMore spacesStretchable spaces use anywhere\xyOO\quadO O\qquad OOMath\!\,\;mode spacesOOOOOO

MathLine and paragraph spacingArbitrary size spaces\hspace{length } makes a horizontal space. Useanywhere.There is a \hspace{1in}before this.There is also a \hspace{1in} after this . Use\hspace* to force space even at line breaks.\vspace{height} makes a vertical space. Use invertical mode.There was a \vspace{.6in} at the end of the previousline.Use \vspace* to force space even at a page break.

MathLine and paragraph spacingFixed vertical spaces\smallskip a small vertical space: follows this line.\medskip a medium vertical space: follows this line.\bigskip a big vertical space: follows this line.Equivalent to e.g. \vspace{\medskipamount}Can change these amounts: \medskipamount 20pt

MathLine and paragraph spacingFillsIn nitely stretchable/shrinkable space\hfill can ll a line, e.g.leftrightLikewise, \hrulefill lls with a line, \dotfill llswith dots.left . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . right\vfill does same in verticalBeware: if the box has variable width or height, the llswill default to zero length.

MathPage spacingMarginsRemember that TEX was designed for producing books.We might need to leave paper for binding.\evensidemargin left margin for even numberedpages\oddsidemargin left margin for odd numbered pages\textwidth width of text area. The right margin iswhatever is left over.\topmargin, \textheight control vertical text area.We usually set these in the preamble.

MathPage spacingMarginsRemember that TEX was designed for producing books.We might need to leave paper for binding.\evensidemargin left margin for even numberedpages\oddsidemargin left margin for odd numbered pages\textwidth width of text area. The right margin iswhatever is left over.\topmargin, \textheight control vertical text area.We usually set these in the preamble.

MathPage spacingMarginsRemember that TEX was designed for producing books.We might need to leave paper for binding.\evensidemargin left margin for even numberedpages\oddsidemargin left margin for odd numbered pages\textwidth width of text area. The right margin iswhatever is left over.\topmargin, \textheight control vertical text area.We usually set these in the preamble.

MathPage spacingMarginsRemember that TEX was designed for producing books.We might need to leave paper for binding.\evensidemargin left margin for even numberedpages\oddsidemargin left margin for odd numbered pages\textwidth width of text area. The right margin iswhatever is left over.\topmargin, \textheight control vertical text area.We usually set these in the preamble.

MathPage spacingMarginsRemember that TEX was designed for producing books.We might need to leave paper for binding.\evensidemargin left margin for even numberedpages\oddsidemargin left margin for odd numbered pages\textwidth width of text area. The right margin iswhatever is left over.\topmargin, \textheight control vertical text area.We usually set these in the preamble.

MathPage spacingMarginsRemember that TEX was designed for producing books.We might need to leave paper for binding.\evensidemargin left margin for even numberedpages\oddsidemargin left margin for odd numbered pages\textwidth width of text area. The right margin iswhatever is left over.\topmargin, \textheight control vertical text area.We usually set these in the preamble.\oddsidemargin 1.5in\setlength{\oddsizemargin}{1.5in}

MathPage spacingVariablesPoint is that certain variables control page size andposition.\parskip distance between paragraphs\parindent indentation at beginning of paragraph\baselineskip distance between baselines of textlinesSome of these can be reset by environments. Inparticular, \baselineskip is set by documentenvironment, so to change it, you must do so inside thedocument.

MathBoxesMaking boxesSometimes you need to set text in a xed area.\makebox[width ]{content } sets content in a box ofwidth width.\makebox[.8\textwidth]{\hrulefill This isofficially .8\textwidth wide}.This is o cially .8\textwidth wide.N.B. you can specify lengths as a number times avariable, where multiplication is denoted by adjacency.

MathBoxesOther boxesIf you want to see the box, you can use a \frameboxTo make a box that usesmultiple lines,use e.g.\parbox{2.0in}{.}the baselineo To make a box that is vertically aligned,use \raisebox{2ex}{.}. Positive lengths denoteraising the box above the baseline; negative lengths putthe base of the box below the baseline.

MathBoxesRulesYou can make a rectangular blob of ink using \rule.\rule{1in}{.2mm} gives.\rule{.1in}{.5\baselineskip} gives .Making a rule of 0 thickness can be a good way offorcing space in horizontal or math mode. Such a rule iscalled a strut.This line has a strut: \rule[-.25in]{0in}{.5in}The optional length moves the strut down from thebaseline by a quarter inch.\strut gives a strut as tall as the default line height.

Math Boxes Rules ouY can make a rectangular blob of ink using nrule . nrule{1in}{.2mm} gives . nrule{.1in}{.5 nbaselineskip} gives . Making a rule of 0 thickness can be a good way of forcing space in horizontal or math mode. Such a rule is called a strut . This line has a strut: nrule[-.25in

Related Documents:

HP Latex 315. HP Latex 335. HP Latex 365. HP Latex 375. Supplied with the printer. HP Latex 64-in Take-Up Reel. HP Latex 64-in Take-Up Reel: HP Latex 64-in Take-Up Reel. HP Latex 54-in Printer 2-in Spindle (including 2- to 3-in spindle adaptor) HP Latex 64-in Printer 2-in Spindle (including 2- to 3-in spindle adaptor) HP Latex 64-in Printer 3 .

Chapter 1: Getting started with LaTeX Version Release Date LaTeX 2.09 1985-09-01 LaTeX 2e 1994-06-01 Section 1.1: LaTeX Editors While you can create LaTeX documents using any editor and compiling using the console, there exist several plugins for widely used editors to simplify creating LaTeX documents, and there are specialized LaTeX editors. An

Mathématiques LATEX est la norme impérative. Physique LATEX est la norme. Autres sciences dures LATEX est courant. Sciences sociales LATEX est peu fréquent. Ailleurs Quelques rares éditeurs non-scientifiques utilisent LATEX. francois.gannaz@silecs.info Introduction à LATEX. Présentation Démo Au-delà Contact Historique Qualité Mécanisme et pratique Typographie Ligatures Affidé .

Getting Started with LaTeX A Brief Tutorial on how to access, install and begin use of LaTeX Section I: What is LaTeX? Briefly put, LaTeX is a text editing and typesetting platform designed especially for the use in Mathematics, Engineering, Science and Industry. However, it should be noted that LaTeX is not only restricted to these fields.

to scroll back through the .tex le to learn how some symbol was generated. Of course, there’s much more to LaTeX than what you’ll nd here; so get yourself a good LaTeX book, such as G. Gr atzer, Math into LaTeX, 3rd ed., Birkh auser, Boston, 2000. There are online sources, too. For example, the LaTeX Wikibook may be found at

LATEX Garner What is LATEX? Typesetting, Not Processing How Does It Work? History and Philosophy . Free The most stable open source software. LATEX Garner What is LATEX? Typesetting, Not Processing How Does It Work? History and Philosophy . Platform Windows, Unix/Linux, Mac, . Quality Camera-ready output Extendable Customizable for any .

Software Review of Zotero Making the LATEX Document Compiling The LATEX Document LATEX Document Notice the commands to set up BibLaTeX in the preamble. The biblatex command is set for Chicago author-date style. The commented-out command is set for MLA-8. LaTeX will expect a bibliography database called \cassirer.bib" 18/24

4 Some LATEX Quirks and Misconceptions 5 4 Some LATEX Quirks and Misconceptions One of the common misconceptions that people using LATEX for the rst time have is that they think of it as more like Microsoft Word than Java. LATEX is, rst and foremost, a programming language, and