public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Markdown lists and vertical spacing
@ 2014-10-30 15:45 hgv
       [not found] ` <251fb60e-850d-49a3-bbb9-611e9396b5e0-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: hgv @ 2014-10-30 15:45 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

Hi all,

When going from md to tex, the simple pandoc command produces lists with 
the vertical spacing (\itemsep, \parskip, and \parsep) hardcoded for each 
instance of a list environment. That is, after the \begin{itemize} or  \begin{enumerate}, 
there is a line that reads: \itemsep1pt\parskip0pt\parsep0pt. I'd like to 
redefine all my lists globally to have a different \itemsep (which I would 
do with the package enumitem). But this is impossible with this hardcoded 
vertical spacing that pandoc creates. Is there any way to suppress this or 
change the behavior? It doesn't seem to be a function of the fancy_lists 
extension.

I'm using pandoc 1.13.1 on Mac OS X 10.10. My MWE is below.

Thanks!


Markdown file:

#Test
1. Test
2. Test
3. Test

#Test2
* Test2
* Test2
* Test2

With the command `pandoc -o Test.tex Test.md` I get the follow .tex

\section{Test}\label{test}

\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\itemsep1pt\parskip0pt\parsep0pt
\item
  Test
\item
  Test
\item
  Test
\end{enumerate}

\section{Test2}\label{test2}

\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
  Test2
\item
  Test2
\item
  Test2
\end{itemize}



-- 
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/251fb60e-850d-49a3-bbb9-611e9396b5e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: Markdown lists and vertical spacing
       [not found] ` <251fb60e-850d-49a3-bbb9-611e9396b5e0-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2014-10-30 16:50   ` John MacFarlane
       [not found]     ` <20141030165029.GN30575-0VdLhd/A9Pm0ooXD8Eul3bZg/RMxJgvuTVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: John MacFarlane @ 2014-10-30 16:50 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

This stuff is only hard-coded when you have "tight" lists.
(Without blank lines between them in the markdown source.)

If you use loose lists, you'll just have the default and you can
redefine as you wish.

+++ hgv [Oct 30 14 08:45 ]:
>Hi all,
>
>When going from md to tex, the simple pandoc command produces lists with
>the vertical spacing (\itemsep, \parskip, and \parsep) hardcoded for each
>instance of a list environment. That is, after the \begin{itemize} or  \begin{enumerate},
>there is a line that reads: \itemsep1pt\parskip0pt\parsep0pt. I'd like to
>redefine all my lists globally to have a different \itemsep (which I would
>do with the package enumitem). But this is impossible with this hardcoded
>vertical spacing that pandoc creates. Is there any way to suppress this or
>change the behavior? It doesn't seem to be a function of the fancy_lists
>extension.
>
>I'm using pandoc 1.13.1 on Mac OS X 10.10. My MWE is below.
>
>Thanks!
>
>
>Markdown file:
>
>#Test
>1. Test
>2. Test
>3. Test
>
>#Test2
>* Test2
>* Test2
>* Test2
>
>With the command `pandoc -o Test.tex Test.md` I get the follow .tex
>
>\section{Test}\label{test}
>
>\begin{enumerate}
>\def\labelenumi{\arabic{enumi}.}
>\itemsep1pt\parskip0pt\parsep0pt
>\item
>  Test
>\item
>  Test
>\item
>  Test
>\end{enumerate}
>
>\section{Test2}\label{test2}
>
>\begin{itemize}
>\itemsep1pt\parskip0pt\parsep0pt
>\item
>  Test2
>\item
>  Test2
>\item
>  Test2
>\end{itemize}
>
>
>
>-- 
>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/251fb60e-850d-49a3-bbb9-611e9396b5e0%40googlegroups.com.
>For more options, visit https://groups.google.com/d/optout.


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

