public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* LaTeX math converted to `\(...\)` not `$...$` - manual needs updating?
@ 2018-06-23 14:56 Gandalf Saxe
       [not found] ` <da923768-e727-4724-a4ce-6a6b9314cf02-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Gandalf Saxe @ 2018-06-23 14:56 UTC (permalink / raw)
  To: pandoc-discuss


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

Manual says:


TeX math will be printed in all output formats. How it is rendered depends 
on the output format:
Markdown, LaTeX, Emacs Org mode, ConTeXt, ZimWikiIt will appear verbatim 
between $ characters.

However converting inline math `$...$` from markdown to LaTeX, converts it 
to `\(...\)` syntax. Am I misunderstanding the manual or should this be 
updated?

Example .md input:
`This is a simple inline $e=mc^2$  math.`

Example command:
`pandoc test.md -o test.tex`

Example .tex output:
`This is a simple inline \(e=mc^2\) math.`

-- 
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/da923768-e727-4724-a4ce-6a6b9314cf02%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: LaTeX math converted to `\(...\)` not `$...$` - manual needs updating?
       [not found] ` <da923768-e727-4724-a4ce-6a6b9314cf02-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2018-06-23 23:59   ` Kolen Cheung
       [not found]     ` <5197fe46-e2aa-407c-9d4b-c0c7e49cf6a0-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2018-06-24 11:02   ` John MacFarlane
  2018-06-25 19:01   ` Kolen Cheung
  2 siblings, 1 reply; 7+ messages in thread
From: Kolen Cheung @ 2018-06-23 23:59 UTC (permalink / raw)
  To: pandoc-discuss


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



The text you quote concern what’s between the dollar sign, not the sign 
itself.

