0

I am using the following code to try and produce a uniform looking sequence of periods and red asterisk.

\documentclass[10pt]{article}
\usepackage[paperheight=11in,paperwidth=8.5in,margin=.5in]{geometry}
\usepackage{xcolor}
\usepackage{seqsplit}
\begin{document}
\linespread{.3}
\noindent
\begin{center}
{\small\seqsplit{.......{\textcolor{red}{\raisebox{-0.15cm}{*}}}.{\textcolor{red}{\raisebox{-0.15cm}{*}}}..............................................................................................................................................................................................................................................................................{\textcolor{red}{\raisebox{-0.15cm}{*}}}.....{\textcolor{red}{\raisebox{-0.15cm}{*}}}.....{\textcolor{red}{\raisebox{-0.15cm}{*}}}{\textcolor{red}{\raisebox{-0.15cm}{*}}}................{\textcolor{red}{\raisebox{-0.15cm}{*}}}.......{\textcolor{red}{\raisebox{-0.15cm}{*}}}.................................................................................................................................................................................{\textcolor{red}{\raisebox{-0.15cm}{*}}}..............{\textcolor{red}{\raisebox{-0.15cm}{*}}}.............{\textcolor{red}{\raisebox{-0.15cm}{*}}}....................................................................................................................................................................................{\textcolor{red}{\raisebox{-0.15cm}{*}}}........................{\textcolor{red}{\raisebox{-0.15cm}{*}}}{\textcolor{red}{\raisebox{-0.15cm}{*}}}.{\textcolor{red}{\raisebox{-0.15cm}{*}}}..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................\\\\}}
\end{center}
\end{document}

But that code produces inconsistent line spacing. I would like all lines to be squished together.

Seqsplit section with inconsistent line spacing

How can I get consistent line spacing?

0

TeX increases distance between lines because it tries to fit your stars. If you tell it that the stars have zero height and zero depth, it will not do this. Fortunately the command \raisebox has optional parameters just for this: \raisebox{amount}[height][depth]{stuff}. So this works:

\documentclass[10pt]{article}
\usepackage[paperheight=11in,paperwidth=8.5in,margin=.5in]{geometry}
\usepackage{xcolor}
\usepackage{seqsplit}
\begin{document}
\pagestyle{empty}
\linespread{.3}
\noindent
\begin{center}
{\small\seqsplit{.......{\textcolor{red}{\raisebox{-0.15cm}[0pt][0pt]{*}}}.{\textcolor{red}{\raisebox{-0.15cm}[0pt][0pt]{*}}}..............................................................................................................................................................................................................................................................................{\textcolor{red}{\raisebox{-0.15cm}[0pt][0pt]{*}}}.....{\textcolor{red}{\raisebox{-0.15cm}[0pt][0pt]{*}}}.....{\textcolor{red}{\raisebox{-0.15cm}[0pt][0pt]{*}}}{\textcolor{red}{\raisebox{-0.15cm}[0pt][0pt]{*}}}................{\textcolor{red}{\raisebox{-0.15cm}[0pt][0pt]{*}}}.......{\textcolor{red}{\raisebox{-0.15cm}[0pt][0pt]{*}}}.................................................................................................................................................................................{\textcolor{red}{\raisebox{-0.15cm}[0pt][0pt]{*}}}..............{\textcolor{red}{\raisebox{-0.15cm}[0pt][0pt]{*}}}.............{\textcolor{red}{\raisebox{-0.15cm}[0pt][0pt]{*}}}....................................................................................................................................................................................{\textcolor{red}{\raisebox{-0.15cm}[0pt][0pt]{*}}}........................{\textcolor{red}{\raisebox{-0.15cm}[0pt][0pt]{*}}}{\textcolor{red}{\raisebox{-0.15cm}[0pt][0pt]{*}}}.{\textcolor{red}{\raisebox{-0.15cm}[0pt][0pt]{*}}}..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................\\\\}}
\end{center}
\end{document}

enter image description here

  • Worked like a charm and I learned something new. Thanks. – KBoehme Mar 18 '17 at 4:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.