1
vote
0answers
89 views

Dynamic programming of cheapest cost in LaTeX

From How can I automate the generation of this dynamic-programming graph?, Jubobs helped develop a foreach scheme to draw the paths. I was wondering if LaTeX can find the cheapest path by ...
4
votes
1answer
160 views

Tips for effective 3-dimensional authoring: tikz, animation, and text flow

I work hard these days on writing animated graphical beamer presentation, which sometimes contain over 100 slides. I find that I need to think across three interacting dimensions: The time ...
0
votes
0answers
29 views

Tikz \foreach: How to iterate over a list stored in a macro? [duplicate]

The title says it all. I would like to create a list in a macro, and then iterate over it using TikZ's \foreach macro. Alas, as usual, superimposition does not work here, as the following MWE shows. ...
1
vote
0answers
58 views

Is it possible to produce a context free grammar for Tikz path? node?

Even further, I would be happy to see a definition of the tikz language in the usual manner programming languages such as Java and Pascal are defined. The reason I ask is that I keep getting ...
5
votes
1answer
99 views

Tikz Procedure/Function like abstraction? [closed]

I am pretty new to tikz but, so I do understand the basics, however, I am truly confused on what's the best way to create a procedure like constructs: there seems to be so many mechanism, and I cannot ...
4
votes
2answers
148 views

Passing parameters to tikz picture?

I wrote a tikz diagram, which resides in its own dedicated file. I would like to include this file several times in my document, each time highlighting a different node in it. I tried defining a macro ...
30
votes
3answers
1k views

Programming Conway's Game of Life in LaTeX

My aim is to program Conway's Game of Life in LaTeX, and make the output into an animated PDF. I intend to use PGF/TikZ for this, especially pgfmath, but I'm stuck at the moment because I need to ...
5
votes
1answer
158 views

Special daily calendar for whole year needed

I need to print out a special daily calendar sheet for every day of 2014. The solution here: Page a day calendar problems no longer is available, the link to mattjy.me is dead. The whole daily sheet I ...
1
vote
0answers
33 views

Is there a way to use a previous TikZ picture? [duplicate]

Let's say I spend some time drawing this picture: And after a few paragraphs I want to draw the same picture plus some "spices". Of course I could just copy-and-paste the code, then edit the few ...
21
votes
3answers
497 views

Best way to illustrate Keplers 2nd law with tikz

I am trying to visualize Keplers second law of planetary motion with tikz. I managed to do the following: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} ...
4
votes
2answers
120 views

Can't generate a tikz matrix, using expl3

Suppose, I want to generate a matrix of nodes: \documentclass{article} \usepackage{expl3} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture} \matrix [ row ...
6
votes
3answers
336 views

How to use data structures in TikZ?

I created a foreach statement, using expl3 and TikZ/pgf: \documentclass{article} \usepackage{tikz} \setlength{\parindent}{0cm} \usepackage{expl3} \ExplSyntaxOn \cs_new:Npn \Counter #1 \Stopper { ...
3
votes
0answers
130 views

Optimizing tikz code for less redundancies [closed]

I don't use tikz very often. When I do, I'm usually pretty happy with the result (and with how useful that manual is). But I always think the code I produced to get there could be optimized, as in the ...
6
votes
1answer
269 views

How to define macros in a foreach loop with effects between iterations and after the loop without using global?

Without using \global, the following code: \documentclass{minimal} \usepackage[T1]{fontenc} \usepackage{tikz} \usepackage{etextools} \newcommand\appendbyforeach[2]{% ...
18
votes
2answers
1k views

Programming simple functions using TikZ arithmetic?

How do you do program simple functions using the TikZ arithmetic engine? I love the idea of using TikZ in order to “program” my pictures, being able to write code once and reuse, get precise ...
7
votes
2answers
258 views

how to test if tikz library is loaded

I want to write some demo code showing code with examples for tikz. However I want the resulting pdf to be automatically depended on the tikz libraries and therefore I must test which are loaded. Is ...
7
votes
1answer
227 views

Why do some arguments in a macro need to be preceded by \noexpand?

I keep on studying the use of nested tikzpicture environments (sorry) and I discover the next problem. I'm not sure but it sounds like a problem with "fragile" commands. Perhaps, the problem is the ...
12
votes
2answers
344 views

How to emulate some options of \node from TikZ

Code \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \foreach \a in {0,45,...,315}% {\node[line width = 0pt, rotate = \a, anchor = ...
6
votes
1answer
304 views

Problem with keys to emulate \rput with TikZ

This is a beta version of \rput with TikZ. I don't know if the psticks version accepts polar coordinates but I added this option. My problem is to add the options ref = B, Bl , Br, t, tl , tr, b, bl ...
4
votes
1answer
112 views

how to use \@Alph in the name of node inside a foreach?

In this question we use a lot of possibilities to define a cube. One idea is to name the vertices. I would like to find something to create these names automatically. In my last example in the ...
5
votes
1answer
431 views

Use a loop to generate a list for another (foreach) loop

Is it possible to use a loop to generate a list for a foreach loop? More specifically I want the following: Consider the following answer to a question I asked some time ago: ...
16
votes
2answers
2k views

Draw a prism in TikZ or PSTricks

Is there a way to define an polygon in plane and output an (orthogonal) prism with that polygon as its base? The prism should be drawn in 3D in parallel oblique perspective with controllable height h, ...
7
votes
2answers
1k views

Passing arguments to \def inside \newcommand (TikZ/PGF)

I'm having trouble passing an argument to \pgfmathparse inside a macro I defined. Here is the code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \newcommand{\drawmestg}[2]{ ...
12
votes
2answers
586 views

Improving TikZ user interface

I am looking to improve both on the concept as well as the user interface for code used to produce visual progress charts. The figure represents activities and progress for the construction of ...
3
votes
1answer
337 views

tkz-euclide, define points outside of tikzpicture

Is it possible to define points in tkz-euclide outside of the tikzpicture environment? For example I would like to have something like this exercise in elementary geometry: Exercise: Consider the ...
2
votes
2answers
1k views

How can I process an array using TikZ 2.00 syntax?

I use TikZ/PGF 2.00. In the CVS PGF manual pag. 563 we have \def\myarray{{1,"two",2+1,"IV","cinq","sechs",sin(\i*5)*14}} \foreach \i in {0,...,6}{\pgfmathparse{\myarray[\i]}\pgfmathresult, } My ...
15
votes
3answers
649 views

LaTeX equivalent of ConTeXt buffers

While creating a series of graphics (using TikZ) in ConTeXt, I frequently use ConTeXt's buffer to "copy-paste" code. Is there a LaTeX package that implements this feature? Since most LaTeX users may ...