public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* markdown math equation not rendered correctly when I convert markdown file to pdf
@ 2017-12-18 10:26 jd h
       [not found] ` <7eebfab5-4c87-42af-9a85-b9a7fb9cda79-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: jd h @ 2017-12-18 10:26 UTC (permalink / raw)
  To: pandoc-discuss


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

I want to convert a markdown file to pdf and it contains math equations. 
But I found that the math equation is not rendered correctly.

Here is a sample *test.md* with a math equation:

$$y\max(d^2 - {m_1}^2) + (1-y)\max({m_2}^2 - d^2)$$

If I convert *test.md* to* test.pdf *using the following command:

*pandoc -f gfm -o test.pdf test.md*

The equation is not rendered in the generated pdf file. But if I remove the* 
-f gfm , *the equation is rendered correctly.

*pandoc -o test.pdf test.md*


The above command works fine.


What is the problem here? 

-- 
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/7eebfab5-4c87-42af-9a85-b9a7fb9cda79%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: markdown math equation not rendered correctly when I convert markdown file to pdf
       [not found] ` <7eebfab5-4c87-42af-9a85-b9a7fb9cda79-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2017-12-18 14:51   ` iandol
       [not found]     ` <07bea062-cd9e-4133-96f1-a433a1f5de6a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2017-12-19 10:24   ` Ronald Ligteringen
  1 sibling, 1 reply; 5+ messages in thread
From: iandol @ 2017-12-18 14:51 UTC (permalink / raw)
  To: pandoc-discuss


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

Well, that Github Flavoured Markdown (GFM) does not seem to support maths:

https://github.github.com/gfm/

Use a format (Pandoc markdown for example) that does and all is fine.

On Monday, 18 December 2017 18:26:20 UTC+8, jd h wrote:
>
> I want to convert a markdown file to pdf and it contains math equations. 
> But I found that the math equation is not rendered correctly.
>
> Here is a sample *test.md <http://test.md>* with a math equation:
>
> $$y\max(d^2 - {m_1}^2) + (1-y)\max({m_2}^2 - d^2)$$
>
> If I convert *test.md <http://test.md>* to* test.pdf *using the following 
> command:
>
> *pandoc -f gfm -o test.pdf test.md <http://test.md>*
>
> The equation is not rendered in the generated pdf file. But if I remove the* 
> -f gfm , *the equation is rendered correctly.
>
> *pandoc -o test.pdf test.md <http://test.md>*
>
>
> The above command works fine.
>
>
> What is the problem here? 
>

-- 
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/07bea062-cd9e-4133-96f1-a433a1f5de6a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: markdown math equation not rendered correctly when I convert markdown file to pdf
       [not found]     ` <07bea062-cd9e-4133-96f1-a433a1f5de6a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2017-12-19  1:49       ` jd h
       [not found]         ` <48f06c33-a6e2-40eb-b7a8-c18bc393cffa-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: jd h @ 2017-12-19  1:49 UTC (permalink / raw)
  To: pandoc-discuss


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

I want to color the url links in the markdown (explicit url links, not in 
markdown link format). I found that only using -f gfm  can generate colored 
links.

Is there a way that colored links and math equations are both supported?

On Monday, December 18, 2017 at 10:51:11 PM UTC+8, iandol wrote:
>
> Well, that Github Flavoured Markdown (GFM) does not seem to support maths:
>
> https://github.github.com/gfm/
>
> Use a format (Pandoc markdown for example) that does and all is fine.
>
> On Monday, 18 December 2017 18:26:20 UTC+8, jd h wrote:
>>
>> I want to convert a markdown file to pdf and it contains math equations. 
>> But I found that the math equation is not rendered correctly.
>>
>> Here is a sample *test.md <http://test.md>* with a math equation:
>>
>> $$y\max(d^2 - {m_1}^2) + (1-y)\max({m_2}^2 - d^2)$$
>>
>> If I convert *test.md <http://test.md>* to* test.pdf *using the 
>> following command:
>>
>> *pandoc -f gfm -o test.pdf test.md <http://test.md>*
>>
>> The equation is not rendered in the generated pdf file. But if I remove 
>> the* -f gfm , *the equation is rendered correctly.
>>
>> *pandoc -o test.pdf test.md <http://test.md>*
>>
>>
>> The above command works fine.
>>
>>
>> What is the problem here? 
>>
>

-- 
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/48f06c33-a6e2-40eb-b7a8-c18bc393cffa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: markdown math equation not rendered correctly when I convert markdown file to pdf
       [not found]         ` <48f06c33-a6e2-40eb-b7a8-c18bc393cffa-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2017-12-19  2:16           ` iandol
  0 siblings, 0 replies; 5+ messages in thread
From: iandol @ 2017-12-19  2:16 UTC (permalink / raw)
  To: pandoc-discuss


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

I would have suggested to just add the tex_math_dollars extension to gfm 
but it seems gfm doesn't support other extensions:

http://pandoc.org/MANUAL.html#markdown-variants

you could try adding autolink_bare_uris to your pandoc variant invocation: *-f 
markdown+autolink_bare_uris*

or use <> around your URLs if you can?

-- 
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/d06bb73a-237e-4766-ae95-5197a58518b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: markdown math equation not rendered correctly when I convert markdown file to pdf
       [not found] ` <7eebfab5-4c87-42af-9a85-b9a7fb9cda79-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2017-12-18 14:51   ` iandol
@ 2017-12-19 10:24   ` Ronald Ligteringen
  1 sibling, 0 replies; 5+ messages in thread
From: Ronald Ligteringen @ 2017-12-19 10:24 UTC (permalink / raw)
  To: pandoc-discuss


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

You can use 
pandoc -f gfm -o test.pdf test.md --variable colorlinks
This will color your links and works fine with GFM


On Monday, December 18, 2017 at 11:26:20 AM UTC+1, jd h wrote:
>
> I want to convert a markdown file to pdf and it contains math equations. 
> But I found that the math equation is not rendered correctly.
>
> Here is a sample *test.md <http://test.md>* with a math equation:
>
> $$y\max(d^2 - {m_1}^2) + (1-y)\max({m_2}^2 - d^2)$$
>
> If I convert *test.md <http://test.md>* to* test.pdf *using the following 
> command:
>
> *pandoc -f gfm -o test.pdf test.md <http://test.md>*
>
> The equation is not rendered in the generated pdf file. But if I remove the* 
> -f gfm , *the equation is rendered correctly.
>
> *pandoc -o test.pdf test.md <http://test.md>*
>
>
> The above command works fine.
>
>
> What is the problem here? 
>

-- 
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/11482642-dc81-47ea-a7a5-b40972728a54%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

end of thread, other threads:[~2017-12-19 10:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-18 10:26 markdown math equation not rendered correctly when I convert markdown file to pdf jd h
     [not found] ` <7eebfab5-4c87-42af-9a85-b9a7fb9cda79-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-12-18 14:51   ` iandol
     [not found]     ` <07bea062-cd9e-4133-96f1-a433a1f5de6a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-12-19  1:49       ` jd h
     [not found]         ` <48f06c33-a6e2-40eb-b7a8-c18bc393cffa-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-12-19  2:16           ` iandol
2017-12-19 10:24   ` Ronald Ligteringen

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