public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* prevent pandoc from treating paragraph starting with number as list
@ 2019-01-04 21:43 jdh246-Re5JQEeQqe8AvxtiuMwx3w
       [not found] ` <3bf2aa28-2acf-49fc-b155-298ac435d6e6-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: jdh246-Re5JQEeQqe8AvxtiuMwx3w @ 2019-01-04 21:43 UTC (permalink / raw)
  To: pandoc-discuss


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

Is there anything I can do to have a regular paragraph start with a number 
while preventing pandoc from treating it as a list?  
For example, I might cite a passage that begins with a number in a block 
quote. 

@Smith1990 [43] lists three reasons to be happy: 

> (1) Aliquam lectus. Vivamus leo. Quisque ornare tellus ullamcorper nulla. 
(2) Mauris porttitor pharetra tortor. Sed fringilla justo sed mauris. (3) 
Mauris tellus. Sed non leo. Nullam elementum, magna in cursus sodales, 
augue est scelerisque sapien, venenatis congue nulla arcu et pede. (4) Ut 
suscipit enim vel sapien. Donec congue. Maecenas urna mi, suscipit in, 
placerat ut, vestibulum ut, massa. Fusce ultrices nulla et nisl. 

I'm converting to LaTeX and what I get is:

\begin{quote}
\begin{enumerate}
\def\labelenumi{(\arabic{enumi})}
\tightlist
\item
  Aliquam lectus. Vivamus leo. Quisque ornare tellus ullamcorper nulla. (2) 
Mauris porttitor pharetra tortor. Sed
  fringilla justo sed mauris. (3) Mauris tellus. Sed non leo. Nullam 
elementum, magna in cursus sodales, augue est
  scelerisque sapien, venenatis congue nulla arcu et pede. (4) Ut suscipit 
enim vel sapien. Donec congue. Maecenas urna
  mi, suscipit in, placerat ut, vestibulum ut, massa. Fusce ultrices nulla 
et nisl.
\end{enumerate}
\end{quote}

How to tell it that it is not an item of enumerate?  

-- 
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/3bf2aa28-2acf-49fc-b155-298ac435d6e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: prevent pandoc from treating paragraph starting with number as list
       [not found] ` <3bf2aa28-2acf-49fc-b155-298ac435d6e6-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2019-01-04 22:14   ` BP Jonsson
       [not found]     ` <b5ad3894-3c2a-e1b5-0e97-0b5fafc291df-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2019-04-25 14:35   ` prevent pandoc from treating paragraph starting with number as list CR
  2019-05-29 13:50   ` Preserving LaTeX backslash comma Jan David Hauck
  2 siblings, 1 reply; 9+ messages in thread
From: BP Jonsson @ 2019-01-04 22:14 UTC (permalink / raw)
  To: pandoc-discuss

Den 2019-01-04 kl. 22:43, skrev jdh246-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org:
> Is there anything I can do to have a regular paragraph start with a number
> while preventing pandoc from treating it as a list?
> For example, I might cite a passage that begins with a number in a block
> quote.

Escape the punctuation character after the number with a backslash:

      (1\) Aliquam lectus. Vivamus leo. Quisque ornare tellus 
ullamcorper nulla.

This applies to upper/lower case valid Roman numerals and 
upper/lower case letters under the same conditions as well:

     A\. Blah blah blah.

     iii\) Blah blah blah.

/bpj


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

