Giter Club home page Giter Club logo

Comments (4)

Niols avatar Niols commented on July 24, 2024

I have taken a look at the syntax of ocamldoc comments (odoc and ocamldoc share the same syntax) and there does not seem to be any way to quote a text. In the code of odoc, one can see a suggestion to use "raw HTML" as follows:

{%html:
        <blockquote>
          If the raw HTML is the only thing in a paragraph, it is treated as a block
          element, and won't be wrapped in paragraph tags by the HTML generator.
        </blockquote>
   %}

However, this does not seem so satisfying as it will only work with HTML and there is then no way to use the other markups from ocamldoc's syntax.

from md2mld.

mseri avatar mseri commented on July 24, 2024

Yes, I think I had thought about it at the time and could not find a satisfactory solution.
The code that deals with it is

md2mld/src/backend.ml

Lines 90 to 93 in 97ae31f

| Blockquote q :: tl ->
Buffer.add_string b (quote ~indent:list_indent (mld_of_md ~min_header q));
if tl <> [] then Buffer.add_string b "\n";
loop list_indent tl

Where quote is used to re-add manually the ">"

from md2mld.

mseri avatar mseri commented on July 24, 2024

We could replace my handcrafted > with two consecutive (redundant) blocks. One in latex using the quote environment and one in html using the blockquotes environment. It will not be nice to see in the sources, but it should produce the correct html and tex/pdf. This would be a relatively simple change to add

from md2mld.

mseri avatar mseri commented on July 24, 2024

I am generating the html form for now. It would not be hard to pass a context to choose between latex-ready or html-ready output though

from md2mld.

Related Issues (7)

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.