public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Bastien DUMONT <bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org>
To: 'juh' via pandoc-discuss
	<pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Fenced Div to ConTeXt Environment (was: Markdown Fenced Div to LaTeX Environment)
Date: Thu, 17 Jun 2021 11:44:12 +0000	[thread overview]
Message-ID: <YMs1jE5/RfL9h/Op@localhost> (raw)
In-Reply-To: <af60ed15-0d8c-5c51-5a34-a9c082e7fc89-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>

I can't help you with this particular point, but as some people here use Markdown+Pandoc more or less as a frontend to TeX, don't hesitate to share your needs and thoughts. Someone may already have a solution, or something approaching. Moreover it could prompt to the creation or publication of filters that extend Pandoc's capabilities. I wrote myself a filter that enables references to spans of text by page or note number in a variety of formats, would you be interested in testing it?

Le Thursday 17 June 2021 à 12:20:05PM, 'juh' via pandoc-discuss a écrit :
> Thanks a lot Bastien and Denis,
> 
> I go with this one:
> 
> ```lua
> ENV_CLASSES = { 'intro', 'zitat', 'solution' }
> 
> local function context(s)
>   return pandoc.RawBlock('context', s)
> end
> 
> local function get_env_class(elem)
> if elem.classes then
>   for i = 1, #elem.classes do
>     for j = 1, #ENV_CLASSES do
>       if elem.classes[i] == ENV_CLASSES[j] then return ENV_CLASSES[j] end
>   end
> end
> else
>   error('function has_class used on an element of type ' ..
>         elem.t .. ' that cannot have classes.')
> end
> end
> 
> function Div(el)
>   local env_class = get_env_class(el) -- nil if there is none
>   if env_class then -- false if env_class is nil
>     return { context('\\startparagraph['.. env_class ..']'), el,
> context('\\stopparagraph') }
>   end
> end
> ```
> 
> ConTeXt is amazingly flexible in many ways and it is fun to create
> individually designed documents. But I have to deploy it to an organization
> were people want to write content in Markdown. I am currently working on a
> proof of concept that we can meet all of our style ideas with ConTeXt while
> writing in markdown using pandoc.
> 
> I think that in the long run I will need some more filters. Eg. it is quite
> easy to have a default width of images with
> 
> \setupexternalfigure[width=\textwidth]
> 
> so that the default image markup
> 
> \placefigure{My caption}{\externalfigure[image.jpg]}
> 
> works perfectly fine.
> 
> But I can imaging situations where I want to pass an argument to it like
> this.
> 
> \placefigure{My caption}{\externalfigure[image.jpg][textwidth=6em]}
> 
> I'll try to figure out how to do this in a lua filter. A co-worker of mine
> has some programming skills and might help.
> 
> But in fact there might be another solution, if I put the image in an
> special paragraph environment and redefine setupexternalfigure.
> 
> For now, thanks a lot!
> 
> juh
> 
> -- 
> Soziale Plastik. Die Kunst der Allmende
> Essay zum 30. Todestag von Joseph Beuys
> http://www.amazon.de/dp/1523458763/
> Taschenbuch, 130 Seiten, EUR 9,90
> 
> -- 
> You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/af60ed15-0d8c-5c51-5a34-a9c082e7fc89%40mailbox.org.

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/YMs1jE5/RfL9h/Op%40localhost.


  parent reply	other threads:[~2021-06-17 11:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-24 13:47 Markdown Fenced Div to LaTeX Environment Chris Diaz
     [not found] ` <8ba84992-d792-4333-aae0-560147ef79d4n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-01-24 14:32   ` Albert Krewinkel
     [not found]     ` <87pn1uwglb.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2021-01-24 17:35       ` Bastien DUMONT
2021-06-16 14:37       ` Fenced Div to ConTeXt Environment (was: Markdown Fenced Div to LaTeX Environment) 'juh' via pandoc-discuss
2021-06-16 15:48         ` AW: " denis.maier-NSENcxR/0n0
     [not found]           ` <5db56b4f1d8d4ca2bec612bcebb7a525-NSENcxR/0n0@public.gmane.org>
2021-06-16 21:59             ` Bastien DUMONT
2021-06-17  6:27               ` 'juh' via pandoc-discuss
     [not found]                 ` <493d0aa9-47f5-ca8d-2ef5-8e63f965c529-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
2021-06-17  6:54                   ` BPJ
     [not found]                     ` <CADAJKhDmtv1iLv8GsKzjxSzmvHzuOfpP6qrc21TUEYturw_xTQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-06-17  7:55                       ` 'juh' via pandoc-discuss
     [not found]                         ` <dc8ef20b-4a8b-c385-704c-28c85a5b6820-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
2021-06-17  8:12                           ` AW: " denis.maier-NSENcxR/0n0
     [not found]                             ` <4396a9133ab74e4fbff486f09e22d254-NSENcxR/0n0@public.gmane.org>
2021-06-17  8:36                               ` Bastien DUMONT
2021-06-17  8:51                                 ` AW: " denis.maier-NSENcxR/0n0
2021-06-17 10:20                                 ` 'juh' via pandoc-discuss
     [not found]                                   ` <af60ed15-0d8c-5c51-5a34-a9c082e7fc89-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org>
2021-06-17 11:44                                     ` Bastien DUMONT [this message]
2021-06-17 12:23                                     ` AW: " denis.maier-NSENcxR/0n0
2021-06-17  8:18                           ` Bastien DUMONT
2021-01-24 17:58   ` Markdown Fenced Div to LaTeX Environment John MacFarlane
     [not found]     ` <m2lfcigqtj.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2021-01-24 19:50       ` Chris Diaz
     [not found]         ` <CAMkDs=NHev6VHpGEq6qiYGbOMgMr6RqKzu0E9dcsr1kZFXO-Ow-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-01-28  3:17           ` Bernie Roesler
     [not found]             ` <e6363602-852a-45a1-a199-81553da1966bn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-01-28 17:10               ` John MacFarlane
     [not found]                 ` <m2ft2l7zrz.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2021-01-28 19:24                   ` Bernie Roesler
     [not found]                     ` <0F730DD9-8029-462F-A65E-AD3E618118E4-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2021-01-28 19:52                       ` Bernie Roesler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YMs1jE5/RfL9h/Op@localhost \
    --to=bastien.dumont-vwifzpto/vqstnjn9+bgxg@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).