Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expl3 macros only available in LaTeX format #1

Closed
muzimuzhi opened this issue Jul 21, 2022 · 4 comments
Closed

expl3 macros only available in LaTeX format #1

muzimuzhi opened this issue Jul 21, 2022 · 4 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@muzimuzhi
Copy link

The doc implies tikzfill libraries are usable in each of plain TeX, LaTeX, and ConTeXt formats.

\section{Image and Picture Fill Library}\label{sec:imagefill}%
\begin{dispListing*}{title=\tikzname\ Library |fill.image|}
\usetikzlibrary{fill.image} % LATEX (primary choice) and plain TEX
\usetikzlibrary[fill.image] % ConTEXt
\usepackage{tikzfill.image} % LATEX (secondary choice)
\end{dispListing*}

But that's not true because currently all three libraries uses expl3 functions but only LaTeX format is shipped with expl3.

To use expl3 macros in portable ways, perhaps tikzfill could load the generic loader expl3-generic.tex, as suggested in texdoc expl3, sec. 8 "Using expl3 with formats other than LaTeX2ε". Writing \input expl3-generic in LaTeX is safe as well.

Also personally, in plain text plain TeX, LaTeX, and ConTeXt is preferable than the all-uppercase TEX, LATEX, and ConTEXt.

@T-F-S
Copy link
Owner

T-F-S commented Jul 22, 2022

To use expl3 macros in portable ways, perhaps tikzfill could load the generic loader expl3-generic.tex, as suggested in texdoc expl3, sec. 8 "Using expl3 with formats other than LaTeX2ε". Writing \input expl3-generic in LaTeX is safe as well.

I just checked that only six packages use \input expl3-generic and only two use it directly. The others have safe-guards where

\ifx\ExplSyntaxOn\undefined
  \input expl3-generic\relax
\fi

seems the simplest one to me.

On the other hand, one could argue that a tikzlibrary does not work by itself. It needs TikZ which is not loaded by the library. From a philosophical point of view I would not like a library to load all expl3, if it does not load all TikZ ...
But, of course, the lines above would not hurt much... Or I add a hint in the documentation that expl3 support has to be present (?).

Finally: I will add these lines to the libraries since they provide no overhead.

@T-F-S
Copy link
Owner

T-F-S commented Jul 22, 2022

Also personally, in plain text plain TeX, LaTeX, and ConTeXt is preferable than the all-uppercase TEX, LATEX, and ConTEXt.

That was copy-and-paste from the pgfmanual.pdf. I agree that one should write it as you did.

@T-F-S T-F-S added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 22, 2022
@T-F-S T-F-S self-assigned this Jul 22, 2022
@muzimuzhi
Copy link
Author

From a philosophical point of view I would not like a library to load all expl3, if it does not load all TikZ ...

expl3 doesn't provide a library/module mechanism, while tikz does. Hence a third-party expl3 module is usually in the form of a separate LaTeX package, while extensions to tikz have two choices, either as a standalone LaTeX package or as one of tikz's libraries. And as a tikz library it gains the same portability as tikz has (assume the implementation is portable as well).

Therefore I think the difference between loading all expl3 and only needed part of tikz is ok and (more or less) by design.

@T-F-S
Copy link
Owner

T-F-S commented Aug 8, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants