Alex Rivera | Logout

CSS class equivalent for LaTeX

Asked 2011-02-14T19:19:15.773
12

I am trying to figure out if there is a way to apply the CSS methodology to the LaTeX template I am building. What I would like to do is to have a set of classes that apply a specific style treatment to the bracketed words. For example:

If I have three paragraphs of text, I want to have all of the paragraphs have [0.5cm] of spacing after the last line without having to add \\[0.5cm] after each paragraph.

Is there a LaTeX equivalent of defining the treatment for all paragraphs in the preamble so that it cascades throughout my document? The equivalent of:

<style> p {padding-bottom:0.5cm} </style>

I want to be able to specify multiple version of these CSS-like LaTeX classes throughout my document, so I don't need a specific solution. I need help understanding how to add custom labels/names/classes to the preamble and an example of how to use them in the document itself.

Thanks!

Ryan

Edit
Report

2 Answers

0

You could adjust the value of \parskip, see here for explanation.

\addtolength{\parskip}{\baselineskip}

Alternatively, you could just use \setlength:

\setlength{\parskip}{0.5cm}
answered 2011-02-15T23:25:01.763
0

You could create commands that change the environment (like setting parskip), and issue the commands at different points in the document. Experiment with {bracketing} to change the scope of the changes the command makes.

answered 2011-02-24T10:14:42.207

Your Answer