public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Customize Conversion for Identifiers in Code Blocks
@ 2015-01-17 21:05 Ranjit Jhala
       [not found] ` <5699588b-678c-4de6-96c0-6505e7fbd950-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Ranjit Jhala @ 2015-01-17 21:05 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


[-- Attachment #1.1: Type: text/plain, Size: 1294 bytes --]

Hi,

I'd like to write a filter that runs on `CodeBlock` such that each 
identifier that begins 
with (say) "$$$mytoken" gets rendered in latex not as a 

    \NormalTok{$$$mytoken} 

but as 

    \MySpecialToken{$$$mytoken}

Can anyone give me a hint as to how to proceed? The stumbling block is that 
it seems like
the filter should "preserve" the type, so I can write a

    myFilter :: CodeBlock -> CodeBlock

But the `CodeBlock` type only allows strings -- presumably just replacing 
(substrings) of the form
    
    $$$mytoken 

with 

   \MySpecialToken{$$$mytoken}

will only cause the latter to then get "escaped" out during the final latex 
conversion? 

Any pointers would be most welcome!

Thanks!

- Ranjit.

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/5699588b-678c-4de6-96c0-6505e7fbd950%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 2172 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-01-18 17:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-17 21:05 Customize Conversion for Identifiers in Code Blocks Ranjit Jhala
     [not found] ` <5699588b-678c-4de6-96c0-6505e7fbd950-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-01-17 23:06   ` Matthew Pickering
     [not found]     ` <CALuQ0m-6JL87AQ6fUy2yRs270iv+ioQv=RZu53Z-Nf5fQcVLkQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-18  0:44       ` Ranjit Jhala
     [not found]         ` <0d47cfc0-2a3d-4248-bd35-317dcd6a738b-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-01-18  0:45           ` Matthew Pickering
     [not found]             ` <CALuQ0m8q+VwiaeZ2pJJKUHpx9w8bJgTw6K2N1LqKqHTaA-5tEg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-18  1:15               ` Ranjit Jhala
     [not found]                 ` <ca72b4ed-aac7-4a6a-9e0f-580bcc450f5f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-01-18 14:22                   ` Matthew Pickering
     [not found]                     ` <CALuQ0m8J-s2f3MTNTP9+uhG-QtHaFb6C13YZA91aHJWLauAJag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-18 14:22                       ` Matthew Pickering
     [not found]                         ` <CALuQ0m8aO6+cTS0M1+_o1iEWNk3H-q4c7o72iuiKEfLuPzoWrA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-18 17:31                           ` Ranjit Jhala

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).