The tag has no usage guidance.

learn more… | top users | synonyms

11
votes
3answers
2k views

Generating random numbers without repetitions

How do I generate in LaTeX a list of random integers, in a given range, avoiding repetitions? The command \pgfmathrandomitem selects an item from a list, but when inserted in a loop can select twice ...
7
votes
2answers
657 views

creating a list of random numbers using a loop

I am trying to write a loop that will generate a set of random variables to be used in the probsoln package. I would like to make a loop to generate A, B, C, etc. This exam will have a lot of ...
10
votes
5answers
3k views

Randomised LaTeX based multiple choice test

I would like to create a multiple choice test with LaTeX. It has the following boundary conditions: 20 questions (q) per test . 20 students (s) take the test, the order of the question should be ...
3
votes
4answers
623 views

How to randomly extract some pages of a PDF file, sort their pages, and finally bundle them into a new PDF?

Some books in amazon.com have excerpts (first several pages plus appendixes) from which we can know their contents, layouts, etc roughly prior to purchasing. Statistically I think it will be better if ...
2
votes
0answers
115 views

How to draw a smooth random blob with TikZ? [duplicate]

How can I draw a smooth, "natural" looking blob with TikZ? My approach \begin{tikzpicture} \draw [] (0,0)node[circle,draw,decorate,decoration={random steps,segment length=.3cm,amplitude=1cm},rounded ...
10
votes
3answers
2k views

How to draw a rectangle filled with random size circular pattern?

I wish to generate a rectangle with circular features present within (to represent water particles), something like this: Which shows that the incoming radiation decreases with distance (as ...
6
votes
2answers
302 views

Random start of line

I would like to add a random white space at the begining of each line in a flushleft typeset paragraph. The idea is to simulate a hand-written manuscript. I thought I could do trick lineno package ...
49
votes
1answer
2k views

Toward a Stamper Package

Imagine that you want to simulate a hand stamp on every page in some large documents. It must be an imperfect print, with random page-to-page variations in ink intensity, fading, rotation and blur. ...
8
votes
2answers
1k views

Random shuffle itemize

Is there an environment (or macro for itemize) that shuffles all items randomly each time the pdf is generated?
5
votes
1answer
387 views

Prohibit see-through text with gibberish on backside of page?

I'd like to have the backside of my LaTeX pages printed with "gibberish" to prevent someone from holding the letter against a lamp and reading the see-through text. Kind of like the PIN letters have ...
24
votes
1answer
1k views

Watermark random location

I would like to add an artistic watermark image on every page, at a random location on each page. I am considering the eso-pic package, but am open to just about any suggestion. Does anyone have any ...
36
votes
4answers
4k views

tikz: Distribute evenly and randomly circles

I want to fill a part of a picture with more or less evenly and randomly distributed circles which should not overlap. It would be okay if circles are only partly inside the shape. The density should ...
5
votes
1answer
691 views

Tikz randomly placed groups of objects

I would like to place several groups of three objects (two circle paths and one node) in a triangular area. I came up with the following code, which is based on a subdivision of the triangle in ...
17
votes
2answers
862 views

Selecting random elements from a comma separated list

I would like to have a command (either user-defined, or from a package, or whatever) that has the basic form: \selectNrandom{N}{list, of, comma, separated, elements}{code to execute} which will ...
7
votes
1answer
238 views

Random coefficients in the polynom package?

I am using the probsoln package to generate random math quizzes. For polynomial division, I can generate random integer coefficients, but I had planned on using the polynom package to auto-generate ...
6
votes
1answer
982 views

How to randomize content with examdesign package using Sweave

Forgive me in advance if this is a dumb question, or too specific to one package. I've been using examdesign to randomize the order of questions, but I also want to randomly generate the content. I've ...
11
votes
3answers
767 views

\rand inside \forloop creates identical values

I try to create a table with random entries... By browsing the random tag, I found some help on random number generators and I tried using lcg. Surprisingly I seem to create the same random number ...
12
votes
2answers
818 views

How to include random images?

I'd like to make LaTeX pick one image file randomly from a series of eight images, and include it. I found that ''lcg'' package can generate random numbers: \usepackage{lcg} \reinitrand[counter=sec,...
10
votes
1answer
784 views

Accessing randomly selected problems via the probsoln package

I have two datasets, each containing problems dealing with a specific topic. These problems are stored in external files (again, one file per topic) and loaded into the datasets in a random order. I ...
14
votes
1answer
903 views

TikZ: decoration - random steps: how to get twice exactly the same shape?

I'm creating a beamer presentation, in which I use TikZ. I am making a figure, on which I would like to highlight something (using \only<> command). My figure contains an ellipse that is ...
11
votes
4answers
991 views

How to randomly shuffle a sliced image?

I have no idea to shuffle the following grids of a sliced image. How to do this in (La)TeX or PostScript level? \documentclass[pstricks,border=12pt]{standalone} \usepackage{multido} \usepackage{...
4
votes
1answer
178 views

Random scale of square makes a rectangle

Why does this code generates a rectangle, not a square? \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[scale=rnd] (0,0) rectangle (1,1); \end{tikzpicture}...
18
votes
2answers
1k views

Filling white space in title page with random numbers or a text

Is it possible to fill all white space in this template with numbers or a text? %---------------------------------------------------------------------------------------- % PACKAGES AND OTHER ...
9
votes
2answers
1k views

Automatically generated BINGO cards

I am trying to automatically generate a series of BINGO cards. So, I need a 5 x 5 table with square cells that allow text wrapping. I also want to randomly assign a word to each cell from a "bank" ...
4
votes
2answers
450 views

Banded matrix with random entries

What is the optimal way to get banded matrices with random entries in LaTeX? By random, I mean the following: It should give me different entries after every compilation.
10
votes
1answer
267 views

Table-aligned, randomized, repeatingly smaller icons for eyesight-chart

My daughter needs to train her eyesight in accordance to the LEA eyesight chart tests. I have manually created a new chart for her, but it really takes a long time randomzing the four icons and ...
6
votes
1answer
999 views

Generating a worksheet

My objective is to be able to generate worksheets in categories like: Laws of Indices Simultaneous Linear equations and Quadratic equations When I say generate is to generate for example 20 ...
9
votes
2answers
4k views

Defining variables in TikZ

I'm trying to define random variables - for example to draw some random points of the form (r,r) when r is a random number. I tried \def\myrandomnumber{rnd}, but that seems to give me a new random ...
4
votes
1answer
2k views

Creating random problems by using rand option

I would like to generate random questions based on a random integer input. I have tried he code from a site online and tweaked it so that it generates more than one random problem but evidently it ...
17
votes
2answers
2k views

Generate random numbers with a specific font

My objective is to create a table or some form of environment as shown in the figure below. The numbers should be randomly generated every time you compile and have the font shown below. Is ...
5
votes
1answer
2k views

Naming coordinates in a foreach loop

I have the following problem: I am using beamer together with tikz, and I want to use some random points in a drawing which is shown over a couple of slides. If I use the normal random method, the ...
10
votes
2answers
658 views

randomize the order of text lines in a .tex file

I need to create an environment (let's call it randomizer) that randomly changes the order of its lines, which may contain any text or latex commands (assume without verifying that they don't break ...
9
votes
1answer
1k views

Storing the result of a random number in tikzpicture

I am drawing a surface composed of rigid "molecules" composed of three spheres each. I want to add some randomness to the surface. I have created this code: \begin{tikzpicture} \def\nuPi{3.1459265} ...
6
votes
3answers
383 views

Random form letter text

I want to randomize some of the text contained within some letters. For e.g.: \random{Dear \name,}{Hello \name,}{Greetings \name,}{Hi \name,}{To \name,} \random{You are invited to}{You are welcome to}...
45
votes
2answers
3k views

The effect of the anonymous letter

I'm trying to create an effect as if the text is made up of letters cut from magazines and newspapers and even the same words had different style. It is necessary that each letter in the word had a ...
12
votes
7answers
4k views

How to create a random math problem in LaTeX?

I want to create a math problem-solution sheet. The coefficients a, b, c must be assigned on the fly at random so the generated pdf will show a numeric quadratic equation rather than a symbolic ...
11
votes
1answer
1k views

Conditional using non-integer numbers

I am trying to generate fractals using affine transformations. I need to generate a random number in the interval (0,1), and depending on the value of this random number choose a function to ...
3
votes
2answers
1k views

How to convert number to length?

I'm trying to generate a "word cloud" by using \mboxes with random spaces around words. In the code below I've removed stuff that change the font size, and I've replaced \mboxes by \frameboxes for ...