Module for Markdown: any volunteer to make a ConTeXt interface?
Hi, There's a really nice module for processing markdown: https://github.com/Witiko/markdown that has been presented during the TUG meeting and is included in TeX Live. It theoretically works for ConTeXt (the output is perfectly usable), but it needs a cleanup of the user interface to turn the options on and off. For example, it would be nice to use something like \setupmarkdown [fencedCode=true] rather than \def\markdownOptionFencedCode{true} Is anyone willing to look into the code and help the author fix the interface? (I can add it to our distribution if needed.) Mojca
On Thu, 4 May 2017, Mojca Miklavec wrote:
Hi,
There's a really nice module for processing markdown: https://github.com/Witiko/markdown that has been presented during the TUG meeting and is included in TeX Live.
This is a fork of luamark (by the author of pandoc). Wouldn't it be better to provide an interface around that? Is it simply providing a tex interface around luamark or are there any changes in the parser as well. Any idea how it compares with the markdown parser in m-markdown already included in ConTeXt? Aditya
On 5 May 2017 at 21:54, Aditya Mahajan wrote:
On Thu, 4 May 2017, Mojca Miklavec wrote:
There's a really nice module for processing markdown: https://github.com/Witiko/markdown that has been presented during the TUG meeting and is included in TeX Live.
This is a fork of luamark (by the author of pandoc). Wouldn't it be better to provide an interface around that? Is it simply providing a tex interface around luamark or are there any changes in the parser as well.
Any idea how it compares with the markdown parser in m-markdown already included in ConTeXt?
I'm CC-ing the author since I don't know answers to these questions, but it would indeed be nice to end up with one single good module rather than having two slightly different incompatible ones with the same name. Mojca
On Fri, May 05, 2017 at 11:12:41PM +0200, Mojca Miklavec wrote:
On 5 May 2017 at 21:54, Aditya Mahajan wrote:
On Thu, 4 May 2017, Mojca Miklavec wrote:
There's a really nice module for processing markdown: https://github.com/Witiko/markdown that has been presented during the TUG meeting and is included in TeX Live.
This is a fork of luamark (by the author of pandoc). Wouldn't it be better to provide an interface around that? Is it simply providing a tex interface around luamark or are there any changes in the parser as well.
Any idea how it compares with the markdown parser in m-markdown already included in ConTeXt?
Hello, some of the major differences between jgm/lunamark and Witiko/markdown include: - Witiko/markdown supports syntax extensions that are currently not implemented in jgm/lunamark (iA Writer Content Blocks). - The output of Witiko/markdown consists of structural `\markdownRenderer...` macros that can be easily redefined by a user to produce arbitrary results. Example input: - _item 1_ - [item 2](url) - `item 3` Example output: \markdownRendererUlBeginTight \markdownRendererUlItem\markdownRendererEmphasis{item 1}\markdownRendererUlItemEnd \markdownRendererUlItem\markdownRendererLink{item 2}{url}{url}{}\markdownRendererUlItemEnd \markdownRendererUlItem\markdownRendererCodeSpan{item 3}\markdownRendererUlItemEnd \markdownRendererUlEndTight In contrast, jgm/lunamark directly produces ConTeXt-specific markup. - Witiko/markdown does caching; processed documents and verbatim code blocks are stored in auxiliary files and these files are referenced from the conversion output. This is highly useful for debugging and for postprocessing the auxiliary files using external tools. - Witiko/markdown is stripped-down compared to jgm/lunamark, so that external dependencies such as Cosmo and Alt-getopt are unnecessary. The `m-markdown.lua` seems like a heavily stripped-down version of lunamark. Most importantly, the parser seems to recognize no syntax extensions, so only Gruber's vanilla Markdown is supported. P.S.: Witiko/markdown already has a ConTeXt interface (see `texdoc markdown`, section 2.4). However, Mojca and I agreed that it would likely benefit from additional syntactic sugar. Example document: \usemodule[t][markdown] \def\markdownOptionSomething{true} \def\markdownRendererSomethingElse#1#2#3{\foo{#1}} \starttext \markdownInput{bar.md} \startmarkdown Some _Markdown_ text. \stopmarkdown \stoptext The example document was taken from the slides introducing the package [1]. [1]: https://github.com/Witiko/markdown/blob/slides-tug07/light.pdf Best Regards, Vít Novotný
I'm CC-ing the author since I don't know answers to these questions, but it would indeed be nice to end up with one single good module rather than having two slightly different incompatible ones with the same name.
Mojca
On 5/5/2017 9:54 PM, Aditya Mahajan wrote:
On Thu, 4 May 2017, Mojca Miklavec wrote:
Hi,
There's a really nice module for processing markdown: https://github.com/Witiko/markdown that has been presented during the TUG meeting and is included in TeX Live.
This is a fork of luamark (by the author of pandoc). Wouldn't it be better to provide an interface around that? Is it simply providing a tex interface around luamark or are there any changes in the parser as well.
Any idea how it compares with the markdown parser in m-markdown already included in ConTeXt?
that one was written when i tested some other lua thing that was very slow/inefficient .. irr some of the improved code was backported but as i never use markdown i didn't keep track of it (maybe some day i'll pick up that tread for mixed source coding or so) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
For what it's worth, the folks I work with would find it very valuable. Our
team currently composes on drive and I have to kick things in various ways
via pandoc to get it into our ConTeXt server (multi-user editing with
floobits is ... kinda neat). Reducing complexity of that would be
wonderful. I also use the md mechanism in journal publishing (
https://github.com/sx-archipelagos/sxa) -- and would find it very useful
there.
(The other route that would be very useful here is any paperpile
integration, but that's rather outside the scope of this discussion).
On 6 May 2017 at 18:28, Hans Hagen
On 5/5/2017 9:54 PM, Aditya Mahajan wrote:
On Thu, 4 May 2017, Mojca Miklavec wrote:
Hi,
There's a really nice module for processing markdown: https://github.com/Witiko/markdown that has been presented during the TUG meeting and is included in TeX Live.
This is a fork of luamark (by the author of pandoc). Wouldn't it be better to provide an interface around that? Is it simply providing a tex interface around luamark or are there any changes in the parser as well.
Any idea how it compares with the markdown parser in m-markdown already included in ConTeXt?
that one was written when i tested some other lua thing that was very slow/inefficient .. irr some of the improved code was backported but as i never use markdown i didn't keep track of it (maybe some day i'll pick up that tread for mixed source coding or so)
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
____________________________________________________________ _______________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/list info/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ____________________________________________________________ _______________________
-- http://fedarch.org/ Brian Ballsun-Stanton Ph.D. FAIMS Project http://fedarch.org/ - Data Architect http://www.mendeley.com/profiles/brian-ballsun-stanton/ brian@fedarch.org 0479 178 749
I recently finished a book project in multimarkdown, which I converted to LaTeX (I could not use ConTeXt because of its limited bibliographical functions in comparison to BibLatex). It worked fine. If I remember correctly, I preferred multimarkdown over markdown for more possibilities regarding tables. Robert
Op 6 mei 2017, om 13:16 heeft Brian Ballsun-Stanton
het volgende geschreven: For what it's worth, the folks I work with would find it very valuable. Our team currently composes on drive and I have to kick things in various ways via pandoc to get it into our ConTeXt server (multi-user editing with floobits is ... kinda neat). Reducing complexity of that would be wonderful. I also use the md mechanism in journal publishing (https://github.com/sx-archipelagos/sxa https://github.com/sx-archipelagos/sxa) -- and would find it very useful there.
(The other route that would be very useful here is any paperpile integration, but that's rather outside the scope of this discussion).
On 6 May 2017 at 18:28, Hans Hagen
mailto:pragma@wxs.nl> wrote: On 5/5/2017 9:54 PM, Aditya Mahajan wrote: On Thu, 4 May 2017, Mojca Miklavec wrote: Hi,
There's a really nice module for processing markdown: https://github.com/Witiko/markdown https://github.com/Witiko/markdown that has been presented during the TUG meeting and is included in TeX Live.
This is a fork of luamark (by the author of pandoc). Wouldn't it be better to provide an interface around that? Is it simply providing a tex interface around luamark or are there any changes in the parser as well.
Any idea how it compares with the markdown parser in m-markdown already included in ConTeXt?
that one was written when i tested some other lua thing that was very slow/inefficient .. irr some of the improved code was backported but as i never use markdown i didn't keep track of it (maybe some day i'll pick up that tread for mixed source coding or so)
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl http://www.pragma-ade.nl/ | www.pragma-pod.nl http://www.pragma-pod.nl/ -----------------------------------------------------------------
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl mailto:ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl http://www.pragma-ade.nl/ / http://context.aanhet.net http://context.aanhet.net/ archive : https://bitbucket.org/phg/context-mirror/commits/ https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net http://contextgarden.net/ ___________________________________________________________________________________
--
Brian Ballsun-Stanton Ph.D. FAIMS Project http://fedarch.org/ - Data Architect http://www.mendeley.com/profiles/brian-ballsun-stanton/ brian@fedarch.org mailto:brian@fedarch.org 0479 178 749
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
On Sun, 7 May 2017 23:33:30 +0200 r.ermers@hccnet.nl wrote:
I recently finished a book project in multimarkdown, which I converted to LaTeX (I could not use ConTeXt because of its limited bibliographical functions in comparison to BibLatex).
Just wonder, since I plan to embrace ConTeXt for a larger educational-based project with the need to use bibliographical functions, what did you prevent you to use it? Let me say that I'm fully familiar with neither BibLatex's capabilities nor with the similar things in MkIV... Sincerely, Gour -- As a lamp in a windless place does not waver, so the transcendentalist, whose mind is controlled, remains always steady in his meditation on the transcendent self.
On 2017-12-05 13:20, Gour wrote:
On Sun, 7 May 2017 23:33:30 +0200 r.ermers@hccnet.nl wrote:
I recently finished a book project in multimarkdown, which I converted to LaTeX (I could not use ConTeXt because of its limited bibliographical functions in comparison to BibLatex). Just wonder, since I plan to embrace ConTeXt for a larger educational-based project with the need to use bibliographical functions, what did you prevent you to use it?
Let me say that I'm fully familiar with neither BibLatex's capabilities nor with the similar things in MkIV...
Sincerely, Gour
The utility of the new bibliography subsystem is a function of your ability to work within the rigid structure of the APA reference standards. Even with that, there are outstanding bugs that have not been addressed for many months. If your publisher requires adherence to some other bibliographical standards, or even variations of the APA standards, the new subsystem may not suffice, or may not suffice without significant customization that requires understanding of the source code. (ConTeXt also has some support for the APS standard, but that is secondary to APA in the implementation plan as so far revealed. There is no current plan of which I am aware to support more humanities-focused standards (Chicago, MHRA, Turabian, ...), although I would be happy to be proved wrong on that.) For comparison, BibLaTeX supports tens of different standards and variants, and has (or had a couple of years ago when I last used it) an active community of developers. To accomplish this, BibLaTeX relies on many added tags to BibTeX, thus forgoing compatibility with other systems. The differences between the two derive from a few basic decisions taken by the ConTeXt developers. Among these, ConTeXt prefers to not add additional fields to BibTeX, and prefers to develop its own code without reliance on third-party software. If your document requires bibliographic support beyond what ConTeXt currently provides, there is another mechanism by which you can incorporate other reference standards. You can write your document in Pandoc http://pandoc.org/ [1] Markdown and use any of the hundreds of reference standards and variants supported there through CSL http://citationstyles.org/ [2]. Pandoc can create an XML result that can be transformed into a PDF by ConTeXt with the bibliography created according the the selected CSL format. This works well for documents that do not require significant customization, but may become cumbersome when you must fiddle with many individual objects. I have done this for a book-scale project as a proof of concept, and the bibliography handling works well. My work expands on that of Pablo Rodríguez, who addressed the method in a note to you last year https://www.mail-archive.com/ntg-context@ntg.nl/msg83581.html [3]. [1] http://pandoc.org/ [2] http://citationstyles.org/ [3] https://www.mail-archive.com/ntg-context@ntg.nl/msg83581.html -- Rik
This analysis is not quite correct.
The mkiv bibliography system is not rigid at all, in fact it is
eminently configurable. However, the APA specification that is
programmed is rigidly adhered to, and it is up to the responsibility of
the user to configure any desired deviations.
The outstanding bugs that Rik refers to are either obscure special
cases, misuses of bibliography fields, or simply a special
configuration request. There may be some outstanding bugs in a system
that is still not fully tested under all conditions.
BibLaTeX introduces many incompatible and curiously defined fields. A
ConTeXt specification that uses them can be written, but I am not going
to do this as I see no point. BibLaTeX is a good example not to follow.
There are "plans" to write other humanities-focused standards, but
there needs to be some motivation and more importantly, a clearly
written standard.
I use the "bibliography" subsystem as a general database tool, defining
glossaries, tables of crystallographic symmetries, catalogs of
diagrams, etc., so it is quite a bit more flexible than just to create
bibliographies.
Alan
On Sat, 23 Dec 2017 16:44:32 -0500
Rik Kabel
On 2017-12-05 13:20, Gour wrote:
On Sun, 7 May 2017 23:33:30 +0200 r.ermers@hccnet.nl wrote:
I recently finished a book project in multimarkdown, which I converted to LaTeX (I could not use ConTeXt because of its limited bibliographical functions in comparison to BibLatex). Just wonder, since I plan to embrace ConTeXt for a larger educational-based project with the need to use bibliographical functions, what did you prevent you to use it?
Let me say that I'm fully familiar with neither BibLatex's capabilities nor with the similar things in MkIV...
Sincerely, Gour
The utility of the new bibliography subsystem is a function of your ability to work within the rigid structure of the APA reference standards. Even with that, there are outstanding bugs that have not been addressed for many months.
If your publisher requires adherence to some other bibliographical standards, or even variations of the APA standards, the new subsystem may not suffice, or may not suffice without significant customization that requires understanding of the source code.
(ConTeXt also has some support for the APS standard, but that is secondary to APA in the implementation plan as so far revealed. There is no current plan of which I am aware to support more humanities-focused standards (Chicago, MHRA, Turabian, ...), although I would be happy to be proved wrong on that.)
For comparison, BibLaTeX supports tens of different standards and variants, and has (or had a couple of years ago when I last used it) an active community of developers. To accomplish this, BibLaTeX relies on many added tags to BibTeX, thus forgoing compatibility with other systems.
The differences between the two derive from a few basic decisions taken by the ConTeXt developers. Among these, ConTeXt prefers to not add additional fields to BibTeX, and prefers to develop its own code without reliance on third-party software.
If your document requires bibliographic support beyond what ConTeXt currently provides, there is another mechanism by which you can incorporate other reference standards. You can write your document in Pandoc http://pandoc.org/ [1] Markdown and use any of the hundreds of reference standards and variants supported there through CSL http://citationstyles.org/ [2]. Pandoc can create an XML result that can be transformed into a PDF by ConTeXt with the bibliography created according the the selected CSL format. This works well for documents that do not require significant customization, but may become cumbersome when you must fiddle with many individual objects. I have done this for a book-scale project as a proof of concept, and the bibliography handling works well. My work expands on that of Pablo Rodríguez, who addressed the method in a note to you last year https://www.mail-archive.com/ntg-context@ntg.nl/msg83581.html [3].
[1] http://pandoc.org/ [2] http://citationstyles.org/ [3] https://www.mail-archive.com/ntg-context@ntg.nl/msg83581.html
On Sat, 23 Dec 2017 15:04:35 -0700
Alan Braslau
This analysis is not quite correct.
Thank you for your input.
I use the "bibliography" subsystem as a general database tool, defining glossaries, tables of crystallographic symmetries, catalogs of diagrams, etc., so it is quite a bit more flexible than just to create bibliographies.
Does it mean there is no need for tools like JabRef, Zotero etc. if I'm staying within the scope of ConTeXt? Sincerely, Gour -- As a blazing fire turns firewood to ashes, O Arjuna, so does the fire of knowledge burn to ashes all reactions to material activities.
On Sun, 24 Dec 2017 16:01:27 +0100
Gour
On Sat, 23 Dec 2017 15:04:35 -0700 Alan Braslau
wrote: This analysis is not quite correct.
Thank you for your input.
I use the "bibliography" subsystem as a general database tool, defining glossaries, tables of crystallographic symmetries, catalogs of diagrams, etc., so it is quite a bit more flexible than just to create bibliographies.
Does it mean there is no need for tools like JabRef, Zotero etc. if I'm staying within the scope of ConTeXt?
JabRef, Zotero are tools useful to manage bibliographic datasets. Their use is not necessary, yet may be quite helpful, and even can be customized at will, if desired. Rik has pointed out a few bugs in the APA (author-year) formatting that will be fixed as they get clearly reported. Even though I started out with the APS (numbered) specification, I have been using APA more thoroughly. Note that APS is purposely very compact (and limited). Thomas seems to use the author-num scheme principally, and this appears to be about the extent to which the ConTeXt system has been tested. Alan
----------------------------------------
From: "Hans Hagen"
It’s a plain text format for writing structured documents, based on formatting conventions from email and usenet.
http://commonmark.org
-m
On May 6, 2017 8:42:46 AM PDT, John Culleton
---------------------------------------- From: "Hans Hagen"
Sent: Saturday, May 6, 2017 4:30 AM To: ntg-context@ntg.nl Subject: Re: [NTG-context] Module for Markdown: any volunteer to make a ConTeXt interface? On 5/5/2017 9:54 PM, Aditya Mahajan wrote: > On Thu, 4 May 2017, Mojca Miklavec wrote: > >> Hi, >> >> There's a really nice module for processing markdown: >> https://github.com/Witiko/markdown >> that has been presented during the TUG meeting and is included in
Pardon my ignorance but what is markdown? ________________________________________
John Culleton
participants (11)
-
Aditya Mahajan
-
Alan Braslau
-
Brian Ballsun-Stanton
-
Gour
-
Hans Hagen
-
John Culleton
-
Mica Semrick
-
Mojca Miklavec
-
r.ermers@hccnet.nl
-
Rik Kabel
-
Vít Novotný