Merge pull request #8 from latex3/label-intent

change name of equation label intent
This commit is contained in:
Ulrike Fischer 2025-02-21 13:32:36 +01:00 committed by GitHub
commit 2e4bdb4dc4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 27 additions and 13 deletions

View File

@ -4,11 +4,25 @@ All notable changes to the `luamml` package since the
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
this project uses date-based 'snapshot' version identifiers. this project uses date-based 'snapshot' version identifiers.
## [Unreleased] ## [Unreleased]
## 2025-02-21
- Ulrike Fischer, 2025-02-21
* change intent :equationlabel to :equation-label and
:noequationlabel to :no-equation-label
## 2025-02-17 ## 2025-02-17
### Changed ### Changed
- Ulrike Fischer, 2025-02-17
* moved all patches into latex-lab
* added sockets to luamml.dtx
* changed handling of tags/labels: empty tags produces a row too and have an intent
* corrected small bugs
- Ulrike Fischer, 2024-11-29 - Ulrike Fischer, 2024-11-29
luamml-structelemwriter.lua: moved the actualtext for e.g. stretched braces from the structure element to the mc-chunk. luamml-structelemwriter.lua: moved the actualtext for e.g. stretched braces from the structure element to the mc-chunk.

View File

@ -1,5 +1,5 @@
\NeedsTeXFormat{LaTeX2e} \NeedsTeXFormat{LaTeX2e}
\ProvidesExplPackage{luamml-demo}{2025-02-17}{0.3.0}{Reasonable default definitions for luamml} \ProvidesExplPackage{luamml-demo}{2025-02-21}{0.4.0}{Reasonable default definitions for luamml}
\sys_if_engine_luatex:F { \sys_if_engine_luatex:F {
\msg_new:nnn {luamml-demo} {pdftex-option-ignored} {Option~`#1'~is~being~ignored~in~pdfTeX~mode.} \msg_new:nnn {luamml-demo} {pdftex-option-ignored} {Option~`#1'~is~being~ignored~in~pdfTeX~mode.}

View File

@ -1,4 +1,4 @@
\ProvidesExplPackage {luamml-patches-amsmath} {2025-02-17} {0.3.0} \ProvidesExplPackage {luamml-patches-amsmath} {2025-02-21} {0.4.0}
{Feel free to add a description here} {Feel free to add a description here}
\lua_now:n { require'luamml-amsmath' } \lua_now:n { require'luamml-amsmath' }

View File

@ -1,4 +1,4 @@
\ProvidesExplPackage {luamml-patches-amstext} {2025-02-17} {0.3.0} \ProvidesExplPackage {luamml-patches-amstext} {2025-02-21} {0.4.0}
{patches of amstext commands} {patches of amstext commands}
% This is the same definition as in latex-lab-amsmath. It can go with the % This is the same definition as in latex-lab-amsmath. It can go with the

View File

@ -1,4 +1,4 @@
\ProvidesExplPackage {luamml-patches-kernel} {2025-02-17} {0.3.0} \ProvidesExplPackage {luamml-patches-kernel} {2025-02-21} {0.4.0}
{Feel free to add a description here} {Feel free to add a description here}

View File

@ -1,4 +1,4 @@
\ProvidesExplPackage {luamml-patches-lab-math} {2025-02-17} {0.3.0} \ProvidesExplPackage {luamml-patches-lab-math} {2025-02-21} {0.4.0}
{Feel free to add a description here} {Feel free to add a description here}
% This definition is identical to the one in latex-lab-math. % This definition is identical to the one in latex-lab-math.

View File

@ -1,4 +1,4 @@
\ProvidesExplPackage {luamml-patches-mathtools} {2025-02-17} {0.3.0} \ProvidesExplPackage {luamml-patches-mathtools} {2025-02-21} {0.4.0}
{Feel free to add a description here} {Feel free to add a description here}
\IfPackageAtLeastTF{latex-lab-testphase-math}{2025-01-24} \IfPackageAtLeastTF{latex-lab-testphase-math}{2025-01-24}
{} {}

View File

@ -1,5 +1,5 @@
\NeedsTeXFormat{LaTeX2e} \NeedsTeXFormat{LaTeX2e}
\ProvidesExplPackage{luamml-pdf-demo}{2025-02-17}{0.3.0}{Reasonable default definitions for luamml-pdf} \ProvidesExplPackage{luamml-pdf-demo}{2025-02-21}{0.4.0}{Reasonable default definitions for luamml-pdf}
\RequirePackage{luamml-pdf}% Loading luamml-pdf is pretty much the point \RequirePackage{luamml-pdf}% Loading luamml-pdf is pretty much the point
% \RequirePackage{amsmath,array}% May come back if the patches get ported % \RequirePackage{amsmath,array}% May come back if the patches get ported

View File

@ -123,7 +123,7 @@ local function write_elem(tree, stash)
end end
for _, elem in ipairs(tree) do for _, elem in ipairs(tree) do
if type(elem) ~= 'string' and not elem['tex:ignore'] then if type(elem) ~= 'string' and not elem['tex:ignore'] then
if elem['intent']==':equationlabel' and ltx.__tag.struct.luamml.labels then if elem['intent']==':equation-label' and ltx.__tag.struct.luamml.labels then
if #ltx.__tag.struct.luamml.labels > 0 then if #ltx.__tag.struct.luamml.labels > 0 then
-- print("CHECK LABEL STRUCTURE: ",table.serialize(elem), table.serialize(ltx.__tag.struct.luamml.labels)) -- print("CHECK LABEL STRUCTURE: ",table.serialize(elem), table.serialize(ltx.__tag.struct.luamml.labels))
local num= table.remove(ltx.__tag.struct.luamml.labels,1) local num= table.remove(ltx.__tag.struct.luamml.labels,1)

View File

@ -58,14 +58,14 @@ end
local function store_tag(xml) local function store_tag(xml)
local mml_row = store_get_row() local mml_row = store_get_row()
xml.intent = ':equationlabel' xml.intent = ':equation-label'
table.insert(mml_row, 1, xml) table.insert(mml_row, 1, xml)
last_tag = nil last_tag = nil
end end
local function store_notag(xml) local function store_notag(xml)
local mml_row = store_get_row() local mml_row = store_get_row()
xml.intent = ':noequationlabel' xml.intent = ':no-equation-label'
table.insert(mml_row, 1, xml) table.insert(mml_row, 1, xml)
end end

View File

@ -133,11 +133,11 @@
% \begin{macrocode} % \begin{macrocode}
%<@@=luamml> %<@@=luamml>
%<*luatex> %<*luatex>
\ProvidesExplPackage {luamml} {2025-02-17} {0.3.0} \ProvidesExplPackage {luamml} {2025-02-21} {0.4.0}
{Automatically generate presentational MathML from LuaTeX math expressions} {Automatically generate presentational MathML from LuaTeX math expressions}
%</luatex> %</luatex>
%<*pdftex> %<*pdftex>
\ProvidesExplPackage {luamml-pdf} {2025-02-17} {0.3.0} \ProvidesExplPackage {luamml-pdf} {2025-02-21} {0.4.0}
{MathML generation for L̶u̶a̶pdfLaTeX} {MathML generation for L̶u̶a̶pdfLaTeX}
%</pdftex> %</pdftex>
% \end{macrocode} % \end{macrocode}
@ -763,7 +763,7 @@
% %
% If math structure elements are created the Lbl-structure of a tag % If math structure elements are created the Lbl-structure of a tag
% must be moved inside the math structure, typically as an additional column in an % must be moved inside the math structure, typically as an additional column in an
% \texttt{mtable} with an intent \texttt{:equationlabel}. % \texttt{mtable} with an intent \texttt{:equation-label} or \texttt{:no-equation-label}.
% %
% The luamml-code handles this by stashing the Lbl-structure, storing the % The luamml-code handles this by stashing the Lbl-structure, storing the
% structure number in an array and reusing it once it creates the math structure elements. % structure number in an array and reusing it once it creates the math structure elements.