ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Xavier B. via ntg-context" <ntg-context@ntg.nl>
To: "Xavier B." <somenxavier@posteo.net>
Cc: "Xavier B." <somenxavier@posteo.net>,
	mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: tikz error upgrading to texlive version (artix)
Date: Fri, 31 Mar 2023 13:54:04 +0000	[thread overview]
Message-ID: <20230331155404.40eacca52497d5329672a6ae@posteo.net> (raw)
In-Reply-To: <20230330223519.3a17e636e52e3cb8021e53f5@posteo.net>


> > I reported that tikz is not working a few months ago, but after a few back and forth with Hans, could not get it to work. At that time, it appeared that I was the only have having issues, so I thought that I was making a mistake in how I was installing the package.
> > 
> > I have reverted to using mkiv for my course notes, because I heavily use pgfplots and that is not working in LMTX. (I was also using some nice new features of metafun, and have had to resort to compiling them externally using LMTX via the filter module and compiling the main doc with MkIV).
> afaik tikz should work ok, so can you make a test file?
> 
> Hans


Perhaps this is a good test. It's a complete example:

\setupcolors[state=start]
\definecolor[darkgreen][g=.5]
\usemodule[tikz]         

\starttext

\starttikzpicture[      scale=3,line cap=round
                        axes/.style=,         
                        important line/.style={very thick},
                        information text/.style={rounded corners,fill=red!10,inner sep=1ex} ]

        \draw[help lines,step=0.5cm] (-1.4,-1.4) grid (1.4,1.4);
        \draw (0,0) circle (1cm);                               
                \draw[->] (-1.5,0) -- (1.5,0) node[right] {$x$} coordinate(x axis);
                \draw[->] (0,-1.5) -- (0,1.5) node[above] {$y$} coordinate(y axis);
                \foreach \x/\xtext in {-1, -.5/-\frac{1}{2}, 1}                    
                        \draw[xshift=\x cm] (0pt,1pt) -- (0pt,-1pt)                
                                node[below,fill=white] {$\xtext$};
                \foreach \y/\ytext in {-1, -.5/-\frac{1}{2}, .5/\frac{1}{2}, 1}
                        \draw[yshift=\y cm] (1pt,0pt) -- (-1pt,0pt)
                                node[left,fill=white] {$\ytext$};
        \filldraw[fill=green!20,draw=green!50!black] (0,0) -- (3mm,0pt) arc(0:30:3mm);
        \draw (15:2mm) node[green!50!black] {$\alpha$};
        \draw[important line,red]
                (30:1cm) -- node[left=1pt,fill=white] {$\sin \alpha$} (30:1cm |- x axis);
        \draw[important line,blue]
                (30:1cm |- x axis) -- node[below=2pt,fill=white] {$\cos \alpha$} (0,0);
        \draw[important line,orange!80!black] (1,0) -- node[right=1pt,fill=white] {
                $\displaystyle \tan \alpha \black =
                \frac{{\red \sin \alpha}}{\blue \cos \alpha}$}
                (intersection of 0,0--30:1cm and 1,0--1,1) coordinate (t);
        \draw (0,0) -- (t);
        \draw[xshift=1.85cm]
                node[right,text width=6cm,information text]
                {
                        The {\darkgreen angle $\alpha$} is $30^\circ$ in the
                        example ($\pi/6$ in radians). The {\red sine of
                        $\alpha$}, which is the height of the red line, is
                        \startformula
                        {\red \sin \alpha} = 1/2.
                        \stopformula
                        By the Theorem of Pythagoras ...
                };
\stoptikzpicture

\stoptext


Taking from tikz manual [https://wiki.contextgarden.net/TikZ]

Xavier

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2023-03-31 13:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-30 18:52 Xavier B. via ntg-context
2023-03-30 20:35 ` Xavier B. via ntg-context
2023-03-31 13:54   ` Xavier B. via ntg-context [this message]
2023-03-30 20:57 ` Max Chernoff via ntg-context
2023-03-30 21:56   ` Xavier B. via ntg-context
2023-03-31  0:42     ` Aditya Mahajan via ntg-context
2023-03-31  7:52       ` Hans Hagen via ntg-context
2023-03-31  8:10     ` Hans Hagen via ntg-context
2023-03-31 16:43       ` Aditya Mahajan via ntg-context
2023-03-31 19:50         ` Hans Hagen via ntg-context
2023-03-31 18:16       ` Ulrike Fischer via ntg-context
2023-03-31 19:52         ` Hans Hagen via ntg-context
2023-04-02 11:00     ` Xavier B. via ntg-context
2023-04-02 22:37       ` Max Chernoff via ntg-context
2023-03-31  8:05 ` Hans Hagen via ntg-context
2023-04-03  0:42 ` George N. White III via ntg-context

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230331155404.40eacca52497d5329672a6ae@posteo.net \
    --to=ntg-context@ntg.nl \
    --cc=somenxavier@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).