* Re: prevent pandoc from treating paragraph starting with number as list
       [not found]     ` <b5ad3894-3c2a-e1b5-0e97-0b5fafc291df-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2019-01-06  2:58       ` jdh246-Re5JQEeQqe8AvxtiuMwx3w
       [not found]         ` <a8841a5c-d501-4a62-a709-3d6eec8fae8f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: jdh246-Re5JQEeQqe8AvxtiuMwx3w @ 2019-01-06  2:58 UTC (permalink / raw)
  To: pandoc-discuss


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

Perfect, thank you! 

On Friday, January 4, 2019 at 2:14:41 PM UTC-8, BP Jonsson wrote:
>
> Den 2019-01-04 kl. 22:43, skrev jdh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>: 
> > Is there anything I can do to have a regular paragraph start with a 
> number 
> > while preventing pandoc from treating it as a list? 
> > For example, I might cite a passage that begins with a number in a block 
> > quote. 
>
> Escape the punctuation character after the number with a backslash: 
>
>       (1\) Aliquam lectus. Vivamus leo. Quisque ornare tellus 
> ullamcorper nulla. 
>
> This applies to upper/lower case valid Roman numerals and 
> upper/lower case letters under the same conditions as well: 
>
>      A\. Blah blah blah. 
>
>      iii\) Blah blah blah. 
>
> /bpj 
>
>

-- 
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/a8841a5c-d501-4a62-a709-3d6eec8fae8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* ~\ref{label} produces \textasciitilde{}
       [not found]         ` <a8841a5c-d501-4a62-a709-3d6eec8fae8f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2019-04-15 10:32           ` Jan David Hauck
       [not found]             ` <CAE4y4Fm-UiTQ8rwJciGQEG=xH_uVO_+o6ZMWmCcyNhqXDor2XQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Jan David Hauck @ 2019-04-15 10:32 UTC (permalink / raw)
  To: pandoc-discuss

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

I'm writing in markdown to export to LaTeX and would like to protect spaces
before a LaTeX label through the customary tilde ~\ref{label}
However, unfortunately it gives me the \textasciitilde{}

This is obviously because ~ itself is not a LaTeX command.

Any workaround for this?

Or, since this is so common, would it make sense to implement a solution
where ~ immediately followed by a backslash is not escaped?

Thanks!

Jan

-- 
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/CAE4y4Fm-UiTQ8rwJciGQEG%3DxH_uVO_%2Bo6ZMWmCcyNhqXDor2XQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: ~\ref{label} produces \textasciitilde{}
       [not found]             ` <CAE4y4Fm-UiTQ8rwJciGQEG=xH_uVO_+o6ZMWmCcyNhqXDor2XQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2019-04-15 13:09               ` jeremy theler
  0 siblings, 0 replies; 9+ messages in thread
From: jeremy theler @ 2019-04-15 13:09 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

use a scaped space i.e. "\ " or a utf8 non-breaking space with compose key
plus two spaces instead of ~

On Mon, Apr 15, 2019, 07:33 Jan David Hauck <jdh246-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> I'm writing in markdown to export to LaTeX and would like to protect
> spaces before a LaTeX label through the customary tilde ~\ref{label}
> However, unfortunately it gives me the \textasciitilde{}
>
> This is obviously because ~ itself is not a LaTeX command.
>
> Any workaround for this?
>
> Or, since this is so common, would it make sense to implement a solution
> where ~ immediately followed by a backslash is not escaped?
>
> Thanks!
>
> Jan
>
> --
> 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/CAE4y4Fm-UiTQ8rwJciGQEG%3DxH_uVO_%2Bo6ZMWmCcyNhqXDor2XQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/pandoc-discuss/CAE4y4Fm-UiTQ8rwJciGQEG%3DxH_uVO_%2Bo6ZMWmCcyNhqXDor2XQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> 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/CAK0Liy%3D841MgtfS3QekryiJBKZX73MGxiMdwsVHpdBT1oe2nvg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: prevent pandoc from treating paragraph starting with number as list
       [not found] ` <3bf2aa28-2acf-49fc-b155-298ac435d6e6-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2019-01-04 22:14   ` BP Jonsson
@ 2019-04-25 14:35   ` CR
  2019-05-29 13:50   ` Preserving LaTeX backslash comma Jan David Hauck
  2 siblings, 0 replies; 9+ messages in thread
From: CR @ 2019-04-25 14:35 UTC (permalink / raw)
  To: pandoc-discuss


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

I didn't realize that (1) would generate a list item. I normally use the 1. 
format. To force numbering to keep the numbering true to the original 
document, I use: 

5\. Blah blah blah

6\. Foo bar blah

Escaping the first parenthesis might also work for you: 
\(1)


