One of the problems I had found with lipsum
was that \lipsum
provides formatting for its paragraphs (\par
s, etc.). For a number of applications where you want to test a macro that manipulates plain text, it would be nice to be able to get lipsum text without the formatting.
So I contacted the author, and he was gracious enough to provide me with the following code (\singlelipsum{}
), which provides just the text of a single lipsum
paragraph, without any paragraph formatting.
\usepackage{lipsum}
\makeatletter
\newcommand\singlelipsum[1]{%
\begingroup\let\lips@par\relax\csname lipsum@\@roman{#1}\endcsname
\endgroup }
\makeatother
Perhaps this would satisy your particular need, which was unstated in your question.
As noted in the comments to this answer, there is a \lipsum*
macro (or alternately a [nopar]
package option) which will suppress the terminating \par
on lipsum paragraph outputs. HOWEVER, \lipsum*
and \singlelipsum
are not identical. Here is an MWE which shows it:
\documentclass{article}
\usepackage{lipsum}
\usepackage{censor}
\makeatletter
\long\def\blackout#1{%
\def~{-}%
\protected@edef\save@arg{#1}%
\expandafter\censor@Block\save@arg\stringend\let~\sv@tilde}
\newcommand\singlelipsum[1]{%
\begingroup\let\lips@par\relax\csname lipsum@\@roman{#1}\endcsname
\endgroup }
\makeatother
\begin{document}
\blackout{\singlelipsum{4}}
%\blackout{\lipsum*[4]}
\end{document}
As it is given, it compiles. But if you uncomment the second to last line, which is nominally similar to the third to last line, it breaks the code.
kantlipsum
; can you be more specific about your need?lipsum
,ptext
,kantlipsum
,blindtext
andplipsum
. What is it you’re missing from these packages?\lipsum[1]
is sometimes to much.