diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-01-12 17:15:07 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-01-12 17:15:07 +0100 |
commit | 8d8d528d2ad52599f11250cfc567fea4f37f2a8b (patch) | |
tree | 94286bc131ef7d994f9432febaf03fe23d10eef8 /tex/context/base/mkiv/file-syn.mkvi | |
parent | f5aed2e51223c36c84c5f25a6cad238b2af59087 (diff) | |
download | context-8d8d528d2ad52599f11250cfc567fea4f37f2a8b.tar.gz |
2016-01-12 16:26:00
Diffstat (limited to 'tex/context/base/mkiv/file-syn.mkvi')
-rw-r--r-- | tex/context/base/mkiv/file-syn.mkvi | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/file-syn.mkvi b/tex/context/base/mkiv/file-syn.mkvi new file mode 100644 index 000000000..52ecd0d71 --- /dev/null +++ b/tex/context/base/mkiv/file-syn.mkvi @@ -0,0 +1,66 @@ +%D \module +%D [ file=file-syn, % was core-fil, +%D version=20110701, % 1997.11.15, +%D title=\CONTEXT\ File Macros, +%D subtitle=Module Support, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\writestatus{loading}{ConTeXt File Macros / Synonyms} + +\unprotect + +\registerctxluafile{file-syn}{1.001} + +%D \macros +%D {definefilesynonym,definefilefallback} +%D +%D One of the problems with loading files is that their names +%D can depend on the interface language. We therefore need a +%D method to define filesynonyms. The actual synonyms are +%D defined elsewhere, but look like: +%D +%D \starttyping +%D \definefilesynonym [chemic] [chemie] +%D \definefilesynonym [einheit] [unit] +%D \definefilesynonym [unit] [unit] +%D \stoptyping +%D +%D So we can say in english: +%D +%D \starttyping +%D \usemodules[pictex,chemic,unit] +%D \stoptyping +%D +%D and in dutch: +%D +%D \starttyping +%D \usemodules[pictex,chemie,unit] +%D \stoptyping + +\unexpanded\def\definefilesynonym {\dodoubleempty \syst_files_define_synonym } +\unexpanded\def\definefilefallback{\dodoubleargument\syst_files_define_fallback} % still used? + +\def\syst_files_define_synonym [#name][#realname]{\clf_definefilesynonym {#name}{#realname}} +\def\syst_files_define_fallback[#name][#alternatives]{\clf_definefilefallback{#name}{#alternatives}} + +%D \macros +%D {truefilename} +%D +%D At the system level such a filename can be called upon by +%D saying: +%D +%D \starttyping +%D \truefilename{filename/filesynonym} +%D \stoptyping +%D +%D The implementation shows that nesting is supported. + +\def\truefilename#1{\clf_truefilename{#1}} + +\protect \endinput |