Giter VIP home page Giter VIP logo

Comments (4)

khalid-hussain avatar khalid-hussain commented on August 21, 2024

We can also add a slightly more enhanced style as well.

Example:
heading.figureno -> 1.1, 1.2, 1.3, ...

from pandoc-fignos.

 avatar commented on August 21, 2024

How the numbers are presented is presentation logic and really belongs in the application responsible for rendering the result. The application could be ConTeXt, LaTeX, CSS (in case of HTML), and so forth. While it would be convenient to put it in the Markdown, it seems to move away from the separation of content and presentation.

from pandoc-fignos.

tomduck avatar tomduck commented on August 21, 2024

This is a very good point, @DaveJarvis. I know this is easy to do in LaTeX, but I'm not sure how I would do it in CSS -- or if the pandoc-fignos html is written correctly to take advantage of this possibility. Can you comment further?

from pandoc-fignos.

 avatar commented on August 21, 2024

Consider the following Markdown document:

1. Line 1
1. Line 2
1. Line 3

Converted to HTML:

<ol><li>Line 1</li><li>Line 2</li><li>Line 3</li></ol>

With CSS, you can change how the number format is presented to the reader throughout the entire document:

ol {list-style-type: upper-roman;}

Now, arguably, if you wanted to convert only one list in the document (instead of all lists), you'd have to find a different way to style it. This might mean marking up the document a little differently to describe the intent of the section, such as:

::: algorithm
1. Line 1
1. Line 2
1. Line 3
:::

This becomes:

<div class="algorithm">
<ol><li>Line 1</li><li>Line 2</li><li>Line 3</li></ol>
</div>

And it's trivial to change the CSS for only that single list accordingly:

div.algorithm ol {list-style-type: upper-roman;}

ConTeXt is syntactically different, but the concept is the same.

I don't know if pandoc-fignos is written to take advantage of this possibility.

from pandoc-fignos.

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.