Questions tagged [random]
The random tag has no usage guidance.
104
questions
0
votes
0
answers
43
views
Producing Randomized 2-Color Identicons with Latex
Consider the code
\documentclass[12pt]{book}
\usepackage{xcolor}
\definecolor{azure}{RGB}{0,87,183}
\definecolor{yellow}{RGB}{255,215,0}
\begin{document}
\newcommand\ident[3][black]{\textcolor{#1}{\...
2
votes
1
answer
65
views
Random shuffle multiple choice questions and options
I have the following enumerate list
\begin{enumerate}
\item question 1
\begin{enumerate}
\item option 1
\item option 2
\item option 3
\item option 4
\end{...
5
votes
0
answers
101
views
Is there a way to randomize a Lindenmayersystem?
I'm trying to draw a classical Koch-Curve using the lindenmayersystem, but everytime a line segment is transformed there should be a 50/50 chance of it to be flipped left or right. The goal is to ...
1
vote
1
answer
110
views
Randomly sampling a subset of images without replacement from a larger list of images
I am trying to create a 10x10 matrix of external images, where the placement is a given image is random and the selection of images are randomly sampled from a larger set of images.
Specifically, I ...
4
votes
1
answer
185
views
randomly assigning objects to a grid using tikz
I am trying to create a 10x10 grid of circles and squares, in which the placement of objects is assigned at random.
For instance, the following code creates a 10x10 grid with 80% circles and 20% ...
1
vote
2
answers
30
views
How to stop Beamer \only overlay regenerating random parameters on parts of frame previously rendered
I have some lcg randomisation in a frame that uses \only. My problem is that the multiple PDF pages that are supposed to make the parts of the frame look like they are slowly appearing next to what ...
1
vote
1
answer
75
views
Animate Tikz image with random coordinates
I would like to do a Tikz image animation of growing lines with a certain randomness with regard to their initial rotation angle (and potentially also with a certain randomness in their initial x and ...
1
vote
2
answers
95
views
nested newcommand to create randomized test
Ok, so I have basically learned LaTex by reading some package manuals and finding answers to specific questions on this site. I have been creating randomized versions of written math exams using the ...
2
votes
1
answer
93
views
variable defined with a command (for exemple a random value) is not correctly stored in a lua list
I am writing random exercices for all students in a class, and i want to store the solutions to print them all at the end of the document (in final versions, each question will be printed in a ...
0
votes
0
answers
77
views
Generating random list
I have to prepare an exam for a large number of students which includes a multiple choice quiz. We do have an e-learning system that allows to manage online quizzes (we used it during the covid ...
3
votes
1
answer
154
views
Macros passed as arguments for randomizechoices does not work
This is a highly simplified version of a large work.
Please see the MWE given at the end. In the first case, when the macros are provided directly
as choices inside randomizechoices it works fine. ...
0
votes
1
answer
134
views
Randomly place images around the text programatically
Here in the MWE:
\documentclass[table]{standalone}
\usepackage{lipsum, graphicx, polyglossia, enumitem, amssymb, pifont, booktabs, cancel, animate, ulem, ragged2e}
\usepackage[most]{tcolorbox}
\...
1
vote
1
answer
124
views
How to use the same random number several times?
I'm using the xfp package to create a random number and defined the following command
\newcommand{\unif}{\fpeval{randint(1,10)}}
How can I assign a random number to a variable such that I can use ...
2
votes
0
answers
110
views
How to randomly replace text in an itemized list in ConTeXt?
I need to randomly replace text with clozes (a.k.a.) write-in-blanks.
I have been using the following code, which works okay in most situations. This randomly replaces words with blank lines, somewhat ...
1
vote
1
answer
70
views
How to randomise the order of items in a tasks environment?
I have set up a document with a structure like this
\documentclass[a4paper,12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{exsheets}
\usepackage{tasks}
\newcommand{\...
2
votes
1
answer
158
views
Randomly Shuffle Enumerated list using enumerate package
I am building a template for writing exams, and I'd like to randomly shuffle my enumerated lists at compile time. The answers to this question worked for that purpose, however I am using other ...
2
votes
0
answers
52
views
Line segments between rnd noisy plot and another function
I am trying to draw line segments between a smooth rnd noisy function (blue) and some other function (red) at given sample positions. However the random numbers change when I revaluate the function, ...
1
vote
2
answers
140
views
Place arcs and random values in tikz
I am making a figure representing a magnetic-core memory. First, I have difficulty in positioning the arcs that represent the electromagnetic currents. I made two tkzfigures and put the second one ...
1
vote
1
answer
101
views
Random changes after pause in Beamer
Working in Beamer I want to make a random construction and then after \pause (or using \onslide<>{}) add more information to the slide. The problem is that after the new text is undercover the ...
1
vote
1
answer
306
views
Shuffle questions in xsim
As said in the title, I want to shuffle questions while using xsim and tasks packages. Here is the code I took from multiple choice questions with correct choice environment which is written by @...
0
votes
1
answer
111
views
Making letters of a word appear in random order
The context is a kids game where a sequence of questions appear on screen, one at a time, and the answers appear gradually and randomly one letter at a time by the press of some button.
For example, ...
1
vote
1
answer
174
views
Randomly generate a book cover
In order to ensure consistency between the covers of the books in a series, it may be desirable to generate them all in the same way.
For example, this is what the Oxford University Press does.
Is ...
6
votes
2
answers
579
views
Randomized fonts for handwritten look
I created a Metafont font with a randomizer, such that each time I compile the font, it looks different. Using those fonts, I like to create handwritten looking parts in my document. I would like to ...
2
votes
2
answers
109
views
switch string/commands based on "random" values to produce random cards
Update
Or is there a way to generate random number between 1 and 52 using lcg package, then associate it to one of the 52 cards from the pst-poker package. Which might be easier to achieve?
OP
...
7
votes
1
answer
648
views
Aggregation states in Tikz: draw random circles and connect them randomly
Hey TeX Stackexchange!
I have have a problem with a \tikzpicture in my beamer presentation about nuclear fusion. I want to show a graphic with all four aggregation states including plasma as the ...
2
votes
2
answers
161
views
Random WordSpacing
for demonstration purposes I'd like to set a paragraph with random wordspacing. I tried to adapt the solution for the chtulhu question (https://tex.stackexchange.com/a/29458/9666) but actually I must ...
4
votes
2
answers
496
views
Random items from enumerate/itemize
If I have an itemize environment with 5 items and I would like to have the following effect:
Every time I compile, exactly 3 random non-repeating items are listed
in a random order.
Say my items ...
1
vote
2
answers
827
views
How to create a subtraction worksheet with random numbers in each question?
I would like to create a worksheet which looks like the following:
Here instead of manually typing every question, I would like to create random questions, where the subtrahend is from a set of ...
0
votes
2
answers
170
views
User-defined command that inserts random words
Is there a way to write a user-defined Latex command that takes no arguments and returns the nth string from a repository of strings?
baseball,marble,coin,watermelon,beachball
Johnny threw a \myWord{...
1
vote
1
answer
67
views
Random start of definition?
I'm currently writing my bachelor thesis and suddenly there's this random text "ärbung2.0.14" on the front page...I can't locate where its coming from. Does it look like its a counter for a definition ...
4
votes
2
answers
209
views
Random Double Arc Endpoint Angles
I am trying to add some randomness to a double arc using random steps. The top and bottom endpoints of the arc are not at the same angles as the same arc drawn normally.
\documentclass{article}
\...
0
votes
0
answers
26
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
1
answer
222
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
0
answers
68
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
1
answer
952
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
0
answers
2k
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
1
answer
71
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
1
answer
721
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
0
answers
202
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). ...
18
votes
2
answers
2k
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 ...
11
votes
2
answers
1k
views
Randomly curved arrows in TikZ
Any suggestions on how to draw something like this picture using TikZ?
Thanks!
1
vote
1
answer
377
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
1
answer
218
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
1
answer
632
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
2
answers
197
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
2
answers
523
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
0
answers
87
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 ...
2
votes
2
answers
392
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. ...
9
votes
2
answers
380
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}
\...
36
votes
3
answers
2k
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 ...