public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Pandoc #4317 side effect
@ 2019-08-27 14:02 Thomas Chevrier
       [not found] ` <6a083675-a292-4bad-9ff4-8d834c477239-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas Chevrier @ 2019-08-27 14:02 UTC (permalink / raw)
  To: pandoc-discuss


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


Hi folks,

John MacFarlane asked me to post here - hence this message.

Indeed, I posted a comment on https://github.com/jgm/pandoc/issues/4317 and 
very very cool - John MacFarlane responded immediately (I thank him 
profusely for that).
I copy the exchange below.
Could anyone please assist me!?
I would v very much appreciate!

Kindly note I also posted a more detailed explanation of my issue on 
StackOverflow but since he suggested I post it here, here we go...
Any channel works for me, if you can help.
Many m thanks
thomas

PS (only because I need to vent my frustration! :-)): I do not understand 
why revealjs would publish on slides content that's not meant to be on 
slides, but of course, the reason for my lack of understanding is that I 
have never used revealjs!! I feel frustrated that another software makes 
pandoc behave "strangely" imho where content not meant to be on a slide (if 
it was, it should be in the proper heading - level 3 in my case??) is 
forced to appear on a slide without escape options... I do understand the 
consistency concern though, again - it's just odd.

tchevri <https://github.com/tchevri> commented 5 days ago 
<https://github.com/jgm/pandoc/issues/4317#issuecomment-524002872>

I am so sorry to trouble - but this (unexpected!) change has caused me 
quite a bit of trouble...
I am certain it's because of my incompetence and despite trying hard, i 
could not find any work around, except to roll back to an earlier pandoc.. 
(have not rolled back yet, but that's the obvious fix for me). I posted the 
detailed explanation here, as per Xie YiHui's advice...
https://stackoverflow.com/questions/57614387/pandoc-4317-forces-content-under-title-slides-to-be-included-in-a-frame-in-pand
Thank you so much for any help you may provide. I hope it's an obvious fix 
for you. Of course, I am happy to provide any code needed - but fyi - i am 
under windows 10 (I prefer linux, but unfortunately the Rblpapi only works 
with windows 10 :-() and everything is fully up to date. I like to use the 
RStudio IDE.
[image: @jgm] <https://github.com/jgm>
  
Ownerjgm <https://github.com/jgm> commented 4 days ago 
<https://github.com/jgm/pandoc/issues/4317#issuecomment-524169706>

@tchevri <https://github.com/tchevri> I'm sorry about this -- it appears 
one can't please everyone. Unfortunately your particular use wasn't 
represented in the discussion. I had assumed that people who didn't want 
the content to appear on slides could simply hide the content (using a 
filter or whatever), but your case is different; you don't want to hide the 
content; you want it to appear in the document outside the slide 
environment.

I'm reluctant to revert the change to beamer, since this would make 
revealjs and beamer behave differently, and because it would break things 
for other users.

But I can't think of a good workaround right now.

I suggest you post on the pandoc-discuss mailing list, where someone might 
have ideas...closed issues aren't a good place for discussions.

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/6a083675-a292-4bad-9ff4-8d834c477239%40googlegroups.com.

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

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

* Re: Pandoc #4317 side effect
       [not found] ` <6a083675-a292-4bad-9ff4-8d834c477239-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2019-08-27 16:22   ` John MacFarlane
       [not found]     ` <m2pnkqefx8.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: John MacFarlane @ 2019-08-27 16:22 UTC (permalink / raw)
  To: Thomas Chevrier, pandoc-discuss


To summarize the issue here, which concerns a change to slide
show formats:

Prior to 2.7, versions of pandoc only put material under the "slide
level" headings on slides.  If you set slide level to 2, then
only material under level-2 headings would appear on slides,
and text under level-1 headings would not appear at all
(though level-1 headings would create "title slides" with
just the section title).

Reveal.js users consistently complained (#4317, #5237) that
this made it hard to structure reveal.js 2D slide shows, in
which it is common to have the "top" slide on each column
contain both a title and some text.

In response, I changed pandoc in 2.7 -- as the changelog says,

> Slide show formats behavior change: content under headers less
> than slide level is no longer ignored, but included in the title
> slide (for HTML slide shows) or in a slide after the title slide
> (for beamer). This change makes possible 2D reveal.js slideshows
> with content in the top slide on each stack (#4317, #5237).

The change to reveal.js has been welcomed by reveal.js users,
but the change to beamer is apparently not welcome by everyone.
The reason I made the change to both formats is because I want
slide shows to work the same no matter what output format you
use. (So you can switch from beamer to reveal.js, for example,
and the slides will look more or less the same.)

I had thought the beamer change was innocuous, since it could
be worked around by people who wanted to include content under
top-level section headings but not in the slides, e.g. by using
a filter to strip out this content.

Unfortunately, Thomas Chevrier's use case can't be handled that
way.  He wants to insert raw tex commands that (a) can't be
stripped out but (b) only work if they're outside the
'frame' environment created for a slide.  I can't think of any
workaround for this.

One possible course of action would be to revert the beamer
change while keeping the reveal.js change. This would potentially
have two bad consequences:

1) slide shows would render differently (in content, not just
form) in reveal.js and beamer.

2) this may break slide shows that were constructed using the
new behavior since 2.7 was released.

A less radical change might be to introduce special Div whose
contents get moved outside the slide itself. Anyway, comments
welcome.



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