-- 
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/f57af128-d85e-4a24-9333-8fb1b6521db5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Preserving LaTeX backslash comma
       [not found] ` <3bf2aa28-2acf-49fc-b155-298ac435d6e6-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2019-01-04 22:14   ` BP Jonsson
  2019-04-25 14:35   ` prevent pandoc from treating paragraph starting with number as list CR
@ 2019-05-29 13:50   ` Jan David Hauck
       [not found]     ` <CAE4y4F=ydNh5aOWyMYbLcWtbCepB6bO67V3Q5ucAd+pS2CwT4w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2 siblings, 1 reply; 9+ messages in thread
From: Jan David Hauck @ 2019-05-29 13:50 UTC (permalink / raw)
  To: pandoc-discuss

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

In LaTeX, the macro \, (backslash comma) produces a "thin space," such as
to separate two initials, as in B.\,A.~Smith.

Pandoc unfortunately treats \, as an escaped comma, i.e., in pandoc to
latex conversion only the comma is preserved.

I tried \\, but that produces (predictably) \textbackslash,

How can I have a thin space in Pandoc?

-- 
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/CAE4y4F%3DydNh5aOWyMYbLcWtbCepB6bO67V3Q5ucAd%2BpS2CwT4w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: Preserving LaTeX backslash comma
       [not found]     ` <CAE4y4F=ydNh5aOWyMYbLcWtbCepB6bO67V3Q5ucAd+pS2CwT4w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2019-05-29 15:13       ` BPJ
       [not found]         ` <CADAJKhCfSn6t0+M+bv+p6jSixYVe55FVZzgSAO=XoEGdLvmk-A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: BPJ @ 2019-05-29 15:13 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

`\,`{=latex} if you have a new enough pandoc but I'd rather say
\newcommand\thinsp{\,} at the top of the document and use that.

Den ons 29 maj 2019 15:51Jan David Hauck <jdh246-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:

> In LaTeX, the macro \, (backslash comma) produces a "thin space," such as
> to separate two initials, as in B.\,A.~Smith.
>
> Pandoc unfortunately treats \, as an escaped comma, i.e., in pandoc to
> latex conversion only the comma is preserved.
>
> I tried \\, but that produces (predictably) \textbackslash,
>
> How can I have a thin space in Pandoc?
>
> --
> 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/CAE4y4F%3DydNh5aOWyMYbLcWtbCepB6bO67V3Q5ucAd%2BpS2CwT4w%40mail.gmail.com
> <https://groups.google.com/d/msgid/pandoc-discuss/CAE4y4F%3DydNh5aOWyMYbLcWtbCepB6bO67V3Q5ucAd%2BpS2CwT4w%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> 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/CADAJKhCfSn6t0%2BM%2Bbv%2Bp6jSixYVe55FVZzgSAO%3DXoEGdLvmk-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: Preserving LaTeX backslash comma
       [not found]         ` <CADAJKhCfSn6t0+M+bv+p6jSixYVe55FVZzgSAO=XoEGdLvmk-A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2019-05-29 16:25           ` John MacFarlane
  0 siblings, 0 replies; 9+ messages in thread
From: John MacFarlane @ 2019-05-29 16:25 UTC (permalink / raw)
  To: BPJ, pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


Another approach is to insert a unicode thin space
character in your source document.


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

end of thread, other threads:[~2019-05-29 16:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-04 21:43 prevent pandoc from treating paragraph starting with number as list jdh246-Re5JQEeQqe8AvxtiuMwx3w
     [not found] ` <3bf2aa28-2acf-49fc-b155-298ac435d6e6-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-01-04 22:14   ` BP Jonsson
     [not found]     ` <b5ad3894-3c2a-e1b5-0e97-0b5fafc291df-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-01-06  2:58       ` jdh246-Re5JQEeQqe8AvxtiuMwx3w
     [not found]         ` <a8841a5c-d501-4a62-a709-3d6eec8fae8f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-04-15 10:32           ` ~\ref{label} produces \textasciitilde{} Jan David Hauck
     [not found]             ` <CAE4y4Fm-UiTQ8rwJciGQEG=xH_uVO_+o6ZMWmCcyNhqXDor2XQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-04-15 13:09               ` jeremy theler
2019-04-25 14:35   ` prevent pandoc from treating paragraph starting with number as list CR
2019-05-29 13:50   ` Preserving LaTeX backslash comma Jan David Hauck
     [not found]     ` <CAE4y4F=ydNh5aOWyMYbLcWtbCepB6bO67V3Q5ucAd+pS2CwT4w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-05-29 15:13       ` BPJ
     [not found]         ` <CADAJKhCfSn6t0+M+bv+p6jSixYVe55FVZzgSAO=XoEGdLvmk-A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-05-29 16:25           ` John MacFarlane

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