Coder Social home page Coder Social logo

Comments (3)

mojavelinux avatar mojavelinux commented on July 30, 2024 1

Passing -d book is a workaround, but I don't understand why it works for latex but not html.

That's because, at the moment, the validation for heading levels as they pertain to the doctype happens in the converter, not in the parser. Ideally, that validation should be moved to the parser so that it is enforced regardless of the converter. This is just a current quirk of the Asciidoctor pipeline. This would need to be enforced in the LaTeX backend to be consistent.

Level-0 sections in the content (other than the document header) are not allowed unless the doctype is book. This requirement is mostly a side-effect of needing to generate valid DocBook. It doesn't make much sense in the HTML backend, to be honest. However, you can think of it as a way of communicate intended structure of the document.

from asciidoctor-latex.

nh2 avatar nh2 commented on July 30, 2024

Passing -d book is a workaround, but I don't understand why it works for latex but not html.

from asciidoctor-latex.

jxxcarlson avatar jxxcarlson commented on July 30, 2024

I'll take a look at it

Sent from my iPhone

On Jan 20, 2015, at 3:55 PM, Niklas Hambüchen [email protected] wrote:

Hi, a question:

If I use this diff

diff --git a/try-out/eqno-latex.adoc b/try-out/eqno-latex.adoc
index c98e741..207e51f 100644
--- a/try-out/eqno-latex.adoc
+++ b/try-out/eqno-latex.adoc
@@ -1,5 +1,6 @@
-== Numbered Equations
+= Numbered Equations

+== Something

The environment [env.equation] is automatically
numbered by default, as in the examples below.
that changes the == heading to a =, and run with asciidoctor -b html5 -r asciidoctor-latex --attribute=stem=latexmath --backend=html eqno-latex.adoc, then I get

asciidoctor: ERROR: eqno-latex.adoc: line 1: only book doctypes can contain level 0 sections
This only happens with the html backend, with the latex backend everything is fine.

What's going on here?


Reply to this email directly or view it on GitHub.

from asciidoctor-latex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.