lipsum Access to 150 paragraphs of Lorem Ipsum dummy text a

Similar documents
MockupUI Widgets Example Project

Pleasant Hill Professional Building Suite 1

john smith* & james smith 1

Something about Computer Science

Analysis I. Title of Paper

PUT THE TITLE OF THE ARTICLE HERE

JOURNAL OF GEOPHYSICAL RESEARCH, VOL.???, XXXX, DOI: /,

Title of the chapter. Robin Turner. Bilkent University. Name of the chapter Name of the author

My Theory of Everything

THE UMALAYATHESIS L A T E X DOCUMENT CLASS LIM LIAN TZE INSTITUTE OF POSTGRADUATE STUDIES UNIVERSITY OF MALAYA KUALA LUMPUR

Common Sense for Animals

[Instructional text only (no text will appear here in your book):

Title of article or workshop presented at Nebrija Journal of applied linguistics to language teaching. Title translated in Spanish

Web Developer Position Available

Sam Speedo (Bathing Suit Detective) Frank Sergeant

A Thesis Title. Author Name

May 4, Barcode. Queen Bee Beekeepers Seek Breed to Survive Oregon Winters

Young Life s First Annual Serve-a-thon

Choosing & Pairing Type

Automatització de la gestió d una granja de conills de bosc (oryctolagus cuniculus)

ANNEX INTERNATIONAL CONTEST. The First Conference

RUC West brand concepts

VOLUME 2, SPECIAL EDITION HAWK SQUAWK

The Shadow Report. For. Mary Smith. Melissa Frei s Service

Hajj 2017 application & Pre- Registration

PORTFOLIO. uk.linkedin.com/in/adamnorbury

Messianic Studies. Assignment and Assessment

FACES OF HOPE Paz arancibia, Souhir benahmed, FranceSco carella, nejla Ghachem, douja Gharbi, Shiraz jerbi, Sonia rigaud and monica carco

Making a Difference. My Awesome Nonprofit Annual Report 2024

Fitz Rubrics How to Write a Narrative Paragraph

THE CHRISTIAN FAMILY LIFE TABLE OF CONTENTS

December 24 Christmas Eve Services 3:30 p.m. 5:30 p.m. 10:00 p.m.

THESMART CONTENTS WATCHREVIEW

DEFENDING THE FAITH MINISTRY TABLE OF CONTENTS

DEFENDING THE FAITH MINISTRY TABLE OF CONTENTS

Mapping Late Medieval Lives of Christ

2015 ANNUAL REPORT. Last week to be a part of Project Help A Child. St. James Lutheran Church, Whyalla. New Beginnings It s Never Too Late

couldn t afford a new apartment. A friend and her husband invited me to move in with them until I could save up some money and find a new place.

University of Mount Union Friday, December 9, 7:30 p.m. Sunday, December 11, 4 p.m.

NEW TESTAMENT SURVEY

WINTER/SPRING 2018 DISCIPLE UNIVERSITY

WHAT IS DISCIPLE University?

AdamsPlace Residential Living

HAPPENINGS. As you consider this event and their efforts, also ask yourself,

Ram Kumar

ONE PRIORITY. love god

PARENTS HANDBOOK

2017 ANNUAL REPORT CALVARY CHAPEL SAN CLEMENTE

Ram Kumar Marketing and Sales Professional

Thesis Title. Name of Author

hands&feet In this Issue Christmas Celebration Ma rk MONTHLY NEWSLETTER OF FRANKLIN PRESBYTERIAN CHURCH DECEMBER 2018

Faith Matters. Dear Friends in Christ, Palm Cross Making Party! March 22 nd 6:00 p.m. in Fellowship Hall. Our Vision: Pizza provided!

LUX* is light. Overview. As a neutral window, LUX* draws in the light of its locale, giving the brand its colour.

Sam Rber. Mister Rubber France. Picture : Thomas Laconis

hands&feet In this Issue Advent Conspiracy Project: Ma rk MONTHLY NEWSLETTER OF FRANKLIN PRESBYTERIAN CHURCH DECEMBER 2017

lamcorper suscipit lobortis nisl ut aliquip ex ea commodo conseq.

March 29, 2017 Volume 54, Issue 13

Faces of Jesus in: Zimbabwe October 12-25, 2011

Introduction. Luke Corinthians 1 6 Deuteronomy 8 34 Revelation 1 9 Ezekiel Kings 2 19 Luke Kings Lamentations 1 5

Daily Bread Words for Life

Week 4: November 14/15. Discussion Guide

Reimagining Our Church for the Kingdom. The shape of things to come February 2018

Daily Bread Words for Life

READING SEUSS...2 THE THESIS SENTENCE...3 WRITING YOUR THESIS STATEMENT...4 SAMPLE THESIS...4 YOUR TURN FOR A THESIS...4

Embark on a Journey of the Self

th Maccabiah ספר מיתוג

December s Focus on Celebes/Indonesia

Philander Chase Conservancy

Week 6: November 28/29. Discussion Guide

Technology in Motion.

First Edition MONTHLY NEWSLETTER FUMCFV DECEMBER 2016

Apostolic Lutheran Church, Pastor Donald Salo, 315 South Main Avenue, New York Mills, Minnesota we begin to They will all pass away when Jesus

Accidental Awakenings:

WainNaz. Newsreel. A note from Pastor Ryan. Church Events. MISSION PROJECT- Bicycles for Pastors. June 8 - Elementary Drop In starts

Review Exam 2. Classical Liberalism. Why did classical liberalism develop? What is classical liberalism? What were the problems with it?

(RE)WRITING THE HISTORY OF THE CONGO FREE STATE

Winning on the Merits: The Joint Effects of Content and Style on Debate Outcomes

Enhance, Improve, Advance

2010 ceft and company LLC. all rights reserved.

of free merchandise to needy families, provide holiday and Other ways to help Spotlight on Chesed At usu quod laboramus, urbanitas, his nisl

liberamet orci. Only, here and there, an old sailor, pretium eleif placerat nan arcu. - Wallace Stevens, Disillusionment of Ten O Clock

Father, they are your gift to me. I wish that where I am they also may be with me.

Eddyism, Or, Christian Science Neither Christian Nor Scientific By J. R Walker

9-17 May

EVANGELIST MYRNA SUMMERS

and saint gianna O woman, great is your faith! Be it done for you as you desire! (Mt 15.28)

The Life Of Jesus By Ernest Renan READ ONLINE

Pilot test ca Agenda Special Council Meeting Meeting Wednesday, July 8, 7:00 PM Council Chambers

Chapter 1. First Week of Advent. Purple Candle. The color purple represents the longing we have waiting for the birth of baby Jesus.

MESSAGE FROM PASTOR STEVE

The liturg Package. Donald P. Goodman III. June 27, 2008

JULY VBS 2017! July AM-Noon BRANDON VALLEY ASSEMBLY OF GOD NEWSLETTER

Brand Guide, Summer 2015

Universal Features: Doubts, Questions, Residual Problems DM VI 7

THE TRUTH OF THE MATTER

Kentucky. Caller MONTHLY NEWSLETTER DECEMBER 2017 KENTUCKY ROAD CHRISTIAN CHURCH

WordPress Primer Version 9

Pro-ISKCON / Pro-GBC / Anti-Corruption

Lorem Ipsum Dolor. The Promises of God. Who can we trust?

SCOTLAND vs POVERTY Prayer. Let hope arise. Following Jesus where the need is greatest. A spoken prayer for Ethiopia for use in services/groups

Transcription:

lipsum Access to 150 paragraphs of Lorem Ipsum dummy text a Patrick Happel b January 3, 2019 Abstract lipsum is a L A TEX package that produces dummy text to be used in test documents or examples. The paragraphs are taken with permission from https://www. lipsum.com/, thanks to James Wilson for this work. Furthermore, the following people contributed to lipsum by suggesting improvements, correcting bugs or a Version: 2.2 b patrick.happel@rub.de finding typos in the documentation: Florent Chervet, Ulrike Fischer, Vincent Belaïche, Enrico Gregorio, Frank Mittelbach, Karl Hagen. Please, file bug reports, typos in the documentation or feature requests as an issue on https://github. com/patta42/lipsum/issues. 1 Quick usage overview To load the package specify \usepackage{lipsum} \lipsum in the preamble of your document. This package provides several macros. The most important one is \lipsum. This macro typesets the Lorem ipsum paragraphs. It has two optional arguments. The first one allows to specify the range of the paragraphs. For example, \lipsum[4-57] typesets the paragraphs 4 to 57 and accordingly, \lipsum[23] typesets the 23 rd paragraph. Using \lipsum without its optional argument typesets the paragraphs 1 7 of Lorem ipsum... As of version 2.0, \lipsum has a second optional argument which allows selecting a range of sentences from the paragraphs. To get the sentences four to eight from paragraphs three to nine, use \lipsum[3-9][4-8]. 2 Foreword to Version 2.0 Version 2.0 of lipsum is a complete (well, nearly complete) rewrite of the code in expl3 syntax. I have never used expl3 before and thus the code might be too complicated, might use wrong or badly chosen data types or weird function names. I am happy to receive comments on this. Due the complete rewrite, some internals have changed which might impact older documents. Since, however, I guess that lipsum is not used for documents with true, important, content, I think potentially breaking up old documents is not a big issue here. The changes are: The package option nopar now uses a \space as terminator, instead of \relax. 1

The commands \UnpackLipsum and \UnpackLipsum* are no longer available. The effect of \UnpackLipsum now is default for \unpacklipsum (or \unpacklipsum*, depending on the package option). The effect of \UnpackLipsum* can be mimicked by using \LipsumProtect{ command }, as in the following example: \documentclass{article} \usepackage{lipsum,xcolor} \newcommand\foo{} \SetLipsumParListItemEnd{\LipsumProtect{\foo}} \begin{document} \renewcommand\foo{\color{.!75!red}} { \lipsumexp } \newcounter{mycnt}\setcounter{mycnt}{1} \renewcommand\foo{% (\themycnt)\stepcounter{mycnt}} \lipsumexp \end{document} The internal macros \lips@i, \lips@ii, \lips@iii,..., \lips@cl are no longer available. All other internal macros (with one exception) are no longer available, too. 3 Foreword to version 2.2 As of version 2.2, lipsum provides a simple interface to define other texts to be used as output of the \lipsum-family of commands. This was heavily inspired by an issue raised by svenper on github 1. However, the implementation of this interface might not match the needs of everyone who wants to provide a dummy text in another language. Comments and suggestions on this are very welcome. Please note that the documentation still only refers to the Lorem ipsum... -text. 4 Usage lipsum was intended to quickly provide a way to fill a page or two to analyze the page layout 2. While it has grown in the meanwhile and now provides some more advanced features, it still is only intended to quickly provide text. If you want more features, look at the blindtext-package. 4.1 Package Options lipsum outputs a range of paragraphs taken from the Lorem ipsum... dummy text. The package option controls how the single paragraphs of Lorem ipsum... are separated. The default is to separate the paragaraph with \par. One option is available to change the default behaviour: 1 https://github.com/patta42/lipsum/issues/13 2 https://groups.google.com/d/topic/de.comp.text.tex/opelojkrlfk/ discussion 2

nopar: Instead of \par, \space is used to separate the paragraphs. 4.2 User Commands \lipsum \lipsum* \lipsum[ paragraph range ][ sentence range ] \lipsum*[ paragraph range ][ sentence range ] \lipsum (and \lipsum*) uses a range as input. A range consists either of a single number or two numbers separated by a dash (-), as in number 1 - number 2. While syntactically correct, \lipsum (and related commands) might fail if number 2 < number 1. If used without an argument, \lipsum outputs the paragraphs 1 7 of Lorem ipsum... (as long as the default has not been overwritten, see below). \lipsum terminates every paragraph depending on the package option (using \par is the default). \lipsum* does the same, but uses a different termination (default is to use a blank space) for each paragraph. As a simplified rule of thumb, \lipsum prints the paragraphs as multiple paragraphs, \lipsum* prints them as a single paragraph. To change the range of the paragraphs, specify a paragraph range, which can either be a single number, as in \lipsum[23] (which will output the 23 rd paragraph), or two numbers separated by a dash, as in \lipsum*[9-12], which will output the paragraphs nine to twelve. lipsum provides 150 paragraphs of Lorem ipsum... thus 150 is the maximum that should be specified. 4.3 Outputting Sentences instead of Paragraphs Starting with lipsum v2.0, \lipsum and \lipsum* allow to output sentences of the Lorem ipsum... dummy text instead of paragraphs. To retrieve sentences instead of paragraphs, specify a sentence range as the second optional argument of \lipsum and \lipsum*. Note: To be able to specify a second optional argument, the first optional argument has to be provided and is thus not really optional anymore. Furthermore, it must be set to some range -value, using an empty first optional argument is not implemented. As a consequence \lipsum[][1-3] will fail. Valid inputs for sentence range are, again, a single number, as in \lipsum[1][1], which will output the first sentence of the first paragraph (the famous»lorem ipsum dolor sit amet, consectetuer adipiscing elit.«). \lipsum*[3-7][7-8] will output the seventh and eighth sentence of the paragraphs three to seven. There are some limitations and remarks on selecting sentences as described in the following: When sentences are output, they are (by default) separated by \space. The difference between \lipsum and \lipsum* is the token that terminates the paragraph of sentences: Without a package option (and changing the defaults), \lipsum terminates the sequence of senetences by \par, \lipsum* by \space and vice versa, if nopar is specified as package option. Specifying a sentence range which is outside the number of sentences in the specified paragraph range will not lead to an error. Instead, sentences which are not available are ignored and nothing is output. For example, \lipsum[104][9-20] will only output two sentences since paragraph #104 consists only of 10 sentences. For the same reason, \lipsum[104][11-20] will output nothing. 3

If you need a lot of sentences, consider the space option and \lipsum[1-150]. This should be faster. 5 Advanced or Developer Macros \SetLipsumDefault \LipsumPar \unpacklipsum \unpacklipsum* \lipsumexp \SetLipsumParListStart \SetLipsumParListStart* \SetLipsumParListEnd \SetLipsumParListEnd* \SetLipsumSentenceListStart \SetLipsumSentenceListStart* \SetLipsumSentenceListEnd \SetLipsumSentenceListEnd* \SetLipsumParListSurrounders \SetLipsumParListSurrounders* \SetLipsumSentenceListSurrounders To distinguish between macros for users and macros for, for example, package developers, it has been discussed to use different naming schemes. One option is that user level macros are all lowercase, while developer-level commands are CamelCase. Until version 2.0, lipsum has not yet followed this convention. Thus, the old lowercase commands are still available, but considered deprecated. They are not described in this section, but in the corresponding section in the documented code (section User- and developer-level commands). In order to change the default range of paragraphs that is used by \lipsum and friends, specify \SetLipsumDefault{8} or \SetLipsumDefault{123-145}. To get a single paragraph of the Lorem ipsum... dummy text, use \LipsumPar{8} (for the eighth paragraph). This is similar to using \lips@viii directly in versions prior to lipsum2.0. the difference between \LipsumPar{8} and \lipsum[8] is that the first directly accesses the internal macro that stores the corresponding paragraph, while the latter runs the loop that selects the Lorem ipsum... paragraphs. The commands \unpacklipsum and \unpacklipsum* work as \lipsum and \lipsum* and have the same two optional arguments, but instead of typesetting the Lorem ipsum... paragraphs, the commands store them in the macro \lipsumexp using \edef, thus, everything which can be expanded is expanded. 5.1 Fine-tuning the output The output of \lipsum, whether paragraphs or sentences, can be seen as a list of item s, where an item is either a paragraph or a sentence. As of version 2.0, lipsum allows to fine-tune which tokens are inserted at the beginning of the list, at the end of the list, at the beginning and end of each item as well as between the single items. The resulting list of tokens can be seen in Figure 1. lipsum allows to specify all of the tokens in the list indicated above except for the item-specific inner and outer items (shown as item N,s -outer/inner, item N,e -outer/inner above), which remain to be implemented. The macros that enable setting these tokens are all available in a normal and in a starred version, they apply to \lipsum and \unpacklipsum or \lipsum* and \unpacklipsum*, respectively. The macro \SetLipsumParListStart{ tokens } and its starred variant insert tokens at the very beginning of the list of paragraphs ( list s in Figure 1). \SetLipsumSentenceListStart and \SetLipsumSentenceListStart* do the same for the list of sentences. The corresponding macros that allow to input tokens at the very end of the output ( list e in Figure 1) are \SetLipsumParListEnd (and its starred variant) and \SetLipsumSentenceListEnd (and its starred variant). As a shorthand, the commands \SetLipsumParListSurrounders{ start }{ end } \SetLipsumParListSurrounders*{ start }{ end } \SetLipsumSentenceListSurrounders{ start }{ end } 4

list s........................................ \SetLipsumParListStart{ tokens } item 1,s -outer.............. \SetLipsumParListOuterItemStart{ item spec }{ tokens } item s................................. \SetLipsumParListItemStart{ tokens } item 1,s -inner.......... \SetLipsumParListInnerItemStart{ item spec }{ tokens } item 1 item 1,e -inner............ \SetLipsumParListInnerItemEnd{ item spec }{ tokens } item e.................................. \SetLipsumParListItemEnd{ tokens } item 1,e -outer................ \SetLipsumParListOuterItemEnd{ item spec }{ tokens } item-separator.......................... \SetLipsumParListItemSeparator{ tokens }... lists of paragraphs lists of sentences item-separator...................... \SetLipsumSentenceListItemSeparator{ tokens } item N,s -outer......... \SetLipsumSentenceListOuterItemStart{ item spec }{ tokens } item s............................ \SetLipsumSentenceListItemStart{ tokens } item N,s -inner...... \SetLipsumSentenceListInnerItemStart{ item spec }{ tokens } item N item N,e -inner........ \SetLipsumSentenceListInnerItemEnd{ item spec }{ tokens } item e.............................. \SetLipsumSentenceListItemEnd{ tokens } item N,e -outer........... \SetLipsumSentenceListOuterItemEnd{ item spec }{ tokens } list e..................................... \SetLipsumSentenceListEnd{ tokens } Figure 1: Places where additional tokens can be inserted in the output. N indicates the last item,... indicate the same structure as for the first and last item. Commands colored gray are not yet implemented. The upper part displays the commands for lists of paragraphs, the lower part for lists of sentences (also indicated by the labelled arrows in the middle). \SetLipsumSentenceListSurrounders* \SetLipsumParListItemStart \SetLipsumParListItemStart* \SetLipsumParListItemEnd \SetLipsumParListItemEnd* \SetLipsumSentenceListItemStart \SetLipsumSentenceListItemStart* \SetLipsumSentenceListItemEnd \SetLipsumSentenceListItemEnd* \SetLipsumParListItemSurrounders \SetLipsumParListItemSurrounders* \SetLipsumSentenceListItemSurrounders \SetLipsumSentenceListItemSurrounders* \SetLipsumParListItemSeparator \SetLipsumParListItemSeparator* \SetLipsumSentenceListItemSeparator \SetLipsumSentenceListItemSeparator* \LipsumProtect \SetLipsumSentenceListSurrounders*{ start }{ end } are available to set the tokens for the start and end position with a single command. To add tokens in front of every item, the commands \SetLipsumParListItemStart (and its starred variant) and \SetLipsumSentenceListItemStart are available. To add tokens after every item, the corresponding commands are \SetLipsumParListItemEnd (and its starred variant) and \SetLipsumSentenceListItemStart (and its starred variant). Again, there are commands that allow to set a pair of tokens to surround every item: \SetLipsumParListItemSurrounders{ start }{ end } \SetLipsumParListItemSurrounders*{ start }{ end } \SetLipsumSentenceListItemSurrounders{ start }{ end } \SetLipsumSentenceListItemSurrounders*{ start }{ end } To insert tokens between the single item s, the commands \SetLipsumParListItemSeparator (with its starred variant) and \SetLipsumSentenceListItemSeparator (also with its starred variant) are available. As can be seen in Figure 1, these tokens are inserted after the tokens inserted by \...ListItemEnd and before the following \...ListItemStart. To insert tokens that survive the expansion by \unpacklipsum and \unpacklipsum*, lipsum provides \LipsumProtect{ tokens }. See the example in the Foreword to Version 2.0. The macros introduced above can be used to turn the output of \lipsum, for example, into a list, as exemplified in Figure 2. The gray commands in Figure 1 are thought to allow inserting tokens 5

Code \SetLipsumSentenceListSurrounders{\begin{itemize}}{\end{itemize}} \SetLipsumSentenceListItemStart{\item} \lipsum[10][1-2] Output Suspendisse vitae elit. Aliquam arcu neque, ornare in, ullamcorper quis, commodo eu, libero. Figure 2: Turning the output of \lipsum into a list using inserted tokens. \LipsumRestoreParList \LipsumRestoreSentenceList \LipsumRestoreAll \NewLipsumPar \SetLipsumText around a specific item, but they remain to be implemented. One way to access a specific item in a list is shown in Figure 3, but other, maybe more elegant ways are conceivable. To quickly reset the tokens inserted by the above commands to their default values, lipsum provides \LipsumRestoreParList (for lists of paragraphs), \LipsumRestoreSentenceList (for lists of sentences) and \LipsumRestoreAll for both lists. 5.2 Loading and defining different texts Starting with lipsum2.2, a simple interface is provided to define and load other texts for the output of \lipsum and friends. This interface can, for example, be used to implement dummy texts in different languages without re-coding the logic implemented by lipsum. In order to provide a new text that will be used by lipsum, define the text by using a set of \NewLipsumPar{ paragraph } commands in a file with the ending.ltd.tex (ltd means lipsum text definition 3 ) to a location where your TEX-system will find it. The paragraph -argument is a single paragraph of the new text. Thus, the first occurence of \NewLipsumPar defines the first paragraph, the second occurence the second paragraph and so on. To specify the new text as output for \lipsum and friends, use \SetLipsumText{ filename }, where filename is the name of the file without the ending.ltd.tex. lipsum ships with two texts, lipsum.ltd.tex which contains the Lorem ipsum... -dummy text and which is loaded by default, and, thanks to github-user svenper, cicero.ltd.tex, which contains the speech by Cicero which inspired the Lorem ipsum... - dummy text. In contrast to the default Lorem ipsum... text, the cicero text, which can be selected by \SetLipsumText{cicero}, is true latin, and thus is properly hyphenated by, for example, the babel package with the language latin loaded (and selected). Figure 4 shows how to load and use the text of Cicero s speech (note that the use of babel is optional). 5.2.1 Limitations of and comments on the interface \SetLipsumText more or less just uses an \input or, to be more precise, the L A TEX3-variant \file_input:n, to load the.ltd.tex 3 To avoid name clashes with files using general languages as names, I chose to introduce the.ltd.tex file ending. I did not find a file with this ending in my texmf-tree, so I guess it is safe. 6

Code \newcounter{itemcount} \setcounter{itemcount}{0} \SetLipsumParListItemSurrounders{% \stepcounter{itemcount} \ifnum\value{itemcount}=2\begingroup\sffamily\fi }{ \ifnum\value{itemcount}=2\endgroup\fi } \lipsum[110-112] Output Suspendisse in odio. In elit diam, cursus vitae, venenatis in, molestie in, leo. Cras ornare. Nulla libero. Phasellus feugiat mattis libero. Sed vehicula aliquam ligula. Nullam lacinia, felis vel dignissim sodales, enim lectus lobortis diam, quis nonummy mauris odio auctor tortor. Integer in dui nec lacus bibendum ultrices. Etiam odio elit, aliquam et, porttitor id, interdum cursus, elit. Nulla eleifend tempor mauris. In vel arcu quis pede laoreet vulputate. Morbi pharetra magna a lorem. Cras sapien. Duis porttitor vehicula urna. Phasellus iaculis, mi vitae varius consequat, purus nibh sollicitudin mauris, quis aliquam felis dolor vel elit. Quisque neque mi, bibendum non, tristique convallis, congue eu, quam. Etiam vel felis. Quisque ac ligula at orci pulvinar rutrum. Donec mi eros, sagittis eu, consectetuer sed, sagittis sed, lorem. Nunc sed eros. Nullam pellentesque ante quis lectus. Vivamus lacinia, sapien vel fermentum placerat, purus nisl aliquet odio, et porta wisi dui nec nunc. Fusce porta cursus libero. Quisque eu mi a augue mollis posuere. Donec tincidunt, lorem at vestibulum pulvinar, felis purus nonummy urna, at accumsan purus dui nec leo. Praesent tortor turpis, vehicula in, aliquet ut, dignissim ac, leo. Curabitur sagittis mi id eros. In magna. Sed vitae elit facilisis elit semper sollicitudin. Curabitur convallis tempor nulla. Nullam non turpis a pede sagittis ultrices. Etiam vulputate pede in ligula. Sed a ante id metus pellentesque suscipit. Sed adipiscing justo vitae sapien. Nunc posuere, pede ullamcorper gravida egestas, justo libero tincidunt arcu, vitae pellentesque arcu leo ut mauris. Pellentesque auctor mauris sit amet elit luctus fringilla. Cras sed wisi. Morbi luctus enim vitae tellus. Vivamus venenatis sodales libero. Figure 3: Styling the second item of a list. Code \lipsum[1][1] \SetLipsumText{cicero} \selectlanguage{latin} % optional, requires babel.sty with option latin. \lipsum[1] Output Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Non eram nescius, Brute, cum, quae summis ingeniis exquisitaque doctrina philosophi Graeco sermone tractavissent, ea Latinis litteris mandaremus, fore ut hic noster labor in varias reprehensiones incurreret. Nam quibusdam, et iis quidem non admodum indoctis, totum hoc displicet philosophari. Quidam autem non tam id reprehendunt, si remissius agatur, sed tantum studium tamque multam operam ponendam in eo non arbitrantur. Erunt etiam, et ii quidem eruditi Graecis litteris, contemnentes Latinas, qui se dicant in Graecis legendis operam malle consumere. Postremo aliquos futuros suspicor, qui me ad alias litteras vocent, genus hoc scribendi, etsi sit elegans, personae tamen et dignitatis esse negent. Figure 4: Selecting and using the text of Cicero s speech. 7

file. This means, that the file is not necessarily loaded in the preamble of the document and thus the contents of the file underlie the respective restrictions. Most importantly, no additional packages can be loaded. Thus, if your text requires additional packages, the documentation should state that the user has to load the packages. Since lipsum is a package for developers and commonly used for examples, it will not load any packages except the ones required by lipsum itself to be usable for a maximum of developers. Futhermore, the commands used to typeset the new texts are still \lipsum, \lipsum*, \unpacklipsum and so on and the commands to tune the output are still \SetLipsumParListStart and friends and no way is provided to easily generate a set of commands where the lipsum (or Lipsum) part of the command names is exchanged by, for example, cicero or Cicero. Nonetheless, if you want to write a new package instead of just providing a new dummy text, maybe because it requires a certain package to be loaded, or because you want to have a different command than \lipsum, this can be as easy as this 4 : \ProvidesPackage{mydummytext} \RequirePackage{lipsum} \SetLipsumText{mydummytext} To make the text accesible via a command \mydummytext, simply use \let to copy the definition of \lipsum: \let\mydummytext\lipsum Note that this works fine with one exception: \unpacklipsum and \unpacklipsum* store their content in \lipsumexp, and they will keep doing so if you simply copy them using \let. Thus, to change \lipsumexp to, for example, \ciceroexp, you will have to re-code the \unpacklipsum command. I would, however, suggest to keep the \lipsum-commands since they are known to provide dummy text and one can easily refer to this documentation. But in the end this decision of course remains to the author of the new package. 6 lipsum Implementation 1 *package 2 @@=lipsum A check to make sure that expl3 is not too old 3 \@ifpackagelater { expl3 } { 2018/10/31 } 4 { } 5 { 6 \PackageError { lipsum } { Package~expl3~too~old } 7 { 8 You~need~to~update~your~installation~of~the~bundles~ 9 l3kernel ~and~ l3packages.\messagebreak 10 Loading~lipsum~will~abort! 11 } 12 \tex_endinput:d 13 } 6.1 Command Variants To parse range -like arguments, that is, arguments consisting either of a single number, as in 8, or of a range, as in 9-11, we use 4 The following code has never been tested, it was just written from mind as an example. 8

the argument processor \SplitArgument of xparse. However, the argument can either be a range as specified above, or a token list containing a range. Thus, the argument has to be expanded before it is analyzed. This use case is not available in xparse (at least not in the release 2018-10-17). Thus, we have to touch xparse s internal and generate such a variant. We copy it to a lipsum internal variant to avoid name clashes with future versions of xparse. \ lipsum_split_argument_expanded:nne \ xparse_split_argument:nne \ lipsum_split_argument_- expanded:nne{ number }{ token }{ argument } #1 : See documentation for \SplitArgument in xparse #2 : See documentation for \SplitArgument in xparse #3 : The argument fed to the function, which is expanded in this case 14 \cs_generate_variant:nn \ xparse_split_argument:nnn {nne} 15 \cs_new_eq:nn 16 \ lipsum_split_argument_expanded:nne 17 \ xparse_split_argument:nne str_if_eq:vntf Allows to compare a string value and a string: 18 \cs_generate_variant:nn \str_if_eq:nntf {VnTF} 6.2 Messages Starting from lipsum2.0, some commands from previous versions are considered deprecated and issue a warning when used. This is the corresponding message. 19 \msg_new:nnnn{lipsum}{deprecatedcommand} 20 {\string#1\msg_line_context:\\ 21 \string#1~should~be~substituted~by~\string#2.} 22 { The~command~\string#1~is~deprecated~ 23 and~should~be~substituted~by~ 24 \string#2.~ 25 \string#1~might~not~be~available~in~a~ 26 future~version~of~lipsum.sty.} 6.3 Variables \g_lipsum_paragraph_seq The sequence that stores all the paragraphs. 27 \seq_new:n\g_lipsum_paragraph_seq (End definition for \g_lipsum_paragraph_seq. This variable is documented on page??.) \g_lipsum_default_range_tl The default range for lipsum paragraphs. 28 \tl_new:n \g_lipsum_default_range_tl % (End definition for \g_lipsum_default_range_tl. This variable is documented on page??.) \l lipsum_pars_tl This variables is used to store the token list containing the selected paragraphs. 29 \tl_new:n \l lipsum_pars_tl (End definition for \l lipsum_pars_tl.) \l lipsum_sentences_tl This variables is used to store the token list containing the selected sentences. 30 \tl_new:n \l lipsum_sentences_tl 9

(End definition for \l lipsum_sentences_tl.) \l lipsum_sentences_seq In this sequence, the sentence list is stored. 31 \seq_new:n \l lipsum_sentences_seq (End definition for \l lipsum_sentences_seq.) \l lipsum_par_list_start_nostar_tl \l lipsum_par_list_end_nostar_tl \l lipsum_sentence_list_start_nostar_tl \l lipsum_sentence_list_end_nostar_tl \l lipsum_par_list_start_star_tl \l lipsum_par_list_end_star_tl \l lipsum_sentence_star_list_start_tl \l lipsum_sentence_star_list_end_tl Next are the variables used to store the tokens between the list items for lists of paragraph and lists of sentences. 32 \tl_new:n \l lipsum_par_list_start_nostar_tl 33 \tl_new:n \l lipsum_par_list_end_nostar_tl 34 \tl_new:n \l lipsum_sentence_list_start_nostar_tl 35 \tl_new:n \l lipsum_sentence_list_end_nostar_tl 36 37 \tl_new:n \l lipsum_par_list_start_star_tl 38 \tl_new:n \l lipsum_par_list_end_star_tl 39 \tl_new:n \l lipsum_sentence_list_start_star_tl 40 \tl_new:n \l lipsum_sentence_list_end_star_tl (End definition for \l lipsum_par_list_start_nostar_tl and others.) \l lipsum_par_list_itemseparator_nostar_tl \l lipsum_sentence_list_itemseparator_nostar_tl \l lipsum_par_list_itemseparator_star_tl \l lipsum_sentence_list_itemseparator_star_tl The variables to store the tokens that separate the single items of the paragraph or sentence list. 41 \tl_new:n \l lipsum_par_list_itemseparator_nostar_tl 42 \tl_new:n \l lipsum_sentence_list_itemseparator_nostar_tl 43 44 \tl_new:n \l lipsum_par_list_itemseparator_star_tl 45 \tl_new:n \l lipsum_sentence_list_itemseparator_star_tl 46 (End definition for \l lipsum_par_list_itemseparator_nostar_tl and others.) \l lipsum_par_list_itemstart_nostar_tl \l lipsum_par_list_itemend_nostar_tl \l lipsum_sentence_list_itemstart_nostar_tl \l lipsum_sentence_list_itemend_nostar_tl \l lipsum_par_list_itemstart_star_tl \l lipsum_par_list_itemend_star_tl \l lipsum_sentence_list_itemstart_star_tl \l lipsum_sentence_list_itemend_star_tl The variables that surround each single item of a paragraph or sentence list. 47 \tl_new:n \l lipsum_par_list_itemstart_nostar_tl 48 \tl_new:n \l lipsum_par_list_itemend_nostar_tl 49 \tl_new:n \l lipsum_sentence_list_itemstart_nostar_tl 50 \tl_new:n \l lipsum_sentence_list_itemend_nostar_tl 51 52 \tl_new:n \l lipsum_par_list_itemstart_star_tl 53 \tl_new:n \l lipsum_par_list_itemend_star_tl 54 \tl_new:n \l lipsum_sentence_list_itemstart_star_tl 55 \tl_new:n \l lipsum_sentence_list_itemend_star_tl 56 (End definition for \l lipsum_par_list_itemstart_nostar_tl and others.) \l lipsum_par_list_start_tl \l lipsum_par_list_end_tl \l lipsum_sentence_list_start_tl \l lipsum_sentence_list_end_tl \l lipsum_par_list_itemseparator_tl \l lipsum_sentence_list_itemseparator_tl \l lipsum_par_list_itemstart_tl \l lipsum_par_list_itemend_tl \l lipsum_sentence_list_itemstart_tl \l lipsum_sentence_list_itemend_tl These variables store a copy of either the \ name _star_tl or \ name _nostar_tl, depending on whether the calling function was called with or without a star. The content of these variables is then used by the functions that generate the Lorem ipsum... list. 57 \tl_new:n\l lipsum_par_list_start_tl 58 \tl_new:n\l lipsum_par_list_end_tl 59 \tl_new:n\l lipsum_sentence_list_start_tl 60 \tl_new:n\l lipsum_sentence_list_end_tl 61 \tl_new:n\l lipsum_par_list_itemseparator_tl 62 \tl_new:n\l lipsum_sentence_list_itemseparator_tl 63 \tl_new:n\l lipsum_par_list_itemstart_tl 64 \tl_new:n\l lipsum_par_list_itemend_tl 65 \tl_new:n\l lipsum_sentence_list_itemstart_tl 66 \tl_new:n\l lipsum_sentence_list_itemend_tl (End definition for \l lipsum_par_list_start_tl and others.) 10

\g lipsum_text_str Holds the current text loaded for the output of \lipsum and friends. Used to avoid loading the same text definition if it is already used. 67 \str_new:n\g lipsum_text_str (End definition for \g lipsum_text_str.) 6.4 Developer interface \lipsum_store_as_temp_ints:nn \lipsum_store_as_temp_ints:nn{ number 1 }{ number 2 } #1 : A number. #2 : A number or -NoValue- as produced by the argument processing of xparse. Stores number 1 in \l_tmpa_int. If number 2 is -NoValue-, stores number 1 in \l_tmpb_int, otherwise stores number 2 in \l_tmpb_int. 68 \cs_new:npn \lipsum_store_as_temp_ints:nn #1#2{ 69 \int_set:nn\l_tmpa_int{#1} 70 \IfNoValueTF{#2} 71 { 72 \int_set:nn\l_tmpb_int{#1} 73 } 74 { 75 \int_set:nn\l_tmpb_int{#2} 76 } 77 } \lipsum_get_non_terminated_par:n \lipsum_get_terminated_par:n \lipsum_get_non_terminated_par:n { number } \lipsum_get_terminated_par:n { number } These two commands are used to retrieve paragraph number from the Lorem ipsum... dummy text. \lipsum_get_terminated_- par:n additionally adds \par. The single paragraphs are stored as constant token lists. \tl_use:c is used to construct a command sequence from c_lipsum_par_, _tl and the number. This is different from versions prior to v2.0, where the paragraphs were stored in \lipsum@i, \lipsum@ii,.... 78 \cs_new:npn \lipsum_get_non_terminated_par:n #1{ 79 \seq_item:nn \g_lipsum_paragraph_seq{#1} 80 } 81 82 \cs_new:npn \lipsum_get_terminated_par:n #1 { 83 \lipsum_get_non_terminated_par:n{#1}\par 84 } 85 11

\lipsum_add_to_tokenlist:n \lipsum_add_to_tokenlist:n{ number } Adds a paragraph item to the list of paragraphs (\l lipsum_- pars_tl) and surrounds it by the user-defined tokens. 86 \cs_new:npn \lipsum_add_to_tokenlist:n #1 { 87 \tl_put_right:nv 88 \l lipsum_pars_tl 89 \l lipsum_par_list_itemstart_tl 90 \tl_put_right:nn \l lipsum_pars_tl { 91 \lipsum_get_non_terminated_par:n{#1} 92 } 93 \tl_put_right:nv 94 \l lipsum_pars_tl 95 \l lipsum_par_list_itemend_tl 96 } 97 \cs_generate_variant:nn 98 \lipsum_add_to_tokenlist:n { V } \lipsum_range_to_tokenlist:vv \lipsum_range_to_tokenlist:vv{ number 1 }{ number 2 } Adds the paragraphs specified by number 1 to number 2 to the token list \l lipsum_pars_tl. 99 \cs_new:npn \lipsum_range_to_tokenlist:nn #1#2 { 100 \tl_clear:n \l lipsum_pars_tl 101 \tl_put_right:nv 102 \l lipsum_pars_tl 103 \l lipsum_par_list_start_tl 104 \int_set:nn \l_tmpa_int {#1} 105 \int_do_until:nnnn 106 {\l_tmpa_int} > {#2} 107 { 108 \int_compare:nnnt 109 \l_tmpa_int > {#1} 110 { 111 \tl_put_right:nv 112 \l lipsum_pars_tl 113 \l lipsum_par_list_itemseparator_tl 114 } 115 \lipsum_add_to_tokenlist:v {\l_tmpa_int} 116 \int_incr:n\l_tmpa_int 117 } 118 \tl_put_right:nv 119 \l lipsum_pars_tl 120 \l lipsum_par_list_end_tl 121 } 122 \cs_generate_variant:nn 123 \lipsum_range_to_tokenlist:nn { VV } 124 % \ lipsum_expanded_paragraphs_terminated_with_space: To be able to parse the list of paragraphs into a list of sentences, we need a list with defined tokens in between. This is stored locally in this macro. 125 \cs_new_nopar:nn 126 \ lipsum_expanded_paragraphs_terminated_with_space:{} 12

\lipsum_sentences_to_tokenlist:vv \lipsum_sentences_to_tokenlist:vv{ number 1 }{ number 2 } Puts the sentences specified by sentence range from the paragraphs specified by paragraph range on the token list \l - lipsum_sentences_tl and surrounds the tokens set by the user. 127 % 128 \cs_new:npn \lipsum_sentences_to_tokenlist:nnn #1#2#3{ Now, we only need to put the sentences within sentence range into \l lipsum_sentences_tl. First we clear the token list. 129 130 \tl_clear:n \l lipsum_sentences_tl 131 Using a regexp turned out to be rather slow for large paragraph range s. Thus, I use a loop similar to the one used by \clist_- item:nn. Since it might be that the sentence range specifies a range not within the number of sentences in the paragraphs, an end has to be indicated. Since empty elements cannot occur,.. can be used as end element. 132 \int_compare:nt {#2 >= #1} 133 { 134 \ lipsum_put_sentence_on_tokenlist:nnnw 135 {#1} 136 {#2} 137 {1} 138 #3.. \q_stop 139 } 140 \tl_put_left:nv 141 \l lipsum_sentences_tl 142 \l lipsum_sentence_list_start_tl 143 \tl_put_right:nv 144 \l lipsum_sentences_tl 145 \l lipsum_sentence_list_end_tl 146 } 147 \cs_generate_variant:nn 148 \lipsum_sentences_to_tokenlist:nnn { VVf } 13

\ lipsum_put_sentence_on_tokenlist:nnnw \ lipsum_put_sentence_on_- tokenlist:nnnw{ start }{ end }{ current }{ sentences tl } #1 : Start number of the range to be selected. #2 : End number of the range to be selected. #3 : the loop counter indicating the current item. #4 : The token list containing the (remaining) sentences. The implementation is quite simple: If sentences tl is empty, gobble the remaining list ans stop. Otherwise, test if start > end, gobble the remaining list and stop. If current > end, gobble the remaining list and stop, otherwise repeat loop with increased loop counter current. Before repeating, test if current >= start and put the current sentence to the token list. It seems that there is no official test for an empty argument ( sentences tl needs to be tested), but the internals of \tl_if_blank provide this, more or less. 149 150 \cs_new:npn 151 \ lipsum_put_sentence_on_tokenlist:nnnw 152 #1#2#3#4. 153 { 154 \int_compare:nnntf{#1} > {#2} 155 { % start > end: leave loop 156 \use_none_delimit_by_q_stop:w 157 } 158 { % start <= end: perform loop 159 \tl_if_blank:otf{#4} 160 { % Argument #4 blank. 161 % Should be from the.. in the calling macro. 162 % End reached. Leave loop. 163 \use_none_delimit_by_q_stop:w 164 } 165 { % Not yet list end 166 \int_compare:nnntf{#3} > {#2} 167 { % Counter > End: Leave loop 168 \use_none_delimit_by_q_stop:w 169 } 170 { % Counter <= End: Proceed 171 \int_compare:nt{ #3 >= #1} 172 { % Counter >= Start: Put item on list 173 \int_compare:nnnt{#3}>{#1} 174 { % Counter < Start, insert separator 175 \tl_put_right:nv 176 \l lipsum_sentences_tl 177 \l lipsum_sentence_list_itemseparator_tl 178 } % End Counter < Start true 179 % Put item on list 180 \tl_put_right:nv 181 \l lipsum_sentences_tl 182 \l lipsum_sentence_list_itemstart_tl 183 \tl_put_right:no 184 \l lipsum_sentences_tl 185 { \tl_trim_spaces:n{#4}. } 186 \tl_put_right:nv 187 \l lipsum_sentences_tl 188 \l lipsum_sentence_list_itemend_tl 189 } % End Counter >= Start: Put item on list 190 % Call loop again 191 \exp_args:nnnf 192 \ lipsum_put_sentence_on_tokenlist:nnnw 193 {#1} 194 {#2} 195 { \int_eval:n{#3+1} } 196 } % End Counter > Start: Proceed 197 } % End Not yet 14 list end 198 } % End Start > End: Perform loop 199 } % End definition

\ lipsum_protect:n Internal command for the user-level \LipsumProtect. Currently, a single \tex_noexpand:d is sufficient to prevent expansion, but in future implementations this might change. 200 \cs_new:npn \ lipsum_protect:n #1 {\tex_noexpand:d#1} \ lipsum_set_surrounding_tokens_star: \_set_surrounding_tokens_star: These commands copy the user-defined tokens to the token lists used by the commands that compose the list of paragraphs or sentences. Here for calls of the starred versions \lipsum* and \unpacklipsum*. 201 \cs_new:npn \ lipsum_set_surrounding_tokens_star: 202 { 203 \tl_set_eq:nn 204 \l lipsum_par_list_start_tl 205 \l lipsum_par_list_start_star_tl 206 \tl_set_eq:nn 207 \l lipsum_par_list_end_tl 208 \l lipsum_par_list_end_star_tl 209 \tl_set_eq:nn 210 \l lipsum_par_list_itemseparator_tl 211 \l lipsum_par_list_itemseparator_star_tl 212 \tl_set_eq:nn 213 \l lipsum_par_list_itemstart_tl 214 \l lipsum_par_list_itemstart_star_tl 215 \tl_set_eq:nn 216 \l lipsum_par_list_itemend_tl 217 \l lipsum_par_list_itemend_star_tl 218 219 \tl_set_eq:nn 220 \l lipsum_sentence_list_start_tl 221 \l lipsum_sentence_list_start_star_tl 222 \tl_set_eq:nn 223 \l lipsum_sentence_list_end_tl 224 \l lipsum_sentence_list_end_star_tl 225 \tl_set_eq:nn 226 \l lipsum_sentence_list_itemseparator_tl 227 \l lipsum_sentence_list_itemseparator_star_tl 228 \tl_set_eq:nn 229 \l lipsum_sentence_list_itemstart_tl 230 \l lipsum_sentence_list_itemstart_star_tl 231 \tl_set_eq:nn 232 \l lipsum_sentence_list_itemend_tl 233 \l lipsum_sentence_list_itemend_star_tl 234 } 15

\ lipsum_set_surrounding_tokens_nostar: \ lipsum_set_surrounding_tokens_nostar: As \ lipsum_set_surrounding_tokens_star:, but for calls of the non-starred version of \lipsum and \unpacklipsum. 235 \cs_new:npn \ lipsum_set_surrounding_tokens_nostar: 236 { 237 \tl_set_eq:nn 238 \l lipsum_par_list_start_tl 239 \l lipsum_par_list_start_nostar_tl 240 \tl_set_eq:nn 241 \l lipsum_par_list_end_tl 242 \l lipsum_par_list_end_nostar_tl 243 \tl_set_eq:nn 244 \l lipsum_par_list_itemseparator_tl 245 \l lipsum_par_list_itemseparator_nostar_tl 246 \tl_set_eq:nn 247 \l lipsum_par_list_itemstart_tl 248 \l lipsum_par_list_itemstart_nostar_tl 249 \tl_set_eq:nn 250 \l lipsum_par_list_itemend_tl 251 \l lipsum_par_list_itemend_nostar_tl 252 253 \tl_set_eq:nn 254 \l lipsum_sentence_list_start_tl 255 \l lipsum_sentence_list_start_nostar_tl 256 \tl_set_eq:nn 257 \l lipsum_sentence_list_end_tl 258 \l lipsum_sentence_list_end_nostar_tl 259 \tl_set_eq:nn 260 \l lipsum_sentence_list_itemseparator_tl 261 \l lipsum_sentence_list_itemseparator_nostar_tl 262 \tl_set_eq:nn 263 \l lipsum_sentence_list_itemstart_tl 264 \l lipsum_sentence_list_itemstart_nostar_tl 265 \tl_set_eq:nn 266 \l lipsum_sentence_list_itemend_tl 267 \l lipsum_sentence_list_itemend_nostar_tl 268 269 } \ lipsum_ensure_parsable_output: \NewLipsumPar \ lipsum_ensure_parsable_output: To ensure that the list of paragraphs can be parsed into a list of sentences, the tokens between the single item s have to macth a pre-defined pattern. This commands sets the tokens accordingly. 270 \cs_new:nn \ lipsum_ensure_parsable_output: 271 { 272 \tl_set:no 273 \l lipsum_par_list_itemseparator_tl{\space} 274 \tl_set:no 275 \l lipsum_par_list_item_start_tl{} 276 \tl_set:no 277 \l lipsum_par_list_item_end_tl{} 278 \tl_set:no 279 \l lipsum_par_list_start_tl{} 280 \tl_set:no 281 \l lipsum_par_list_end_tl{} 282 } 6.5 User- and developer-level commands Developer-Level macro to add a paragraph to the dummy text used by \lipsum and related commands. To specify a new dummy text, 16

see section 5.2. \NewLipsumPar{ content } #1 : The content of the paragraph. In contrast to previous versions, lipsum2.0 does not store a macro that is typeset at the end of the paragraph. Implemented as follows: 283 284 \NewDocumentCommand\NewLipsumPar{m}{ 285 \seq_gput_right:nn{\g_lipsum_paragraph_seq}{#1} 286 } (End definition for \NewLipsumPar. This function is documented on page??.) \LipsumPar Macro to typeset a single paragraph of Lorem ipsum... Was not officially available in version prior to 2.0. \LipsumPar{ number } #1 : Number of the paragraph to typeset. Implemented as follows: 287 \NewDocumentCommand\LipsumPar{m}{ 288 \group_begin: 289 \lipsum_get_terminated_par:n{#1} 290 \group_end: 291 } (End definition for \LipsumPar. This function is documented on page??.) 6.6 Tokens surrounding the Lorem ipsum... content \SetLipsumParListStart \SetLipsumParListStart* \SetLipsumSentenceListStart \SetLipsumSentenceListStart* \SetLipsumParListStart{ tokens } \SetLipsumParListStart*{ tokens } \SetLipsumSentenceListStart{ tokens } \SetLipsumSentenceListStart*{ tokens } #1 : tokens to be inserted at the beginning of the paragraph or sentence list. 292 \NewDocumentCommand\SetLipsumParListStart{s+m}{ 293 \IfBooleanTF{#1} 294 { 295 \tl_set:no\l lipsum_par_list_start_star_tl{#2} 296 } 297 { 298 \tl_set:no\l lipsum_par_list_start_nostar_tl{#2} 299 } 300 } 301 \NewDocumentCommand\SetLipsumSentenceListStart{s+m}{ 302 \IfBooleanTF{#1} 303 { 304 \tl_set:no\l lipsum_sentence_list_start_star_tl{#2} 305 } 306 { 307 \tl_set:no\l lipsum_sentence_list_start_nostar_tl{#2} 308 } 309 } (End definition for \SetLipsumParListStart and others. These functions are documented on page??.) \SetLispumParListEnd \SetLispumParListEnd* \SetLispumSentenceListEnd \SetLispumSentenceListEnd* \SetLispumParListEnd{ tokens } \SetLispumParListEnd*{ tokens } \SetLispumSentenceListEnd{ tokens } \SetLispumSentenceListEnd*{ tokens } 17

#1 : tokens to be inserted after the paragraph or sentence list. Accepts long arguments. 310 \NewDocumentCommand\SetLipsumParListEnd{s+m}{ 311 \IfBooleanTF{#1} 312 { 313 \tl_set:no\l lipsum_par_list_end_star_tl{#2} 314 } 315 { 316 \tl_set:no\l lipsum_par_list_end_nostar_tl{#2} 317 } 318 } 319 \NewDocumentCommand\SetLipsumSentenceListEnd{s+m}{ 320 \IfBooleanTF{#1} 321 { 322 \tl_set:no\l lipsum_sentence_list_end_star_tl{#2} 323 } 324 { 325 \tl_set:no\l lipsum_sentence_list_end_nostar_tl{#2} 326 } 327 } (End definition for \SetLispumParListEnd and others. documented on page??.) These functions are \SetLipsumParListSurrounders \SetLipsumParListSurrounders* \SetLipsumSentenceListSurrounders \SetLipsumSentenceListSurrounders* These macros are short-hands for setting the start and end tokens surrounding a paragraph or sentence list. \SetLipsumParListSurrounders{ start }{ end } \SetLipsumParListSurrounders*{ start }{ end } \SetLipsumSentenceListSurrounders{ start }{ end } \SetLipsumSentenceListSurrounders*{ start }{ end } #1 : start -tokens to be inserted at the beginning of the paragraph or sentence list. Can be empty and accepts \long arguments, thus, accepts \par. #2 : end -tokens to be inserted at the beginning of the paragraph or sentence list. Can be empty and accepts \long arguments, thus, accepts \par. 328 \NewDocumentCommand\SetLipsumParListSurrounders{s+m+m}{ 329 \IfBooleanTF{#1} 330 { 331 \SetLipsumParListStart*{#2} 332 \SetLipsumParListEnd*{#3} 333 } 334 { 335 \SetLipsumParListStart{#2} 336 \SetLipsumParListEnd{#3} 337 } 338 } 339 \NewDocumentCommand\SetLipsumSentenceListSurrounders{s+m+m}{ 340 \IfBooleanTF{#1} 341 { 342 \SetLipsumSentenceListStart*{#2} 343 \SetLipsumSentenceListEnd*{#3} 344 } 345 { 346 \SetLipsumSentenceListStart{#2} 347 \SetLipsumSentenceListEnd{#3} 348 } 349 } (End definition for \SetLipsumParListSurrounders and others. These functions are documented on page??.) 18

\SetLipsumParListItemStart \SetLipsumParListItemStart* \SetLipsumSentenceListItemStart \SetLipsumSentenceListItemStart* \SetLipsumParListItemStart{ tokens } \SetLipsumParListItemStart*{ tokens } \SetLipsumSentenceListItemStart{ tokens } \SetLipsumSentenceListItemStart*{ tokens } #1 : tokens inserted before every item in the paragraph or sentence list. Can be \long. 350 \NewDocumentCommand\SetLipsumParListItemStart{s+m}{ 351 \IfBooleanTF{#1} 352 { 353 \tl_set:no 354 \l lipsum_par_list_itemstart_star_tl{#2} 355 } 356 { 357 \tl_set:no 358 \l lipsum_par_list_itemstart_nostar_tl{#2} 359 } 360 } 361 \NewDocumentCommand\SetLipsumSentenceListItemStart{s+m}{ 362 \IfBooleanTF{#1} 363 { 364 \tl_set:no 365 \l lipsum_sentence_list_itemstart_star_tl {#2} 366 } 367 { 368 \tl_set:no 369 \l lipsum_sentence_list_itemstart_nostar_tl{#2} 370 } 371 } (End definition for \SetLipsumParListItemStart and others. These functions are documented on page??.) \SetLipsumParListItemEnd \SetLipsumParListItemEnd* \SetLipsumSentenceListItemEnd \SetLipsumSentenceListItemEnd* \SetLipsumParListItemEnd{ tokens } \SetLipsumParListItemEnd*{ tokens } \SetLipsumSentenceListItemEnd{ tokens } \SetLipsumSentenceListItemEnd*{ tokens } #1 : tokens inserted after every item in the paragraph or sentence list. Can be \long. 372 \NewDocumentCommand\SetLipsumParListItemEnd{s+m}{ 373 \IfBooleanTF{#1} 374 { 375 \tl_set:no 376 \l lipsum_par_list_itemend_star_tl{#2} 377 } 378 { 379 \tl_set:no 380 \l lipsum_par_list_itemend_nostar_tl{#2} 381 } 382 } 383 \NewDocumentCommand\SetLipsumSentenceListItemEnd{s+m}{ 384 \IfBooleanTF{#1} 385 { 386 \tl_set:no 387 \l lipsum_sentence_list_itemend_star_tl{#2} 388 } 389 { 390 \tl_set:no 391 \l lipsum_sentence_list_itemend_nostar_tl{#2} 392 } 393 } (End definition for \SetLipsumParListItemEnd and others. These functions are documented on page??.) 19

\SetLipsumParListItemSurrounders \SetLipsumParListItemSurrounders* \SetLipsumSentenceListItemSurrounders \SetLipsumSentenceListItemSurrounders* Short-hands for setting the token s surrounding a single list item. \SetLipsumParListItemSurrounders{ start }{ end } \SetLipsumParListItemSurrounders*{ start }{ end } \SetLipsumSentenceListItemSurrounders{ start }{ end } \SetLipsumSentenceListItemSurrounders*{ start }{ end } #1 : start -tokens inserted before each list item. #2 : end -tokens inserted after each list item. 394 \NewDocumentCommand\SetLipsumParListItemSurrounders{s+m+m}{ 395 \IfBooleanTF{#1} 396 { 397 \SetLipsumParListItemStart*{#2} 398 \SetLipsumParListItemEnd*{#3} 399 } 400 { 401 \SetLipsumParListItemStart{#2} 402 \SetLipsumParListItemEnd{#3} 403 } 404 } 405 406 \NewDocumentCommand\SetLipsumSentenceListItemSurrounders{s+m+m}{ 407 \IfBooleanTF{#1} 408 { 409 \SetLipsumSentenceListItemStart*{#2} 410 \SetLipsumSentenceListItemEnd*{#3} 411 } 412 { 413 \SetLipsumSentenceListItemStart{#2} 414 \SetLipsumSentenceListItemEnd{#3} 415 } 416 } (End definition for \SetLipsumParListItemSurrounders and others. functions are documented on page??.) These \SetLipsumParListItemSeparator \SetLipsumParListItemSeparator* \SetLipsumSentenceListItemSeparator \SetLipsumSentenceListItemSeparator* \SetLipsumParListItemSeparator{ tokens } \SetLipsumParListItemSeparator*{ tokens } \SetLipsumSentenceListItemSeparator{ tokens } \SetLipsumSentenceListItemSeparator*{ tokens } #1 : tokens to be inserted between two item s of a paragraph or sentence list. 417 \NewDocumentCommand\SetLipsumParListItemSeparator{s+m}{ 418 \IfBooleanTF{#1} 419 { 420 \tl_set:no 421 \l lipsum_par_list_itemseparator_star_tl{#2} 422 } 423 { 424 \tl_set:no 425 \l lipsum_par_list_itemseparator_nostar_tl{#2} 426 } 427 } 428 \NewDocumentCommand\SetLipsumSentenceListItemSeparator{s+m}{ 429 \IfBooleanTF{#1} 430 { 431 \tl_set:no 432 \l lipsum_sentence_list_itemseparator_star_tl{#2} 433 } 434 { 435 \tl_set:no 436 \l lipsum_sentence_list_itemseparator_nostar_tl{#2} 437 } 438 } 20

(End definition for \SetLipsumParListItemSeparator and others. These functions are documented on page??.) \SetLipsumProtect \LipsumProtect{ tokens } Protects tokens from being expanded when processed by \unpacklipsum. 439 \NewDocumentCommand\LipsumProtect{m}{} 440 \cs_gset_eq:nn 441 \LipsumProtect 442 \ lipsum_protect:n 443 (End definition for \SetLipsumProtect. This function is documented on page??.) \SetLipsumDefault \setlipsumdefault Command to change the default range used by \lipsum and friends. Note that the use of \setlipsumdefault is considered deprecated starting from lipsum2.0. \SetLipsumDefault{ range } range Range to be used as default. Implemented as: 444 \NewDocumentCommand\SetLipsumDefault{m}{ 445 \tl_gset:no\g_lipsum_default_range_tl{#1} 446 } Implement \setlipsumdefault and mark it deprecated. 447 \NewDocumentCommand\setlipsumdefault{m}{% 448 \msg_warning:nnnn 449 {lipsum} 450 {DeprecatedCommand} 451 {\setlipsumdefault} 452 {\SetLipsumDefault} 453 \SetLipsumDefault{#1} 454 } (End definition for \SetLipsumDefault and \setlipsumdefault. These functions are documented on page??.) The following macros are considered to be user-level commands and thus all lower-case. \lipsum \lipsum* \lipsum[ paragraph range ][ sentence range ] \lipsum*[ paragraph range ][ sentence range ] #1 : Range-like string that specifies the number of the paragraphs taken from Lorem ipsum... If omitted, the value set by \SetLipsumDefault is used, which defaults to 1-7. this argument can not be empty if the second optional argument is provided. #2 : Sentences to be typeset from the range selected by paragraph range. If sentences outside the number of sentences in paragraph range are specified, only existing sentences are typeset. The difference between \lipsum and \lipsum* is the token(s) that are inserted after each paragraph (only if called without the second optional argument). 455 456 \NewDocumentCommand 457 \lipsum{ 458 s 459 >{\ lipsum_split_argument_expanded:nne{1}{-}} 460 O{\g_lipsum_default_range_tl} 461 >{\ lipsum_split_argument_expanded:nne{1}{-}} 21

462 o 463 } 464 { 465 \group_begin: 466 \lipsum_store_as_temp_ints:nn #2 467 \IfBooleanTF {#1} 468 { 469 \ lipsum_set_surrounding_tokens_star: 470 } 471 { 472 \ lipsum_set_surrounding_tokens_nostar: 473 } 474 475 \IfNoValueTF{#3} 476 { 477 \lipsum_range_to_tokenlist:vv 478 { \l_tmpa_int }{ \l_tmpb_int } 479 \tl_use:n \l lipsum_pars_tl 480 } 481 { 482 \ lipsum_ensure_parsable_output: 483 \lipsum_range_to_tokenlist:vv 484 { \l_tmpa_int }{ \l_tmpb_int } 485 \lipsum_store_as_temp_ints:nn #3 486 \cs_gset_nopar:nx 487 \ lipsum_expanded_paragraphs_terminated_with_space: 488 {\tl_use:n\l lipsum_pars_tl} 489 \lipsum_sentences_to_tokenlist:vvf 490 { \l_tmpa_int } 491 { \l_tmpb_int } 492 \ lipsum_expanded_paragraphs_terminated_with_space: 493 \tl_use:n \l lipsum_sentences_tl 494 } 495 \group_end: 496 } (End definition for \lipsum and \lipsum*. These functions are documented on page??.) \lipsumexp The following macros store their results in the macro \lipsumexp. I create it first using xparss before it is overwritten. Don t know if this makes sense. 497 \NewDocumentCommand\lipsumexp{}{} (End definition for \lipsumexp. This function is documented on page??.) \unpacklipsum \unpacklipsum* These two commands do the same as \lipsum and \lipsum*, but instead of typesetting the paragraphs or sentences, they store the expanded content in the macro \lipsumexp. If, for example by using the package option space or by using the \SetLipsum...List commands, the corresponding tokens between the single items of the list are expandable, they are expanded. If they arenot expandable, they are of course not. \unpacklipsum[ paragraph range ][ sentence range ] \unpacklipsum*[ paragraph range ][ sentence range ]... \lipsumexp 498 \cs_new:nn \ lipsum_expanded: {} 499 \NewDocumentCommand 500 \unpacklipsum 501 { 502 s 22