Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
394 views
in Technique[技术] by (71.8m points)

pandoc - asciidoc: Encourage reduction of text size to fix page width

I have a workflow where I use asciidoc (via asciidoctor) to create html, pdf and or open office (.odt) format documents. For the most part this works very well.

For the open office conversion I use pandoc with docbook format as an intermediary as in:

asciidoctor -b docbook foo.adoc -o foo.docbook
pandoc --base-header-level=3 -V date:"" -V title:"" -f docbook foo.docbook -o foo.odt

As it my related question, I wish to format output like the following:

This is some pipe delimited output:

    #columns: name|rank|serial-number|address|phone|age
    Goza|God|666|Zuul|555|10000

The columns can get quite wide. I would like them to stay on one line if at all possible but have the font size reduced instead. How can I force this or at least encourage it where there is no direct control.

I have tried things like:

    [%small]
    ----
    #columns: name|rank|serial-number|address|phone|age
    Goza|God|666|Zuul|555|10000
    ----

    [%nowrap][%autofit]
    ----
    #columns: name|rank|serial-number|address|phone|age
    Goza|God|666|Zuul|555|10000
    ----

But so far nothing has worked.

What is the best way to:

  • Express this semantically in asciidoc
  • Express this semantically in docbook (generated by asciidoctor)
  • Express this semantically in html (generated by asciidoctor)

Ideally I'd like to express myself in statements like:

  • shrink font to fit page width
  • minimum font size can't be less than X
  • only break on pipe symbol (it does this already thankfully)

It would be acceptable to say:

  • specify font size

But this is not so good for the case of html where the text is reflowable and the window could be any size.

question from:https://stackoverflow.com/questions/65944920/asciidoc-encourage-reduction-of-text-size-to-fix-page-width

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...