Questions tagged [random]

The tag has no usage guidance.

0
votes
0answers
16 views

using input to capture random questions in a folder

I have a directory with multiple questions, each question has a number, example, quest1 ... questn. Using random numbers I want to get the questions randomly, I'm using \input {} because the questions ...
0
votes
1answer
55 views

Does \pgfkeys{/pgf/fpu=false} work?

When I calculate very small numbers, I use the fpu package. But it seems \pgfkeys{/pgf/fpu=false} does not work. \documentclass[dvipdfmx]{article} % packages \usepackage{pgf} \usepackage{tikz} % ...
1
vote
0answers
38 views

Getting ABCD sequence of exercises with “esami” package

I am using exami package for a random choice of exercises in a list. I have a list of 4 different exercises A, B, C, D and the random choice can be something like D-B-C-B-A-C-B-A-D-A-D-B now I see ...
4
votes
1answer
73 views

Random Numbers and Variables in Latex

Below is my MWE. I understand the gist of tikz and foreachs, but when it comes to variables I don't understand most yet. I want an arrow pointing from each cell to a module, and them from the module ...
1
vote
0answers
36 views

How to add directories into build path for latex workshop vs code plugin?

I'm using latex workshop in VS code on Windows and I have the following issue. So I have my bibliography in ./bibliography folder, my figures in ./figures folder and styles in ./styles folder and all ...
0
votes
1answer
22 views

Random compile-time document style

I am trying to create a document class with random style attributes, determined at compilation time. Random attributes would ideally include: Margins Line spacing Font selection For my particular ...
1
vote
1answer
112 views

Combine tikz curve with random variation

I would like to combine a curve defined with \draw with a random variation along the path. So far I have found quite some interesting discussions on tex.SE like How to draw Brownian motions in tikz/...
1
vote
0answers
88 views

Is there a little randomization on TeX default font which is not present in LaTeX default font?

It's more pleasing to me to stare at this... ... than to stare at this... One time Knuth commented that he prefers fonts with a little randomization on their design (Knuth, D. E. (1979). ...
16
votes
2answers
1k views

Drawing a constant randomly distorted circle

I am trying to draw a special and contradictive plot : A circle with random distortions which have to remain constant regardless of how many times I build the document. An example of what I am trying ...
9
votes
2answers
785 views

Randomly curved arrows in TikZ

Any suggestions on how to draw something like this picture using TikZ? Thanks!
1
vote
1answer
44 views

How to fix an Answer Key code in a particular case of random answer exam? (See more)

