Generalexpl3 for dummies

LaTeX specific issues not fitting into one of the other forums of this category.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10343
Joined: Mon Mar 10, 2008 9:44 pm

expl3 for dummies

Post by Stefan Kottwitz »

That was a spammer. I checked it once he posted, it was not yet clear spam. He added a signature later with a spam. I deleted the post and that account.

Thanks!

Stefan
LaTeX.org admin

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

expl3 for dummies

Post by cgnieder »

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.
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.)

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
site moderator & package author
erwann
Posts: 75
Joined: Thu Aug 25, 2016 2:24 am

expl3 for dummies

Post by erwann »

OK, thanks.

Maybe internal/public should be renamed private/public or internal/external or implementation/interface?
x_86 / Linux Mint 18.3 / texlive 2015.20160320-1ubuntu0.1 / TeXworks 0.5r1361 (Debian)
erwann
Posts: 75
Joined: Thu Aug 25, 2016 2:24 am

expl3 for dummies

Post by erwann »

x_86 / Linux Mint 18.3 / texlive 2015.20160320-1ubuntu0.1 / TeXworks 0.5r1361 (Debian)
Post Reply