metanorma / mn-native-pdf

Development repository for mn2pdf with Metanorma document samples
3 stars 2 forks source link

Add M3AAWG layout #161

Closed ronaldtse closed 4 years ago

ronaldtse commented 4 years ago

https://github.com/metanorma/mn-samples-m3aawg

Also refer to this: https://www.m3aawg.org/sites/default/files/m3aawg-dns-crypto-tutorial-2018-09.pdf

Intelligent2013 commented 4 years ago

@ronaldtse I'm trying to generate a source XML file, but get the error

setlocal enableextensions & md documents & endlocal
if "" == "null" ( \
        echo "Running locally..." & bundle exec metanorma -x xml "sources/best-practice/best-practice.adoc" \
) else ( \
        if exist "" ( \
                if "" == ".xml" ( \
                        copy "" "sources\best-practice\best-practice.xml" \
                ) else ( \
                        echo "Running locally..." & bundle exec metanorma  & \
                        copy "" "sources\best-practice\best-practice.xml" \
                ) \
        ) else ( \
                echo "Running locally..." & bundle exec metanorma  & \
                copy "" "sources\best-practice\best-practice.xml" \
        ) \
)
"Running locally..."
Commands:
  metanorma compile FILENAME                                # Compile to a me...
  metanorma help [COMMAND]                                  # Describe availa...
  metanorma list-extensions                                 # List supported ...
  metanorma new NAME -d, --doctype=DOCTYPE -t, --type=TYPE  # Create new Meta...
  metanorma template-repo                                   # Manage metanorm...
  metanorma version                                         # Version of the ...

The system cannot find the path specified.
make: *** [Makefile.win:78: sources/best-practice/best-practice.xml] Error 1

What do I do wrong?

Full log:

make -f Makefile.win all
A subdirectory or file C:\Users\IntlUser\.cache\xml2rfc already exists.
"src sources/best-practice/best-practice.adoc"
"xml documents/best-practice/best-practice.xml"
"formats doc html rxl xml"
bundle install --jobs 4 --retry 3
Fetching gem metadata from https://rubygems.org/...............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies.......
Using rake 12.3.3
Using public_suffix 4.0.5
Using asciidoctor 2.0.10
Using asciimath 1.0.9
Using latex-decode 0.3.1
Using bundler 2.1.4
Using camertron-eprun 1.1.1
Using cldr-plurals-runtime-rb 1.0.1
Using cnccs 0.1.5
Using concurrent-ruby 1.1.6
Using unf_ext 0.0.7.7 (x86-mingw32)
Using multipart-post 2.1.1
Using ffi 1.12.2 (x86-mingw32)
Using gb-agencies 0.0.6
Using rchardet 1.8.0
Using htmlentities 4.3.4
Using image_size 2.0.2
Using mime-types-data 3.2020.0425
Using mini_portile2 2.4.0
Using thread_safe 0.3.6
Using uuidtools 2.1.5
Using iso-639 0.3.5
Using iso639 1.3.2
Using liquid 4.0.3
Using roman-numerals 0.3.0
Using isoics 0.1.8
Using mimemagic 0.3.5
Using rubyzip 2.3.0
Using optout 0.0.2
Using unicode2latex 0.0.3
Using thor 0.20.3
Using addressable 2.7.0
Using bibtex-ruby 5.1.4
Using unf 0.1.4
Using faraday 1.0.1
Using git 1.7.0
Using sassc 2.2.1 (x86-mingw32)
Using tzinfo 2.0.2
Using mime-types 3.3.1
Using nokogiri 1.10.9 (x86-mingw32)
Using ruby-jing 0.0.1
Using domain_name 0.5.20190701
Using http-cookie 1.0.3
Using twitter_cldr 4.4.5
Using tzinfo-data 1.2020.1
Using html2doc 1.0.1
Using iev 0.2.3
Using metanorma 1.0.4
Using mathml2asciimath 0.0.10
Using relaton-bib 1.0.1
Using sterile 1.0.16
Using relaton-iso-bib 1.0.0
Using relaton-ietf 1.0.0
Using relaton-nist 1.0.0
Using relaton-omg 1.0.0
Using relaton-w3c 1.0.0
Using isodoc 1.0.25
Using relaton-calconnect 1.0.0
Using relaton-gb 1.0.0
Using relaton-iec 1.0.0
Using relaton-itu 1.0.1
Using relaton-ogc 1.0.0
Using relaton-un 1.0.0
Using relaton-iso 1.0.1
Using relaton 1.0.1
Using relaton-iev 1.0.0
Using relaton-cli 1.0.1
Using metanorma-standoc 1.3.26
Using metanorma-csa 1.4.9
Using metanorma-csd 1.3.20
Using metanorma-iso 1.3.23
Using metanorma-generic 1.4.7
Using metanorma-ietf 2.0.9
Using metanorma-itu 1.0.14
Using metanorma-m3d 1.3.18
Using metanorma-nist 1.0.6
Using metanorma-ogc 1.0.5
Using metanorma-un 0.3.7
Using metanorma-gb 1.3.22
Using metanorma-iec 1.0.5
Using metanorma-cli 1.2.11.2
Bundle complete! 1 Gemfile dependency, 81 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
setlocal enableextensions & md documents & endlocal
if "" == "null" ( \
        echo "Running locally..." & bundle exec metanorma -x xml "sources/best-practice/best-practice.adoc" \
) else ( \
        if exist "" ( \
                if "" == ".xml" ( \
                        copy "" "sources\best-practice\best-practice.xml" \
                ) else ( \
                        echo "Running locally..." & bundle exec metanorma  & \
                        copy "" "sources\best-practice\best-practice.xml" \
                ) \
        ) else ( \
                echo "Running locally..." & bundle exec metanorma  & \
                copy "" "sources\best-practice\best-practice.xml" \
        ) \
)
"Running locally..."
Commands:
  metanorma compile FILENAME                                # Compile to a me...
  metanorma help [COMMAND]                                  # Describe availa...
  metanorma list-extensions                                 # List supported ...
  metanorma new NAME -d, --doctype=DOCTYPE -t, --type=TYPE  # Create new Meta...
  metanorma template-repo                                   # Manage metanorm...
  metanorma version                                         # Version of the ...

