!NuxCISwYQJuyWwNsEI:matrix.org

PGF/TikZ

59 Members
https://github.com/pgf-tikz12 Servers

Load older messages


SenderMessageTime
18 Jun 2024
@6b6279:freiburg.socialkby* Isn’t luatex using Lua 5.4 since ver. 1.09?08:45:05
@6b6279:freiburg.socialkbyoh no, it was frozen at Lua 5.3.608:48:37
@6b6279:freiburg.socialkbyThat was three years ago, and as far as I know, the project is active. Have you opened an issue at the LuaTeX repository?08:49:59
@northface:matrix.orgNorbert Preining
In reply to @6b6279:freiburg.social
That was three years ago, and as far as I know, the project is active. Have you opened an issue at the LuaTeX repository?
It is a well known state, there was a very recent email thread on tex-live list AFAIR about it. No big movement getting it to 5.4
12:58:35
@marcel:2krueger.deMarcel KrügerLuaMetaTeX is running with Lua 5.4, I think for LuaTeX there was an explicit decision to avoid it.17:18:55
19 Jun 2024
@some.knowit:matrix.orgsome.knowit
In reply to @marcel:2krueger.de
LuaMetaTeX is running with Lua 5.4, I think for LuaTeX there was an explicit decision to avoid it.
A completely different question - when do people find it more useful or prefer to use ConTeXt over, say, LuaLaTeX?
15:51:36
@northface:matrix.orgNorbert Preining
In reply to @some.knowit:matrix.org
A completely different question - when do people find it more useful or prefer to use ConTeXt over, say, LuaLaTeX?
I never write ConTeXt, only LaTeX. Different, very different, formats.
For Japanese text I use lualatex, other than that, mostly pdflatex.
15:52:53
@some.knowit:matrix.orgsome.knowit Indeed that's the reason I asked. Never used ConTeXt which seems to have it's own universe. 15:58:55
@some.knowit:matrix.orgsome.knowit My naive impression so far is that all these are built on top of TeX and Lua but people decided to build different macro packages in their own ways for different purposes. 16:01:59
@northface:matrix.orgNorbert PreiningYes, ConTeXt is built on top of TeX like LaTeX, but it is a very different system.16:02:43
@some.knowit:matrix.orgsome.knowit I find the (highest score) answer in this post on LuaTex/ConTeXt quite funny :) 16:17:11
@some.knowit:matrix.orgsome.knowit * I find the (highest score) answer in this post on LuaTex/ConTeXt quite (perhaps brutally honest?) and funny :) 16:18:19
@some.knowit:matrix.orgsome.knowit * I find the (highest score) answer in this post on LuaTex/ConTeXt quite (perhaps brutally honest? and) funny :) 16:18:39
@some.knowit:matrix.orgsome.knowitOnly 2 contributors to https://github.com/contextgarden/luametatex - indicative of a fringe project :)16:26:27
20 Jun 2024
@6b6279:freiburg.socialkbyIs there a way to regenerate random shapes, e.g., starbursts in a tikzpicture? I don't know how but, despite deleting all intermediate files, LaTeX keeps generating the exact same starburst.00:22:48
@some.knowit:matrix.orgsome.knowit
In reply to @6b6279:freiburg.social
Is there a way to regenerate random shapes, e.g., starbursts in a tikzpicture? I don't know how but, despite deleting all intermediate files, LaTeX keeps generating the exact same starburst.

I think so. This seems to work:

\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfmath}
\usepackage{pgffor}

\begin{document}

\begin{tikzpicture}

% Seed the random number generator
\pgfmathsetseed{\pdfuniformdeviate256}

% Function to generate a starburst
\def\starburst{
    \pgfmathsetmacro{\numrays}{int(5 + rand*6)} % Random number of rays between 5 and 10
    \pgfmathsetmacro{\innerradius}{0.5 + rand*0.5} % Random inner radius between 0.5 and 1
    \pgfmathsetmacro{\outerradius}{1.5 + rand*1.5} % Random outer radius between 1.5 and 3

    \foreach \i in {1,...,\numrays}{
        \pgfmathsetmacro{\angle}{\i * 360 / \numrays}
        \pgfmathsetmacro{\nextangle}{(\i + 1) * 360 / \numrays}
        \draw (0,0) -- (\angle:\outerradius) arc[start angle=\angle, end angle=\nextangle, radius=\outerradius] -- cycle;
    }
}
% Draw multiple starbursts at random positions
\foreach \j in {1,...,5} {
    \pgfmathsetmacro{\xpos}{rand*10} % Random x position
    \pgfmathsetmacro{\ypos}{rand*10} % Random y position
    \begin{scope}[shift={(\xpos,\ypos)}]
        \starburst
    \end{scope}
}
\end{tikzpicture}
\end{document}
01:51:36
@some.knowit:matrix.orgsome.knowit
In reply to @6b6279:freiburg.social
Is there a way to regenerate random shapes, e.g., starbursts in a tikzpicture? I don't know how but, despite deleting all intermediate files, LaTeX keeps generating the exact same starburst.
*

