metanorma / tex2mn

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

Duplicated author attribute value #97

Closed manuelfuenmayor closed 4 years ago

manuelfuenmayor commented 4 years ago

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

The following tex code:

\documentclass{Metanorma}

\title{ISO Standard}
\author{John Doe}
\set{author}{John Doe}
\set{author-phonetic}{jän dō}
\set{doctype}{international-standard}
\set{mn-document-class}{iso}

\begin{document}
...

Results in this adoc code:

= ISO Standard
:author: John Doe
:author-phonetic: jän dō
:doctype: international-standard
:mn-document-class: iso

John Doe
...

As shown above, the value John Doe gets duplicated right after the attributes. And, I believe the :author: attribute is not currently in use.

ronaldtse commented 4 years ago

In the ISO flavor there are no authors. So the \set{author}{John Doe} and \author{John Doe} lines should be removed.

On the other hand, we need to support other flavors with authorship, e.g. OGC.

paolobrasolin commented 4 years ago

Using \author{John Doe} produced a spurious John Doe at the beginning of the document. That bug is fixed in https://github.com/metanorma/tex2mn/commit/772ccbd22dab1e20c01f49b07bec84f27d77156e

That being said, there was some confusion because \author targets direct LaTeX compilation, while \set{author} targets AsciiDoc conversion. However, one can simply using both macros to target both LaTeX compilation and AsciiDoc conversion.

I've clarified the manual and opened #111 as a non urgent enhancement. cc @ronaldtse @manuel489

manuelfuenmayor commented 4 years ago

Issue fix confirmed, thanks @paolobrasolin. Closing.