Text FormattingParagraph side border

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
jonallard
Posts: 5
Joined: Sat Jan 23, 2010 7:12 pm

Paragraph side border

Post by jonallard »

How would one add a vertical line left of a paragraph, analogous to a paragraph border in MS Word?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Paragraph side border

Post by localghost »

Search the forum for the framed package and its leftbar environment. If you want that line in the margin, you can use the \marginpar command. An enhancement to this command comes with the marginnote package.


Best regards and welcome to the board
Thorsten
jonallard
Posts: 5
Joined: Sat Jan 23, 2010 7:12 pm

Paragraph side border

Post by jonallard »

Thank you for responding.

The leftbar works well for me. However, I cannot figure out how to put it in the margin with \marginpar. Any pointers?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Paragraph side border

Post by localghost »

I expressed myself a little bit misleading. You can only use one or the other. Read the marginnote manual for more information.
jonallard
Posts: 5
Joined: Sat Jan 23, 2010 7:12 pm

Re: Paragraph side border

Post by jonallard »

Still, after reading the manual, I don't get: how can you use this package to create a bar rather than a note?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Paragraph side border

Post by localghost »

Just use the \rule command.

Code: Select all

\marginnote{\rule{\2pt}{3\baselineskip}}  % vertical rule with height of three lines
ptrcao
Posts: 88
Joined: Sun Dec 05, 2010 3:26 am

Paragraph side border

Post by ptrcao »

localghost wrote:Just use the \rule command.

Code: Select all

\marginnote{\rule{\2pt}{3\baselineskip}}  % vertical rule with height of three lines
Sorry to revive an old thread but this is very close to what I'm looking for. I wanted the above, but on the left side, not the right side. I've tried using the \margin options but I can't seem to force the side border to go on the left hand side of the paragraph...
OS info: Win XP | Debian 6.0 | Ubuntu 10.04
Latex editor of choice: TexWorks (for dual view feature)
Post Reply