metanorma / tex2mn

Write Metanorma documents in LaTeX
https://www.metanorma.com
MIT License
2 stars 0 forks source link

LaTeX markup for setting attributes to sections? #98

Open manuelfuenmayor opened 4 years ago

manuelfuenmayor commented 4 years ago

From https://github.com/metanorma/mn-samples-tex-iso/issues/5

Is there a way to set an attribute to a section in LaTeX?

For example, [.preface]:

[.preface]
== Introduction
...
ronaldtse commented 4 years ago

Thanks @manuel489 for raising this -- @paolobrasolin is it possible to do so?

paolobrasolin commented 4 years ago

The \mn macro does the job like this:

\section{Introduction}
\mn{.preface}

This specific usage of \mn is untested/undocumented; please wait before closing the question so I can update the manual and write a test.

Generally speaking, \mn takes an asciidoc attributes list and uses it verbatim on the "nearby object"; the manual contains various usage examples, but \mn is undocumented as a standalone entity.

manuelfuenmayor commented 4 years ago

Thanks @paolobrasolin, the \mn macro seems to be working fine.

please wait before closing the question so I can update the manual and write a test.

Ok, I'll keep it opened.