* Re: Pandoc #4317 side effect
       [not found]     ` <m2pnkqefx8.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2020-08-24 17:57       ` Thomas Chevrier
       [not found]         ` <c4db2ddc-b3b0-4c62-a8bb-8a601e37dc48n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas Chevrier @ 2020-08-24 17:57 UTC (permalink / raw)
  To: pandoc-discuss


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


Hi folks,

it's been exactly a year now and I am still not able to upgrade my version 
of Pandoc - stuck pre 2.7, because of the adverse change.
Indeed, the "upgrade" for reveal.js users caused my latex beamer code to 
break down.
I have tried multiple things without luck - I also tried a lua filter, but 
that did not work - no matter what, the content gets "slapped" onto a slide.
As JGM suggests (was great watching him talk about Pandoc at TUG 2020 
keynote address), I'd love to be able to simply be able to have content 
escape being slapped onto a slide - I believe that's precisely the spirit 
of Beamer, which uses <mode> heavily for that purpose.
I also thought that was the spirit of pandoc - as you were setting in the 
yaml header your level for displaying on slides, but i have been clearly 
proven wrong. :-(
One option would be to recompile pandoc without that change, but because of 
the bloomberg API, I am forced to be on windows, which would make this 
solution cumbersome at best (would be straightforward on linux though).

FYI, I posted back then on SO, got only 2 upvotes and 2 bookmarks, but no 
answer, not even a comment :-(
https://stackoverflow.com/questions/57614387/pandoc-4317-forces-content-under-title-slides-to-be-included-in-a-frame-in-pand
  

Could anyone *please* help me?
many thanks in advance
thomas


On Wednesday, August 28, 2019 at 12:23:15 AM UTC+8 John MacFarlane wrote:

>
> To summarize the issue here, which concerns a change to slide 
> show formats: 
>
> Prior to 2.7, versions of pandoc only put material under the "slide 
> level" headings on slides. If you set slide level to 2, then 
> only material under level-2 headings would appear on slides, 
> and text under level-1 headings would not appear at all 
> (though level-1 headings would create "title slides" with 
> just the section title). 
>
> Reveal.js users consistently complained (#4317, #5237) that 
> this made it hard to structure reveal.js 2D slide shows, in 
> which it is common to have the "top" slide on each column 
> contain both a title and some text. 
>
> In response, I changed pandoc in 2.7 -- as the changelog says, 
>
> > Slide show formats behavior change: content under headers less 
> > than slide level is no longer ignored, but included in the title 
> > slide (for HTML slide shows) or in a slide after the title slide 
> > (for beamer). This change makes possible 2D reveal.js slideshows 
> > with content in the top slide on each stack (#4317, #5237). 
>
> The change to reveal.js has been welcomed by reveal.js users, 
> but the change to beamer is apparently not welcome by everyone. 
> The reason I made the change to both formats is because I want 
> slide shows to work the same no matter what output format you 
> use. (So you can switch from beamer to reveal.js, for example, 
> and the slides will look more or less the same.) 
>
> I had thought the beamer change was innocuous, since it could 
> be worked around by people who wanted to include content under 
> top-level section headings but not in the slides, e.g. by using 
> a filter to strip out this content. 
>
> Unfortunately, Thomas Chevrier's use case can't be handled that 
> way. He wants to insert raw tex commands that (a) can't be 
> stripped out but (b) only work if they're outside the 
> 'frame' environment created for a slide. I can't think of any 
> workaround for this. 
>
> One possible course of action would be to revert the beamer 
> change while keeping the reveal.js change. This would potentially 
> have two bad consequences: 
>
> 1) slide shows would render differently (in content, not just 
> form) in reveal.js and beamer. 
>
> 2) this may break slide shows that were constructed using the 
> new behavior since 2.7 was released. 
>
> A less radical change might be to introduce special Div whose 
> contents get moved outside the slide itself. Anyway, comments 
> welcome. 
>
>
>

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/c4db2ddc-b3b0-4c62-a8bb-8a601e37dc48n%40googlegroups.com.

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

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

* Re: Pandoc #4317 side effect
       [not found]         ` <c4db2ddc-b3b0-4c62-a8bb-8a601e37dc48n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-08-24 20:00           ` John MacFarlane
       [not found]             ` <m2y2m3x1a3.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
       [not found]             ` <CAJffZrHi=PsXVgf6psA+gAaOJvw9bzuoQU_HbXnbzUtc0s+QLA@mail.gmail.com>
  0 siblings, 2 replies; 10+ messages in thread
From: John MacFarlane @ 2020-08-24 20:00 UTC (permalink / raw)
  To: Thomas Chevrier, pandoc-discuss


If you use the raw attribute to mark up content as "raw beamer,"
as suggested earlier in this thread, it will not appear in
reveal.js output. Demo here:

https://pandoc.org/try/?text=%23+Introduction%0A%0A%60%60%60%7B%3Dbeamer%7D%0AHey+this+is+raw+beamer!%0A%60%60%60%0A%0A%23%23+Slide+one%0A%0Acontent%0A%0A%23%23%23+Vertical+slide%0A%0Acontent+vertical%0A&from=markdown&to=revealjs&standalone=0


Thomas Chevrier <tchevri-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Hi folks,
>
> it's been exactly a year now and I am still not able to upgrade my version 
> of Pandoc - stuck pre 2.7, because of the adverse change.
> Indeed, the "upgrade" for reveal.js users caused my latex beamer code to 
> break down.
> I have tried multiple things without luck - I also tried a lua filter, but 
> that did not work - no matter what, the content gets "slapped" onto a slide.
> As JGM suggests (was great watching him talk about Pandoc at TUG 2020 
> keynote address), I'd love to be able to simply be able to have content 
> escape being slapped onto a slide - I believe that's precisely the spirit 
> of Beamer, which uses <mode> heavily for that purpose.
> I also thought that was the spirit of pandoc - as you were setting in the 
> yaml header your level for displaying on slides, but i have been clearly 
> proven wrong. :-(
> One option would be to recompile pandoc without that change, but because of 
> the bloomberg API, I am forced to be on windows, which would make this 
> solution cumbersome at best (would be straightforward on linux though).
>
> FYI, I posted back then on SO, got only 2 upvotes and 2 bookmarks, but no 
> answer, not even a comment :-(
> https://stackoverflow.com/questions/57614387/pandoc-4317-forces-content-under-title-slides-to-be-included-in-a-frame-in-pand
>   
>
> Could anyone *please* help me?
> many thanks in advance
> thomas
>
>
> On Wednesday, August 28, 2019 at 12:23:15 AM UTC+8 John MacFarlane wrote:
>
>>
>> To summarize the issue here, which concerns a change to slide 
>> show formats: 
>>
>> Prior to 2.7, versions of pandoc only put material under the "slide 
>> level" headings on slides. If you set slide level to 2, then 
>> only material under level-2 headings would appear on slides, 
>> and text under level-1 headings would not appear at all 
>> (though level-1 headings would create "title slides" with 
>> just the section title). 
>>
>> Reveal.js users consistently complained (#4317, #5237) that 
>> this made it hard to structure reveal.js 2D slide shows, in 
>> which it is common to have the "top" slide on each column 
>> contain both a title and some text. 
>>
>> In response, I changed pandoc in 2.7 -- as the changelog says, 
>>
>> > Slide show formats behavior change: content under headers less 
>> > than slide level is no longer ignored, but included in the title 
>> > slide (for HTML slide shows) or in a slide after the title slide 
>> > (for beamer). This change makes possible 2D reveal.js slideshows 
>> > with content in the top slide on each stack (#4317, #5237). 
>>
>> The change to reveal.js has been welcomed by reveal.js users, 
>> but the change to beamer is apparently not welcome by everyone. 
>> The reason I made the change to both formats is because I want 
>> slide shows to work the same no matter what output format you 
>> use. (So you can switch from beamer to reveal.js, for example, 
>> and the slides will look more or less the same.) 
>>
>> I had thought the beamer change was innocuous, since it could 
>> be worked around by people who wanted to include content under 
>> top-level section headings but not in the slides, e.g. by using 
>> a filter to strip out this content. 
>>
>> Unfortunately, Thomas Chevrier's use case can't be handled that 
>> way. He wants to insert raw tex commands that (a) can't be 
>> stripped out but (b) only work if they're outside the 
>> 'frame' environment created for a slide. I can't think of any 
>> workaround for this. 
>>
>> One possible course of action would be to revert the beamer 
>> change while keeping the reveal.js change. This would potentially 
>> have two bad consequences: 
>>
>> 1) slide shows would render differently (in content, not just 
>> form) in reveal.js and beamer. 
>>
>> 2) this may break slide shows that were constructed using the 
>> new behavior since 2.7 was released. 
>>
>> A less radical change might be to introduce special Div whose 
>> contents get moved outside the slide itself. Anyway, comments 
>> welcome. 
>>
>>
>>
>
> -- 
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/c4db2ddc-b3b0-4c62-a8bb-8a601e37dc48n%40googlegroups.com.


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

* Re: Pandoc #4317 side effect
       [not found]             ` <m2y2m3x1a3.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2020-08-25  3:54               ` Thomas Chevrier
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Chevrier @ 2020-08-25  3:54 UTC (permalink / raw)
  To: pandoc-discuss


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

First of all, thank you so much for taking the time to reply - really much 
appreciated, all the more given how busy I see you are, with so many 
awesome improvements.
I love this "raw beamer" attribute, might make my document a lot more 
readable, yet to try it for other purposes.
Unfortunately, this suggested solution does not help the issue at stake.

The issue is for the content not to get forced slapped onto a slide.
To create a new title page, I need the following piece of code:
\mode<presentation>
  {
    \title[\CourseName{} Lecture 1]{\CourseName{} \newline \, Lecture 1}
    \date{\DayOne{}\Yr{}}
  }
  ###
  \titlepage

And this {...} code cannot sit inside a frame or a latex error is thrown (! 
Illegal parameter number in definition of \iterate.).
After 2.7 - there is no more option for me to write content outside a frame 
- everything is forced into a frame.
"raw beamer" attribute does not escape this behavior unfortunately.

Hence my suggestion last night - i don't know if that would be acceptable 
or even useful?
But i have been thinking that I am perfectly fine with level -2 content not 
being forced onto slides.
From what I read, it looks like reveal.js users only need level -1 content 
slapped onto slides?
Of course, I'd be happy with any other solution you think is best.

Many thank
thomas

On Tuesday, August 25, 2020 at 4:00:22 AM UTC+8 John MacFarlane wrote:

>
> If you use the raw attribute to mark up content as "raw beamer,"
> as suggested earlier in this thread, it will not appear in
> reveal.js output. Demo here:
>
>
> https://pandoc.org/try/?text=%23+Introduction%0A%0A%60%60%60%7B%3Dbeamer%7D%0AHey+this+is+raw+beamer!%0A%60%60%60%0A%0A%23%23+Slide+one%0A%0Acontent%0A%0A%23%23%23+Vertical+slide%0A%0Acontent+vertical%0A&from=markdown&to=revealjs&standalone=0
>
>
> Thomas Chevrier <tch...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > Hi folks,
> >
> > it's been exactly a year now and I am still not able to upgrade my 
> version 
> > of Pandoc - stuck pre 2.7, because of the adverse change.
> > Indeed, the "upgrade" for reveal.js users caused my latex beamer code to 
> > break down.
> > I have tried multiple things without luck - I also tried a lua filter, 
> but 
> > that did not work - no matter what, the content gets "slapped" onto a 
> slide.
> > As JGM suggests (was great watching him talk about Pandoc at TUG 2020 
> > keynote address), I'd love to be able to simply be able to have content 
> > escape being slapped onto a slide - I believe that's precisely the 
> spirit 
> > of Beamer, which uses <mode> heavily for that purpose.
> > I also thought that was the spirit of pandoc - as you were setting in 
> the 
> > yaml header your level for displaying on slides, but i have been clearly 
> > proven wrong. :-(
> > One option would be to recompile pandoc without that change, but because 
> of 
> > the bloomberg API, I am forced to be on windows, which would make this 
> > solution cumbersome at best (would be straightforward on linux though).
> >
> > FYI, I posted back then on SO, got only 2 upvotes and 2 bookmarks, but 
> no 
> > answer, not even a comment :-(
> > 
> https://stackoverflow.com/questions/57614387/pandoc-4317-forces-content-under-title-slides-to-be-included-in-a-frame-in-pand
> > 
> >
> > Could anyone *please* help me?
> > many thanks in advance
> > thomas
> >
> >
> > On Wednesday, August 28, 2019 at 12:23:15 AM UTC+8 John MacFarlane wrote:
> >
> >>
> >> To summarize the issue here, which concerns a change to slide 
> >> show formats: 
> >>
> >> Prior to 2.7, versions of pandoc only put material under the "slide 
> >> level" headings on slides. If you set slide level to 2, then 
> >> only material under level-2 headings would appear on slides, 
> >> and text under level-1 headings would not appear at all 
> >> (though level-1 headings would create "title slides" with 
> >> just the section title). 
> >>
> >> Reveal.js users consistently complained (#4317, #5237) that 
> >> this made it hard to structure reveal.js 2D slide shows, in 
> >> which it is common to have the "top" slide on each column 
> >> contain both a title and some text. 
> >>
> >> In response, I changed pandoc in 2.7 -- as the changelog says, 
> >>
> >> > Slide show formats behavior change: content under headers less 
> >> > than slide level is no longer ignored, but included in the title 
> >> > slide (for HTML slide shows) or in a slide after the title slide 
> >> > (for beamer). This change makes possible 2D reveal.js slideshows 
> >> > with content in the top slide on each stack (#4317, #5237). 
> >>
> >> The change to reveal.js has been welcomed by reveal.js users, 
> >> but the change to beamer is apparently not welcome by everyone. 
> >> The reason I made the change to both formats is because I want 
> >> slide shows to work the same no matter what output format you 
> >> use. (So you can switch from beamer to reveal.js, for example, 
> >> and the slides will look more or less the same.) 
> >>
> >> I had thought the beamer change was innocuous, since it could 
> >> be worked around by people who wanted to include content under 
> >> top-level section headings but not in the slides, e.g. by using 
> >> a filter to strip out this content. 
> >>
> >> Unfortunately, Thomas Chevrier's use case can't be handled that 
> >> way. He wants to insert raw tex commands that (a) can't be 
> >> stripped out but (b) only work if they're outside the 
> >> 'frame' environment created for a slide. I can't think of any 
> >> workaround for this. 
> >>
> >> One possible course of action would be to revert the beamer 
> >> change while keeping the reveal.js change. This would potentially 
> >> have two bad consequences: 
> >>
> >> 1) slide shows would render differently (in content, not just 
> >> form) in reveal.js and beamer. 
> >>
> >> 2) this may break slide shows that were constructed using the 
> >> new behavior since 2.7 was released. 
> >>
> >> A less radical change might be to introduce special Div whose 
> >> contents get moved outside the slide itself. Anyway, comments 
> >> welcome. 
> >>
> >>
> >>
> >
> > -- 
> > 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...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/c4db2ddc-b3b0-4c62-a8bb-8a601e37dc48n%40googlegroups.com
> .
>

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/aec295b6-4974-4d14-9a5e-6a3538683111n%40googlegroups.com.

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

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

* Re: Pandoc #4317 side effect
       [not found]               ` <CAJffZrHi=PsXVgf6psA+gAaOJvw9bzuoQU_HbXnbzUtc0s+QLA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2020-08-25  4:22                 ` John MacFarlane
       [not found]                   ` <m2v9h7uzgu.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: John MacFarlane @ 2020-08-25  4:22 UTC (permalink / raw)
  To: Chevrier, Thomas; +Cc: Thomas Chevrier, pandoc-discuss


