Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

To motivate my students to participate I have divided my class into teams. I want to randomly draw the name of a team to come to board. And of course I want to do it the hard way.

I want a PDF file with a list of names so that every time I click somewhere on it, it randomly pops some name up. With some pizzazz!

Is this possible? Can a PDF file have a random number generator embedded?

Edit:

What I need is a sample LaTeX file where a random number generator controls the appearance of the resulting PDF file every time a button on the PDF file is clicked.

In my application the fixed portion of output page may have a rectangular array or circular list of names. The animation could consist of highlighting different names/blocks in a random fashion until it stabilizes to a particular block.

share|improve this question

closed as unclear what you're asking by Svend Tveskæg, Peter Jansson, Jubobs, egreg, ChrisS Jan 18 at 0:35

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

3  
Only with JavaScript in PDF. That's doable with LaTeX, but not for the faint of heart. –  Martin Schröder Jan 17 at 21:46
    
Even with the revision, this seems highly dependent on the viewer as well as non-LaTeX-related content (JavaScript). –  Werner Jan 20 at 20:19
    
@Werner I noticed that many browser-based PDF readers do not work well with PDF files containing JavaScript, this includes Chrome and FireFox and Adobe Reader for Iphone. However Internet Explorer seems to work on my files. What is the learning path from LaTeX to LaTeX+JavaScript? I have seen this but not sure if that is a good start. –  Maesumi Jan 22 at 13:11
    
@Maesumi: AcroTeX's insdljs might be a start... –  Werner Jan 22 at 15:15

Browse other questions tagged or ask your own question.