metanorma / tex2mn

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

Integrate tex2mn into MN #96

Closed paolobrasolin closed 3 years ago

paolobrasolin commented 4 years ago

I submitted the package to CTAN and set up a GHA action to release new tags on both GH and CTAN automatically.


In essence, tex2mn is composed of

Running tex2mn is a two step job:

latexml input.tex  --destination=intermediate.xml --preload=metanorma.cls --nocomments --strict
latexmlpost intermediate.xml --destination=output.adoc --stylesheet=metanorma.xsl --nocrossref --nodefaultresources
# NOTE: latexml is actually prealoading metanorma.cls.ltxml, which is in the same folder as metanorma.cls

In case the workflow benefits from it, these commands also work piping stdin/stdout:

cat input.tex \
  | latexml - --preload=metanorma.cls --nocomments --strict \
  | latexmlpost - --stylesheet=metanorma.xsl --nocrossref --nodefaultresources |
  > output.adoc

All the flags are needed as they are because of technical reasons (not delving into that here).

The exceptions are:

All that said, the piece of pipeline which is missing from MN

CAVEAT: we need an unreleased feature of latexml, contained precisely in git://github.com/brucemiller/LaTeXML.git@9a0e7dc5 Installation details for common OSs are available in the workflows: https://github.com/metanorma/tex2mn/tree/master/.github/workflows We'll have to wait for LaTeXML 0.8.5 to avoid handpicking a commit -- it's expected by July 2020: https://github.com/brucemiller/LaTeXML/issues/1234#issuecomment-591046589 Here is the progress status: https://github.com/brucemiller/LaTeXML/milestone/12

ronaldtse commented 4 years ago

@paolobrasolin thank you for this great news!

Could you help with:

  1. Provide setup instructions regarding CTAN and the metanorma.xsl stylesheet
  2. Update https://github.com/metanorma/mn-samples-tex-iso to reflect changes (and update its code to the latest mn-samples-iso)
  3. Update https://github.com/metanorma/rfc-camelot-holy-grenade-tex to make sure it is compilable
  4. Explain to @opoudjis on how to provide "TEX -> ADOC" flow inside the Metanorma gems (e.g. metanorma-tex gem or tex2mn gem?)

For the handpicked LaTeXML, @CAMOBAP can you help release that version in Snap as "edge" for now? Thanks!

CAMOBAP commented 4 years ago

@ronaldtse @paolobrasolin we already did --edge release for snap for git://github.com/brucemiller/LaTeXML.git@9a0e7dc5

Screen Shot 2020-05-04 at 3 48 06 PM

Please let me know if we should do the same for chocolatey

P.S. for OSX we don't control brew package, but it can be easily installed like this https://github.com/metanorma/metanorma-standoc/blob/master/.github/workflows/macos.yml#L30-L32

CAMOBAP commented 4 years ago

ping @ronaldtse @paolobrasolin

ronaldtse commented 4 years ago

Thanks @CAMOBAP ! Yes, can you please do the same for chocolatey, and can you also write up some documentation on metanorma.com on how to install this special version of LaTeXML for Metanorma on different platforms?

CAMOBAP commented 4 years ago

@ronaldtse done https://github.com/metanorma/metanorma.com/pull/263

CAMOBAP commented 3 years ago

Done