Debian Codegraph @

texmf-dist/source/latex-dev/latex-lab/latex-lab-mathintent.dtx

raw
1 % \iffalse meta-comment
2 %
3 %% File: latex-lab-mathintent.dtx
4 %
5 % Copyright (C) 2025 The LaTeX Project
6 %
7 % It may be distributed and/or modified under the conditions of the
8 % LaTeX Project Public License (LPPL), either version 1.3c of this
9 % license or (at your option) any later version. The latest version
10 % of this license is in the file
11 %
12 % https://www.latex-project.org/lppl.txt
13 %
14 %
15 % The latex-lab bundle is developed in the LaTeX2e GitHub.
16 % Issues may be reported at
17 %
18 % https://github.com/latex3/latex2e/issues
19 %
20 %<*driver>
21 \DocumentMetadata{tagging=on,pdfstandard=ua-2}
22 \documentclass[kernel]{l3in2edoc}
23
24 \EnableCrossrefs
25 \CodelineIndex
26 \begin{document}
27 \DocInput{latex-lab-mathintent.dtx}
28 \end{document}
29 %</driver>
30 %
31 % \fi
32 %
33 %
34 % \title{The \texttt{latex-lab-mathintent} code\thanks{}}
35 % \author{\LaTeX{} Project}
36 %
37 % \maketitle
38 %
39 % \newcommand\fmi[1]{\begin{quote} TODO: \itshape #1\end{quote}}
40 % \newcommand\NEW[1]{\marginpar{\mbox{}\hfill\fbox{New: #1}}}
41 % \providecommand\class[1]{\texttt{#1.cls}}
42 % \providecommand\pkg[1]{\texttt{#1}}
43 % \providecommand\hook[1]{\texttt{#1}}
44 %
45 % \begin{abstract}
46 % \end{abstract}
47 %
48 % \tableofcontents
49 %
50 % \section{Introduction}
51 %
52 % This file implements Experiments with the MathML4 \texttt{intent} feature.
53 % Initially to give readings for invisible times and function application.
54 %
55 % \MaybeStop{\setlength\IndexMin{200pt} \PrintIndex }
56 %
57 % \section{The Implementation}
58 %
59 % \begin{macrocode}
60 %<@@=math>
61 % \end{macrocode}
62 %
63 % \begin{macrocode}
64 %<*kernel>
65 % \end{macrocode}
66 %
67 % \subsection{File declaration}
68 % \begin{macrocode}
69 \ProvidesFile{latex-lab-mathintent.ltx}
70 [2026-01-16 v0.1c MathML intent attributes]
71 % \end{macrocode}
72 %
73 % \subsection{Invisible ops}
74 % \begin{macrocode}
75 \ExplSyntaxOn
76 % \end{macrocode}
77 %
78 % \begin{macrocode}
79 \protected\def\invisibletimes{
80 \if_cs_exist:N\luamml_annotate:en
81 \luamml_annotate:en {
82 core = {[0] = 'mo', intent="times","^^^^2062"},
83 }{
84 \latelua{}
85 }
86 \fi:
87 }
88 % \end{macrocode}
89 %
90 % \begin{macrocode}
91 \protected\def\functionapplication{
92 \if_cs_exist:N\luamml_annotate:en
93 \luamml_annotate:en {
94 core = {[0] = 'mo', intent="applied_to","^^^^2061"},
95 }{
96 \latelua{}
97 }
98 \fi:
99 }
100 % \end{macrocode}
101 %
102 % \subsection{MathML intent and arg}
103 % These commands have stub definitions in the Kernel
104 % Here we enable their active definition.
105 % \begin{macrocode}
106 \AtBeginDocument{
107 \if_cs_exist:N \luamml_attribute:een
108 \let\MathMLintent\relax
109 \NewDocumentCommand \MathMLintent {} {
110 \luamml_attribute:een { intent }
111 }
112 % \end{macrocode}
113 %
114 % \begin{macrocode}
115 \let\MathMLarg\relax
116 \NewDocumentCommand \MathMLarg {} {
117 \luamml_attribute:een { arg }
118 }
119 \fi:
120 }
121 % \end{macrocode}
122 %
123 % \begin{macrocode}
124 \ExplSyntaxOff
125 % \end{macrocode}
126 % \begin{macrocode}
127 %</kernel>
128 % \end{macrocode}
129 % \Finale
130 %