public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* pandoc, reveal.js and the mathjax plugin
@ 2017-11-03  5:25 R (Chandra) Chandrasekhar
       [not found] ` <42fa0576-c0e0-117c-11d9-a8b3e68e8ec0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: R (Chandra) Chandrasekhar @ 2017-11-03  5:25 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

I am using pandoc with reveal.js after some years.

While pandoc's --mathjax option is fine for standalone HTML output, I 
have had non-rendition when using it with reveal.js.

Since reveal.js has its own plugin, and the instructions [1] are to 
invoke it thus:
---
Reveal.initialize({

	// other options ...

	math: {
		mathjax: 
'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js',
		config: 'TeX-AMS_HTML-full'  // See 
http://docs.mathjax.org/en/latest/config-files.html
	},

	dependencies: [
		{ src: 'plugin/math/math.js', async: true }
	]

});
---
[1]: https://github.com/hakimel/reveal.js#mathjax

I want to know what invocation I should make with pandoc to achieve this.

If it means having a suitably named file with is content in my root 
directory, I would appreciate knowing what I should call it.

Thanks.

Chandra


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

* Re: pandoc, reveal.js and the mathjax plugin
       [not found] ` <42fa0576-c0e0-117c-11d9-a8b3e68e8ec0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-11-03  5:39   ` John MacFarlane
  2017-11-05  5:21   ` R (Chandra) Chandrasekhar
  1 sibling, 0 replies; 5+ messages in thread
From: John MacFarlane @ 2017-11-03  5:39 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

With pandoc 2.0+, if you use --mathjax -t revealjs,
pandoc will use the reveal.js plugin.  You don't have
to do anything further.

Unfortunately, this has its own drawbacks if you
have regular $'s in your document, which
we're trying to iron out:
https://github.com/jgm/pandoc/issues/4027

+++ R (Chandra) Chandrasekhar [Nov 03 17 10:55 ]:
>I am using pandoc with reveal.js after some years.
>
>While pandoc's --mathjax option is fine for standalone HTML output, I 
>have had non-rendition when using it with reveal.js.
>
>Since reveal.js has its own plugin, and the instructions [1] are to 
>invoke it thus:
>---
>Reveal.initialize({
>
>	// other options ...
>
>	math: {
>		mathjax: 
>'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js',
>		config: 'TeX-AMS_HTML-full'  // See 
>http://docs.mathjax.org/en/latest/config-files.html
>	},
>
>	dependencies: [
>		{ src: 'plugin/math/math.js', async: true }
>	]
>
>});
>---
>[1]: https://github.com/hakimel/reveal.js#mathjax
>
>I want to know what invocation I should make with pandoc to achieve this.
>
>If it means having a suitably named file with is content in my root 
>directory, I would appreciate knowing what I should call it.
>
>Thanks.
>
>Chandra
>
>-- 
>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/42fa0576-c0e0-117c-11d9-a8b3e68e8ec0%40gmail.com.
>For more options, visit https://groups.google.com/d/optout.


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

* Re: pandoc, reveal.js and the mathjax plugin
       [not found] ` <42fa0576-c0e0-117c-11d9-a8b3e68e8ec0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2017-11-03  5:39   ` John MacFarlane
@ 2017-11-05  5:21   ` R (Chandra) Chandrasekhar
       [not found]     ` <6f1f6c12-a784-e466-361d-9769b8d35175-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  1 sibling, 1 reply; 5+ messages in thread
From: R (Chandra) Chandrasekhar @ 2017-11-05  5:21 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

I have got a little clarity and a workaround now, but it raises two 
questions.

Workaround
==========

Use "--slide-level 2" in the pandoc invocation and remove 
"--self-contained". It appears to seize up my machine.

My compile script is now:

"$pandoc" --from markdown+smart --to revealjs --standalone --slide-level 
2 --css "$custom" --output "$dest" "$source"

Two Questions
=============
1. The default value is supposed to be "slide-level 2" unless I have 
misunderstood the documentation. So, why the need for a separate option 
in the invocation?

2. Including "slide-level: 2" in the YAML header does not work, although 
the command-line invocation does. Why is this so? How do we know when 
not to include an option in the header? The reason is that I could use a 
vanilla compile script as all document-specific options will be in the 
document.

