Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [random]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
36 views

Error with Latex , using Babel package and Randomizechoices package

I'm using the randomizechoices package to write a test. As shown in the following code. \documentclass[12pt,a4paper]{exam} \usepackage[spanish]{babel} \usepackage{exam-randomizechoices} \renewcommand{\...
Victor Perez's user avatar
7 votes
2 answers
300 views

Random sorting of text items

I would like to produce random texts in which some specific items would be sorted and printed in a random order, varying at each compilation. The intended purpose is to remove any hidden bias in the ...
Denis's user avatar
  • 5,277
2 votes
2 answers
174 views

Itemize a name list randomly several times throught the document

I have a list of names, say: \newcommand{\names}{Fred, Barry, Joe, Jack, Zach} and I just want to display the list in a randomized order a few times through my document. Something like: Barry, Zach,...
Andrew's user avatar
  • 63
4 votes
1 answer
160 views

How to include EPS in LuaLaTeX multiple times and have the postscript code run each time?

Ahoj, I have an .eps file that does some random number calculations in order to look different on each execution. Now I want to include it into a LuaLaTeX document several times, and each time it is ...
Golar Ramblar's user avatar
9 votes
2 answers
983 views

Is there an easier way to generate a multiplication table?

I am trying to find an easier way to generate randomised multiplication tables. I want to keep the formatting exactly as it is- with the table and the lines I have added- etc... Is there a more ...
user292225's user avatar
0 votes
0 answers
75 views

Get randomized lists with optionnal seed

I want to random some items in an exercise and be able to display the corresponding solutions in the same order. With xsim package such lists are in two different places so I thought about a first ...
Piroooh's user avatar
  • 1,207
2 votes
1 answer
712 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{...
ccleeba36's user avatar
5 votes
1 answer
143 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 ...
Stroebel's user avatar
1 vote
1 answer
185 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 ...
David's user avatar
  • 55
4 votes
1 answer
203 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% ...
David's user avatar
  • 55
1 vote
2 answers
35 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 ...
Peter Rowlett's user avatar
1 vote
1 answer
88 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 ...
LeonC's user avatar
  • 13
1 vote
2 answers
111 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 ...
LNBowman's user avatar
2 votes
1 answer
103 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 ...
mathteacher's user avatar
0 votes
0 answers
98 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 ...
Andrea Mori's user avatar
3 votes
1 answer
239 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. ...
Masroor's user avatar
  • 18k
0 votes
1 answer
189 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} \...
deshmukh's user avatar
  • 2,445
1 vote
1 answer
208 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 ...
Peter's user avatar
  • 11
2 votes
0 answers
124 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 ...
Village's user avatar
  • 13.3k
1 vote
1 answer
102 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{\...
dakralex's user avatar
2 votes
1 answer
322 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 ...
Shaun's user avatar
  • 75
2 votes
0 answers
54 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, ...
cwkx's user avatar
  • 21
1 vote
2 answers
149 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 ...
Cristian Koliver's user avatar
1 vote
1 answer
128 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 ...
Ozc's user avatar
  • 11
1 vote
1 answer
405 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 @...
Nguyễn Xuân Duy Bảo's user avatar
0 votes
1 answer
134 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, ...
Maesumi's user avatar
  • 9,139
1 vote
1 answer
235 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 ...
user avatar
6 votes
2 answers
863 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 ...
Niels Wer's user avatar
2 votes
2 answers
125 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 ...
CasperYC's user avatar
  • 697
7 votes
1 answer
809 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 ...
JonaSchwei01's user avatar
2 votes
2 answers
171 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 ...
schmendrich's user avatar
  • 3,908
4 votes
2 answers
769 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 ...
Zuriel's user avatar
  • 876
1 vote
2 answers
1k 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 ...
Zuriel's user avatar
  • 876
0 votes
2 answers
214 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{...
ignoramus's user avatar
1 vote
1 answer
71 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 ...
karah97's user avatar
  • 13
4 votes
2 answers
228 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} \...
anonymous_pigeon's user avatar
0 votes
0 answers
32 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 ...
Airton José Sachetim Garcia's user avatar
0 votes
1 answer
287 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} % ...
Takahiro Niwa's user avatar
1 vote
0 answers
83 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 ...
Marco Disce's user avatar
4 votes
1 answer
1k 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 ...
Rhynden's user avatar
  • 225
1 vote
0 answers
3k 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 ...
anon's user avatar
  • 11
0 votes
1 answer
91 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 ...
kyle's user avatar
  • 449
1 vote
1 answer
901 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/...
AndiW's user avatar
  • 786
1 vote
0 answers
237 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). ...
Joep Awinita's user avatar
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 ...
Thanos's user avatar
  • 12.5k
12 votes
2 answers
1k views

Randomly curved arrows in TikZ

Any suggestions on how to draw something like this picture using TikZ? Thanks!
sorciotto's user avatar
  • 147
1 vote
1 answer
422 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,...
FrozenCore's user avatar
1 vote
1 answer
256 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? \...
FrozenCore's user avatar
7 votes
1 answer
661 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, ...
solisoc's user avatar
  • 640
2 votes
2 answers
212 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 ...
Marco Disce's user avatar