我正在使用以下代码来尝试生成一个看起来统一的句点和红色星号序列。
\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}
但该代码会产生不一致的行距。我希望所有行都挤在一起。
如何获得一致的行距?
答案1
TeX 会增加线条之间的距离,因为它会尝试适应您的星星。如果您告诉它星星的高度和深度为零,它不会这样做。幸运的是,该命令\raisebox
有可选参数:\raisebox{amount}[height][depth]{stuff}
。所以这有效:
\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}