In LaTeX, it is often recommended to use \(...\) and \[...\] instead of the 
TeX $...$ and $$...$$. See [math mode - What are the differences between 
$$, \, align, equation and displaymath? - TeX - LaTeX Stack Exchange 
<https://tex.stackexchange.com/questions/40492/what-are-the-differences-between-align-equation-and-displaymath> 
for example.,

On Saturday, June 23, 2018 at 7:56:54 AM UTC-7, Gandalf Saxe wrote:

Manual says:
>
>
> TeX math will be printed in all output formats. How it is rendered depends 
> on the output format:
> Markdown, LaTeX, Emacs Org mode, ConTeXt, ZimWikiIt will appear verbatim 
> between $ characters.
>
> However converting inline math `$...
>
> The text you quote concern what’s between the dollar sign, not the sign 
> itself.
>
> In LaTeX, it is often recommended to use \(...\) and \[...\] instead of 
> the TeX $...$ and $$...$$. See [math mode - What are the differences 
> between $$, \, align, equation and displaymath? - TeX - LaTeX Stack 
> Exchange 
> <https://tex.stackexchange.com/questions/40492/what-are-the-differences-between-align-equation-and-displaymath> 
> for example.,
>
> On Saturday, June 23, 2018 at 7:56:54 AM UTC-7, Gandalf Saxe wrote:
>
> from markdown to LaTeX, converts it to `\(...\)` syntax. Am I 
> misunderstanding the manual or should this be updated?
>
> Example .md input:
> `This is a simple inline $e=mc^2$  math.`
>
> Example command:
> `pandoc test.md -o test.tex`
>
> Example .tex output:
> `This is a simple inline \(e=mc^2\) math.`
>
​

-- 
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/5197fe46-e2aa-407c-9d4b-c0c7e49cf6a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: LaTeX math converted to `\(...\)` not `$...$` - manual needs updating?
       [not found] ` <da923768-e727-4724-a4ce-6a6b9314cf02-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2018-06-23 23:59   ` Kolen Cheung
@ 2018-06-24 11:02   ` John MacFarlane
       [not found]     ` <87r2kwsb0f.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
  2018-06-25 19:01   ` Kolen Cheung
  2 siblings, 1 reply; 7+ messages in thread
From: John MacFarlane @ 2018-06-24 11:02 UTC (permalink / raw)
  To: Gandalf Saxe, pandoc-discuss


Thanks, I've made a small update to the manual.

Gandalf Saxe <gandalfsaxe-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Manual says:
>
>
> TeX math will be printed in all output formats. How it is rendered depends 
> on the output format:
> Markdown, LaTeX, Emacs Org mode, ConTeXt, ZimWikiIt will appear verbatim 
> between $ characters.
>
> However converting inline math `$...$` from markdown to LaTeX, converts it 
> to `\(...\)` syntax. Am I misunderstanding the manual or should this be 
> updated?
>
> Example .md input:
> `This is a simple inline $e=mc^2$  math.`
>
> Example command:
> `pandoc test.md -o test.tex`
>
> Example .tex output:
> `This is a simple inline \(e=mc^2\) math.`
>
> -- 
> 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/da923768-e727-4724-a4ce-6a6b9314cf02%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


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

* Re: LaTeX math converted to `\(...\)` not `$...$` - manual needs updating?
       [not found]     ` <5197fe46-e2aa-407c-9d4b-c0c7e49cf6a0-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2018-06-24 18:05       ` Gandalf Saxe
  0 siblings, 0 replies; 7+ messages in thread
From: Gandalf Saxe @ 2018-06-24 18:05 UTC (permalink / raw)
  To: pandoc-discuss


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

How is the quoted segment of the manual above not be to understood as 
meaning that TeX math it will appear in LaTeX output as verbatim between $ 
characters, as opposed to verbatim between \(...\) ?

On Sunday, 24 June 2018 01:59:42 UTC+2, Kolen Cheung wrote:
>
> The text you quote concern what’s between the dollar sign, not the sign 
> itself.
>
> In LaTeX, it is often recommended to use \(...\) and \[...\] instead of 
> the TeX $...$ and $$...$$. See [math mode - What are the differences 
> between $$, \, align, equation and displaymath? - TeX - LaTeX Stack 
> Exchange 
> <https://tex.stackexchange.com/questions/40492/what-are-the-differences-between-align-equation-and-displaymath> 
> for example.,
>
> On Saturday, June 23, 2018 at 7:56:54 AM UTC-7, Gandalf Saxe wrote:
>
> Manual says:
>>
>>
>> TeX math will be printed in all output formats. How it is rendered 
>> depends on the output format:
>> Markdown, LaTeX, Emacs Org mode, ConTeXt, ZimWikiIt will appear verbatim 
>> between $ characters.
>>
>> However converting inline math `$...
>>
>> The text you quote concern what’s between the dollar sign, not the sign 
>> itself.
>>
>> In LaTeX, it is often recommended to use \(...\) and \[...\] instead of 
>> the TeX $...$ and $$...$$. See [math mode - What are the differences 
>> between $$, \, align, equation and displaymath? - TeX - LaTeX Stack 
>> Exchange 
>> <https://tex.stackexchange.com/questions/40492/what-are-the-differences-between-align-equation-and-displaymath> 
>> for example.,
>>
>> On Saturday, June 23, 2018 at 7:56:54 AM UTC-7, Gandalf Saxe wrote:
>>
>> from markdown to LaTeX, converts it to `\(...\)` syntax. Am I 
>> misunderstanding the manual or should this be updated?
>>
>> Example .md input:
>> `This is a simple inline $e=mc^2$  math.`
>>
>> Example command:
>> `pandoc test.md -o test.tex`
>>
>> Example .tex output:
>> `This is a simple inline \(e=mc^2\) math.`
>>
> ​
>

-- 
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/1d533971-4ee9-4fea-a27e-61b1f0acbd25%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: LaTeX math converted to `\(...\)` not `$...$` - manual needs updating?
       [not found]     ` <87r2kwsb0f.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2018-06-24 18:39       ` Gandalf Saxe
  0 siblings, 0 replies; 7+ messages in thread
From: Gandalf Saxe @ 2018-06-24 18:39 UTC (permalink / raw)
  To: pandoc-discuss


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

Looks good. I think you missed a little thing as commented here: 
https://github.com/jgm/pandoc/commit/ee84687d25a0d6cabc932660cf4a094693b289b7#commitcomment-29476214

On Sunday, 24 June 2018 13:02:39 UTC+2, John MacFarlane wrote:
>
>
> Thanks, I've made a small update to the manual. 
>
> Gandalf Saxe <ganda...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>> writes: 
>
> > Manual says: 
> > 
> > 
> > TeX math will be printed in all output formats. How it is rendered 
> depends 
> > on the output format: 
> > Markdown, LaTeX, Emacs Org mode, ConTeXt, ZimWikiIt will appear verbatim 
> > between $ characters. 
> > 
> > However converting inline math `$...$` from markdown to LaTeX, converts 
> it 
> > to `\(...\)` syntax. Am I misunderstanding the manual or should this be 
> > updated? 
> > 
> > Example .md input: 
> > `This is a simple inline $e=mc^2$  math.` 
> > 
> > Example command: 
> > `pandoc test.md -o test.tex` 
> > 
> > Example .tex output: 
> > `This is a simple inline \(e=mc^2\) math.` 
> > 
> > -- 
> > 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/da923768-e727-4724-a4ce-6a6b9314cf02%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/0aedc3b7-2c96-4a6a-a3f0-fc84a792f528%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: LaTeX math converted to `\(...\)` not `$...$` - manual needs updating?
       [not found] ` <da923768-e727-4724-a4ce-6a6b9314cf02-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2018-06-23 23:59   ` Kolen Cheung
  2018-06-24 11:02   ` John MacFarlane
@ 2018-06-25 19:01   ` Kolen Cheung
       [not found]     ` <90db846b-e36a-4794-97d6-9df3b7c02d69-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2 siblings, 1 reply; 7+ messages in thread
From: Kolen Cheung @ 2018-06-25 19:01 UTC (permalink / raw)
  To: pandoc-discuss

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

(In resonse to a private email) Also note that by using GFM, it doesn't "fix anything". If my guess is correct, it is because the GFM reader doesn't parse the math equation and hence leaving it as is. But, if you math equation contains anything that GFM parses (any markdown syntax), then you won't get a verbatim output in the LaTeX format.

In general, just embrace what the parser do (changing `$...$` to `\(...\)`). This is the recommended way to do things in LaTeX. We aren't targetting TeX but LaTeX, and unless you really want TeX primitives, stick with the LaTeX conventions and recommendations.

On Saturday, June 23, 2018 at 7:56:54 AM UTC-7, Gandalf Saxe wrote:
> Manual says:
> 
> 
> 
> 
> 
> TeX math will be printed in all output formats. How it is rendered depends on the output format:Markdown, LaTeX, Emacs Org mode, ConTeXt, ZimWikiIt will appear verbatim between $ characters.
> 
> 
> However converting inline math `$...$` from markdown to LaTeX, converts it to `\(...\)` syntax. Am I misunderstanding the manual or should this be updated?
> 
> 
> Example .md input:
> `This is a simple inline $e=mc^2$  math.`
> 
> 
> Example command:
> `pandoc test.md -o test.tex`
> 
> 
> Example .tex output:
> `This is a simple inline \(e=mc^2\) math.`

-- 
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/90db846b-e36a-4794-97d6-9df3b7c02d69%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

* Re: LaTeX math converted to `\(...\)` not `$...$` - manual needs updating?
       [not found]     ` <90db846b-e36a-4794-97d6-9df3b7c02d69-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2018-06-25 20:58       ` Gandalf Saxe
  0 siblings, 0 replies; 7+ messages in thread
From: Gandalf Saxe @ 2018-06-25 20:58 UTC (permalink / raw)
  To: pandoc-discuss


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

Hmm I think we're speaking past each other. The point was the the manual 
section (Extension: `tex_math_dollars`) described what happens to $...$ - 
that is it's interpreted as TeX inline math. Before the manual said that it 
was going to appear as $...$ for inline math and $$...$$ for display math 
for LaTeX *output*, but for LaTeX output, the TeX syntax is actually 
converted into the LaTeX syntax (\(...\) and \[...\]). So the manual wasn't 
truthful. But jgm already made the change, so I think he agreed.

The section of the manual I quoted did deal with the delimiters of the 
LaTeX output. Perhaps we were talking about two different segments of the 
manual. Anyway it's fixed now, so it's all good :)

On Monday, 25 June 2018 21:01:17 UTC+2, Kolen Cheung wrote:
>
> (In resonse to a private email) Also note that by using GFM, it doesn't 
> "fix anything". If my guess is correct, it is because the GFM reader 
> doesn't parse the math equation and hence leaving it as is. But, if you 
> math equation contains anything that GFM parses (any markdown syntax), then 
> you won't get a verbatim output in the LaTeX format. 
>
> In general, just embrace what the parser do (changing `$...$` to 
> `\(...\)`). This is the recommended way to do things in LaTeX. We aren't 
> targetting TeX but LaTeX, and unless you really want TeX primitives, stick 
> with the LaTeX conventions and recommendations. 
>
> On Saturday, June 23, 2018 at 7:56:54 AM UTC-7, Gandalf Saxe wrote: 
> > Manual says: 
> > 
> > 
> > 
> > 
> > 
> > TeX math will be printed in all output formats. How it is rendered 
> depends on the output format:Markdown, LaTeX, Emacs Org mode, ConTeXt, 
> ZimWikiIt will appear verbatim between $ characters. 
> > 
> > 
> > However converting inline math `$...$` from markdown to LaTeX, converts 
> it to `\(...\)` syntax. Am I misunderstanding the manual or should this be 
> updated? 
> > 
> > 
> > Example .md input: 
> > `This is a simple inline $e=mc^2$  math.` 
> > 
> > 
> > Example command: 
> > `pandoc test.md -o test.tex` 
> > 
> > 
> > Example .tex output: 
> > `This is a simple inline \(e=mc^2\) math.` 
>
>

-- 
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/22a6ffad-3572-4adf-a8ec-2a536b6f3e12%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

end of thread, other threads:[~2018-06-25 20:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-23 14:56 LaTeX math converted to `\(...\)` not `$...$` - manual needs updating? Gandalf Saxe
     [not found] ` <da923768-e727-4724-a4ce-6a6b9314cf02-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-06-23 23:59   ` Kolen Cheung
     [not found]     ` <5197fe46-e2aa-407c-9d4b-c0c7e49cf6a0-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-06-24 18:05       ` Gandalf Saxe
2018-06-24 11:02   ` John MacFarlane
     [not found]     ` <87r2kwsb0f.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2018-06-24 18:39       ` Gandalf Saxe
2018-06-25 19:01   ` Kolen Cheung
     [not found]     ` <90db846b-e36a-4794-97d6-9df3b7c02d69-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-06-25 20:58       ` Gandalf Saxe

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