Questions tagged [random]
The random tag has no usage guidance.
98
questions
1
vote
1
answer
40
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
1
answer
46
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
58
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
35
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
71
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
66
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
68
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
103
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
53
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
73
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
36
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
130
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
64
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
200
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
93
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
131
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
395
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
88
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
484
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
148
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
319
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
472
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
118
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
64
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
179
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
20
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
178
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
61
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
586
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
52
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
561
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
158
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
317
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
178
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
572
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
176
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
470
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
83
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
2
answers
303
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
313
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}
\...
34
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 ...
2
votes
1
answer
327
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
3
answers
658
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 ...
37
votes
2
answers
4k
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
1
answer
75
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
2
answers
512
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
1
answer
69
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 ...