如何自动覆盖换行?

如何自动覆盖换行?

这可能与大多数人想要的相反,但我想让我的行文本自行覆盖。例如,如果我有:

\documentclass{article}
\begin{document}
These are some words that I'd like to overwrite when they wrap instead of just
continuing onto the next line like they should for a regular document. 
\end{document}

正如您所期望的那样,这将跨越两行。我可以通过以下方式实现我想要的效果:

\documentclass{article}
\begin{document}
These are some words that I'd like to overwrite when they wrap instead of\par
\vspace{-1.2em}
just continuing onto the next line like they should for a regular document. 
\end{document} 

但我想知道是否可以重新定义或设置一些东西,使得换行时,它根本不会向下移动页面。当然,我可以手动编辑带有换行符和负垂直空间的块,但我希望做得更优雅一些。

答案1

在此处输入图片描述

baselineskip 设置为 0pt

\documentclass{article}
\begin{document}
\setlength\baselineskip{0pt}
\setlength\lineskiplimit{-\maxdimen}

These are some words that I'd like to overwrite when they wrap instead of just
continuing onto the next line like they should for a regular document. 
\end{document}

相关内容