General > General Technical Chat
Generating documents .docx from lightweight markup language
(1/4) > >>
Picuino:
Hi all. I am looking for a way to generate complex documents (docx or pdf) from a lightweight markup language.
The lightweight languages ​​I know are Markdown and ReStructuredText, but I could adapt to any other.
I know that this task can be done from the LaTeX language, but I think that LaTeX is too complex for what I'm looking for.

So far I have used pandoc (https://pandoc.org/) to try to do the task, but I can't define the .docx template to change the fonts, margins, etc.

I have also used Sphinx (https://www.sphinx-doc.org/) on occasion to generate PDF files. It's a bit complex, generate a single file, not several and won't let me change the font formatting, etc. Although the result is usually very good. Another problem it has is that it does not allow to generate .docx.

Is there any good alternative or solution for what I'm looking for?
Whales:
Re pandoc: see if this does what you want https://pandoc.org/MANUAL.html#option--reference-doc
PKTKS:

--- Quote from: Picuino on February 07, 2022, 12:38:09 pm ---Hi all. I am looking for a way to generate complex documents (docx or pdf) from a lightweight markup language.


--- End quote ---

Both asserts are opposite

Complex  documents like PDFs and the sick doc docx doc family will not be kind with simple markup.. results will be messy

For that kind of docs (not simple MAN or PODs or html template based) TeX is the tool


--- Quote from: Picuino on February 07, 2022, 12:38:09 pm ---I know that this task can be done from the LaTeX language, but I think that LaTeX is too complex for what I'm looking for.

--- End quote ---

It is simpler than PostScript itself. With even better results.

Best possible bottom line is SGML with proper  docbook and sgmlcat templates...
You just can not  generate complex  without this at minimum.

Bare bones things can be done directly with PERL PODs structured markup

Paul

PS> ALAS if i recall correctly last time I used needed that to generate brain damaged DOCs i have used sgml which will be directly translated to RTF  by JADE.

SGML  plus docbook templates have a wide output of formats..
PKTKS:
Just checked the status of my converters as of today...

And before some  modern  folk start whining about SGML..

It does the job amazingly well even today (while SGML has less than minimum attention these days) ..   I like very much NEDIT to execute my macros and commands (although vi and emacs can do the same thing)  as a matter of preference.. even though NEDIT is still MOTIF only..

I am pretty sure it is hard to replace all simple functional things of this solution.

JADE can output RTF  PDF HTML XML and MIF from a single simple source
Just make sure to have all OASIS templates and SGML catalogs properly available


--- Code: ---<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"/share/sgml/docbook/sgml-dtd-4.5/docbookx.dtd" [

<!ENTITY genindex.sgm SYSTEM "genindex.sgm">
]>

<!-- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" -->

<book>
<bookinfo>
<title>SGML bare bones</title>
<date>Version $Revision$, $Date$</date>
<authorgroup>
<author>
<firstname>Nobody</firstname><surname>None</surname>
</author>
</authorgroup>
<copyright>
<year>$Date$</year>
<holder></holder>
</copyright>
</bookinfo>

<toc></toc>

<chapter><title>1st Chapter</title>
<para>
SGML bare bones minimum
</para>
</chapter>

<!-- &genindex.sgm; -->

</book>

--- End code ---

Cheers
Paul
Picuino:
This is a skeleton of what I want.
I'm going to try several solutions to see which one comes closest.
Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod