public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Manipulating the Items of a Bullet List with a pandoc filter
@ 2014-09-21 15:11 Joshua Fishburn
       [not found] ` <a47f8f52-33bd-4bd4-be95-7a1845c36917-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Joshua Fishburn @ 2014-09-21 15:11 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 1648 bytes --]

I'm working on my CV using Markdown as the basis, but would like to 
implement a pandoc filter that replaces the bulleted lists in markdown with 
specific LaTeX syntax for each list item.

In place of a block like this:
\begin{itemize}
\item
 Assistant Professor, Media Arts and Game Development, Department of
 Communication, University of Wisconsin-Whitewater, Whitewater, WI.,
 Aug 2010-Present
...
\end{itemize}

I would like this (attempting to use a variant of Kieran Healy's CV template 
<http://kjhealy.github.io/kjh-vita/>, but starting in Markdown):
\ind Assistant Professor, Media Arts and Game Development, Department of
  Communication, University of Wisconsin-Whitewater, Whitewater, WI.,
  Aug 2010-Present

\ind (next list item, and so on through the itemized list)

I'm new to Haskell and would appreciate pointers for how you might approach 
this with a pandoc filter. I've looked briefly at the scripting guide 
<http://johnmacfarlane.net/pandoc/scripting.html> but am at a loss as to 
how to remove the BulletList and apply the action to each item inside.

-- 
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/a47f8f52-33bd-4bd4-be95-7a1845c36917%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #2: Type: text/html, Size: 6301 bytes --]

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

* Manipulating the Items of a Bullet List with a pandoc filter
       [not found] ` <a47f8f52-33bd-4bd4-be95-7a1845c36917-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2014-09-22 12:19   ` Caleb McDaniel
  0 siblings, 0 replies; 2+ messages in thread
From: Caleb McDaniel @ 2014-09-22 12:19 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

You can also use a Python filter to do this. Here's one that inserts \ind at the beginning of every paragraph block. 

https://gist.github.com/wcaleb/d01da6c1ce5900e2ff4c

Doing what you describe---eliminate bullets, then add \ind---would require modification to this script, but it could get you started. Or it could solve your problem if you're not wedded to using bullet lists in the Markdown source and would be fine separating the items as paragraphs. 

Caleb McDaniel

-- 
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/3f00ab35-6f18-41cf-9520-082389e08e8d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

end of thread, other threads:[~2014-09-22 12:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-21 15:11 Manipulating the Items of a Bullet List with a pandoc filter Joshua Fishburn
     [not found] ` <a47f8f52-33bd-4bd4-be95-7a1845c36917-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2014-09-22 12:19   ` Caleb McDaniel

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