General ⇒ expl3 for dummies
- Stefan Kottwitz
- Site Admin
- Posts: 10361
- Joined: Mon Mar 10, 2008 9:44 pm
expl3 for dummies
Thanks!
Stefan
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
expl3 for dummies
I take it the difference between function and variable is clear? (This is mostly a semantic difference here as in TeX everything is a macro in the end.)erwann wrote:I would need, if possible, some clarification as to what the intended purposes of local public, local internal, global public, and public function are.
internal means variables and functions only to be used in the package and by the package author; the code can be changed or deleted or whatever from release to release, it is not to be relied upon by others.
public means available for every user of the package, ideally with a documented meaning and stable from one release to the next so that users can rely upon them.
local/global means local/global with respect to TeX's groups – in traditional TeX (the concept is the same in expl3):
Code: Select all
% local:
{\def\foo{bar}} \show\foo % \foo=undefined
\bgroup\def\foo{bar}\egroup \show\foo % \foo=undefined
\begingroup\def\foo{bar}\endgroup \show\foo % \foo=undefined
% global:
{\gdef\foo{bar}} \show\foo % \foo=macro: ->bar
\bgroup\def\foo{bar}\egroup \show\foo % \foo=macro: ->bar
\begingroup\def\foo{bar}\endgroup \show\foo % \foo=macro: ->bar
expl3 for dummies
Maybe internal/public should be renamed private/public or internal/external or implementation/interface?