I think so. This seems to work (ie different output across different compilations):

\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfmath}
\usepackage{pgffor}

\begin{document}

\begin{tikzpicture}

% Seed the random number generator
\pgfmathsetseed{\pdfuniformdeviate256}

% Function to generate a starburst
\def\starburst{
    \pgfmathsetmacro{\numrays}{int(5 + rand*6)} % Random number of rays between 5 and 10
    \pgfmathsetmacro{\innerradius}{0.5 + rand*0.5} % Random inner radius between 0.5 and 1
    \pgfmathsetmacro{\outerradius}{1.5 + rand*1.5} % Random outer radius between 1.5 and 3

    \foreach \i in {1,...,\numrays}{
        \pgfmathsetmacro{\angle}{\i * 360 / \numrays}
        \pgfmathsetmacro{\nextangle}{(\i + 1) * 360 / \numrays}
        \draw (0,0) -- (\angle:\outerradius) arc[start angle=\angle, end angle=\nextangle, radius=\outerradius] -- cycle;
    }
}
% Draw multiple starbursts at random positions
\foreach \j in {1,...,5} {
    \pgfmathsetmacro{\xpos}{rand*10} % Random x position
    \pgfmathsetmacro{\ypos}{rand*10} % Random y position
    \begin{scope}[shift={(\xpos,\ypos)}]
        \starburst
    \end{scope}
}
\end{tikzpicture}
\end{document}
01:54:54
@some.knowit:matrix.orgsome.knowit In general, perhaps the Discord channel LaTeX Support is a better place to ask these questions. 01:56:09
@some.knowit:matrix.orgsome.knowit * In general, perhaps the Discord channel LaTeX Support is a better place to ask these questions. 01:57:14
@some.knowit:matrix.orgsome.knowit * In general, perhaps the Discord channel LaTeX support is a better place to ask these questions. 01:57:28
21 Jun 2024
@some.knowit:matrix.orgsome.knowit

I see in Koerner2015.lua there exists an exaple that makes use of a simple pedigree layout:

   \tikz \graph [simple pedigree layout, default edge operator=complete bipartite]
    {
      Eve -- [mate] Felix;
      { Eve, Felix } -> [child] { George, Hank };

      Alice -- [mate] Bob;
      { Alice, Bob } -> [child] { Charly, Dave, Eve };
    };