The system cannot find the path specified.
make: *** [Makefile.win:78: sources/best-practice/best-practice.xml] Error 1
ronaldtse commented 4 years ago

Please use this XML for reference. Archive.zip

Intelligent2013 commented 4 years ago

@ronaldtse

Original PDFs have very different layouts. Example for ToC: https://www.m3aawg.org/sites/default/files/m3aawg-dns-crypto-tutorial-2018-09.pdf изображение

https://www.m3aawg.org/sites/default/files/m3aawg-dns-crypto-recipes-2018-09.pdf изображение

https://www.m3aawg.org/sites/default/files/m3aawg-mobile-messaging-bcp-political-programs-us-2020-04.pdf изображение

Current version of m3d.report.core.xsl most fits to m3aawg-dns-crypto-recipes-2018-09_2.pdf .

ronaldtse commented 4 years ago

Current version of m3d.report.core.xsl most fits to m3aawg-dns-crypto-recipes-2018-09_2.pdf .

Looks good, thanks!

If there is a Makefile.win issue, @CAMOBAP can you help fix this? Thanks!

CAMOBAP commented 4 years ago

@ronaldtse looks like issue with Makefile, I will check

CAMOBAP commented 4 years ago

@Intelligent2013 what is your yq --version? Highly likely it's below 2.4.0

@Intelligent2013 @ronaldtse let me know if you think that this should be fixed for older yq versions

ronaldtse commented 4 years ago

@CAMOBAP I don't think we want to support yq below 3.0. Perhaps @Intelligent2013 can try updating yq?

Intelligent2013 commented 4 years ago

@CAMOBAP

@Intelligent2013 what is your yq --version? Highly likely it's below 2.4.0

yq version 3.2.1
where yq
C:\ProgramData\chocolatey\bin\yq.exe                       

May be I something install wrong? What should I do to install all needed software on Windows platform? I've installed chocolatey and completed these actions: https://www.metanorma.com/author/topics/install/#windows

CAMOBAP commented 4 years ago

@Intelligent2013 thanks, looks like the situation is completely opposite to my initial comment: it works for 2.4 but doesn't work for the newest version of yq

I already have a local fix, trying it on CI

CAMOBAP commented 4 years ago

Fixed in the repository, but because of https://github.com/metanorma/metanorma-itu/issues/213 it may not work

Intelligent2013 commented 4 years ago

@CAMOBAP Thank you. XML creating working now.