* `#` in inline code should be escaped when using --listings
@ 2019-05-09 14:44 jiewuza
[not found] ` <m2v9yj7klz.fsf-9Onoh4P/yGk@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: jiewuza @ 2019-05-09 14:44 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
I find that `#` becomes `##` in the resulting pdf when I convert a md
file which has inline code `#` inside with listings and xeCJK package.
Here I just simplified the tex generated by pandoc to reproduce the problem:
```
\documentclass{article}
\usepackage{xeCJK}
\usepackage{listings}
\newcommand{\passthrough}[1]{#1}
\begin{document}
\passthrough{\lstinline!#!} % not escaped
\passthrough{\lstinline!\#!} % escaped
\end{document}
```
The result is
```
##
#
```
I checked the document of listings. At page 27, it says:
`If you want to enter one of the special characters {}#%\, this
character must be escaped with a backslash.`
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: `#` in inline code should be escaped when using --listings
[not found] ` <m2v9yj7klz.fsf-9Onoh4P/yGk@public.gmane.org>
@ 2019-05-09 17:06 ` John MacFarlane
2019-05-10 2:24 ` jiewuza
0 siblings, 1 reply; 3+ messages in thread
From: John MacFarlane @ 2019-05-09 17:06 UTC (permalink / raw)
To: jiewuza, pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
This was fixed in issue #4939 - Jan 25.
Update your pandoc version?
jiewuza <jiewuza-9Onoh4P/yGk@public.gmane.org> writes:
> I find that `#` becomes `##` in the resulting pdf when I convert a md
> file which has inline code `#` inside with listings and xeCJK package.
>
> Here I just simplified the tex generated by pandoc to reproduce the problem:
>
> ```
> \documentclass{article}
> \usepackage{xeCJK}
> \usepackage{listings}
> \newcommand{\passthrough}[1]{#1}
> \begin{document}
>
> \passthrough{\lstinline!#!} % not escaped
>
> \passthrough{\lstinline!\#!} % escaped
>
> \end{document}
> ```
>
> The result is
> ```
> ##
> #
> ```
>
> I checked the document of listings. At page 27, it says:
>
> `If you want to enter one of the special characters {}#%\, this
> character must be escaped with a backslash.`
>
> --
> 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/m2v9yj7klz.fsf%40163.com.
> For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: `#` in inline code should be escaped when using --listings
2019-05-09 17:06 ` John MacFarlane
@ 2019-05-10 2:24 ` jiewuza
0 siblings, 0 replies; 3+ messages in thread
From: jiewuza @ 2019-05-10 2:24 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
I updated my pandoc from 2.5 to 2.7.
It solves the problem.
Thanks.
John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> writes:
> This was fixed in issue #4939 - Jan 25.
> Update your pandoc version?
>
> jiewuza <jiewuza-9Onoh4P/yGk@public.gmane.org> writes:
>
>> I find that `#` becomes `##` in the resulting pdf when I convert a md
>> file which has inline code `#` inside with listings and xeCJK package.
>>
>> Here I just simplified the tex generated by pandoc to reproduce the problem:
>>
>> ```
>> \documentclass{article}
>> \usepackage{xeCJK}
>> \usepackage{listings}
>> \newcommand{\passthrough}[1]{#1}
>> \begin{document}
>>
>> \passthrough{\lstinline!#!} % not escaped
>>
>> \passthrough{\lstinline!\#!} % escaped
>>
>> \end{document}
>> ```
>>
>> The result is
>> ```
>> ##
>> #
>> ```
>>
>> I checked the document of listings. At page 27, it says:
>>
>> `If you want to enter one of the special characters {}#%\, this
>> character must be escaped with a backslash.`
>>
>> --
>> 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/m2v9yj7klz.fsf%40163.com.
>> For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-05-10 2:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-09 14:44 `#` in inline code should be escaped when using --listings jiewuza
[not found] ` <m2v9yj7klz.fsf-9Onoh4P/yGk@public.gmane.org>
2019-05-09 17:06 ` John MacFarlane
2019-05-10 2:24 ` jiewuza
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).