Thank you.

Chandra

On 03/11/17 10:55, R (Chandra) Chandrasekhar wrote:
> I am using pandoc with reveal.js after some years.
> 
> While pandoc's --mathjax option is fine for standalone HTML output, I 
> have had non-rendition when using it with reveal.js.
> 
> Since reveal.js has its own plugin, and the instructions [1] are to 
> invoke it thus:
> ---
> Reveal.initialize({
> 
>      // other options ...
> 
>      math: {
>          mathjax: 
> 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js',
>          config: 'TeX-AMS_HTML-full'  // See 
> http://docs.mathjax.org/en/latest/config-files.html
>      },
> 
>      dependencies: [
>          { src: 'plugin/math/math.js', async: true }
>      ]
> 
> });
> ---
> [1]: https://github.com/hakimel/reveal.js#mathjax
> 
> I want to know what invocation I should make with pandoc to achieve this.
> 
> If it means having a suitably named file with is content in my root 
> directory, I would appreciate knowing what I should call it.
> 
> Thanks.
> 
> Chandra

-- 
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/6f1f6c12-a784-e466-361d-9769b8d35175%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


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

* Re: pandoc, reveal.js and the mathjax plugin
       [not found]     ` <6f1f6c12-a784-e466-361d-9769b8d35175-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-11-05  6:24       ` John MacFarlane
       [not found]         ` <20171105062436.GB9333-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: John MacFarlane @ 2017-11-05  6:24 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ R (Chandra) Chandrasekhar [Nov 05 17 10:51 ]:
>Two Questions
>=============
>1. The default value is supposed to be "slide-level 2" unless I have 
>misunderstood the documentation. So, why the need for a separate 
>option in the invocation?

The default is not 2.  The slide level is the first header
level under which regular text appears (see the manual under
slide shows).

>2. Including "slide-level: 2" in the YAML header does not work, 
>although the command-line invocation does. Why is this so? How do we 
>know when not to include an option in the header? The reason is that I 
>could use a vanilla compile script as all document-specific options 
>will be in the document.

Putting something in your YAML header will only affect how
variables are filled in templates.  The slide level is not
a template variable, so putting it in YAML has no effect.
You need to use the command line option.  You can inspect
the template with `pandoc -D revealjs`.


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

* Re: pandoc, reveal.js and the mathjax plugin
       [not found]         ` <20171105062436.GB9333-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
@ 2017-11-05  7:35           ` R (Chandra) Chandrasekhar
  0 siblings, 0 replies; 5+ messages in thread
From: R (Chandra) Chandrasekhar @ 2017-11-05  7:35 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On 05/11/17 11:54, John MacFarlane wrote:
> +++ R (Chandra) Chandrasekhar [Nov 05 17 10:51 ]:
>> Two Questions
>> =============
>> 1. The default value is supposed to be "slide-level 2" unless I have 
>> misunderstood the documentation. So, why the need for a separate 
>> option in the invocation?
> 
> The default is not 2.  The slide level is the first header
> level under which regular text appears (see the manual under
> slide shows).

Thank you.

It appears that some comments below the last level 1 slide were the 
cause of the unexpected loss of vertical navigation.

My last slide in my source .md file looked like:

---Quote---
# Thank You!

<!--Some comments

Across three lines.-->
---Unquote---

And the comments seemed to cause the problems I have seen.

Once those terminal comments were removed and only the "Thank You" was 
left behind, the slide-level of 2 was restored without need for 
invocation as a command-line option, and vertical navigation was restored.

Chandra

-- 
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/120a9216-5f79-cb9a-4566-d44dfdc77f71%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


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

end of thread, other threads:[~2017-11-05  7:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-03  5:25 pandoc, reveal.js and the mathjax plugin R (Chandra) Chandrasekhar
     [not found] ` <42fa0576-c0e0-117c-11d9-a8b3e68e8ec0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-11-03  5:39   ` John MacFarlane
2017-11-05  5:21   ` R (Chandra) Chandrasekhar
     [not found]     ` <6f1f6c12-a784-e466-361d-9769b8d35175-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-11-05  6:24       ` John MacFarlane
     [not found]         ` <20171105062436.GB9333-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
2017-11-05  7:35           ` R (Chandra) Chandrasekhar

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