# Tag Info

5

Like this? \documentclass{article} \usepackage{pgffor} \usepackage{graphicx} \begin{document} \foreach \x in {a,b,c} { \begin{figure}[p] \includegraphics[scale=.5]{example-image-\x} \caption{So, three figures displayed, and this one has the number \x\ of the letter position (or iteration count)} % ie. 1 for a, 2 for b, 3 for c \end{figure} ...

8

Update I simplified the code using a \pic for the fundamental domain. For the color, I present three options: Randomly selecting shades of a fixed color (red, in my example), gives different coloring for each piece: \documentclass[tikz]{standalone} \usetikzlibrary{calc} \tikzset{ fundamental/.pic={ \draw[,scale=0.4,black,fill=red!\tmp,rotate ...

5

As a single path: \documentclass[tikz,border=5]{standalone} \begin{document} \tikz\draw (0,0) \foreach \i in {3,...,10} \foreach \j in {1,...,\i}{ -- ++(360/\i*\j:1) }; \end{document}

3

As I understand the question, all the polygons should have the same side and should sit on a common base. Here's how to easily do it. \Multipol{<number>} builds regular polygones of 3,4,...,<number> sides all sitting on a common base. The code: \documentclass[border=4pt]{standalone} \usepackage{tikz} \newcommand\polygon[2][]{ ...

0

A pstricks way, with the pst-poly package: \documentclass[x11names]{standalone} \usepackage{ pst-poly} \usepackage{auto-pst-pdf} \colorlet{color3}{DarkSeaGreen2} \colorlet{color4}{DarkSeaGreen3} \colorlet{color5}{DarkSeaGreen4} \colorlet{color6}{DarkSeaGreen4} \colorlet{color7}{DarkSeaGreen3} \colorlet{color8}{DarkSeaGreen2} \begin{document} ...

3

You can also do this very simply in plain Metapost. My poly_on routine will return the path of an n-sided polygon using the line between points a and b as a base. prologues := 3; outputtemplate := "%j%c.eps"; % return the path of a polygon with n sides % using points a and b as the base vardef poly_on(expr a,b,n) = save s,t,c; pair c; s = 360/n; ...

10

You could use the TikZ polygon shapes in a \foreach loop. Add color and styles as you like. Key points are regular polygon shape of the shapes.geometric library relative positioning of the positioning library remember the last node, using characters a, b, ... for node names using the south anchor for positioning and anchoring at the same base line ...

2

This is a halfway construction. \documentclass{beamer} \usepackage{xparse} \ExplSyntaxOn \def\addpause#1{\rotatebox{180}{$\mathord{}=#1$}\pause} \DeclareDocumentCommand\BeamerRep{>{\SplitList{=}}m}{ \edef\tempA{{\tl_reverse_items:n{#1}}} \expandafter\ProcessList\tempA{\addpause} } \ExplSyntaxOff \begin{document} \begin{frame}\Huge ...

1

Try this code. Instead of 5 put the max number of files you have. The optional argument allow you to input a particular file if you need. \documentclass{article} \usepackage{graphicx} \makeatletter \newcount\sk@vignette \newcommand*\vignette[1][]{\begingroup \ifx\@empty#1\@empty \global\advance\sk@vignette by\@ne\relax \else \sk@vignette=#1\relax ...

8

The definitions of \B and \C are the problem: \def\B{\advance\cnt@a by-1} \def\C{\ifnum\cnt@a>0} TeX does not stop at the end of the numbers, but continue expanding until it finds a token, which is not a digit, e.g.: \B1234\relax will decrease \cnt@a by -11234, not by -1. Or \B\C Then the \ifnum is executed before the counter is decreased. Both ...

2

How about this: \documentclass{article} \usepackage{forloop} \begin{document} \newcounter{i} \forloop{i}{1}{\value{i} < 4} { $\thei$ } \forloop{i}{1}{\value{i} < 4} { \roman{i} } \end{document}

Top 50 recent answers are included