Questions tagged [random]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
2answers
38 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
160 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
66 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 ...
2
votes
0answers
35 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
88 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
38 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
58 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
131 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
75 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
43 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
121 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
400 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
31 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
179 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
107 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 ...
9
votes
2answers
863 views

Randomly curved arrows in TikZ

Any suggestions on how to draw something like this picture using TikZ? Thanks!
1
vote
1answer
71 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
90 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
455 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
80 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
300 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
50 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
116 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
189 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 ...
2
votes
1answer
128 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
293 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 ...
36
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
53 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
185 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
57 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
165 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
706 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
212 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
246 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
457 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
183 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
254 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
136 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
230 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
440 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
137 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
250 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
183 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
180 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
86 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
676 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} \...