The essentials of the code below have been suggested at link. As you can see, the command set to \ answerkey is working cumulatively. How to fix it? \documentclass{article} \usepackage{xparse,...
1
vote
1answer
57 views

Label an item of a 'randomized enumerate'

I got the following code from Random shuffle itemize. How to label (something like \label{1}, \ref{1}) a specific randomList item to print the corresponding letter at the end of the document? \...
7
votes
1answer
431 views

Drawing many random paths in TikZ

I'm trying to draw a diagram in TikZ that helps visually explain an analogy I'm trying to make in a paper. Basically, I want to start with a plane that contains many random paths of different lengths, ...
2
votes
2answers
60 views

“Esami” package: \randestrai and \sqrt not working together?

The \randestrai command from the "esami" package allows to define a set of elements to randomly choose within, such as a set of formulas. It works with formulas including latex commands inside, for ...
5
votes
2answers
277 views

Randomly choose a symbol each time the document compiles

I need to randomly change which symbol is attached to a particular command every time I compile my script. I had hoped that this would be possible using the pgffor package, as in the minimal example ...
1
vote
0answers
39 views

“Esami” package: random extraction from a set of elements?

I am trying to give randomness to a test with the "esami" package and the command "randestrai" was promising. I wanted to pick some random prime numbers so I wrote \randestrai{3,5,7,11}{alpha} which ...
1
vote
2answers
81 views

Generating random graphs with “esami” package

I want to display graphs with random variations using the variables in the esami package. I have tried with tikz but when I put the \FPsv inside the coordinate of a point I get lots of error messages. ...
6
votes
2answers
153 views

Drawing stones and pebbles under seafloor

in order to do some technical drawings, I intend to reproduced a (schematized) pebbled sea floor. I could manage to do a MWE, but this is as far as I can possibly get. \documentclass{article} \...
33
votes
3answers
1k views

How to create nice-looking nuclei in TikZ?

In the responses to Draw Bohr atomic model with electron shells in TeX?, there are nice drawings of atoms. However, the nuclei don't look very appealing or realistic. I was wondering: Can anyone ...
1
vote
1answer
85 views

Randomly distributed, randomly rotated and non-overlapping text

I am trying to generate a page with randomly distributed and randomly rotated text and the code here does the job well. But it causes overlapping of text (I am using devanagari alphabet --- there are ...
7
votes
3answers
213 views

Generate random color in way that works with both pdflatex and lualatex

Right now, I am generating a random color in pdftex using \definecolor{randomcolor}{RGB} { \pdfuniformdeviate 255, \pdfuniformdeviate 255, \pdfuniformdeviate 255 } Which works pretty ...
31
votes
2answers
3k views

Playing around with a Rubik's Cube in TikZ

My questions are: Is there a possibility to get a view of a Rubik's Cube in TikZ such as in pgfplots; like view={NUMBER1}{NUMBER2}? How can be the Rubik's Cube be scrambled with a number a, such that ...
1
vote
1answer
46 views

A random pattern with predefined style

I would like to create the following picture with TikZ. But I have no idea how to do this mathematically; for example, saying that if that condition is met, the rectangle, corresponding to the image, ...
1
vote
2answers
135 views

Help with writing base 10 addition/subtraction formula

I am preparing this small tutorial for addition and subtraction formulas for kids who have a strong understanding of base-10 representation and also have a good enough understanding of addition and ...
1
vote
1answer
52 views

How to randomise the order of macros?

I'm designing a questionnaire. I would like to do two things in particular in this design. I'm asking about both things in one question since I believe they are related: First, I would like to have a ...
5
votes
1answer
110 views

Randomly choosing preexisting nodes in tikz-pgf

Introduction I am trying to produce a figure illustrating multiple generations of a population in a version of the Wright-Fisher model. In this population generations are non-overlapping, each ...
4
votes
1answer
696 views

3.33333pt at the top of the document

I am currently attempting to write my first Latex document and having some issues with it. There is a weird 3.33333pt at the top of the document, as can be seen in the attached image, and it will not ...
3
votes
2answers
142 views

Duplicate irregular lines

I want to create two irregular lines, one on top of each other, that follow the same pattern. Following an answer from @vialrogo on the post Drawing randomly ragged lines in technical drawings I got ...
5
votes
1answer
241 views

How to randomly assign background picture in Beamer?

I am reading the presentation here where the background image changes in each slide. I am thinking how you can do it in Beamer. Pseudocode \documentclass{beamer} \usetheme{Berkeley} % TODO ...
9
votes
1answer
343 views

\tikz \draw[violet] (0,0) circle (rand+2) is an oval!

can someone please explain to me why I get an oval from this command? thanks. \documentclass[tikz, border=3mm]{standalone} \begin{document} \tikz \draw[violet] (0,0) circle (rand+2); \end{document}
3
votes
1answer
133 views

How to export the random text generated by lipsum to txt file?

I'm working on a project for words manipulation. I would like to take advantage of some Latex packages lipsum or blindtext to export the output to txt file. Is this task possible? Google failed me ...
1
vote
2answers
215 views

Comma separated number representation fed to latex math mode from \sage{}

I came across other tex questions where people asked ways to represent numbers in comma-separated format. That is writing 1234567 as 1,234,567. I need this while teaching addition/subtraction to my ...
3
votes
1answer
127 views

Randomly sampling a text file in a TeX document (specifically `exam`)

Is there a way to sample random items from a series of text files and include them in exam questions? Context I want to create vocab quizzes that comprise a random subset of the words the students ...
4
votes
1answer
779 views

Pgfplots: Generate points randomly

I have a very simple pgf plot, like this: \pgfmathdeclarefunction{gauss}{2}{% \pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}% } \begin{tikzpicture} \begin{axis}[ height=4cm, ...
3
votes
2answers
193 views

TikZ distinct random integers

I am trying to generate BINGO cards where but all the number in the card must be distinct. Here is what I got so far: \documentclass[a4paper]{article} \usepackage{xstring} \usepackage{tikz} \...
6
votes
6answers
388 views

How to write a macro that randomly chooses a word from a set of words? [duplicate]

I am currently working on a technical report using pdflatex and noticed that I overuse the term "w.r.t." (at least I wrote a command for it). Is there a way to write a macro that randomly chooses "x",...
6
votes
2answers
127 views

How to have a fixed value in a command

I have a command whose definition is given randomly. Every time I call it, it's redefined again, randomly. I'd like for it to be redefined only when I want it. The MWE is the following. Notice that ...
8
votes
2answers
224 views

OpenType 'rand' (Randomize) feature not correct implemented in XeTeX?

If XeLaTeX (v3.14159265-2.6-0.99996) compiles \documentclass{article} \usepackage{fontspec} \setmainfont[Letters=Random]{punknova-regular.otf} \begin{document} bananes et ananas \end{document} it ...
0
votes
1answer
140 views

Generating random uuid in xelatex [duplicate]

Is there a simple way to generate a unique identifier like random uuids in XeLaTeX with a package or a simple LaTeX script which does not need any external commands to execute?
2
votes
2answers
141 views

How to insert random quotes on empty pages

I am working on putting a book together. there are several places where I have empty pages as a result of new chapters. I would like to dress these pages up a bit by adding a quotation, but I would ...
2
votes
2answers
74 views

Random dots excluding certain values or range of values

I am able to generate the random dots, but how would I exclude specific values or range of values? For example, excluding 8 or excluding 10-20. \begin{pgfpicture} \foreach \x in {1,...,...
7
votes
2answers
609 views

Drawing percolation configuration with TikZ

I am trying to draw a site/bond percolation configuration. For the site percolation, which seem the easier one to draw, I was trying this probably too naive code: \documentclass{standalone} \...
1
vote
0answers
57 views

Fill column with random numbers using datatool and PGF

Consider the following csv file: column1,column2 line1, line2, I want to fill column2 with random numbers, preferably using PGF (simply because I already know a bit about PGF, but I am open to other ...
1
vote
0answers
107 views

Randomly generate pdf on website [closed]

I have created a latex file which creates a pdf by randomly selecting 10 subfiles from a pool of files. This works fine, and I am able to generate a random PDF every time I run my script. A breakdown ...
2
votes
0answers
47 views

Random imperfections simulating traditional print [duplicate]

Is there an easy way to accomplish something like this: I am aware this is scanned, what I want is the random ink distribution and character placement.
6
votes
2answers
408 views

How to randomize the order of (sub)sections?

How would you randomize the order of sections in a chapter (or subsection in a section)? I would type them in the order A, B, C, ..., but in the rendered document they should appear as 1=F, 2=Y, 3=C, ...
1
vote
1answer
87 views

Permuting an index list; and creating an index list of 0's and 1's

I want to run the steps of a loop in random order and also save the order in which the iterations were carried out: \documentclass[english]{article} \usepackage{tikz} \newcommand\...
6
votes
1answer
2k views

Random plot based on a specific random seed

I would like to draw a set of random functions f(x) from point A to point B with a fixed random seed for each function. In other words, I would like to have functions which look the same each time I ...
0
votes
1answer
234 views

Is possible get this image with tikz and random?

I don't know if is possible draw a picture like the next with tikz and some random related command:
5
votes
1answer
625 views

How to draw randomly spaced square wave

I am new to tikz and am not familiar with nomenclature so please excuse my raw expression here. I need to say a non-periodic square wave. I saw this post How to draw a square wave? which talks about ...