One sentence of dummy text
up vote
7
down vote
favorite
I need to create just a specified number of sentences of dummy text (rather than a long paragraph). Can I use lipsum to do this? If not, then what can I use? The idea is to be able to create a MWE that doesn't contain a lot of distracting text in the source code, but allows me to use smaller numbers of sentences then I can get with lipsum[n].
lipsum
add a comment |
up vote
7
down vote
favorite
I need to create just a specified number of sentences of dummy text (rather than a long paragraph). Can I use lipsum to do this? If not, then what can I use? The idea is to be able to create a MWE that doesn't contain a lot of distracting text in the source code, but allows me to use smaller numbers of sentences then I can get with lipsum[n].
lipsum
1
Then what? What do you mean? If you need a more specific amount thanlipsum
orblindtext
orkantlipsum
provide, you can just write arbitrary text or copy the relevant amount of text from those packages.
– cfr
Jul 11 '15 at 20:26
3
you can use yourmylipsum
command:newcommand{mylipsum}{just dummy text}
– touhami
Jul 11 '15 at 20:36
add a comment |
up vote
7
down vote
favorite
up vote
7
down vote
favorite
I need to create just a specified number of sentences of dummy text (rather than a long paragraph). Can I use lipsum to do this? If not, then what can I use? The idea is to be able to create a MWE that doesn't contain a lot of distracting text in the source code, but allows me to use smaller numbers of sentences then I can get with lipsum[n].
lipsum
I need to create just a specified number of sentences of dummy text (rather than a long paragraph). Can I use lipsum to do this? If not, then what can I use? The idea is to be able to create a MWE that doesn't contain a lot of distracting text in the source code, but allows me to use smaller numbers of sentences then I can get with lipsum[n].
lipsum
lipsum
edited Jul 11 '15 at 21:19
asked Jul 11 '15 at 20:22
Ruby
4191416
4191416
1
Then what? What do you mean? If you need a more specific amount thanlipsum
orblindtext
orkantlipsum
provide, you can just write arbitrary text or copy the relevant amount of text from those packages.
– cfr
Jul 11 '15 at 20:26
3
you can use yourmylipsum
command:newcommand{mylipsum}{just dummy text}
– touhami
Jul 11 '15 at 20:36
add a comment |
1
Then what? What do you mean? If you need a more specific amount thanlipsum
orblindtext
orkantlipsum
provide, you can just write arbitrary text or copy the relevant amount of text from those packages.
– cfr
Jul 11 '15 at 20:26
3
you can use yourmylipsum
command:newcommand{mylipsum}{just dummy text}
– touhami
Jul 11 '15 at 20:36
1
1
Then what? What do you mean? If you need a more specific amount than
lipsum
or blindtext
or kantlipsum
provide, you can just write arbitrary text or copy the relevant amount of text from those packages.– cfr
Jul 11 '15 at 20:26
Then what? What do you mean? If you need a more specific amount than
lipsum
or blindtext
or kantlipsum
provide, you can just write arbitrary text or copy the relevant amount of text from those packages.– cfr
Jul 11 '15 at 20:26
3
3
you can use your
mylipsum
command: newcommand{mylipsum}{just dummy text}
– touhami
Jul 11 '15 at 20:36
you can use your
mylipsum
command: newcommand{mylipsum}{just dummy text}
– touhami
Jul 11 '15 at 20:36
add a comment |
4 Answers
4
active
oldest
votes
up vote
3
down vote
accepted
One can defines command mylipsum
newcommand{mylipsum}{just dummy text}
MWE
documentclass{article}
newcommand{mylipsum}{just dummy text}
newcommand{Mylipsum}{mylipsum{} mylipsum}
begin{document}
mylipsum
Mylipsum
end{document}
add a comment |
up vote
8
down vote
newcountzz
loop
Hello world.
advancezz1
ifnumzz<10
repeat
writes Hello world 10 times.
add a comment |
up vote
8
down vote
With some help from xparse
we can extract a rich supply of sentences from lipsum
; precisely 1498, I guess they're sufficient.
documentclass{article}
usepackage{lipsum}
usepackage{xparse}
% store a big set of sentences
unpacklipsum[1-100] % it was UnpackLipsum before version 2.0
ExplSyntaxOn
% unpack lipsumexp
seq_new:N g_lipsum_sentences_seq
cs_generate_variant:Nn seq_set_split:Nnn { NnV }
seq_gset_split:NnV g_lipsum_sentences_seq {.~} lipsumexp
NewDocumentCommand{lipsumsentence}{>{SplitArgument{1}{-}}O{1-7}}
{
lipsumsentenceaux #1
}
NewDocumentCommand{lipsumsentenceaux}{mm}
{
IfNoValueTF { #2 }
{
seq_item:Nn g_lipsum_sentences_seq { #1 }.~
}
{
int_step_inline:nnnn { #1 } { 1 } { #2 }
{
seq_item:Nn g_lipsum_sentences_seq { ##1 }.~
}
}
}
ExplSyntaxOff
begin{document}
section{Seven sentences}
lipsumsentence
section{Three sentences}
lipsumsentence[2-4]
section{Some single sentences}
lipsumsentence[1]
lipsumsentence[2]
lipsumsentence[3]
lipsumsentence[4]
lipsumsentence[5]
end{document}
The code no longer compiles becauseUnpackLipsum
has been deprecated.
– Troy
5 hours ago
@Troy Thanks, I updated
– egreg
5 hours ago
add a comment |
up vote
7
down vote
You can use a macro for the dummy text and a loop to repeat it, taking as an argument the number of repetitions. These commands work in any variety of TeX, but I illustrate their use in a LaTeX document.
documentclass{article}
% Define the dummy sentence, an ancient palindrome.
defsator{Sator Arepo tenet opera rotas.}
% Create a command to print the sentence repeatedly.
% Argument #1 is the number of times to repeat it.
newcountloopcounter
defdummysentences#1{%
loopcounter = #1
loop
sator %
advanceloopcounter by -1
ifnumloopcounter > 0
repeat%
}
begin{document}
sator
dummysentences{5}
begin{itemize}
item sator
item dummysentences{3}
item dummysentences{2}
end{itemize}
end{document}
See also my answer here: Is there a dummy package like Lipsum or Blindtext for Tables and Figures?
... and of course:defsator{noindentttfamily sator\ arepo\ tenet\ opera\ rotas}
.
– jon
Jul 11 '15 at 21:49
@jon See the commandsatorfig
from the package in the answer I link to. :)
– musarithmia
Jul 11 '15 at 22:06
add a comment |
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
One can defines command mylipsum
newcommand{mylipsum}{just dummy text}
MWE
documentclass{article}
newcommand{mylipsum}{just dummy text}
newcommand{Mylipsum}{mylipsum{} mylipsum}
begin{document}
mylipsum
Mylipsum
end{document}
add a comment |
up vote
3
down vote
accepted
One can defines command mylipsum
newcommand{mylipsum}{just dummy text}
MWE
documentclass{article}
newcommand{mylipsum}{just dummy text}
newcommand{Mylipsum}{mylipsum{} mylipsum}
begin{document}
mylipsum
Mylipsum
end{document}
add a comment |
up vote
3
down vote
accepted
up vote
3
down vote
accepted
One can defines command mylipsum
newcommand{mylipsum}{just dummy text}
MWE
documentclass{article}
newcommand{mylipsum}{just dummy text}
newcommand{Mylipsum}{mylipsum{} mylipsum}
begin{document}
mylipsum
Mylipsum
end{document}
One can defines command mylipsum
newcommand{mylipsum}{just dummy text}
MWE
documentclass{article}
newcommand{mylipsum}{just dummy text}
newcommand{Mylipsum}{mylipsum{} mylipsum}
begin{document}
mylipsum
Mylipsum
end{document}
answered Jul 11 '15 at 23:56
touhami
16.9k21145
16.9k21145
add a comment |
add a comment |
up vote
8
down vote
newcountzz
loop
Hello world.
advancezz1
ifnumzz<10
repeat
writes Hello world 10 times.
add a comment |
up vote
8
down vote
newcountzz
loop
Hello world.
advancezz1
ifnumzz<10
repeat
writes Hello world 10 times.
add a comment |
up vote
8
down vote
up vote
8
down vote
newcountzz
loop
Hello world.
advancezz1
ifnumzz<10
repeat
writes Hello world 10 times.
newcountzz
loop
Hello world.
advancezz1
ifnumzz<10
repeat
writes Hello world 10 times.
answered Jul 11 '15 at 20:38
David Carlisle
478k3811091841
478k3811091841
add a comment |
add a comment |
up vote
8
down vote
With some help from xparse
we can extract a rich supply of sentences from lipsum
; precisely 1498, I guess they're sufficient.
documentclass{article}
usepackage{lipsum}
usepackage{xparse}
% store a big set of sentences
unpacklipsum[1-100] % it was UnpackLipsum before version 2.0
ExplSyntaxOn
% unpack lipsumexp
seq_new:N g_lipsum_sentences_seq
cs_generate_variant:Nn seq_set_split:Nnn { NnV }
seq_gset_split:NnV g_lipsum_sentences_seq {.~} lipsumexp
NewDocumentCommand{lipsumsentence}{>{SplitArgument{1}{-}}O{1-7}}
{
lipsumsentenceaux #1
}
NewDocumentCommand{lipsumsentenceaux}{mm}
{
IfNoValueTF { #2 }
{
seq_item:Nn g_lipsum_sentences_seq { #1 }.~
}
{
int_step_inline:nnnn { #1 } { 1 } { #2 }
{
seq_item:Nn g_lipsum_sentences_seq { ##1 }.~
}
}
}
ExplSyntaxOff
begin{document}
section{Seven sentences}
lipsumsentence
section{Three sentences}
lipsumsentence[2-4]
section{Some single sentences}
lipsumsentence[1]
lipsumsentence[2]
lipsumsentence[3]
lipsumsentence[4]
lipsumsentence[5]
end{document}
The code no longer compiles becauseUnpackLipsum
has been deprecated.
– Troy
5 hours ago
@Troy Thanks, I updated
– egreg
5 hours ago
add a comment |
up vote
8
down vote
With some help from xparse
we can extract a rich supply of sentences from lipsum
; precisely 1498, I guess they're sufficient.
documentclass{article}
usepackage{lipsum}
usepackage{xparse}
% store a big set of sentences
unpacklipsum[1-100] % it was UnpackLipsum before version 2.0
ExplSyntaxOn
% unpack lipsumexp
seq_new:N g_lipsum_sentences_seq
cs_generate_variant:Nn seq_set_split:Nnn { NnV }
seq_gset_split:NnV g_lipsum_sentences_seq {.~} lipsumexp
NewDocumentCommand{lipsumsentence}{>{SplitArgument{1}{-}}O{1-7}}
{
lipsumsentenceaux #1
}
NewDocumentCommand{lipsumsentenceaux}{mm}
{
IfNoValueTF { #2 }
{
seq_item:Nn g_lipsum_sentences_seq { #1 }.~
}
{
int_step_inline:nnnn { #1 } { 1 } { #2 }
{
seq_item:Nn g_lipsum_sentences_seq { ##1 }.~
}
}
}
ExplSyntaxOff
begin{document}
section{Seven sentences}
lipsumsentence
section{Three sentences}
lipsumsentence[2-4]
section{Some single sentences}
lipsumsentence[1]
lipsumsentence[2]
lipsumsentence[3]
lipsumsentence[4]
lipsumsentence[5]
end{document}
The code no longer compiles becauseUnpackLipsum
has been deprecated.
– Troy
5 hours ago
@Troy Thanks, I updated
– egreg
5 hours ago
add a comment |
up vote
8
down vote
up vote
8
down vote
With some help from xparse
we can extract a rich supply of sentences from lipsum
; precisely 1498, I guess they're sufficient.
documentclass{article}
usepackage{lipsum}
usepackage{xparse}
% store a big set of sentences
unpacklipsum[1-100] % it was UnpackLipsum before version 2.0
ExplSyntaxOn
% unpack lipsumexp
seq_new:N g_lipsum_sentences_seq
cs_generate_variant:Nn seq_set_split:Nnn { NnV }
seq_gset_split:NnV g_lipsum_sentences_seq {.~} lipsumexp
NewDocumentCommand{lipsumsentence}{>{SplitArgument{1}{-}}O{1-7}}
{
lipsumsentenceaux #1
}
NewDocumentCommand{lipsumsentenceaux}{mm}
{
IfNoValueTF { #2 }
{
seq_item:Nn g_lipsum_sentences_seq { #1 }.~
}
{
int_step_inline:nnnn { #1 } { 1 } { #2 }
{
seq_item:Nn g_lipsum_sentences_seq { ##1 }.~
}
}
}
ExplSyntaxOff
begin{document}
section{Seven sentences}
lipsumsentence
section{Three sentences}
lipsumsentence[2-4]
section{Some single sentences}
lipsumsentence[1]
lipsumsentence[2]
lipsumsentence[3]
lipsumsentence[4]
lipsumsentence[5]
end{document}
With some help from xparse
we can extract a rich supply of sentences from lipsum
; precisely 1498, I guess they're sufficient.
documentclass{article}
usepackage{lipsum}
usepackage{xparse}
% store a big set of sentences
unpacklipsum[1-100] % it was UnpackLipsum before version 2.0
ExplSyntaxOn
% unpack lipsumexp
seq_new:N g_lipsum_sentences_seq
cs_generate_variant:Nn seq_set_split:Nnn { NnV }
seq_gset_split:NnV g_lipsum_sentences_seq {.~} lipsumexp
NewDocumentCommand{lipsumsentence}{>{SplitArgument{1}{-}}O{1-7}}
{
lipsumsentenceaux #1
}
NewDocumentCommand{lipsumsentenceaux}{mm}
{
IfNoValueTF { #2 }
{
seq_item:Nn g_lipsum_sentences_seq { #1 }.~
}
{
int_step_inline:nnnn { #1 } { 1 } { #2 }
{
seq_item:Nn g_lipsum_sentences_seq { ##1 }.~
}
}
}
ExplSyntaxOff
begin{document}
section{Seven sentences}
lipsumsentence
section{Three sentences}
lipsumsentence[2-4]
section{Some single sentences}
lipsumsentence[1]
lipsumsentence[2]
lipsumsentence[3]
lipsumsentence[4]
lipsumsentence[5]
end{document}
edited 5 hours ago
answered Jul 11 '15 at 20:42
egreg
701k8618653140
701k8618653140
The code no longer compiles becauseUnpackLipsum
has been deprecated.
– Troy
5 hours ago
@Troy Thanks, I updated
– egreg
5 hours ago
add a comment |
The code no longer compiles becauseUnpackLipsum
has been deprecated.
– Troy
5 hours ago
@Troy Thanks, I updated
– egreg
5 hours ago
The code no longer compiles because
UnpackLipsum
has been deprecated.– Troy
5 hours ago
The code no longer compiles because
UnpackLipsum
has been deprecated.– Troy
5 hours ago
@Troy Thanks, I updated
– egreg
5 hours ago
@Troy Thanks, I updated
– egreg
5 hours ago
add a comment |
up vote
7
down vote
You can use a macro for the dummy text and a loop to repeat it, taking as an argument the number of repetitions. These commands work in any variety of TeX, but I illustrate their use in a LaTeX document.
documentclass{article}
% Define the dummy sentence, an ancient palindrome.
defsator{Sator Arepo tenet opera rotas.}
% Create a command to print the sentence repeatedly.
% Argument #1 is the number of times to repeat it.
newcountloopcounter
defdummysentences#1{%
loopcounter = #1
loop
sator %
advanceloopcounter by -1
ifnumloopcounter > 0
repeat%
}
begin{document}
sator
dummysentences{5}
begin{itemize}
item sator
item dummysentences{3}
item dummysentences{2}
end{itemize}
end{document}
See also my answer here: Is there a dummy package like Lipsum or Blindtext for Tables and Figures?
... and of course:defsator{noindentttfamily sator\ arepo\ tenet\ opera\ rotas}
.
– jon
Jul 11 '15 at 21:49
@jon See the commandsatorfig
from the package in the answer I link to. :)
– musarithmia
Jul 11 '15 at 22:06
add a comment |
up vote
7
down vote
You can use a macro for the dummy text and a loop to repeat it, taking as an argument the number of repetitions. These commands work in any variety of TeX, but I illustrate their use in a LaTeX document.
documentclass{article}
% Define the dummy sentence, an ancient palindrome.
defsator{Sator Arepo tenet opera rotas.}
% Create a command to print the sentence repeatedly.
% Argument #1 is the number of times to repeat it.
newcountloopcounter
defdummysentences#1{%
loopcounter = #1
loop
sator %
advanceloopcounter by -1
ifnumloopcounter > 0
repeat%
}
begin{document}
sator
dummysentences{5}
begin{itemize}
item sator
item dummysentences{3}
item dummysentences{2}
end{itemize}
end{document}
See also my answer here: Is there a dummy package like Lipsum or Blindtext for Tables and Figures?
... and of course:defsator{noindentttfamily sator\ arepo\ tenet\ opera\ rotas}
.
– jon
Jul 11 '15 at 21:49
@jon See the commandsatorfig
from the package in the answer I link to. :)
– musarithmia
Jul 11 '15 at 22:06
add a comment |
up vote
7
down vote
up vote
7
down vote
You can use a macro for the dummy text and a loop to repeat it, taking as an argument the number of repetitions. These commands work in any variety of TeX, but I illustrate their use in a LaTeX document.
documentclass{article}
% Define the dummy sentence, an ancient palindrome.
defsator{Sator Arepo tenet opera rotas.}
% Create a command to print the sentence repeatedly.
% Argument #1 is the number of times to repeat it.
newcountloopcounter
defdummysentences#1{%
loopcounter = #1
loop
sator %
advanceloopcounter by -1
ifnumloopcounter > 0
repeat%
}
begin{document}
sator
dummysentences{5}
begin{itemize}
item sator
item dummysentences{3}
item dummysentences{2}
end{itemize}
end{document}
See also my answer here: Is there a dummy package like Lipsum or Blindtext for Tables and Figures?
You can use a macro for the dummy text and a loop to repeat it, taking as an argument the number of repetitions. These commands work in any variety of TeX, but I illustrate their use in a LaTeX document.
documentclass{article}
% Define the dummy sentence, an ancient palindrome.
defsator{Sator Arepo tenet opera rotas.}
% Create a command to print the sentence repeatedly.
% Argument #1 is the number of times to repeat it.
newcountloopcounter
defdummysentences#1{%
loopcounter = #1
loop
sator %
advanceloopcounter by -1
ifnumloopcounter > 0
repeat%
}
begin{document}
sator
dummysentences{5}
begin{itemize}
item sator
item dummysentences{3}
item dummysentences{2}
end{itemize}
end{document}
See also my answer here: Is there a dummy package like Lipsum or Blindtext for Tables and Figures?
edited Apr 13 '17 at 12:36
Community♦
1
1
answered Jul 11 '15 at 20:59
musarithmia
7,92421960
7,92421960
... and of course:defsator{noindentttfamily sator\ arepo\ tenet\ opera\ rotas}
.
– jon
Jul 11 '15 at 21:49
@jon See the commandsatorfig
from the package in the answer I link to. :)
– musarithmia
Jul 11 '15 at 22:06
add a comment |
... and of course:defsator{noindentttfamily sator\ arepo\ tenet\ opera\ rotas}
.
– jon
Jul 11 '15 at 21:49
@jon See the commandsatorfig
from the package in the answer I link to. :)
– musarithmia
Jul 11 '15 at 22:06
... and of course:
defsator{noindentttfamily sator\ arepo\ tenet\ opera\ rotas}
.– jon
Jul 11 '15 at 21:49
... and of course:
defsator{noindentttfamily sator\ arepo\ tenet\ opera\ rotas}
.– jon
Jul 11 '15 at 21:49
@jon See the command
satorfig
from the package in the answer I link to. :)– musarithmia
Jul 11 '15 at 22:06
@jon See the command
satorfig
from the package in the answer I link to. :)– musarithmia
Jul 11 '15 at 22:06
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f254901%2fone-sentence-of-dummy-text%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Then what? What do you mean? If you need a more specific amount than
lipsum
orblindtext
orkantlipsum
provide, you can just write arbitrary text or copy the relevant amount of text from those packages.– cfr
Jul 11 '15 at 20:26
3
you can use your
mylipsum
command:newcommand{mylipsum}{just dummy text}
– touhami
Jul 11 '15 at 20:36