Is it possible to generate a set amount of words using lipsum? I looked through the documentation and either I have not understood it correctly or you can only create paragraphs and sentences not words? If you can create words e.g. say 10 words in lipsum how would I do it exactly in (La)TeX if this is not possible at all in lipsum, is there a package or method e.g. a loop of some sort that can achieve this?


Just for fun. Note that the output of \lipsum is protected, so the only way get the text is to copy it from a previous PDF.


\newcommand{\mystring}{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit,
vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida
mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna.
Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus
et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra
metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. Phasellus
eu tellus sit amet tortor gravida placerat. Integer sapien est, iaculis in, pretium
quis, viverra ac, nunc. Praesent eget sem vel leo ultrices bibendum. Aenean
faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. 
Curabitur auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue
eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim

\StrBefore[20]{\mystring}{ }
  • You can copy it from the source... Or from one of the many Lipsum generators online. Much easier, in my opinion. Nov 29 '18 at 21:01

I worked it out without a package:


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.