Drawing Horizontal Line Options in LaTeX
LaTeX is a typesetting system and an open-source preparation of documents. This system specifies how a document looks with the help of its programming commands.
Other word processor shows graphical buttons to choose from and gives the result right after an edit. LaTeX gives multiple options to users on how they wanted their document to look like.
Options/ Commands for LaTeX horizontal lines:
- hline. Read as “backslash line”. This command is the simplest and most used option for the horizontal line. The horizontal line will be drawn between paragraphs that follow and when the document is rendered. When this command is used in the middle of a paragraph, it means forced break. There will be a paragraph break. It is like pressing the “Control& Enter” keys when using the common MS Word of MS Office suite that results to or adds a new page.
- rule. This “backslash rule” command is used if the user wants to construct a box. Its syntax is rule [h]{w}{t} where h, w & t stands for height, weight, and tallness, respectively of the box. H is the height above the baseline that you want the box raised. Its default is 0 (zero). W is the width of the box, and T is the thickness of the rule you want. Unit of measurement is in “cm” (centimeter) or in “p” (point).
- line. Syntax: “line{x,y}{length}. This command allows users to draw a either a horizontal or others line segment depending on your desired slope – the x, y values. Example: line(0,0){10cm} will give you a 10cm horizontal line. Reminder, this feature can only be used within the LaTex picture feature.
- dotfill. This command allows the user to draw a series of line dots. A rubber space is created and will expand as needed filling the horizontal spaces. This command is advisable to be used in defining a table of contents. The chapter title is left justified. The page number is right-justified. The distance or spaces between will be filled with dots if dotfill is used.
- hruefill. This command draws a thin line along the bottom of the text. Its effect is the same as the dotfill’s. The only difference is it will fill the available space with this horizontal line LaTeX rule.
Depending on our needs for word processing, LaTeX offers us various options to make our works more straightforward and faster in drawing or creating horizontal lines.