transpect / xml2tex

Converts XML to LaTeX
BSD 2-Clause "Simplified" License
43 stars 4 forks source link

Store xml file catalog under which folder for setup? #8

Closed mabromuela88 closed 3 years ago

mabromuela88 commented 3 years ago

There are xmlcatalog subfolder in almost every folder, Under which folder will we add the catalog file?

gimsieke commented 3 years ago

You will create a new xmlcatalog directory in the project directory that includes the libraries using git submodules or svn externals. xml2tex is one of the libraries. Each library has its own xmlcatalog directory. The catalog.xml files in these directories will be included using nextCatalog instructions from the to-be-created project file xmlcatalog/catalog.xml. I suggest you download as zip distribution (or recursively clone) https://github.com/transpect/docx2tex. This is such a project that has its own catalog.

gimsieke commented 3 years ago

Warning: Configuring a transpect project is by no means trivial. You need to have a good understanding of XSLT, XProc, XML catalogs, and more.

mabromuela88 commented 3 years ago

ah I see, I understand now. about docx2tex, this one work for docx, but I like to use xml as an input to get tex output like the one from xml2tex

gimsieke commented 3 years ago

Then you can create a project directory, attach some submodules/externals (at least xslt-util, xproc-util, xml2tex, mml2tex if you have formulas, calabash-frontend, mml-normalize). Then you need to create a pipeline that invokes xml2tex:convert (the last step in docx2tex.xpl), and you need to prepare an xml2tex configuration that you supply to the step’s conf port. There are examples in https://github.com/transpect/xml2tex/tree/master/example and in https://github.com/transpect/docx2tex/blob/master/conf/conf.xml (this one is the best developed configuration besides the BITS one in the examples directory; it maps DocBook to TeX, as used in docx2tex).

mabromuela88 commented 3 years ago

thank you