* Re: Markdown lists and vertical spacing
       [not found]     ` <20141030165029.GN30575-0VdLhd/A9Pm0ooXD8Eul3bZg/RMxJgvuTVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
@ 2014-10-30 19:00       ` hgv
       [not found]         ` <7c5fc3d5-343a-40b1-b473-ed30ca7a6bfd-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: hgv @ 2014-10-30 19:00 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

Ah OK. I see that my next question, how to get tight lists treated as loose 
lists, has been answered 
here: https://groups.google.com/forum/#!searchin/pandoc-discuss/loose$20lists/pandoc-discuss/A_Fp-fAm1PM/IPFav4EYLkMJ. 

But I've alas failed many times to install Haskell (and therefore ghc) on 
my computer and can't get filters to work. So perhaps this can be counted 
as a vote to make the tight/loose lists distinction optional like 
fancy_lists, so a -tight_lists option would remove the tight lists process 
and treat everything as loose lists (or something like that)?

Thanks again for all the work on this!

On Thursday, October 30, 2014 12:50:42 PM UTC-4, John MacFarlane wrote:
>
> This stuff is only hard-coded when you have "tight" lists. 
> (Without blank lines between them in the markdown source.) 
>
> If you use loose lists, you'll just have the default and you can 
> redefine as you wish. 
>
> +++ hgv [Oct 30 14 08:45 ]: 
> >Hi all, 
> > 
> >When going from md to tex, the simple pandoc command produces lists with 
> >the vertical spacing (\itemsep, \parskip, and \parsep) hardcoded for each 
> >instance of a list environment. That is, after the \begin{itemize} or 
>  \begin{enumerate}, 
> >there is a line that reads: \itemsep1pt\parskip0pt\parsep0pt. I'd like to 
> >redefine all my lists globally to have a different \itemsep (which I 
> would 
> >do with the package enumitem). But this is impossible with this hardcoded 
> >vertical spacing that pandoc creates. Is there any way to suppress this 
> or 
> >change the behavior? It doesn't seem to be a function of the fancy_lists 
> >extension. 
> > 
> >I'm using pandoc 1.13.1 on Mac OS X 10.10. My MWE is below. 
> > 
> >Thanks! 
> > 
> > 
> >Markdown file: 
> > 
> >#Test 
> >1. Test 
> >2. Test 
> >3. Test 
> > 
> >#Test2 
> >* Test2 
> >* Test2 
> >* Test2 
> > 
> >With the command `pandoc -o Test.tex Test.md` I get the follow .tex 
> > 
> >\section{Test}\label{test} 
> > 
> >\begin{enumerate} 
> >\def\labelenumi{\arabic{enumi}.} 
> >\itemsep1pt\parskip0pt\parsep0pt 
> >\item 
> >  Test 
> >\item 
> >  Test 
> >\item 
> >  Test 
> >\end{enumerate} 
> > 
> >\section{Test2}\label{test2} 
> > 
> >\begin{itemize} 
> >\itemsep1pt\parskip0pt\parsep0pt 
> >\item 
> >  Test2 
> >\item 
> >  Test2 
> >\item 
> >  Test2 
> >\end{itemize} 
> > 
> > 
> > 
> >-- 
> >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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> >To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
> <javascript:>. 
> >To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/251fb60e-850d-49a3-bbb9-611e9396b5e0%40googlegroups.com. 
>
> >For more options, visit https://groups.google.com/d/optout. 
>

-- 
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/7c5fc3d5-343a-40b1-b473-ed30ca7a6bfd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: Markdown lists and vertical spacing
       [not found]         ` <7c5fc3d5-343a-40b1-b473-ed30ca7a6bfd-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2014-10-30 19:14           ` John MacFarlane
       [not found]             ` <20141030191420.GB32186-0VdLhd/A9Pm0ooXD8Eul3bZg/RMxJgvuTVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: John MacFarlane @ 2014-10-30 19:14 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ hgv [Oct 30 14 12:00 ]:
>Ah OK. I see that my next question, how to get tight lists treated as loose
>lists, has been answered
>here: https://groups.google.com/forum/#!searchin/pandoc-discuss/loose$20lists/pandoc-discuss/A_Fp-fAm1PM/IPFav4EYLkMJ.
>
>But I've alas failed many times to install Haskell (and therefore ghc) on
>my computer and can't get filters to work.

You don't need Haskell to use filters -- you can write them in python,
for example.  (See the pandocfilters package on pip.)


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

* Re: Markdown lists and vertical spacing
       [not found]             ` <20141030191420.GB32186-0VdLhd/A9Pm0ooXD8Eul3bZg/RMxJgvuTVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
@ 2014-10-30 19:19               ` hgv
  0 siblings, 0 replies; 5+ messages in thread
From: hgv @ 2014-10-30 19:19 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

Thanks! Got it to work v. quickly!

On Thursday, October 30, 2014 3:14:32 PM UTC-4, John MacFarlane wrote:
>
> +++ hgv [Oct 30 14 12:00 ]: 
> >Ah OK. I see that my next question, how to get tight lists treated as 
> loose 
> >lists, has been answered 
> >here: 
> https://groups.google.com/forum/#!searchin/pandoc-discuss/loose$20lists/pandoc-discuss/A_Fp-fAm1PM/IPFav4EYLkMJ. 
>
> > 
> >But I've alas failed many times to install Haskell (and therefore ghc) on 
> >my computer and can't get filters to work. 
>
> You don't need Haskell to use filters -- you can write them in python, 
> for example.  (See the pandocfilters package on pip.) 
>
>

-- 
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/593768db-c0a5-4f0e-a2dc-05f88c950300%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

end of thread, other threads:[~2014-10-30 19:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-30 15:45 Markdown lists and vertical spacing hgv
     [not found] ` <251fb60e-850d-49a3-bbb9-611e9396b5e0-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2014-10-30 16:50   ` John MacFarlane
     [not found]     ` <20141030165029.GN30575-0VdLhd/A9Pm0ooXD8Eul3bZg/RMxJgvuTVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
2014-10-30 19:00       ` hgv
     [not found]         ` <7c5fc3d5-343a-40b1-b473-ed30ca7a6bfd-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2014-10-30 19:14           ` John MacFarlane
     [not found]             ` <20141030191420.GB32186-0VdLhd/A9Pm0ooXD8Eul3bZg/RMxJgvuTVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
2014-10-30 19:19               ` hgv

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