Can someone suggest ways to add random references during the draft stage. The idea is to not get distracted to add references during the initial draft of the manuscript. I am looking for solutions like the lipsum package or the \blindtext command, which can fill in random references and not just words. Any help in this direction will be greatly appreciated.

For example,

this was done \lipsumrefs{4}. but xxxxx still needs to be done \lipsumrefs{2}

should produce an output similar to

this was done [1-4]. but xxxxx still needs to be done [5,6]


[1] loren ipsum 1

[2] loren ipsum 2

[3] loren ipsum 3

[4] loren ipsum 4

[5] loren ipsum 5

[6] loren ipsum 6

  • 1
    Welcome to TeX.SE! What is your goal exactly in having dummy references? Is it specifically for testing citation ranges? If so, why do you want to test this in the draft stage? If you just want to have a dummy citation marker, then maybe it is sufficient to use \cite{xyz}, which produces [?], or even type [1-4] literally, and replace it with the actual citation later. Or do you want to have a bibliography during the draft stage? If so, why? To see the formatting of entries? If so, why? Or just a list? Then you can use \nocite{*} with a random bibliography file. – Marijn Mar 12 '18 at 20:29
  • Your TeX distribution should contain xampl.bib which provides some dummy references for testing. – Nicola Talbot Mar 12 '18 at 20:54
  • @Marijn I want to use it for the same reason lipsum command is used. It should help me recognize that I need to fill stuff in there, with minimal effort during the writing process. I see the usage of \cite{xyz} but repeating it will be limiting. My thought can enable to get an idea of expected number of references for the manuscript in the draft process. Please let me know if you have any more ideas – TerminalBasher Mar 13 '18 at 3:25

The following code implements \lipsumrefs and \lipsumbib, similar to \cite and \bibliography. The idea is to keep a counter throughout the document to add references, and print a list in the end.


% counter for references in text
% print opening bracket
% argument = 1, print the counter
\ifnum#1=1 \thelpref\else%
% argument = 2, print the counter, a comma, increase the counter by 1, print the counter
\ifnum#1=2 \thelpref,\stepcounter{lpref}\thelpref\else%
% argument > 2, print the counter, a dash, increase by (argument-1), print the counter
\thelpref-\addtocounter{lpref}{\numexpr #1-1}\thelpref\fi%
% print closing bracket
% increase by one for next call
\section*{Lipsum references}
% counter for reference list
% print current item
[\thelpbib] Lorem ipsum \thelpbib\\
% increase list counter
% repeat loop if list counter smaller than reference counter
\ifnum \value{lpbib}<\value{lpref}
this was done \lipsumrefs{4}. but xxxxx still needs to be done \lipsumrefs{2}. and a single \lipsumrefs{1}


enter image description here

  • This is the closest answer I could have found. Thanks... I will surely make some tweaks to suit my application but this is great! – TerminalBasher Mar 13 '18 at 22:38

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.