Questions tagged [random]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
0answers
26 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
2answers
108 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
1answer
53 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 ...
0
votes
0answers
41 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
1answer
82 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, ...
0
votes
0answers
51 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
2answers
190 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
2answers
59 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
1answer
261 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
2answers
105 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
2answers
137 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
2answers
104 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
2answers
55 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
1answer
61 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
2answers
144 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
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
106 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
53 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
235 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
870 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
42 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
275 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
117 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
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 ...
10
votes
2answers
932 views

Randomly curved arrows in TikZ

Any suggestions on how to draw something like this picture using TikZ? Thanks!
1
vote
1answer
84 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
124 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
486 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
115 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
359 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
65 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
189 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. ...
8
votes
2answers
238 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
3answers
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
1answer
178 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
410 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
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
58 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
266 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
59 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
199 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
719 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
290 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
259 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
557 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}
4
votes
1answer
217 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
279 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
146 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
1k 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
313 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} \...