LaTeX/Rules and Struts
Www.Chikita/Isaac.com{| class="wikitable collapsible noprint" style="background-color: #efe; float: right; clear: right; border: 1px solid #8b8; padding: 0.5em; font-size: small; text-align: left; width: 20%; margin: 0.5em;" |- !
LaTeX |- | Getting Started
Common Elements
- Document Structure
- Text Formatting
- Paragraph Formatting
- Colors
- Fonts
- List Structures
- Special Characters
- Internationalization
- Rotations
- Tables
- Title creation
- Page Layout
- Customizing Page Headers and Footers
- Importing Graphics
- Floats, Figures and Captions
- Footnotes and Margin Notes
- Hyperlinks
- Labels and Cross-referencing
- Initials
Mechanics
Technical Text
- Mathematics
- Advanced Mathematics
- Theorems
- Chemical Graphics
- Algorithms
- Source Code Listings
- Linguistics
Special Pages
Special Documents
- Scientific Reports (Bachelor Report, Master Thesis, Dissertation)
- Letters
- Presentations
- Teacher's Corner
- Curriculum Vitae
- Academic Journals (MLA, APA, etc.)
Creating Graphics
Programming
Miscellaneous
Help and Recommendations
Appendices
|- | edit this box • edit the TOC |}
Rules
[edit | edit source]The \rule
command in normal use produces a simple black box:
\rule[raise]{width}{thickness}
|
The parameter thickness determines the height, whereas width determines the width of the produced rule. With the optional parameter raise, you can optionally raise or lower the produced rule above or below the baseline.
Here is an example (the thin lines are located at the baseline):
\rule{3mm}{.1pt}%
\rule[-1mm]{5mm}{1cm}%
\rule{3mm}{.1pt}%
\rule[1mm]{1cm}{5mm}%
\rule{3mm}{.1pt}
|
This is useful for drawing vertical and horizontal lines.
Struts
[edit | edit source]A special case is a rule with no width but a certain height. In professional typesetting, this is called a strut. It is used to guarantee that an element on a page has a certain minimal height. You could use it in a tabular environment or in boxes to make sure a row has a certain minimum height.
In LaTeX a strut is defined as
\rule[-.3\baselineskip]{0pt}{\baselineskip}
|
Stretched rules
[edit | edit source]LaTeX provides the \hrulefill
command, which work like a stretched horizontal space.
See the Lengths chapter.