Taglatex

LaTeX Paragraph Spacing and Indentation

In this short post, I’ll show you how you can modify the paragraph spacing and indentation in LaTeX. Why would anyone want to change the spacing and indention? Well, if you write a text in Dutch it is customary to leave a blank line after each paragraph and to not indent a new paragraph. This is different from English texts and the default in LaTeX where you do indent new paragraphs and don’t leave a blank line at the end.

To obtain a Dutch paragraph style, you have two options:

1. The package parskip

Include the package parskip in the preamble using following command:

\usepackage{parskip}

This will automatically cancel paragraph indentation and append a blank line at the end.

2. Set the parindent en parskip length

If the previous approach doesn’t work or if you want more fine-grained control, you can manually set the length of the indentation and the height of the blank line. You can do this by putting these commands in the preamble of your document:

\setlength{\parindent}{0pt}
\setlength{\parskip}{1.3ex plus 0.5ex minus 0.3ex}

The first command sets the indentation to 0 and thus cancels paragraph indentation. The second command sets the height of the trailing blank line. This is done using the LaTeX measure ex. One ex corresponds to the height of a lowercase ‘x’ in the current font style. I use 1.3 because I want the height of a capital letter. The “plus 0.5ex minus 0.3ex” part tells LaTeX that it can increase the height with at most 0.5ex and decrease it with maximum 0.3ex to make a decent layout. This means that the minimal height of the blank line is 1ex and the maximum 1.8ex.

And that’s it! Using one of these two options you can change the paragraph spacing and indentation in LaTeX.

The source (in Dutch) I used which has much more LaTeX tips: http://www.ntg.nl/doc/oostrum/latexhnd.pdf (846.7 kB)

How To: Create your CV in LaTeX

Currently I’m in my graduating year so I had to get my CV ready. And of course, I wanted to write it in \LaTeX. Today I’m summarizing my findings in this small how to on creating your CV in \LaTeX. There are really tons of packages and templates to create a CV. So there is no point in developing a package of my own (it’s a bit stupid to reinvent the wheel). I’ve searched and looked at a lot of PDFs and templates and I think I finally found my favorite: Moderncv.

Moderncv is a \LaTeX document class for typesetting curriculum vitaes in various styles. It’s created by Xavier Danaux who is also the main maintainer. In my opinion it is one of the best tools out there to create your CV and has received far too little attention. The template that is included in the download is self-explanatory but I’ll list some quick pointers and tips:

  • Use the \LaTeX commands \section{} and \subsection{} to give structure to your CV.
  • The document class has following color options: blue, orange, green, red, purple, grey and black. You can also define your own colors for the sections and symbols with the commands:
    \definecolor{sectionrectanglecolor}{rgb}{0.2,0.0,0.4}
    \definecolor{sectiontitlecolor}{rgb}{0.2,0.0,0.4}
    \definecolor{subsectioncolor}{rgb}{0.2,0.0,0.4}
    \definecolor{footersymbolcolor}{rgb}{0.2,0.0,0.4}

    Remark: it’s best to use web-safe colors.
  • It also allows you to type-set your motivation letter, very useful!
  • I use the \cvdoubleitem{} command to list specific skills in a compact way. For example:
    \cvdoubleitem{\textbf{Programming Languages}}{C, C++, Java, Prolog, Scala, Go}
    {\textbf{Web}}{HTML, CSS, PHP, JavaScript, JSP}
  • Be sure not to use more than two pages and put the most important things at the top.
You can download a censored version of my CV as an example. Do you have other suggestions for nice \LaTeX CV packages? Or any other remark? Don’t hesitate to leave a comment bellow!

 

LaTeX Template for Use Cases

This is just a quick post about a \LaTeX template I recently created. I’m currently doing a project on Software Architecture (designing a big and complicated application) and we had to write lots and lots of use cases. I searched the Internet for a nice \LaTeX template or environment to write my use cases in, but I couldn’t find one. Therefor I created my own usecases package that adds an environment to write use cases in. I based my package on this post. You can download the template, style file and an example PDF HERE.

To use the package, please follow these steps:

  1. Drop the file usecases.sty in the same folder as your root \LaTeX file.
  2. Include the usecases package in the preamble of your root file with the command:
    \usepackage{usecases}
  3. Within your document, you can now use the usecase environment (make sure to take a look at the template file)

I’ll also give you a short manual:

  • \begin{usecase} ... \end{usecase}: These commands define the use case. All the following commands should be within this environment.
  • \addtitle{Use Case X}{Title}: This should be the first command you use in the use case environment. You can use it to show the use case number and the title.
  • \addfield{Property:}{Value}: With this command, you can add a line with a use case specification. For example preconditions, postconditions, scope…
  • \additemizedfield{Property:}{\item Value}: This command is similar to the \addfieldcommand but the values (must) appear in a bullet list.
  • \addscenario{Scenario Name:}{\item Xth step}: Here you can specify the main (or an alternative) use case scenario. There are examples of both in the template.

In the file usecases.sty you can easily change the style for the use cases. The template you can download is based on the use case template presented in the book Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development (3rd Edition) by Craig Larman. Don’t expect too much of this template, I just created it for my project.

I hope this is useful to someone!

DOWNLOAD TEMPLATE >>>

© 2017 Tom's Webspace

Theme by Anders NorénUp ↑