# Class 'standalone' and linebreaks for a 'Je suis Charlie'

I have produced a Je suis Charlie image, and I wanted initially to use the standalone class, but I did not obtain the intended result.

Here is the intended result:

Here is the produced result:

Here is the code:

% -*- coding: iso-latin-1; -*-

\documentclass[border=.5cm]{standalone}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[dvipsnames,usenames]{color}
\pagecolor{black}
\usepackage{dejavu}
\begin{document}
%\Huge

\textcolor{Gray}{JE SUIS}
\bfseries
\textcolor{red}{CHARLIE}

\mdseries
\textcolor{Gray}{JE SUIS}
\bfseries
\textcolor{red}{POLICIER}

\mdseries
\textcolor{Gray}{JE SUIS}
\bfseries
\textcolor{red}{JUIF}

\mdseries
\textcolor{Gray}{JE SUIS}
\bfseries
\textcolor{red}{MUSULMAN}

\mdseries
\textcolor{Gray}{JE SUIS}
\bfseries
\textcolor{red}{ATHÉE}

\mdseries
\textcolor{Gray}{JE SUIS}
\bfseries
\textcolor{red}{FRÉDÉRIC}

\mdseries
\textcolor{Gray}{JE SUIS}
\bfseries
\textcolor{red}{AHMED}

\mdseries
\textcolor{Gray}{JE SUIS}
\bfseries
\textcolor{red}{YOHAV}

\mdseries
\textcolor{Gray}{JE SUIS}
\bfseries
\textcolor{red}{FRANÇAIS}

\mdseries
\textcolor{Gray}{JE DEMEURE}
\bfseries
\textcolor{white}{LIBRE !}

\end{document}

• You need to use the varwidth option. – Alan Munn Jan 11 '15 at 17:11
• @AlanMunn indeed, this does it! didn't know about that. Thanks. – user4686 Jan 11 '15 at 17:43
• @AlanMunn I did not ask you to promote your comment into an answer, because yours is also mentioned there in comments, and the tabular + package array approach of the already provided answer, which has attracted a number of upvotes, has its advantages, hence I accepted it. But in my use case (for adding a Je suis chrétien some people told me found was lacking), I used your varwidth option proposal. – user4686 Jan 12 '15 at 8:29

standalone does not really provide a paragraph mode, you better enclose everything in a tabular. You can, moreover, save yourself a lot of typing ;)

\documentclass[border=.5cm]{standalone}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[dvipsnames,usenames]{color}
\pagecolor{black}
\usepackage{dejavu}
\usepackage{array}
\begin{document}
%\Huge
\begin{tabular}{>{\color{Gray}JE SUIS\ \color{red}\bfseries}l}
CHARLIE\\
POLICIER\\
JUIF\\
MUSULMAN\\
ATHÉE\\
FRÉDÉRIC\\
AHMED\\
YOHAV\\
FRANÇAIS\\
\multicolumn{1}{l}{\color{Gray}JE DEMEURE
\color{white}\bfseries LIBRE !}
\end{tabular}

\end{document}


(Text used in this answer doesn't necessarily express my opinion.)

• Or use the varwidth option, that allows \\ for the line breaks. But tabular is handier for avoiding formatting instructions. – egreg Jan 11 '15 at 17:17
• @egreg Yeah, that works as well of course (and makes my first sentence partially invalid...). – yo' Jan 11 '15 at 17:18
• @yo' I avoided the typing from copy-yanking in the Emacs buffer, but doing as you do is better, thanks. – user4686 Jan 11 '15 at 17:40