ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Aditya Mahajan <adityam@umich.edu>
Subject: Re: circuitikz module seems broken
Date: Mon, 13 Dec 2021 22:57:09 -0500 (EST)	[thread overview]
Message-ID: <nycvar.YAK.7.78.908.2112132219480.1632@nqv-guvaxcnq> (raw)
In-Reply-To: <41f06234-caab-6576-aa5e-8396c8ee34db@xs4all.nl>

I tested with my course assignments (simple tikz block diagrams, lots of pgdplots code) and everything works correctly. I haven't tested circuitikz; the simple example fails and I am trying to understand why that is happening.

> Aditya: can you check if we load enough? 

I believe so. This is what my notes say (it is no fun to trace down these files):

% Order in which files are loaded
% 1. t-tikz
% 1.1 t-pgf
% 1.1.1 t-pgfcor
% 1.1.1.1 t-pgfsys
% 1.1.1.1.1 t-pgfrcs
% 1.1.1.1.1.1 t-pgfmod  % Ignore
% 1.1.1.1.1.2 pgfutil-common.tex            (1)
% 1.1.1.1.1.3 pgfutil-context.def           (2)
% 1.1.1.1.1.4 pgfrcs.code.tex               (3)
% 1.1.1.1.2 pgfsys.code.tex                 (4)
% 1.1.1.1.3 pgfsyssoftpath.code.tex         (5)
% 1.1.1.1.4 pgfsysprotocol.code.tex         (6)
% 1.1.1.2 pgfcore.code.tex                  (7)
% 1.1.2 \usepgfmodule[shapes,plot]          (8)
% 1.2 t-pgffor
% 1.2.1 t-pgfrcs (already loaded)
% 1.2.2 t-pgfkey
% 1.2.2.1 pgfkeys.code.tex                  (9)
% 1.2.3 pgffor.code.tex                    (10)
% 1.3 tikz.code.tex                        (11)

You also have pgfmoduleplot.code.tex, which I had missed.

> We really need to get rid of all
> these (kind of strange) t-* modules that somehow ended up in tikz and it's way
> easier and robust to occasionally add something needed to m-tikz than to try
> to catch hard-to-locate-and-fix stuff in the tikz distribution. If needed we
> can apply runtime patches too.

Agreed. I believe that the pgf module provides so many modules as a means to be modular. For example, it possible to use `pgffor` module to get the for loop syntax; or load `pgfkey` to get the key-value arguments, etc. But each of these t-* files has so much boilerplate code, so I like your method better. 

> (nyw, it looks like tikz creates empty pfg files during a run but that's
> probbably has a reason)

tikz's ChangeLog has the following entries:

2007-01-18:
    - Fixed .aux problems in plain and ConTeXt mode. Using .pgf as
      extension now.

Grepping the source for `.pgf` gives:

tex/generic/pgf/utilities/pgfutil-context.def:  \pgfutil@IfFileExists{\jobname.pgf}{\input \jobname.pgf\relax}{}
tex/generic/pgf/utilities/pgfutil-context.def:  \immediate\csname openout\endcsname\pgfutil@auxout\jobname.pgf\relax
tex/generic/pgf/utilities/pgfutil-plain.def:  \pgfutil@IfFileExists{\jobname.pgf}{\input \jobname.pgf\relax}{}
tex/generic/pgf/utilities/pgfutil-plain.def:  \immediate\csname openout\endcsname\pgfutil@auxout\jobname.pgf

The file handle \pgfutil@auxout is used in the macro \pgfutil@writetoaux which gets used in the driver files to write absolute positioning stuff to file. For example, pgfsys-luatex.def has:

\def\pgfsys@markposition#1{%
  \savepos%
  \edef\pgf@temp{#1}%
  \expandafter\pgfutil@writetoaux\expandafter{%
    \expandafter\noexpand\expandafter\pgfsyspdfmark\expandafter{\pgf@temp}{\the\lastxpos}{\the\lastypos}}%
}

This can easily be stored in the tuc file using two-pass data, but I don't use this feature of tikz, so don't have examples to test this. 

@HenriMenke: Do you know if it is save to not create the `.pgf` file and rewrite the above macro to read store the \pgfsyspdfmark table in the `.tuc` file?



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

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

  reply	other threads:[~2021-12-14  3:57 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-03  7:54 Jan-Erik Hägglöf via ntg-context
2021-12-03  9:49 ` [DKIM] " Hans Hagen via ntg-context
2021-12-03 13:54   ` [DKIM] " Hans Hagen via ntg-context
2021-12-03 14:17     ` skrantajanneman via ntg-context
2021-12-03 14:40       ` [DKIM] " Hans Hagen via ntg-context
2021-12-03 14:47     ` Aditya Mahajan via ntg-context
2021-12-03 18:16       ` Hans Hagen via ntg-context
2021-12-03 22:39         ` Jan-Erik Hägglöf via ntg-context
2021-12-03 23:27           ` Aditya Mahajan via ntg-context
2021-12-04  9:05             ` Henning Hraban Ramm via ntg-context
2021-12-04 21:37               ` Jan-Erik Hägglöf via ntg-context
2021-12-05 15:35                 ` [DKIM] " Hans Hagen via ntg-context
2021-12-05 20:45                   ` [DKIM] " Jan-Erik Hägglöf via ntg-context
2021-12-06  6:54                   ` [DKIM] " Aditya Mahajan via ntg-context
2021-12-06  9:02                 ` Aditya Mahajan via ntg-context
2021-12-06 17:39                   ` Aditya Mahajan via ntg-context
2021-12-06 19:30                     ` Hans Hagen via ntg-context
2021-12-06 20:49                     ` Jan-Erik Hägglöf via ntg-context
2021-12-07  8:48                       ` [DKIM] " Hans Hagen via ntg-context
2021-12-08  5:30                       ` Aditya Mahajan via ntg-context
2021-12-13 20:08                     ` Aditya Mahajan via ntg-context
2021-12-13 20:14                       ` Jan-Erik Hägglöf via ntg-context
2021-12-13 22:35                         ` Jan-Erik Hägglöf via ntg-context
2021-12-13 23:54                           ` Hans Hagen via ntg-context
2021-12-14  3:57                             ` Aditya Mahajan via ntg-context [this message]
2021-12-14 13:14                               ` Jan-Erik Hägglöf 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=nycvar.YAK.7.78.908.2112132219480.1632@nqv-guvaxcnq \
    --to=ntg-context@ntg.nl \
    --cc=adityam@umich.edu \
    /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).