Giter Club home page Giter Club logo

Comments (3)

owenh000 avatar owenh000 commented on July 26, 2024

Hi @************, thanks for the suggestion. However, if I understand correctly, you are suggesting that an h6 (for example) should be rendered different sizes depending on where it exists on the page. That's not a good idea: why specify an h6 (or any level) in the source if that header might be arbitrarily assigned some other size?

I suppose the source document should be restructured to be more flat and less deep. As a physical book would normally only have page breaks for the top one or two levels in the hierarchy (such as part and chapter or chapter and section), using a multipage-level value over 2 doesn't seem like a good idea either (I added this to the README).

If I'm missing something, feel free to provide (or link to) a working example and re-open this issue.

from asciidoctor-multipage.

************ avatar ************ commented on July 26, 2024

However, if I understand correctly, you are suggesting that an h6 (for example) should be rendered different sizes depending on where it exists on the page

Hi, I'm not sure you understood what I meant, but you might have, but just in case I'll try to be more explicit.

Input document:

= h1

== h2

=== h3

==== h4

===== h5

====== h6

Desired output document without multipage:

<h1>h1</h1>

<h2>h2</h2>

<h3>h3</h3>

<h4>h4</h4>

<h5>h5</h5>

<h6>h6</h6>

Desired multi page output:

h1.html

<h1>h1</h1>

h2.html

<h1>h1</h1>

<h2>h2</h2>

h3.html

<h1>h1</h1>

<h2>h3</h2>

h4.html

<h1>h1</h1>

<h2>h4</h2>

h5.html

<h1>h1</h1>

<h2>h5</h2>

h6.html

<h1>h1</h1>

<h2>h6</h2>

Live example: consider this page: https://************.com/linux-kernel-module-cheat/linux-kernel-defconfig

It is from a h6 header about "Linux kernel defconfig", which should be the main topic of the page.

However, "Linux kernel defconfig" appears so tiny on that page, especially so under a huge "Linux Kernel Module Cheat" (the toplevel h1) that it is hard for users to understand what is the main topic of the page.

from asciidoctor-multipage.

owenh000 avatar owenh000 commented on July 26, 2024

I'm not sure you understood what I meant, but you might have, but just in case I'll try to be more explicit.

Thanks for providing the live example. It looks like I did understand, but thanks for providing more details to be sure.

As I implied earlier, this extension is intended for use with a source document that is structured like a book, with a hierarchy of levels. The extension splits the document into separate chunks similar to the way page breaks (and perhaps blank pages) are added to a book to separate top levels (such as parts and chapters, or h1/h2). Lower levels (such as sections and subsections, or h3+) are all included in a single chunk with styled headers to establish a visual hierarchy.

This extension is not designed for generating a hierarchical website, where stand-alone pages have various positions in a tree. If you wanted to use Asciidoctor for that, a better way would be to write and generate a separate adoc document for each page on the website (and not use this extension).

The live example you linked to, at the time I write this, contains only a single h6 subsubsubsection (multipage-level is probably set to 5) with no child sections. It is totally fine for you to use Asciidoctor and asciidoctor-multipage in this way if it is working for you, but making changes to accommodate this type of use means we would be working against the way Asciidoctor is designed (and thus it is not practical).

from asciidoctor-multipage.

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.