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?

  • Maybe related: http://tex.stackexchange.com/questions/144169. Basically use the listings package -- I think you want something close to ASCII art :). – Dr. Manuel Kuehner Mar 16 '17 at 01:00

1 Answers1

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

Boris
  • 38,129