If that's what you need, then a custom template could provide it.
Just add this stuff to a custom template, with variables in the
varying parts:

 \mode<presentation>
   {
     \title[\CourseName{} Lecture $lecture-number$]{\CourseName{} \newline \, Lecture $lecture-number$}
     \date{\DayOne{}\Yr{}}
   }
   ###
   \titlepage

   $body$

"Chevrier, Thomas" <tc-ACPurvaskuAAcGGWjIcM5Q@public.gmane.org> writes:

> First of all, thank you so much for taking the time to reply - really much
> appreciated, all the more given how busy I see you are, with so many
> awesome improvements.
> I love this "raw beamer" attribute, might make my document a lot more
> readable, yet to try it for other purposes.
> Unfortunately, this suggested solution does not help the issue at stake.
>
> The issue is for the content not to get forced slapped onto a slide.
> To create a new title page, I need the following piece of code:
> \mode<presentation>
>   {
>     \title[\CourseName{} Lecture 1]{\CourseName{} \newline \, Lecture 1}
>     \date{\DayOne{}\Yr{}}
>   }
>   ###
>   \titlepage
>
> And this {...} code cannot sit inside a frame or a latex error is thrown (!
> Illegal parameter number in definition of \iterate.).
> After 2.7 - there is no more option for me to write content outside a frame
> - everything is forced into a frame.
> "raw beamer" attribute does not escape this behavior unfortunately.
>
> Hence my suggestion last night - i don't know if that would be acceptable
> or even useful?
> But i have been thinking that I am perfectly fine with level -2 content not
> being forced onto slides.
> From what I read, it looks like reveal.js users only need level -1 content
> slapped onto slides?
> Of course, I'd be happy with any other solution you think is best.
>
> Many thank
> thomas
>
>
> On Tue, Aug 25, 2020 at 4:00 AM John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
>
>>
>> If you use the raw attribute to mark up content as "raw beamer,"
>> as suggested earlier in this thread, it will not appear in
>> reveal.js output. Demo here:
>>
>>
>> https://pandoc.org/try/?text=%23+Introduction%0A%0A%60%60%60%7B%3Dbeamer%7D%0AHey+this+is+raw+beamer!%0A%60%60%60%0A%0A%23%23+Slide+one%0A%0Acontent%0A%0A%23%23%23+Vertical+slide%0A%0Acontent+vertical%0A&from=markdown&to=revealjs&standalone=0
>>
>>
>> Thomas Chevrier <tchevri-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>>
>> > Hi folks,
>> >
>> > it's been exactly a year now and I am still not able to upgrade my
>> version
>> > of Pandoc - stuck pre 2.7, because of the adverse change.
>> > Indeed, the "upgrade" for reveal.js users caused my latex beamer code to
>> > break down.
>> > I have tried multiple things without luck - I also tried a lua filter,
>> but
>> > that did not work - no matter what, the content gets "slapped" onto a
>> slide.
>> > As JGM suggests (was great watching him talk about Pandoc at TUG 2020
>> > keynote address), I'd love to be able to simply be able to have content
>> > escape being slapped onto a slide - I believe that's precisely the
>> spirit
>> > of Beamer, which uses <mode> heavily for that purpose.
>> > I also thought that was the spirit of pandoc - as you were setting in
>> the
>> > yaml header your level for displaying on slides, but i have been clearly
>> > proven wrong. :-(
>> > One option would be to recompile pandoc without that change, but because
>> of
>> > the bloomberg API, I am forced to be on windows, which would make this
>> > solution cumbersome at best (would be straightforward on linux though).
>> >
>> > FYI, I posted back then on SO, got only 2 upvotes and 2 bookmarks, but
>> no
>> > answer, not even a comment :-(
>> >
>> https://stackoverflow.com/questions/57614387/pandoc-4317-forces-content-under-title-slides-to-be-included-in-a-frame-in-pand
>> >
>> >
>> > Could anyone *please* help me?
>> > many thanks in advance
>> > thomas
>> >
>> >
>> > On Wednesday, August 28, 2019 at 12:23:15 AM UTC+8 John MacFarlane wrote:
>> >
>> >>
>> >> To summarize the issue here, which concerns a change to slide
>> >> show formats:
>> >>
>> >> Prior to 2.7, versions of pandoc only put material under the "slide
>> >> level" headings on slides. If you set slide level to 2, then
>> >> only material under level-2 headings would appear on slides,
>> >> and text under level-1 headings would not appear at all
>> >> (though level-1 headings would create "title slides" with
>> >> just the section title).
>> >>
>> >> Reveal.js users consistently complained (#4317, #5237) that
>> >> this made it hard to structure reveal.js 2D slide shows, in
>> >> which it is common to have the "top" slide on each column
>> >> contain both a title and some text.
>> >>
>> >> In response, I changed pandoc in 2.7 -- as the changelog says,
>> >>
>> >> > Slide show formats behavior change: content under headers less
>> >> > than slide level is no longer ignored, but included in the title
>> >> > slide (for HTML slide shows) or in a slide after the title slide
>> >> > (for beamer). This change makes possible 2D reveal.js slideshows
>> >> > with content in the top slide on each stack (#4317, #5237).
>> >>
>> >> The change to reveal.js has been welcomed by reveal.js users,
>> >> but the change to beamer is apparently not welcome by everyone.
>> >> The reason I made the change to both formats is because I want
>> >> slide shows to work the same no matter what output format you
>> >> use. (So you can switch from beamer to reveal.js, for example,
>> >> and the slides will look more or less the same.)
>> >>
>> >> I had thought the beamer change was innocuous, since it could
>> >> be worked around by people who wanted to include content under
>> >> top-level section headings but not in the slides, e.g. by using
>> >> a filter to strip out this content.
>> >>
>> >> Unfortunately, Thomas Chevrier's use case can't be handled that
>> >> way. He wants to insert raw tex commands that (a) can't be
>> >> stripped out but (b) only work if they're outside the
>> >> 'frame' environment created for a slide. I can't think of any
>> >> workaround for this.
>> >>
>> >> One possible course of action would be to revert the beamer
>> >> change while keeping the reveal.js change. This would potentially
>> >> have two bad consequences:
>> >>
>> >> 1) slide shows would render differently (in content, not just
>> >> form) in reveal.js and beamer.
>> >>
>> >> 2) this may break slide shows that were constructed using the
>> >> new behavior since 2.7 was released.
>> >>
>> >> A less radical change might be to introduce special Div whose
>> >> contents get moved outside the slide itself. Anyway, comments
>> >> welcome.
>> >>
>> >>
>> >>
>> >
>> > --
>> > 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/pandoc-discuss/c4db2ddc-b3b0-4c62-a8bb-8a601e37dc48n%40googlegroups.com
>> .
>>


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

* Re: Pandoc #4317 side effect
       [not found]                   ` <m2v9h7uzgu.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2020-08-25 17:06                     ` Thomas Chevrier
       [not found]                       ` <73f0ad6f-f17d-424a-abe6-e8e29e9c7f2en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas Chevrier @ 2020-08-25 17:06 UTC (permalink / raw)
  To: pandoc-discuss


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


Thank you again John for taking the time again and again to respond - 
totally appreciated, it's amazing.

As a consequence, I took the entire day to try your solution, google 
frantically, but I failed miserably.
I will spare you the details of everything I tried, but here is what i 
think is my best attempt:

.1.  
Read carefully: https://bookdown.org/yihui/rmarkdown/template-pandoc.html

.2. 
Download default.latex from your website: 
https://github.com/jgm/pandoc-templates

.3. 
Rename the file to my-template.tex and, as per your email, line 460 just 
before $body$, add:
$if(dayone)$
\mode<presentation>
   {
     \title[\CourseName{} Lecture $lecture-number$]{\CourseName{} \newline 
\, Lecture $lecture-number$}
     \date{\DayOne{}\Yr{}}
   }
   ###
   \titlepage
$endif$

.4. 
In my bookdown,  add the $dayone$ custom Pandoc variable
# Notations {#notations}
## Mathematics
$dayone$
```{r Lecture1Outline, eval = (out_type=="beamer"), echo=FALSE, 
results='asis'}
```
```{r Lecture1Slide1, eval = (out_type=="beamer"), echo=FALSE, 
results='asis'}
```
`r if (out_type=="beamer") "- "` $h = \left(h_{1}, h_{2}, \ldots, 
h_{n}\right)$ denotes a vector (lowercase)

etc. etc...

.5.
add "template: my-template.tex" to my YAML so that "--template 
my-template.tex" is being correctly added as an option to Pandoc.

OUTCOME:

I still get the undesired slide...
"...
Mathematics
𝑑𝑎𝑦𝑜𝑛𝑒
..."

I check the .rmd file.
It has 
<!--chapter:end:index.Rmd-->
# Notations {#notations}
## Mathematics
$dayone$
etc. etc...

the .tex file has:

\hypertarget{mathematics}{%
\subsection{Mathematics}\label{mathematics}}
\begin{frame}{Mathematics}
\(dayone\)
\end{frame}

I am so sorry - I feel crummy I could not figure this one out after so many 
hours and I Thank you in advance for any further help on this issue that 
has drawn me for nearly 18 months.
Many thanks
thomas

PS: note that I have 
before_body: beamer_prefix.tex
and that works well for setting the initial cover page (syllabus) - the 
issue is really after, as I used this mode<presentation> to redefine the 
elements of the title slide on the fly (day 1, 2, etc of the course)

On Tuesday, August 25, 2020 at 12:22:26 PM UTC+8 John MacFarlane wrote:

>
> If that's what you need, then a custom template could provide it.
> Just add this stuff to a custom template, with variables in the
> varying parts:
>
> \mode<presentation>
> {
> \title[\CourseName{} Lecture $lecture-number$]{\CourseName{} \newline \, 
> Lecture $lecture-number$}
> \date{\DayOne{}\Yr{}}
> }
> ###
> \titlepage
>
> $body$
>
> "Chevrier, Thomas" <t...-ACPurvaskuAAcGGWjIcM5Q@public.gmane.org> writes:
>
> > First of all, thank you so much for taking the time to reply - really 
> much
> > appreciated, all the more given how busy I see you are, with so many
> > awesome improvements.
> > I love this "raw beamer" attribute, might make my document a lot more
> > readable, yet to try it for other purposes.
> > Unfortunately, this suggested solution does not help the issue at stake.
> >
> > The issue is for the content not to get forced slapped onto a slide.
> > To create a new title page, I need the following piece of code:
> > \mode<presentation>
> > {
> > \title[\CourseName{} Lecture 1]{\CourseName{} \newline \, Lecture 1}
> > \date{\DayOne{}\Yr{}}
> > }
> > ###
> > \titlepage
> >
> > And this {...} code cannot sit inside a frame or a latex error is thrown 
> (!
> > Illegal parameter number in definition of \iterate.).
> > After 2.7 - there is no more option for me to write content outside a 
> frame
> > - everything is forced into a frame.
> > "raw beamer" attribute does not escape this behavior unfortunately.
> >
> > Hence my suggestion last night - i don't know if that would be acceptable
> > or even useful?
> > But i have been thinking that I am perfectly fine with level -2 content 
> not
> > being forced onto slides.
> > From what I read, it looks like reveal.js users only need level -1 
> content
> > slapped onto slides?
> > Of course, I'd be happy with any other solution you think is best.
> >
> > Many thank
> > thomas
> >
> >
> > On Tue, Aug 25, 2020 at 4:00 AM John MacFarlane <j...-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> 
> wrote:
> >
> >>
> >> If you use the raw attribute to mark up content as "raw beamer,"
> >> as suggested earlier in this thread, it will not appear in
> >> reveal.js output. Demo here:
> >>
> >>
> >> 
> https://pandoc.org/try/?text=%23+Introduction%0A%0A%60%60%60%7B%3Dbeamer%7D%0AHey+this+is+raw+beamer!%0A%60%60%60%0A%0A%23%23+Slide+one%0A%0Acontent%0A%0A%23%23%23+Vertical+slide%0A%0Acontent+vertical%0A&from=markdown&to=revealjs&standalone=0
> >>
> >>
> >> Thomas Chevrier <tch...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> >>
> >> > Hi folks,
> >> >
> >> > it's been exactly a year now and I am still not able to upgrade my
> >> version
> >> > of Pandoc - stuck pre 2.7, because of the adverse change.
> >> > Indeed, the "upgrade" for reveal.js users caused my latex beamer code 
> to
> >> > break down.
> >> > I have tried multiple things without luck - I also tried a lua filter,
> >> but
> >> > that did not work - no matter what, the content gets "slapped" onto a
> >> slide.
> >> > As JGM suggests (was great watching him talk about Pandoc at TUG 2020
> >> > keynote address), I'd love to be able to simply be able to have 
> content
> >> > escape being slapped onto a slide - I believe that's precisely the
> >> spirit
> >> > of Beamer, which uses <mode> heavily for that purpose.
> >> > I also thought that was the spirit of pandoc - as you were setting in
> >> the
> >> > yaml header your level for displaying on slides, but i have been 
> clearly
> >> > proven wrong. :-(
> >> > One option would be to recompile pandoc without that change, but 
> because
> >> of
> >> > the bloomberg API, I am forced to be on windows, which would make this
> >> > solution cumbersome at best (would be straightforward on linux 
> though).
> >> >
> >> > FYI, I posted back then on SO, got only 2 upvotes and 2 bookmarks, but
> >> no
> >> > answer, not even a comment :-(
> >> >
> >> 
> https://stackoverflow.com/questions/57614387/pandoc-4317-forces-content-under-title-slides-to-be-included-in-a-frame-in-pand
> >> >
> >> >
> >> > Could anyone *please* help me?
> >> > many thanks in advance
> >> > thomas
> >> >
> >> >
> >> > On Wednesday, August 28, 2019 at 12:23:15 AM UTC+8 John MacFarlane 
> wrote:
> >> >
> >> >>
> >> >> To summarize the issue here, which concerns a change to slide
> >> >> show formats:
> >> >>
> >> >> Prior to 2.7, versions of pandoc only put material under the "slide
> >> >> level" headings on slides. If you set slide level to 2, then
> >> >> only material under level-2 headings would appear on slides,
> >> >> and text under level-1 headings would not appear at all
> >> >> (though level-1 headings would create "title slides" with
> >> >> just the section title).
> >> >>
> >> >> Reveal.js users consistently complained (#4317, #5237) that
> >> >> this made it hard to structure reveal.js 2D slide shows, in
> >> >> which it is common to have the "top" slide on each column
> >> >> contain both a title and some text.
> >> >>
> >> >> In response, I changed pandoc in 2.7 -- as the changelog says,
> >> >>
> >> >> > Slide show formats behavior change: content under headers less
> >> >> > than slide level is no longer ignored, but included in the title
> >> >> > slide (for HTML slide shows) or in a slide after the title slide
> >> >> > (for beamer). This change makes possible 2D reveal.js slideshows
> >> >> > with content in the top slide on each stack (#4317, #5237).
> >> >>
> >> >> The change to reveal.js has been welcomed by reveal.js users,
> >> >> but the change to beamer is apparently not welcome by everyone.
> >> >> The reason I made the change to both formats is because I want
> >> >> slide shows to work the same no matter what output format you
> >> >> use. (So you can switch from beamer to reveal.js, for example,
> >> >> and the slides will look more or less the same.)
> >> >>
> >> >> I had thought the beamer change was innocuous, since it could
> >> >> be worked around by people who wanted to include content under
> >> >> top-level section headings but not in the slides, e.g. by using
> >> >> a filter to strip out this content.
> >> >>
> >> >> Unfortunately, Thomas Chevrier's use case can't be handled that
> >> >> way. He wants to insert raw tex commands that (a) can't be
> >> >> stripped out but (b) only work if they're outside the
> >> >> 'frame' environment created for a slide. I can't think of any
> >> >> workaround for this.
> >> >>
> >> >> One possible course of action would be to revert the beamer
> >> >> change while keeping the reveal.js change. This would potentially
> >> >> have two bad consequences:
> >> >>
> >> >> 1) slide shows would render differently (in content, not just
> >> >> form) in reveal.js and beamer.
> >> >>
> >> >> 2) this may break slide shows that were constructed using the
> >> >> new behavior since 2.7 was released.
> >> >>
> >> >> A less radical change might be to introduce special Div whose
> >> >> contents get moved outside the slide itself. Anyway, comments
> >> >> welcome.
> >> >>
> >> >>
> >> >>
> >> >
> >> > --
> >> > 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...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> >> > To view this discussion on the web visit
> >> 
> https://groups.google.com/d/msgid/pandoc-discuss/c4db2ddc-b3b0-4c62-a8bb-8a601e37dc48n%40googlegroups.com
> >> .
> >>
>

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/73f0ad6f-f17d-424a-abe6-e8e29e9c7f2en%40googlegroups.com.

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

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

* Re: Pandoc #4317 side effect
       [not found]                       ` <73f0ad6f-f17d-424a-abe6-e8e29e9c7f2en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-08-25 18:13                         ` John MacFarlane
       [not found]                           ` <m2h7sqvbiy.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: John MacFarlane @ 2020-08-25 18:13 UTC (permalink / raw)
  To: Thomas Chevrier, pandoc-discuss


You can't make it use the template by adding 'template:'
to your YAML metadata.  Use a defaults file or just specify
--template mytemplate.tex on the command line.

Also, you don't put $dayone$ in the body of your document.
You can set this variable in YAML metadata or with -V
on the command line.

---
dayone: true
...

or

-Vdayone



Thomas Chevrier <tchevri-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Thank you again John for taking the time again and again to respond - 
> totally appreciated, it's amazing.
>
> As a consequence, I took the entire day to try your solution, google 
> frantically, but I failed miserably.
> I will spare you the details of everything I tried, but here is what i 
> think is my best attempt:
>
> .1.  
> Read carefully: https://bookdown.org/yihui/rmarkdown/template-pandoc.html
>
> .2. 
> Download default.latex from your website: 
> https://github.com/jgm/pandoc-templates
>
> .3. 
> Rename the file to my-template.tex and, as per your email, line 460 just 
> before $body$, add:
> $if(dayone)$
> \mode<presentation>
>    {
>      \title[\CourseName{} Lecture $lecture-number$]{\CourseName{} \newline 
> \, Lecture $lecture-number$}
>      \date{\DayOne{}\Yr{}}
>    }
>    ###
>    \titlepage
> $endif$
>
> .4. 
> In my bookdown,  add the $dayone$ custom Pandoc variable
> # Notations {#notations}
> ## Mathematics
> $dayone$
> ```{r Lecture1Outline, eval = (out_type=="beamer"), echo=FALSE, 
> results='asis'}
> ```
> ```{r Lecture1Slide1, eval = (out_type=="beamer"), echo=FALSE, 
> results='asis'}
> ```
> `r if (out_type=="beamer") "- "` $h = \left(h_{1}, h_{2}, \ldots, 
> h_{n}\right)$ denotes a vector (lowercase)
>
> etc. etc...
>
> .5.
> add "template: my-template.tex" to my YAML so that "--template 
> my-template.tex" is being correctly added as an option to Pandoc.
>
> OUTCOME:
>
> I still get the undesired slide...
> "...
> Mathematics
> 𝑑𝑎𝑦𝑜𝑛𝑒
> ..."
>
> I check the .rmd file.
> It has 
> <!--chapter:end:index.Rmd-->
> # Notations {#notations}
> ## Mathematics
> $dayone$
> etc. etc...
>
> the .tex file has:
>
> \hypertarget{mathematics}{%
> \subsection{Mathematics}\label{mathematics}}
> \begin{frame}{Mathematics}
> \(dayone\)
> \end{frame}
>
> I am so sorry - I feel crummy I could not figure this one out after so many 
> hours and I Thank you in advance for any further help on this issue that 
> has drawn me for nearly 18 months.
> Many thanks
> thomas
>
> PS: note that I have 
> before_body: beamer_prefix.tex
> and that works well for setting the initial cover page (syllabus) - the 
> issue is really after, as I used this mode<presentation> to redefine the 
> elements of the title slide on the fly (day 1, 2, etc of the course)
>
> On Tuesday, August 25, 2020 at 12:22:26 PM UTC+8 John MacFarlane wrote:
>
>>
>> If that's what you need, then a custom template could provide it.
>> Just add this stuff to a custom template, with variables in the
>> varying parts:
>>
>> \mode<presentation>
>> {
>> \title[\CourseName{} Lecture $lecture-number$]{\CourseName{} \newline \, 
>> Lecture $lecture-number$}
>> \date{\DayOne{}\Yr{}}
>> }
>> ###
>> \titlepage
>>
>> $body$
>>
>> "Chevrier, Thomas" <t...-ACPurvaskuAAcGGWjIcM5Q@public.gmane.org> writes:
>>
>> > First of all, thank you so much for taking the time to reply - really 
>> much
>> > appreciated, all the more given how busy I see you are, with so many
>> > awesome improvements.
>> > I love this "raw beamer" attribute, might make my document a lot more
>> > readable, yet to try it for other purposes.
>> > Unfortunately, this suggested solution does not help the issue at stake.
>> >
>> > The issue is for the content not to get forced slapped onto a slide.
>> > To create a new title page, I need the following piece of code:
>> > \mode<presentation>
>> > {
>> > \title[\CourseName{} Lecture 1]{\CourseName{} \newline \, Lecture 1}
>> > \date{\DayOne{}\Yr{}}
>> > }
>> > ###
>> > \titlepage
>> >
>> > And this {...} code cannot sit inside a frame or a latex error is thrown 
>> (!
>> > Illegal parameter number in definition of \iterate.).
>> > After 2.7 - there is no more option for me to write content outside a 
>> frame
>> > - everything is forced into a frame.
>> > "raw beamer" attribute does not escape this behavior unfortunately.
>> >
>> > Hence my suggestion last night - i don't know if that would be acceptable
>> > or even useful?
>> > But i have been thinking that I am perfectly fine with level -2 content 
>> not
>> > being forced onto slides.
>> > From what I read, it looks like reveal.js users only need level -1 
>> content
>> > slapped onto slides?
>> > Of course, I'd be happy with any other solution you think is best.
>> >
>> > Many thank
>> > thomas
>> >
>> >
>> > On Tue, Aug 25, 2020 at 4:00 AM John MacFarlane <j...-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> 
>> wrote:
>> >
>> >>
>> >> If you use the raw attribute to mark up content as "raw beamer,"
>> >> as suggested earlier in this thread, it will not appear in
>> >> reveal.js output. Demo here:
>> >>
>> >>
>> >> 
>> https://pandoc.org/try/?text=%23+Introduction%0A%0A%60%60%60%7B%3Dbeamer%7D%0AHey+this+is+raw+beamer!%0A%60%60%60%0A%0A%23%23+Slide+one%0A%0Acontent%0A%0A%23%23%23+Vertical+slide%0A%0Acontent+vertical%0A&from=markdown&to=revealjs&standalone=0
>> >>
>> >>
>> >> Thomas Chevrier <tch...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>> >>
>> >> > Hi folks,
>> >> >
>> >> > it's been exactly a year now and I am still not able to upgrade my
>> >> version
>> >> > of Pandoc - stuck pre 2.7, because of the adverse change.
>> >> > Indeed, the "upgrade" for reveal.js users caused my latex beamer code 
>> to
>> >> > break down.
>> >> > I have tried multiple things without luck - I also tried a lua filter,
>> >> but
>> >> > that did not work - no matter what, the content gets "slapped" onto a
>> >> slide.
>> >> > As JGM suggests (was great watching him talk about Pandoc at TUG 2020
>> >> > keynote address), I'd love to be able to simply be able to have 
>> content
>> >> > escape being slapped onto a slide - I believe that's precisely the
>> >> spirit
>> >> > of Beamer, which uses <mode> heavily for that purpose.
>> >> > I also thought that was the spirit of pandoc - as you were setting in
>> >> the
>> >> > yaml header your level for displaying on slides, but i have been 
>> clearly
>> >> > proven wrong. :-(
>> >> > One option would be to recompile pandoc without that change, but 
>> because
>> >> of
>> >> > the bloomberg API, I am forced to be on windows, which would make this
>> >> > solution cumbersome at best (would be straightforward on linux 
>> though).
>> >> >
>> >> > FYI, I posted back then on SO, got only 2 upvotes and 2 bookmarks, but
>> >> no
>> >> > answer, not even a comment :-(
>> >> >
>> >> 
>> https://stackoverflow.com/questions/57614387/pandoc-4317-forces-content-under-title-slides-to-be-included-in-a-frame-in-pand
>> >> >
>> >> >
>> >> > Could anyone *please* help me?
>> >> > many thanks in advance
>> >> > thomas
>> >> >
>> >> >
>> >> > On Wednesday, August 28, 2019 at 12:23:15 AM UTC+8 John MacFarlane 
>> wrote:
>> >> >
>> >> >>
>> >> >> To summarize the issue here, which concerns a change to slide
>> >> >> show formats:
>> >> >>
>> >> >> Prior to 2.7, versions of pandoc only put material under the "slide
>> >> >> level" headings on slides. If you set slide level to 2, then
>> >> >> only material under level-2 headings would appear on slides,
>> >> >> and text under level-1 headings would not appear at all
>> >> >> (though level-1 headings would create "title slides" with
>> >> >> just the section title).
>> >> >>
>> >> >> Reveal.js users consistently complained (#4317, #5237) that
>> >> >> this made it hard to structure reveal.js 2D slide shows, in
>> >> >> which it is common to have the "top" slide on each column
>> >> >> contain both a title and some text.
>> >> >>
>> >> >> In response, I changed pandoc in 2.7 -- as the changelog says,
>> >> >>
>> >> >> > Slide show formats behavior change: content under headers less
>> >> >> > than slide level is no longer ignored, but included in the title
>> >> >> > slide (for HTML slide shows) or in a slide after the title slide
>> >> >> > (for beamer). This change makes possible 2D reveal.js slideshows
>> >> >> > with content in the top slide on each stack (#4317, #5237).
>> >> >>
>> >> >> The change to reveal.js has been welcomed by reveal.js users,
>> >> >> but the change to beamer is apparently not welcome by everyone.
>> >> >> The reason I made the change to both formats is because I want
>> >> >> slide shows to work the same no matter what output format you
>> >> >> use. (So you can switch from beamer to reveal.js, for example,
>> >> >> and the slides will look more or less the same.)
>> >> >>
>> >> >> I had thought the beamer change was innocuous, since it could
>> >> >> be worked around by people who wanted to include content under
>> >> >> top-level section headings but not in the slides, e.g. by using
>> >> >> a filter to strip out this content.
>> >> >>
>> >> >> Unfortunately, Thomas Chevrier's use case can't be handled that
>> >> >> way. He wants to insert raw tex commands that (a) can't be
>> >> >> stripped out but (b) only work if they're outside the
>> >> >> 'frame' environment created for a slide. I can't think of any
>> >> >> workaround for this.
>> >> >>
>> >> >> One possible course of action would be to revert the beamer
>> >> >> change while keeping the reveal.js change. This would potentially
>> >> >> have two bad consequences:
>> >> >>
>> >> >> 1) slide shows would render differently (in content, not just
>> >> >> form) in reveal.js and beamer.
>> >> >>
>> >> >> 2) this may break slide shows that were constructed using the
>> >> >> new behavior since 2.7 was released.
>> >> >>
>> >> >> A less radical change might be to introduce special Div whose
>> >> >> contents get moved outside the slide itself. Anyway, comments
>> >> >> welcome.
>> >> >>
>> >> >>
>> >> >>
>> >> >
>> >> > --
>> >> > 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...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> >> > To view this discussion on the web visit
>> >> 
>> https://groups.google.com/d/msgid/pandoc-discuss/c4db2ddc-b3b0-4c62-a8bb-8a601e37dc48n%40googlegroups.com
>> >> .
>> >>
>>
>
> -- 
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/73f0ad6f-f17d-424a-abe6-e8e29e9c7f2en%40googlegroups.com.

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/m2h7sqvbiy.fsf%40johnmacfarlane.net.


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

* Re: Pandoc #4317 side effect
       [not found]                           ` <m2h7sqvbiy.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2020-08-25 20:39                             ` Thomas Chevrier
       [not found]                               ` <d70cf350-f53a-4b7b-80ef-1bb1526e849fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas Chevrier @ 2020-08-25 20:39 UTC (permalink / raw)
  To: pandoc-discuss


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


Dear John,

Thank you again for your super prompt response - very much appreciated, 
amazing.
Last thing I want is to waste your time and kindness and support.
Therefore, I allowed myself to create a MWE, as I think we are on different 
wavelengths.
https://github.com/tchevri/BookdownExample 

Opened as a project in RStudio, it compiles with a single click  (build 
book radio button, bookdown::pdf_book).
with Pandoc 2.6 - i get precisely what i look for - new title slides for 
every lecture set, works perfect.
with pandoc >2.7, because of the reveal.js request that impacted beamer, I 
am getting a spurious slide, which I cannot get rid of, containing the 
current section header.

I am using XieYiHui's bookdown, so i think yes, I can make my bookdown use 
a custom template by adding 'template:' to my YAML metadata.
As i said, I even see it in the command line when I build the 
book: "C:/PROGRA~1/Pandoc/pandoc"  +RTS -K512m -RTS 
./index.split.md --template my-template.tex etc etc....
I tried so many things - setting the variable in the YAML metadata or with 
-V is one of the many things I tried.

Please do allow me to think you have a different issue in mind - you do 
handle so many (and I am so impressed you can, i would not be able to).
pre 2.7, non slide level content was just ignored.
Post 2.7 *anything* above a slide level gets slapped automatically onto a 
slide.
That's the new behavior that's been causing me havoc.

hence my suggestion that if I have level 3 slides, then content below level 
1 be not slapped onto a slide, only content below level 2, if that makes 
sense?
Of course, I'd be happy with any other resolution.

Many thanks
thomas

 
On Wednesday, August 26, 2020 at 2:14:14 AM UTC+8 John MacFarlane wrote:

>
> You can't make it use the template by adding 'template:' 
> to your YAML metadata. Use a defaults file or just specify 
> --template mytemplate.tex on the command line. 
>
> Also, you don't put $dayone$ in the body of your document. 
> You can set this variable in YAML metadata or with -V 
> on the command line. 
>
> --- 
> dayone: true 
> ... 
>
> or 
>
> -Vdayone 
>
>
>
> Thomas Chevrier  writes: 
>
> > Thank you again John for taking the time again and again to respond - 
> > totally appreciated, it's amazing. 
> > 
> > As a consequence, I took the entire day to try your solution, google 
> > frantically, but I failed miserably. 
> > I will spare you the details of everything I tried, but here is what i 
> > think is my best attempt: 
> > 
> > .1. 
> > Read carefully: 
> https://bookdown.org/yihui/rmarkdown/template-pandoc.html 
> > 
> > .2. 
> > Download default.latex from your website: 
> > https://github.com/jgm/pandoc-templates 
> > 
> > .3. 
> > Rename the file to my-template.tex and, as per your email, line 460 just 
> > before $body$, add: 
> > $if(dayone)$ 
> > \mode<presentation> 
> > { 
> > \title[\CourseName{} Lecture $lecture-number$]{\CourseName{} \newline 
> > \, Lecture $lecture-number$} 
> > \date{\DayOne{}\Yr{}} 
> > } 
> > ### 
> > \titlepage 
> > $endif$ 
> > 
> > .4. 
> > In my bookdown, add the $dayone$ custom Pandoc variable 
> > # Notations {#notations} 
> > ## Mathematics 
> > $dayone$ 
> > ```{r Lecture1Outline, eval = (out_type=="beamer"), echo=FALSE, 
> > results='asis'} 
> > ``` 
> > ```{r Lecture1Slide1, eval = (out_type=="beamer"), echo=FALSE, 
> > results='asis'} 
> > ``` 
> > `r if (out_type=="beamer") "- "` $h = \left(h_{1}, h_{2}, \ldots, 
> > h_{n}\right)$ denotes a vector (lowercase) 
> > 
> > etc. etc... 
> > 
> > .5. 
> > add "template: my-template.tex" to my YAML so that "--template 
> > my-template.tex" is being correctly added as an option to Pandoc. 
> > 
> > OUTCOME: 
> > 
> > I still get the undesired slide... 
> > "... 
> > Mathematics 
> > 𝑑𝑎𝑦𝑜𝑛𝑒 
> > ..." 
> > 
> > I check the .rmd file. 
> > It has 
> > <!--chapter:end:index.Rmd--> 
> > # Notations {#notations} 
> > ## Mathematics 
> > $dayone$ 
> > etc. etc... 
> > 
> > the .tex file has: 
> > 
> > \hypertarget{mathematics}{% 
> > \subsection{Mathematics}\label{mathematics}} 
> > \begin{frame}{Mathematics} 
> > \(dayone\) 
> > \end{frame} 
> > 
> > I am so sorry - I feel crummy I could not figure this one out after so 
> many 
> > hours and I Thank you in advance for any further help on this issue that 
> > has drawn me for nearly 18 months. 
> > Many thanks 
> > thomas 
> > 
> > PS: note that I have 
> > before_body: beamer_prefix.tex 
> > and that works well for setting the initial cover page (syllabus) - the 
> > issue is really after, as I used this mode<presentation> to redefine the 
> > elements of the title slide on the fly (day 1, 2, etc of the course) 
> > 
> > On Tuesday, August 25, 2020 at 12:22:26 PM UTC+8 John MacFarlane wrote: 
> > 
> >> 
> >> If that's what you need, then a custom template could provide it. 
> >> Just add this stuff to a custom template, with variables in the 
> >> varying parts: 
> >> 
> >> \mode<presentation> 
> >> { 
> >> \title[\CourseName{} Lecture $lecture-number$]{\CourseName{} \newline 
> \, 
> >> Lecture $lecture-number$} 
> >> \date{\DayOne{}\Yr{}} 
> >> } 
> >> ### 
> >> \titlepage 
> >> 
> >> $body$ 
> >> 
> >> "Chevrier, Thomas" writes: 
> >> 
> >> > First of all, thank you so much for taking the time to reply - really 
> >> much 
> >> > appreciated, all the more given how busy I see you are, with so many 
> >> > awesome improvements. 
> >> > I love this "raw beamer" attribute, might make my document a lot more 
> >> > readable, yet to try it for other purposes. 
> >> > Unfortunately, this suggested solution does not help the issue at 
> stake. 
> >> > 
> >> > The issue is for the content not to get forced slapped onto a slide. 
> >> > To create a new title page, I need the following piece of code: 
> >> > \mode<presentation> 
> >> > { 
> >> > \title[\CourseName{} Lecture 1]{\CourseName{} \newline \, Lecture 1} 
> >> > \date{\DayOne{}\Yr{}} 
> >> > } 
> >> > ### 
> >> > \titlepage 
> >> > 
> >> > And this {...} code cannot sit inside a frame or a latex error is 
> thrown 
> >> (! 
> >> > Illegal parameter number in definition of \iterate.). 
> >> > After 2.7 - there is no more option for me to write content outside a 
> >> frame 
> >> > - everything is forced into a frame. 
> >> > "raw beamer" attribute does not escape this behavior unfortunately. 
> >> > 
> >> > Hence my suggestion last night - i don't know if that would be 
> acceptable 
> >> > or even useful? 
> >> > But i have been thinking that I am perfectly fine with level -2 
> content 
> >> not 
> >> > being forced onto slides. 
> >> > From what I read, it looks like reveal.js users only need level -1 
> >> content 
> >> > slapped onto slides? 
> >> > Of course, I'd be happy with any other solution you think is best. 
> >> > 
> >> > Many thank 
> >> > thomas 
> >> > 
> >> > 
> >> > On Tue, Aug 25, 2020 at 4:00 AM John MacFarlane 
> >> wrote: 
> >> > 
> >> >> 
> >> >> If you use the raw attribute to mark up content as "raw beamer," 
> >> >> as suggested earlier in this thread, it will not appear in 
> >> >> reveal.js output. Demo here: 
> >> >> 
> >> >> 
> >> >> 
> >> 
> https://pandoc.org/try/?text=%23+Introduction%0A%0A%60%60%60%7B%3Dbeamer%7D%0AHey+this+is+raw+beamer!%0A%60%60%60%0A%0A%23%23+Slide+one%0A%0Acontent%0A%0A%23%23%23+Vertical+slide%0A%0Acontent+vertical%0A&from=markdown&to=revealjs&standalone=0 
> >> >> 
> >> >> 
> >> >> Thomas Chevrier  writes: 
> >> >> 
> >> >> > Hi folks, 
> >> >> > 
> >> >> > it's been exactly a year now and I am still not able to upgrade my 
> >> >> version 
> >> >> > of Pandoc - stuck pre 2.7, because of the adverse change. 
> >> >> > Indeed, the "upgrade" for reveal.js users caused my latex beamer 
> code 
> >> to 
> >> >> > break down. 
> >> >> > I have tried multiple things without luck - I also tried a lua 
> filter, 
> >> >> but 
> >> >> > that did not work - no matter what, the content gets "slapped" 
> onto a 
> >> >> slide. 
> >> >> > As JGM suggests (was great watching him talk about Pandoc at TUG 
> 2020 
> >> >> > keynote address), I'd love to be able to simply be able to have 
> >> content 
> >> >> > escape being slapped onto a slide - I believe that's precisely the 
> >> >> spirit 
> >> >> > of Beamer, which uses <mode> heavily for that purpose. 
> >> >> > I also thought that was the spirit of pandoc - as you were setting 
> in 
> >> >> the 
> >> >> > yaml header your level for displaying on slides, but i have been 
> >> clearly 
> >> >> > proven wrong. :-( 
> >> >> > One option would be to recompile pandoc without that change, but 
> >> because 
> >> >> of 
> >> >> > the bloomberg API, I am forced to be on windows, which would make 
> this 
> >> >> > solution cumbersome at best (would be straightforward on linux 
> >> though). 
> >> >> > 
> >> >> > FYI, I posted back then on SO, got only 2 upvotes and 2 bookmarks, 
> but 
> >> >> no 
> >> >> > answer, not even a comment :-( 
> >> >> > 
> >> >> 
> >> 
> https://stackoverflow.com/questions/57614387/pandoc-4317-forces-content-under-title-slides-to-be-included-in-a-frame-in-pand 
> >> >> > 
> >> >> > 
> >> >> > Could anyone *please* help me? 
> >> >> > many thanks in advance 
> >> >> > thomas 
> >> >> > 
> >> >> > 
> >> >> > On Wednesday, August 28, 2019 at 12:23:15 AM UTC+8 John MacFarlane 
> >> wrote: 
> >> >> > 
> >> >> >> 
> >> >> >> To summarize the issue here, which concerns a change to slide 
> >> >> >> show formats: 
> >> >> >> 
> >> >> >> Prior to 2.7, versions of pandoc only put material under the 
> "slide 
> >> >> >> level" headings on slides. If you set slide level to 2, then 
> >> >> >> only material under level-2 headings would appear on slides, 
> >> >> >> and text under level-1 headings would not appear at all 
> >> >> >> (though level-1 headings would create "title slides" with 
> >> >> >> just the section title). 
> >> >> >> 
> >> >> >> Reveal.js users consistently complained (#4317, #5237) that 
> >> >> >> this made it hard to structure reveal.js 2D slide shows, in 
> >> >> >> which it is common to have the "top" slide on each column 
> >> >> >> contain both a title and some text. 
> >> >> >> 
> >> >> >> In response, I changed pandoc in 2.7 -- as the changelog says, 
> >> >> >> 
> >> >> >> > Slide show formats behavior change: content under headers less 
> >> >> >> > than slide level is no longer ignored, but included in the 
> title 
> >> >> >> > slide (for HTML slide shows) or in a slide after the title 
> slide 
> >> >> >> > (for beamer). This change makes possible 2D reveal.js 
> slideshows 
> >> >> >> > with content in the top slide on each stack (#4317, #5237). 
> >> >> >> 
> >> >> >> The change to reveal.js has been welcomed by reveal.js users, 
> >> >> >> but the change to beamer is apparently not welcome by everyone. 
> >> >> >> The reason I made the change to both formats is because I want 
> >> >> >> slide shows to work the same no matter what output format you 
> >> >> >> use. (So you can switch from beamer to reveal.js, for example, 
> >> >> >> and the slides will look more or less the same.) 
> >> >> >> 
> >> >> >> I had thought the beamer change was innocuous, since it could 
> >> >> >> be worked around by people who wanted to include content under 
> >> >> >> top-level section headings but not in the slides, e.g. by using 
> >> >> >> a filter to strip out this content. 
> >> >> >> 
> >> >> >> Unfortunately, Thomas Chevrier's use case can't be handled that 
> >> >> >> way. He wants to insert raw tex commands that (a) can't be 
> >> >> >> stripped out but (b) only work if they're outside the 
> >> >> >> 'frame' environment created for a slide. I can't think of any 
> >> >> >> workaround for this. 
> >> >> >> 
> >> >> >> One possible course of action would be to revert the beamer 
> >> >> >> change while keeping the reveal.js change. This would potentially 
> >> >> >> have two bad consequences: 
> >> >> >> 
> >> >> >> 1) slide shows would render differently (in content, not just 
> >> >> >> form) in reveal.js and beamer. 
> >> >> >> 
> >> >> >> 2) this may break slide shows that were constructed using the 
> >> >> >> new behavior since 2.7 was released. 
> >> >> >> 
> >> >> >> A less radical change might be to introduce special Div whose 
> >> >> >> contents get moved outside the slide itself. Anyway, comments 
> >> >> >> welcome. 
> >> >> >> 
> >> >> >> 
> >> >> >> 
> >> >> > 
> >> >> > -- 
> >> >> > 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 . 
> >> >> > To view this discussion on the web visit 
> >> >> 
> >> 
> https://groups.google.com/d/msgid/pandoc-discuss/c4db2ddc-b3b0-4c62-a8bb-8a601e37dc48n%40googlegroups.com 
> >> >> . 
> >> >> 
> >> 
> > 
> > -- 
> > 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 . 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/73f0ad6f-f17d-424a-abe6-e8e29e9c7f2en%40googlegroups.com. 
>
>

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/d70cf350-f53a-4b7b-80ef-1bb1526e849fn%40googlegroups.com.

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

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

* Re: Pandoc #4317 side effect
       [not found]                               ` <d70cf350-f53a-4b7b-80ef-1bb1526e849fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-01-19 16:40                                 ` Paul Gesting
  0 siblings, 0 replies; 10+ messages in thread
From: Paul Gesting @ 2022-01-19 16:40 UTC (permalink / raw)
  To: pandoc-discuss


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

I have the same problem. But I would like content under either heading 1 or 
2 not to show up on a slide. I posted both here 
<https://groups.google.com/g/pandoc-discuss/c/mK2k59mtD5k/m/67EL5B2uAgAJ> and 
in tex.se 
<https://tex.stackexchange.com/questions/630390/add-a-beamer-note-to-a-section-slide-using-pandoc-and-markdown>. 
I am on 2.11.2 so I would hate to have to roll all the way back to 2.6!

On Tuesday, August 25, 2020 at 10:39:21 PM UTC+2 tch...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:

>
> Dear John,
>
> Thank you again for your super prompt response - very much appreciated, 
> amazing.
> Last thing I want is to waste your time and kindness and support.
> Therefore, I allowed myself to create a MWE, as I think we are on 
> different wavelengths.
> https://github.com/tchevri/BookdownExample 
>
> Opened as a project in RStudio, it compiles with a single click  (build 
> book radio button, bookdown::pdf_book).
> with Pandoc 2.6 - i get precisely what i look for - new title slides for 
> every lecture set, works perfect.
> with pandoc >2.7, because of the reveal.js request that impacted beamer, I 
> am getting a spurious slide, which I cannot get rid of, containing the 
> current section header.
>
> I am using XieYiHui's bookdown, so i think yes, I can make my bookdown use 
> a custom template by adding 'template:' to my YAML metadata.
> As i said, I even see it in the command line when I build the 
> book: "C:/PROGRA~1/Pandoc/pandoc"  +RTS -K512m -RTS ./index.split.md --template 
> my-template.tex etc etc....
> I tried so many things - setting the variable in the YAML metadata or with 
> -V is one of the many things I tried.
>
> Please do allow me to think you have a different issue in mind - you do 
> handle so many (and I am so impressed you can, i would not be able to).
> pre 2.7, non slide level content was just ignored.
> Post 2.7 *anything* above a slide level gets slapped automatically onto a 
> slide.
> That's the new behavior that's been causing me havoc.
>
> hence my suggestion that if I have level 3 slides, then content below 
> level 1 be not slapped onto a slide, only content below level 2, if that 
> makes sense?
> Of course, I'd be happy with any other resolution.
>
> Many thanks
> thomas
>
>  
> On Wednesday, August 26, 2020 at 2:14:14 AM UTC+8 John MacFarlane wrote:
>
>>
>> You can't make it use the template by adding 'template:' 
>> to your YAML metadata. Use a defaults file or just specify 
>> --template mytemplate.tex on the command line. 
>>
>> Also, you don't put $dayone$ in the body of your document. 
>> You can set this variable in YAML metadata or with -V 
>> on the command line. 
>>
>> --- 
>> dayone: true 
>> ... 
>>
>> or 
>>
>> -Vdayone 
>>
>>
>>
>> Thomas Chevrier  writes: 
>>
>
>> > Thank you again John for taking the time again and again to respond - 
>> > totally appreciated, it's amazing. 
>> > 
>> > As a consequence, I took the entire day to try your solution, google 
>> > frantically, but I failed miserably. 
>> > I will spare you the details of everything I tried, but here is what i 
>> > think is my best attempt: 
>> > 
>> > .1. 
>> > Read carefully: 
>> https://bookdown.org/yihui/rmarkdown/template-pandoc.html 
>> > 
>> > .2. 
>> > Download default.latex from your website: 
>> > https://github.com/jgm/pandoc-templates 
>> > 
>> > .3. 
>> > Rename the file to my-template.tex and, as per your email, line 460 
>> just 
>> > before $body$, add: 
>> > $if(dayone)$ 
>> > \mode<presentation> 
>> > { 
>> > \title[\CourseName{} Lecture $lecture-number$]{\CourseName{} \newline 
>> > \, Lecture $lecture-number$} 
>> > \date{\DayOne{}\Yr{}} 
>> > } 
>> > ### 
>> > \titlepage 
>> > $endif$ 
>> > 
>> > .4. 
>> > In my bookdown, add the $dayone$ custom Pandoc variable 
>> > # Notations {#notations} 
>> > ## Mathematics 
>> > $dayone$ 
>> > ```{r Lecture1Outline, eval = (out_type=="beamer"), echo=FALSE, 
>> > results='asis'} 
>> > ``` 
>> > ```{r Lecture1Slide1, eval = (out_type=="beamer"), echo=FALSE, 
>> > results='asis'} 
>> > ``` 
>> > `r if (out_type=="beamer") "- "` $h = \left(h_{1}, h_{2}, \ldots, 
>> > h_{n}\right)$ denotes a vector (lowercase) 
>> > 
>> > etc. etc... 
>> > 
>> > .5. 
>> > add "template: my-template.tex" to my YAML so that "--template 
>> > my-template.tex" is being correctly added as an option to Pandoc. 
>> > 
>> > OUTCOME: 
>> > 
>> > I still get the undesired slide... 
>> > "... 
>> > Mathematics 
>> > 𝑑𝑎𝑦𝑜𝑛𝑒 
>> > ..." 
>> > 
>> > I check the .rmd file. 
>> > It has 
>> > <!--chapter:end:index.Rmd--> 
>> > # Notations {#notations} 
>> > ## Mathematics 
>> > $dayone$ 
>> > etc. etc... 
>> > 
>> > the .tex file has: 
>> > 
>> > \hypertarget{mathematics}{% 
>> > \subsection{Mathematics}\label{mathematics}} 
>> > \begin{frame}{Mathematics} 
>> > \(dayone\) 
>> > \end{frame} 
>> > 
>> > I am so sorry - I feel crummy I could not figure this one out after so 
>> many 
>> > hours and I Thank you in advance for any further help on this issue 
>> that 
>> > has drawn me for nearly 18 months. 
>> > Many thanks 
>> > thomas 
>> > 
>> > PS: note that I have 
>> > before_body: beamer_prefix.tex 
>> > and that works well for setting the initial cover page (syllabus) - the 
>> > issue is really after, as I used this mode<presentation> to redefine 
>> the 
>> > elements of the title slide on the fly (day 1, 2, etc of the course) 
>> > 
>> > On Tuesday, August 25, 2020 at 12:22:26 PM UTC+8 John MacFarlane wrote: 
>> > 
>> >> 
>> >> If that's what you need, then a custom template could provide it. 
>> >> Just add this stuff to a custom template, with variables in the 
>> >> varying parts: 
>> >> 
>> >> \mode<presentation> 
>> >> { 
>> >> \title[\CourseName{} Lecture $lecture-number$]{\CourseName{} \newline 
>> \, 
>> >> Lecture $lecture-number$} 
>> >> \date{\DayOne{}\Yr{}} 
>> >> } 
>> >> ### 
>> >> \titlepage 
>> >> 
>> >> $body$ 
>> >> 
>>
> >> "Chevrier, Thomas" writes: 
>>
> >> 
>> >> > First of all, thank you so much for taking the time to reply - 
>> really 
>> >> much 
>> >> > appreciated, all the more given how busy I see you are, with so many 
>> >> > awesome improvements. 
>> >> > I love this "raw beamer" attribute, might make my document a lot 
>> more 
>> >> > readable, yet to try it for other purposes. 
>> >> > Unfortunately, this suggested solution does not help the issue at 
>> stake. 
>> >> > 
>> >> > The issue is for the content not to get forced slapped onto a slide. 
>> >> > To create a new title page, I need the following piece of code: 
>> >> > \mode<presentation> 
>> >> > { 
>> >> > \title[\CourseName{} Lecture 1]{\CourseName{} \newline \, Lecture 1} 
>> >> > \date{\DayOne{}\Yr{}} 
>> >> > } 
>> >> > ### 
>> >> > \titlepage 
>> >> > 
>> >> > And this {...} code cannot sit inside a frame or a latex error is 
>> thrown 
>> >> (! 
>> >> > Illegal parameter number in definition of \iterate.). 
>> >> > After 2.7 - there is no more option for me to write content outside 
>> a 
>> >> frame 
>> >> > - everything is forced into a frame. 
>> >> > "raw beamer" attribute does not escape this behavior unfortunately. 
>> >> > 
>> >> > Hence my suggestion last night - i don't know if that would be 
>> acceptable 
>> >> > or even useful? 
>> >> > But i have been thinking that I am perfectly fine with level -2 
>> content 
>> >> not 
>> >> > being forced onto slides. 
>> >> > From what I read, it looks like reveal.js users only need level -1 
>> >> content 
>> >> > slapped onto slides? 
>> >> > Of course, I'd be happy with any other solution you think is best. 
>> >> > 
>> >> > Many thank 
>> >> > thomas 
>> >> > 
>> >> > 
>> >> > On Tue, Aug 25, 2020 at 4:00 AM John MacFarlane 
>>
> >> wrote: 
>> >> > 
>> >> >> 
>> >> >> If you use the raw attribute to mark up content as "raw beamer," 
>> >> >> as suggested earlier in this thread, it will not appear in 
>> >> >> reveal.js output. Demo here: 
>> >> >> 
>> >> >> 
>> >> >> 
>> >> 
>> https://pandoc.org/try/?text=%23+Introduction%0A%0A%60%60%60%7B%3Dbeamer%7D%0AHey+this+is+raw+beamer!%0A%60%60%60%0A%0A%23%23+Slide+one%0A%0Acontent%0A%0A%23%23%23+Vertical+slide%0A%0Acontent+vertical%0A&from=markdown&to=revealjs&standalone=0 
>> >> >> 
>> >> >> 
>>
> >> >> Thomas Chevrier  writes: 
>>
> >> >> 
>> >> >> > Hi folks, 
>> >> >> > 
>> >> >> > it's been exactly a year now and I am still not able to upgrade 
>> my 
>> >> >> version 
>> >> >> > of Pandoc - stuck pre 2.7, because of the adverse change. 
>> >> >> > Indeed, the "upgrade" for reveal.js users caused my latex beamer 
>> code 
>> >> to 
>> >> >> > break down. 
>> >> >> > I have tried multiple things without luck - I also tried a lua 
>> filter, 
>> >> >> but 
>> >> >> > that did not work - no matter what, the content gets "slapped" 
>> onto a 
>> >> >> slide. 
>> >> >> > As JGM suggests (was great watching him talk about Pandoc at TUG 
>> 2020 
>> >> >> > keynote address), I'd love to be able to simply be able to have 
>> >> content 
>> >> >> > escape being slapped onto a slide - I believe that's precisely 
>> the 
>> >> >> spirit 
>> >> >> > of Beamer, which uses <mode> heavily for that purpose. 
>> >> >> > I also thought that was the spirit of pandoc - as you were 
>> setting in 
>> >> >> the 
>> >> >> > yaml header your level for displaying on slides, but i have been 
>> >> clearly 
>> >> >> > proven wrong. :-( 
>> >> >> > One option would be to recompile pandoc without that change, but 
>> >> because 
>> >> >> of 
>> >> >> > the bloomberg API, I am forced to be on windows, which would make 
>> this 
>> >> >> > solution cumbersome at best (would be straightforward on linux 
>> >> though). 
>> >> >> > 
>> >> >> > FYI, I posted back then on SO, got only 2 upvotes and 2 
>> bookmarks, but 
>> >> >> no 
>> >> >> > answer, not even a comment :-( 
>> >> >> > 
>> >> >> 
>> >> 
>> https://stackoverflow.com/questions/57614387/pandoc-4317-forces-content-under-title-slides-to-be-included-in-a-frame-in-pand 
>> >> >> > 
>> >> >> > 
>> >> >> > Could anyone *please* help me? 
>> >> >> > many thanks in advance 
>> >> >> > thomas 
>> >> >> > 
>> >> >> > 
>> >> >> > On Wednesday, August 28, 2019 at 12:23:15 AM UTC+8 John 
>> MacFarlane 
>> >> wrote: 
>> >> >> > 
>> >> >> >> 
>> >> >> >> To summarize the issue here, which concerns a change to slide 
>> >> >> >> show formats: 
>> >> >> >> 
>> >> >> >> Prior to 2.7, versions of pandoc only put material under the 
>> "slide 
>> >> >> >> level" headings on slides. If you set slide level to 2, then 
>> >> >> >> only material under level-2 headings would appear on slides, 
>> >> >> >> and text under level-1 headings would not appear at all 
>> >> >> >> (though level-1 headings would create "title slides" with 
>> >> >> >> just the section title). 
>> >> >> >> 
>> >> >> >> Reveal.js users consistently complained (#4317, #5237) that 
>> >> >> >> this made it hard to structure reveal.js 2D slide shows, in 
>> >> >> >> which it is common to have the "top" slide on each column 
>> >> >> >> contain both a title and some text. 
>> >> >> >> 
>> >> >> >> In response, I changed pandoc in 2.7 -- as the changelog says, 
>> >> >> >> 
>> >> >> >> > Slide show formats behavior change: content under headers less 
>> >> >> >> > than slide level is no longer ignored, but included in the 
>> title 
>> >> >> >> > slide (for HTML slide shows) or in a slide after the title 
>> slide 
>> >> >> >> > (for beamer). This change makes possible 2D reveal.js 
>> slideshows 
>> >> >> >> > with content in the top slide on each stack (#4317, #5237). 
>> >> >> >> 
>> >> >> >> The change to reveal.js has been welcomed by reveal.js users, 
>> >> >> >> but the change to beamer is apparently not welcome by everyone. 
>> >> >> >> The reason I made the change to both formats is because I want 
>> >> >> >> slide shows to work the same no matter what output format you 
>> >> >> >> use. (So you can switch from beamer to reveal.js, for example, 
>> >> >> >> and the slides will look more or less the same.) 
>> >> >> >> 
>> >> >> >> I had thought the beamer change was innocuous, since it could 
>> >> >> >> be worked around by people who wanted to include content under 
>> >> >> >> top-level section headings but not in the slides, e.g. by using 
>> >> >> >> a filter to strip out this content. 
>> >> >> >> 
>> >> >> >> Unfortunately, Thomas Chevrier's use case can't be handled that 
>> >> >> >> way. He wants to insert raw tex commands that (a) can't be 
>> >> >> >> stripped out but (b) only work if they're outside the 
>> >> >> >> 'frame' environment created for a slide. I can't think of any 
>> >> >> >> workaround for this. 
>> >> >> >> 
>> >> >> >> One possible course of action would be to revert the beamer 
>> >> >> >> change while keeping the reveal.js change. This would 
>> potentially 
>> >> >> >> have two bad consequences: 
>> >> >> >> 
>> >> >> >> 1) slide shows would render differently (in content, not just 
>> >> >> >> form) in reveal.js and beamer. 
>> >> >> >> 
>> >> >> >> 2) this may break slide shows that were constructed using the 
>> >> >> >> new behavior since 2.7 was released. 
>> >> >> >> 
>> >> >> >> A less radical change might be to introduce special Div whose 
>> >> >> >> contents get moved outside the slide itself. Anyway, comments 
>> >> >> >> welcome. 
>> >> >> >> 
>> >> >> >> 
>> >> >> >> 
>> >> >> > 
>> >> >> > -- 
>> >> >> > 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 . 
>>
> >> >> > To view this discussion on the web visit 
>> >> >> 
>> >> 
>> https://groups.google.com/d/msgid/pandoc-discuss/c4db2ddc-b3b0-4c62-a8bb-8a601e37dc48n%40googlegroups.com 
>> >> >> . 
>> >> >> 
>> >> 
>> > 
>> > -- 
>> > 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 . 
>>
> > To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/73f0ad6f-f17d-424a-abe6-e8e29e9c7f2en%40googlegroups.com. 
>>
>>
>

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/4631adce-45af-48e7-80d5-74343c7c4699n%40googlegroups.com.

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

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

end of thread, other threads:[~2022-01-19 16:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-27 14:02 Pandoc #4317 side effect Thomas Chevrier
     [not found] ` <6a083675-a292-4bad-9ff4-8d834c477239-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-08-27 16:22   ` John MacFarlane
     [not found]     ` <m2pnkqefx8.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2020-08-24 17:57       ` Thomas Chevrier
     [not found]         ` <c4db2ddc-b3b0-4c62-a8bb-8a601e37dc48n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-08-24 20:00           ` John MacFarlane
     [not found]             ` <m2y2m3x1a3.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2020-08-25  3:54               ` Thomas Chevrier
     [not found]             ` <CAJffZrHi=PsXVgf6psA+gAaOJvw9bzuoQU_HbXnbzUtc0s+QLA@mail.gmail.com>
     [not found]               ` <CAJffZrHi=PsXVgf6psA+gAaOJvw9bzuoQU_HbXnbzUtc0s+QLA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-08-25  4:22                 ` John MacFarlane
     [not found]                   ` <m2v9h7uzgu.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2020-08-25 17:06                     ` Thomas Chevrier
     [not found]                       ` <73f0ad6f-f17d-424a-abe6-e8e29e9c7f2en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-08-25 18:13                         ` John MacFarlane
     [not found]                           ` <m2h7sqvbiy.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2020-08-25 20:39                             ` Thomas Chevrier
     [not found]                               ` <d70cf350-f53a-4b7b-80ef-1bb1526e849fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-01-19 16:40                                 ` Paul Gesting

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