Does anyone know what preamble (eg \usetikzlibrary{graphs,graphdrawing} \usegdlibrary{???} needs to be specified for this example to compile?

03:06:22
@some.knowit:matrix.orgsome.knowit *

I see in Koerner2015.lua there exists an example that makes use of a simple pedigree layout:

   \tikz \graph [simple pedigree layout, default edge operator=complete bipartite]
    {
      Eve -- [mate] Felix;
      { Eve, Felix } -> [child] { George, Hank };

      Alice -- [mate] Bob;
      { Alice, Bob } -> [child] { Charly, Dave, Eve };
    };

Does anyone know what preamble (eg \usetikzlibrary{graphs,graphdrawing} \usegdlibrary{???} needs to be specified for this example to compile?

03:06:40
@some.knowit:matrix.orgsome.knowit
In reply to @some.knowit:matrix.org

I see in Koerner2015.lua there exists an example that makes use of a simple pedigree layout:

   \tikz \graph [simple pedigree layout, default edge operator=complete bipartite]
    {
      Eve -- [mate] Felix;
      { Eve, Felix } -> [child] { George, Hank };

      Alice -- [mate] Bob;
      { Alice, Bob } -> [child] { Charly, Dave, Eve };
    };

Does anyone know what preamble (eg \usetikzlibrary{graphs,graphdrawing} \usegdlibrary{???} needs to be specified for this example to compile?

Got it - it's \usetikzlibrary{graphs,graphdrawing} \usegdlibrary{pedigrees}
03:28:56
@some.knowit:matrix.orgsome.knowit

I see there are BalloonLayout.lua and CircularLayout.lua. Are these actually in use or are they work in progress? The example code, for instance, involves a CircularLayout:

\tikz \graph [CircularLayout, part sep=1cm] {
  a -- b -- c -- a -- d -- e -- f -- g -- d;
  b -- {x,y,z};
};

But as far as I understand to use a circular layout, we would do something like the following instead:

\usetikzlibrary{graphs,graphdrawing} \usegdlibrary{circular}
\begin{document}

\tikz \graph [simple necklace layout, part sep=1cm] {
      a -- b -- c -- a -- d -- e -- f -- g -- d;
      b -- {x,y,z};
    };
\end{document}

What am I missing?

05:56:16
@some.knowit:matrix.orgsome.knowit *

I see there are BalloonLayout.lua and CircularLayout.lua. Are these actually in use or are they work in progress? The example code in these files, for instance, involves a CircularLayout:

\tikz \graph [CircularLayout, part sep=1cm] {
  a -- b -- c -- a -- d -- e -- f -- g -- d;
  b -- {x,y,z};
};

But as far as I understand to use a circular layout, we would do something like the following instead:

\usetikzlibrary{graphs,graphdrawing} \usegdlibrary{circular}
\begin{document}

\tikz \graph [simple necklace layout, part sep=1cm] {
      a -- b -- c -- a -- d -- e -- f -- g -- d;
      b -- {x,y,z};
    };
\end{document}

What am I missing?

05:56:46
@some.knowit:matrix.orgsome.knowit *

I see there are BalloonLayout.lua and CircularLayout.lua. Are these actually in use or are they work in progress? The example code in these files, for instance, involves a CircularLayout:

\tikz \graph [CircularLayout, part sep=1cm] {
  a -- b -- c -- a -- d -- e -- f -- g -- d;
  b -- {x,y,z};
};

But as far as I understand to use a circular layout, we would do something like the following instead:

\usetikzlibrary{graphs,graphdrawing} \usegdlibrary{circular}
\begin{document}
\tikz \graph [simple necklace layout, part sep=1cm] {
      a -- b -- c -- a -- d -- e -- f -- g -- d;
      b -- {x,y,z};
    };
\end{document}

What am I missing?

05:57:13
@hmenke:matrix.orghmenke
In reply to @some.knowit:matrix.org

I see there are BalloonLayout.lua and CircularLayout.lua. Are these actually in use or are they work in progress? The example code in these files, for instance, involves a CircularLayout:

\tikz \graph [CircularLayout, part sep=1cm] {
  a -- b -- c -- a -- d -- e -- f -- g -- d;
  b -- {x,y,z};
};

But as far as I understand to use a circular layout, we would do something like the following instead:

\usetikzlibrary{graphs,graphdrawing} \usegdlibrary{circular}
\begin{document}
\tikz \graph [simple necklace layout, part sep=1cm] {
      a -- b -- c -- a -- d -- e -- f -- g -- d;
      b -- {x,y,z};
    };
\end{document}

What am I missing?

https://github.com/pgf-tikz/pgf/blob/12f17834c849a659b8829bbc9122bc459f585917/doc/generic/pgf/pgfmanual-en-main-preamble.tex#L109-L133
08:29:18
@hmenke:matrix.orghmenke
In reply to @some.knowit:matrix.org

I see there are BalloonLayout.lua and CircularLayout.lua. Are these actually in use or are they work in progress? The example code in these files, for instance, involves a CircularLayout:

\tikz \graph [CircularLayout, part sep=1cm] {
  a -- b -- c -- a -- d -- e -- f -- g -- d;
  b -- {x,y,z};
};

But as far as I understand to use a circular layout, we would do something like the following instead:

\usetikzlibrary{graphs,graphdrawing} \usegdlibrary{circular}
\begin{document}
\tikz \graph [simple necklace layout, part sep=1cm] {
      a -- b -- c -- a -- d -- e -- f -- g -- d;
      b -- {x,y,z};
    };
\end{document}

What am I missing?

* I'm not sure anyone has ever looked that detailed into graphdrawing. You can check what libraries the documentation loads:
https://github.com/pgf-tikz/pgf/blob/12f17834c849a659b8829bbc9122bc459f585917/doc/generic/pgf/pgfmanual-en-main-preamble.tex#L109-L133
08:29:55
@hmenke:matrix.orghmenke Looks to me like you probably need \usegdlibrary{ogdf}. 08:30:24
@hmenke:matrix.orghmenkeOh, it looks like this actually needs a compiled C++ module. https://github.com/pgf-tikz/pgf/blob/12f17834c849a659b8829bbc9122bc459f585917/source/generic/pgf/c/graphdrawing/pgf/gd/ogdf/c/ogdf_script.c%2B%2B08:34:26

Show newer messages


Back to Room ListRoom Version: 6