Chris Martens (they/them)
11/24/2020, 5:22 PMDenny Vrandečić
11/24/2020, 5:30 PMDenny Vrandečić
11/24/2020, 5:30 PMEmmanuel Oga
11/24/2020, 5:53 PMPrathyush
11/24/2020, 8:17 PMChris Martens (they/them)
11/24/2020, 10:24 PMKonrad Hinsen
11/25/2020, 10:03 AMSietse Brouwer
12/01/2020, 12:10 PM\csname
](https://en.wikibooks.org/wiki/TeX/csname) macro, which allows you to call or define a TeX command by building its name from strings.
Allow me to quote from Aditya's excellent explanation on the TeX Stack Exchange:
How should such a multilingual a key-value driven interface be defined?
This is where theand\c!...
macros come in. (Remember that in\v!...
mode\unprotected
is a letter, so!
is a macro with a name\c!something
). In the core packages, ConteXt definesc!something
\definehead[\v!chapter][...]
This defines (amongst other things) a macro `\e!start\v!chapter`: in the English interface,His full explanation is longer and better, I can recommend it. Some Stack Overflow QAs explaining the mechanism: • https://tex.stackexchange.com/questions/109869/what-does-s-do/110131#110131 • https://tex.stackexchange.com/questions/58654/context-how-do-you-create-your-own-commands/58716#58716 Relevant source files: • mult-ini.mkiv contains doc comments explaining the system • mult-def.lua contains command translations. One of them, Farsi, is a right-to-left language (actually a macrolanguage, in both senses of the word :D). Other noteworthy elements of the multilingual system: - namespaces for the system's words, because 'left' might mean 'the left' or 'leftwards'. - This implementation actually uses less CPU and RAM than the old monolingual one, because TeX commands take up less TeX tokens (1 in total) than strings (1 per letter). ---- #### Quick intro to ConTeXt for those unfamiliar with it I realise ConTeXt is nowhere near as well-known as LaTeX, so I'll briefly introduce it. Like LaTeX, it is a TeX macro suite that provides high-level typesetting constructs on top of TeX. Its development is headed by Hans Hagen, an independent publisher/designer in the Netherlands. Unlike LaTeX: - ConTeXt supports user-controlled per-document design as well as style sheets. - ConTeXt is expandable: it makes it easy to derive or define your own structural/sementic elements. For example, you could define a section type, `\v!chapter=chapter`; in the French interface\e!start=start
,\e!start=demarre
. Hence we get\v!chapter=chapitre
and\startchapter
.\demarrechapitre
\exercises
that inherits from \subsection
, or a block type \startexercise...\stopexercise
that inherits from \startframed
.
- ConTeXt is stylable: it provides commands and parameters to change the style of elements, both your own and the built-ins.
- ConTeXt is consistent: setting style parameters uses a nice key=value
syntax, and settings like color=...
are available everywhere they make sense.
- ConTeXt is integrated: fundamental typesetting concepts such as page numbering, or margin notes, or arranging multiple pages on a sheet, are all part of core. (There are third-party modules, too.)
A small example: (output attached):
\setuppapersize[A6][A5,landscape] % A6 pages on A5 paper,
\setuparranging[2SIDE] % arranged side-by-side
% Section heads are bold, blue, and start 3cm below previous text.
\setuphead[section]
[color=blue,
style=bold,
before={\blank[2cm]},
]
% Our custom `redsection` inherits from `section`,
% but uses red instead.
\definehead[redsection][section]
[color=red]
\starttext % like \begin{document}
\section{Black, black, black...}
\startlines[style=bold]
...is the color of my true love's hair
His lips are something wondrous fair.
\stoplines
\redsection{The lady in red is dancing with me...}
Cheek \color[red]{to} cheek.
\section{ʿAlī ibn Abī Ṭālib}
\input khatt-en % Some lorem ipsum text
\stoptext
Cole
12/16/2020, 5:55 PMChris Martens (they/them)
12/16/2020, 5:57 PMCole
12/16/2020, 5:59 PMChris Martens (they/them)
12/16/2020, 5:59 PMChris Martens (they/them)
12/16/2020, 5:59 PMKonrad Hinsen
12/17/2020, 7:18 AMChris Martens (they/them)
12/17/2020, 6:36 PMGeoffrey Litt
01/06/2021, 4:04 PMCole
01/06/2021, 4:36 PMDan Cook
01/18/2021, 6:46 PMCole
01/18/2021, 6:48 PMCole
01/18/2021, 6:50 PMLojban is proposed as a speakable language for communication between people of different language backgrounds, as a potential means of machine translation, and as a tool to explore the intersection between human language and software.– from wikipedia. I hadn't thought of it from the software perspective.
Dan Cook
01/18/2021, 6:51 PMDan Cook
01/18/2021, 6:52 PMCole
01/18/2021, 6:53 PMCole
01/18/2021, 6:54 PMCole
01/18/2021, 6:56 PMKonrad Hinsen
01/19/2021, 9:52 AM