From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30005 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Gesting Newsgroups: gmane.text.pandoc Subject: Re: Pandoc #4317 side effect Date: Wed, 19 Jan 2022 08:40:14 -0800 (PST) Message-ID: <4631adce-45af-48e7-80d5-74343c7c4699n@googlegroups.com> References: <6a083675-a292-4bad-9ff4-8d834c477239@googlegroups.com> <73f0ad6f-f17d-424a-abe6-e8e29e9c7f2en@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_6316_1093322390.1642610414746" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22550"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCJ2VV4Y2UORB375UCHQMGQE7OGMKIQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Jan 19 17:40:18 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f58.google.com ([209.85.161.58]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nAE0Q-0005gE-CK for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 19 Jan 2022 17:40:18 +0100 Original-Received: by mail-oo1-f58.google.com with SMTP id v30-20020a4a9761000000b002daad3afaf6sf447725ooi.18 for ; Wed, 19 Jan 2022 08:40:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=xI3VVDDSUe65MDkqh/0GhLTM7RfpcKZ95iQyO/DWgMo=; b=OCOA4ZLmCRUaQwimFsFytqQD5T/mDbNOHaTKbwSG9IFUh1hPssXwO+g0QxyO/RZHT2 cj1PzNxF4x4P9k/fNR2aEoXosrElRqVGB569a6KBZloITRz2uprh4xj0Hwccrsapd2Qj PFvK3SKOb+yqEhOUcXa8yVZdg0IPT7Rjv1P1QGImsInpB7bjKKx9HOt65H1azzKgw2N5 uCPY9dfNTQLsZ3un6Q1zGwbcrRdIHEMaOt8ixxc1TdqMPoI/dBb5q9XM8TzLxm/vsH3L y0YlqgCc/XChWbgMnhlGjriBrsb7mzGaKFri8WDyWS3qYvVM3i8jArbn1f9cXjuGLYXz zopg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=xI3VVDDSUe65MDkqh/0GhLTM7RfpcKZ95iQyO/DWgMo=; b=N/qOES6wBEqMKuAFQKr8xadA5ZuWgyslqPSx+1RwXea5vRy6z1c36x4RMiZ2k7BOqR ORo/mO7oHvk8ax54z9bXSLzQCnR/aaEiujVKPi0KXm5Be/N+0N7McuYBeEj/Sr8tTYY2 Cf7LBw1GXqifE2mlC95tjiRXWbYx2rHaCDKKizRIAqVg2QAxXZQkhcKJt126DSMN4yS8 6AAJ0Crtzk6FqNkX9ffqy9NuRPiDCQVitGVl3Ks6llT9sOhHT2FQEAnb7ha7AXo1Z793 faxyCHYtSm8ZeRxs77vMjQhSnPdZgIi9IuSDFP6g7mZliySIfFtBY/RLw02p4qzjfA6h c/4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=xI3VVDDSUe65MDkqh/0GhLTM7RfpcKZ95iQyO/DWgMo=; b=OtKtCyeZ+NKCfuN81SkdwbuvTq7uQbAHOavkrdqwI/UMid4zuMtbWAwh5LvDvkfA7d 3h4Nu0cwu+1dyK2Y17FTPmdGv9qSpFsaeBnTaxUXygYx9u1ar1DImxNqXZgENA0w652+ z5hz98Qt6uHyylN4EcGkasDe3Gvkytygb+0ifx6xx6TOpD6y6o9msDxeXG275fKRWuKO rxZ+WpHZJlzX+yUW2y+F1cqFuxLzGQ1iGQKjXgcA21W1i4SCKZhaDtdtXD6598mfZXMj ckKu9oI/kNZ2+xkTFu08QYItE8Pa1B+ZBbDuWTYFt0sntRKEZxFVPH/M81tYR97SajdO Xs3g== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM5307hNN+DSK500zA+kOj8v72VGEq1UNa0ENIsPASmNgEg0u0NJW3 EtBtGUaKgaKy4gLA/XwAUdA= X-Google-Smtp-Source: ABdhPJymk8gwKgKm8bbGBg95ZBCILzYCYLd8pxmf6DuwjEHVzZCe/HiqG/9+kApiWXTfF/MoFwi6kw== X-Received: by 2002:a05:6808:1486:: with SMTP id e6mr3847381oiw.133.1642610417047; Wed, 19 Jan 2022 08:40:17 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a9d:4807:: with SMTP id c7ls709510otf.0.gmail; Wed, 19 Jan 2022 08:40:15 -0800 (PST) X-Received: by 2002:a9d:5c01:: with SMTP id o1mr25350393otk.26.1642610415384; Wed, 19 Jan 2022 08:40:15 -0800 (PST) In-Reply-To: X-Original-Sender: folofjc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:30005 Archived-At: ------=_Part_6316_1093322390.1642610414746 Content-Type: multipart/alternative; boundary="----=_Part_6317_1784886884.1642610414746" ------=_Part_6317_1784886884.1642610414746 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I have the same problem. But I would like content under either heading 1 or= =20 2 not to show up on a slide. I posted both here=20 a= nd=20 in tex.se=20 .=20 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,= =20 > 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=20 > different wavelengths. > https://github.com/tchevri/BookdownExample=20 > > Opened as a project in RStudio, it compiles with a single click (build= =20 > book radio button, bookdown::pdf_book). > with Pandoc 2.6 - i get precisely what i look for - new title slides for= =20 > every lecture set, works perfect. > with pandoc >2.7, because of the reveal.js request that impacted beamer, = I=20 > am getting a spurious slide, which I cannot get rid of, containing the=20 > current section header. > > I am using XieYiHui's bookdown, so i think yes, I can make my bookdown us= e=20 > 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=20 > book: "C:/PROGRA~1/Pandoc/pandoc" +RTS -K512m -RTS ./index.split.md --te= mplate=20 > my-template.tex etc etc.... > I tried so many things - setting the variable in the YAML metadata or wit= h=20 > -V is one of the many things I tried. > > Please do allow me to think you have a different issue in mind - you do= =20 > 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= =20 > 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=20 > level 1 be not slapped onto a slide, only content below level 2, if that= =20 > makes sense? > Of course, I'd be happy with any other resolution. > > Many thanks > thomas > > =20 > 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:'=20 >> to your YAML metadata. Use a defaults file or just specify=20 >> --template mytemplate.tex on the command line.=20 >> >> Also, you don't put $dayone$ in the body of your document.=20 >> You can set this variable in YAML metadata or with -V=20 >> on the command line.=20 >> >> ---=20 >> dayone: true=20 >> ...=20 >> >> or=20 >> >> -Vdayone=20 >> >> >> >> Thomas Chevrier writes:=20 >> > >> > Thank you again John for taking the time again and again to respond -= =20 >> > totally appreciated, it's amazing.=20 >> >=20 >> > As a consequence, I took the entire day to try your solution, google= =20 >> > frantically, but I failed miserably.=20 >> > I will spare you the details of everything I tried, but here is what i= =20 >> > think is my best attempt:=20 >> >=20 >> > .1.=20 >> > Read carefully:=20 >> https://bookdown.org/yihui/rmarkdown/template-pandoc.html=20 >> >=20 >> > .2.=20 >> > Download default.latex from your website:=20 >> > https://github.com/jgm/pandoc-templates=20 >> >=20 >> > .3.=20 >> > Rename the file to my-template.tex and, as per your email, line 460=20 >> just=20 >> > before $body$, add:=20 >> > $if(dayone)$=20 >> > \mode=20 >> > {=20 >> > \title[\CourseName{} Lecture $lecture-number$]{\CourseName{} \newline= =20 >> > \, Lecture $lecture-number$}=20 >> > \date{\DayOne{}\Yr{}}=20 >> > }=20 >> > ###=20 >> > \titlepage=20 >> > $endif$=20 >> >=20 >> > .4.=20 >> > In my bookdown, add the $dayone$ custom Pandoc variable=20 >> > # Notations {#notations}=20 >> > ## Mathematics=20 >> > $dayone$=20 >> > ```{r Lecture1Outline, eval =3D (out_type=3D=3D"beamer"), echo=3DFALSE= ,=20 >> > results=3D'asis'}=20 >> > ```=20 >> > ```{r Lecture1Slide1, eval =3D (out_type=3D=3D"beamer"), echo=3DFALSE,= =20 >> > results=3D'asis'}=20 >> > ```=20 >> > `r if (out_type=3D=3D"beamer") "- "` $h =3D \left(h_{1}, h_{2}, \ldots= ,=20 >> > h_{n}\right)$ denotes a vector (lowercase)=20 >> >=20 >> > etc. etc...=20 >> >=20 >> > .5.=20 >> > add "template: my-template.tex" to my YAML so that "--template=20 >> > my-template.tex" is being correctly added as an option to Pandoc.=20 >> >=20 >> > OUTCOME:=20 >> >=20 >> > I still get the undesired slide...=20 >> > "...=20 >> > Mathematics=20 >> > =F0=9D=91=91=F0=9D=91=8E=F0=9D=91=A6=F0=9D=91=9C=F0=9D=91=9B=F0=9D=91= =92=20 >> > ..."=20 >> >=20 >> > I check the .rmd file.=20 >> > It has=20 >> > =20 >> > # Notations {#notations}=20 >> > ## Mathematics=20 >> > $dayone$=20 >> > etc. etc...=20 >> >=20 >> > the .tex file has:=20 >> >=20 >> > \hypertarget{mathematics}{%=20 >> > \subsection{Mathematics}\label{mathematics}}=20 >> > \begin{frame}{Mathematics}=20 >> > \(dayone\)=20 >> > \end{frame}=20 >> >=20 >> > I am so sorry - I feel crummy I could not figure this one out after so= =20 >> many=20 >> > hours and I Thank you in advance for any further help on this issue=20 >> that=20 >> > has drawn me for nearly 18 months.=20 >> > Many thanks=20 >> > thomas=20 >> >=20 >> > PS: note that I have=20 >> > before_body: beamer_prefix.tex=20 >> > and that works well for setting the initial cover page (syllabus) - th= e=20 >> > issue is really after, as I used this mode to redefine= =20 >> the=20 >> > elements of the title slide on the fly (day 1, 2, etc of the course)= =20 >> >=20 >> > On Tuesday, August 25, 2020 at 12:22:26 PM UTC+8 John MacFarlane wrote= :=20 >> >=20 >> >>=20 >> >> If that's what you need, then a custom template could provide it.=20 >> >> Just add this stuff to a custom template, with variables in the=20 >> >> varying parts:=20 >> >>=20 >> >> \mode=20 >> >> {=20 >> >> \title[\CourseName{} Lecture $lecture-number$]{\CourseName{} \newline= =20 >> \,=20 >> >> Lecture $lecture-number$}=20 >> >> \date{\DayOne{}\Yr{}}=20 >> >> }=20 >> >> ###=20 >> >> \titlepage=20 >> >>=20 >> >> $body$=20 >> >>=20 >> > >> "Chevrier, Thomas" writes:=20 >> > >>=20 >> >> > First of all, thank you so much for taking the time to reply -=20 >> really=20 >> >> much=20 >> >> > appreciated, all the more given how busy I see you are, with so man= y=20 >> >> > awesome improvements.=20 >> >> > I love this "raw beamer" attribute, might make my document a lot=20 >> more=20 >> >> > readable, yet to try it for other purposes.=20 >> >> > Unfortunately, this suggested solution does not help the issue at= =20 >> stake.=20 >> >> >=20 >> >> > The issue is for the content not to get forced slapped onto a slide= .=20 >> >> > To create a new title page, I need the following piece of code:=20 >> >> > \mode=20 >> >> > {=20 >> >> > \title[\CourseName{} Lecture 1]{\CourseName{} \newline \, Lecture 1= }=20 >> >> > \date{\DayOne{}\Yr{}}=20 >> >> > }=20 >> >> > ###=20 >> >> > \titlepage=20 >> >> >=20 >> >> > And this {...} code cannot sit inside a frame or a latex error is= =20 >> thrown=20 >> >> (!=20 >> >> > Illegal parameter number in definition of \iterate.).=20 >> >> > After 2.7 - there is no more option for me to write content outside= =20 >> a=20 >> >> frame=20 >> >> > - everything is forced into a frame.=20 >> >> > "raw beamer" attribute does not escape this behavior unfortunately.= =20 >> >> >=20 >> >> > Hence my suggestion last night - i don't know if that would be=20 >> acceptable=20 >> >> > or even useful?=20 >> >> > But i have been thinking that I am perfectly fine with level -2=20 >> content=20 >> >> not=20 >> >> > being forced onto slides.=20 >> >> > From what I read, it looks like reveal.js users only need level -1= =20 >> >> content=20 >> >> > slapped onto slides?=20 >> >> > Of course, I'd be happy with any other solution you think is best.= =20 >> >> >=20 >> >> > Many thank=20 >> >> > thomas=20 >> >> >=20 >> >> >=20 >> >> > On Tue, Aug 25, 2020 at 4:00 AM John MacFarlane=20 >> > >> wrote:=20 >> >> >=20 >> >> >>=20 >> >> >> If you use the raw attribute to mark up content as "raw beamer,"= =20 >> >> >> as suggested earlier in this thread, it will not appear in=20 >> >> >> reveal.js output. Demo here:=20 >> >> >>=20 >> >> >>=20 >> >> >>=20 >> >>=20 >> https://pandoc.org/try/?text=3D%23+Introduction%0A%0A%60%60%60%7B%3Dbeam= er%7D%0AHey+this+is+raw+beamer!%0A%60%60%60%0A%0A%23%23+Slide+one%0A%0Acont= ent%0A%0A%23%23%23+Vertical+slide%0A%0Acontent+vertical%0A&from=3Dmarkdown&= to=3Drevealjs&standalone=3D0=20 >> >> >>=20 >> >> >>=20 >> > >> >> Thomas Chevrier writes:=20 >> > >> >>=20 >> >> >> > Hi folks,=20 >> >> >> >=20 >> >> >> > it's been exactly a year now and I am still not able to upgrade= =20 >> my=20 >> >> >> version=20 >> >> >> > of Pandoc - stuck pre 2.7, because of the adverse change.=20 >> >> >> > Indeed, the "upgrade" for reveal.js users caused my latex beamer= =20 >> code=20 >> >> to=20 >> >> >> > break down.=20 >> >> >> > I have tried multiple things without luck - I also tried a lua= =20 >> filter,=20 >> >> >> but=20 >> >> >> > that did not work - no matter what, the content gets "slapped"= =20 >> onto a=20 >> >> >> slide.=20 >> >> >> > As JGM suggests (was great watching him talk about Pandoc at TUG= =20 >> 2020=20 >> >> >> > keynote address), I'd love to be able to simply be able to have= =20 >> >> content=20 >> >> >> > escape being slapped onto a slide - I believe that's precisely= =20 >> the=20 >> >> >> spirit=20 >> >> >> > of Beamer, which uses heavily for that purpose.=20 >> >> >> > I also thought that was the spirit of pandoc - as you were=20 >> setting in=20 >> >> >> the=20 >> >> >> > yaml header your level for displaying on slides, but i have been= =20 >> >> clearly=20 >> >> >> > proven wrong. :-(=20 >> >> >> > One option would be to recompile pandoc without that change, but= =20 >> >> because=20 >> >> >> of=20 >> >> >> > the bloomberg API, I am forced to be on windows, which would mak= e=20 >> this=20 >> >> >> > solution cumbersome at best (would be straightforward on linux= =20 >> >> though).=20 >> >> >> >=20 >> >> >> > FYI, I posted back then on SO, got only 2 upvotes and 2=20 >> bookmarks, but=20 >> >> >> no=20 >> >> >> > answer, not even a comment :-(=20 >> >> >> >=20 >> >> >>=20 >> >>=20 >> https://stackoverflow.com/questions/57614387/pandoc-4317-forces-content-= under-title-slides-to-be-included-in-a-frame-in-pand=20 >> >> >> >=20 >> >> >> >=20 >> >> >> > Could anyone *please* help me?=20 >> >> >> > many thanks in advance=20 >> >> >> > thomas=20 >> >> >> >=20 >> >> >> >=20 >> >> >> > On Wednesday, August 28, 2019 at 12:23:15 AM UTC+8 John=20 >> MacFarlane=20 >> >> wrote:=20 >> >> >> >=20 >> >> >> >>=20 >> >> >> >> To summarize the issue here, which concerns a change to slide= =20 >> >> >> >> show formats:=20 >> >> >> >>=20 >> >> >> >> Prior to 2.7, versions of pandoc only put material under the=20 >> "slide=20 >> >> >> >> level" headings on slides. If you set slide level to 2, then=20 >> >> >> >> only material under level-2 headings would appear on slides,=20 >> >> >> >> and text under level-1 headings would not appear at all=20 >> >> >> >> (though level-1 headings would create "title slides" with=20 >> >> >> >> just the section title).=20 >> >> >> >>=20 >> >> >> >> Reveal.js users consistently complained (#4317, #5237) that=20 >> >> >> >> this made it hard to structure reveal.js 2D slide shows, in=20 >> >> >> >> which it is common to have the "top" slide on each column=20 >> >> >> >> contain both a title and some text.=20 >> >> >> >>=20 >> >> >> >> In response, I changed pandoc in 2.7 -- as the changelog says,= =20 >> >> >> >>=20 >> >> >> >> > Slide show formats behavior change: content under headers les= s=20 >> >> >> >> > than slide level is no longer ignored, but included in the=20 >> title=20 >> >> >> >> > slide (for HTML slide shows) or in a slide after the title=20 >> slide=20 >> >> >> >> > (for beamer). This change makes possible 2D reveal.js=20 >> slideshows=20 >> >> >> >> > with content in the top slide on each stack (#4317, #5237).= =20 >> >> >> >>=20 >> >> >> >> The change to reveal.js has been welcomed by reveal.js users,= =20 >> >> >> >> but the change to beamer is apparently not welcome by everyone.= =20 >> >> >> >> The reason I made the change to both formats is because I want= =20 >> >> >> >> slide shows to work the same no matter what output format you= =20 >> >> >> >> use. (So you can switch from beamer to reveal.js, for example,= =20 >> >> >> >> and the slides will look more or less the same.)=20 >> >> >> >>=20 >> >> >> >> I had thought the beamer change was innocuous, since it could= =20 >> >> >> >> be worked around by people who wanted to include content under= =20 >> >> >> >> top-level section headings but not in the slides, e.g. by using= =20 >> >> >> >> a filter to strip out this content.=20 >> >> >> >>=20 >> >> >> >> Unfortunately, Thomas Chevrier's use case can't be handled that= =20 >> >> >> >> way. He wants to insert raw tex commands that (a) can't be=20 >> >> >> >> stripped out but (b) only work if they're outside the=20 >> >> >> >> 'frame' environment created for a slide. I can't think of any= =20 >> >> >> >> workaround for this.=20 >> >> >> >>=20 >> >> >> >> One possible course of action would be to revert the beamer=20 >> >> >> >> change while keeping the reveal.js change. This would=20 >> potentially=20 >> >> >> >> have two bad consequences:=20 >> >> >> >>=20 >> >> >> >> 1) slide shows would render differently (in content, not just= =20 >> >> >> >> form) in reveal.js and beamer.=20 >> >> >> >>=20 >> >> >> >> 2) this may break slide shows that were constructed using the= =20 >> >> >> >> new behavior since 2.7 was released.=20 >> >> >> >>=20 >> >> >> >> A less radical change might be to introduce special Div whose= =20 >> >> >> >> contents get moved outside the slide itself. Anyway, comments= =20 >> >> >> >> welcome.=20 >> >> >> >>=20 >> >> >> >>=20 >> >> >> >>=20 >> >> >> >=20 >> >> >> > --=20 >> >> >> > You received this message because you are subscribed to the=20 >> Google=20 >> >> >> Groups "pandoc-discuss" group.=20 >> >> >> > To unsubscribe from this group and stop receiving emails from it= ,=20 >> send=20 >> > >> >> an email to .=20 >> > >> >> > To view this discussion on the web visit=20 >> >> >>=20 >> >>=20 >> https://groups.google.com/d/msgid/pandoc-discuss/c4db2ddc-b3b0-4c62-a8bb= -8a601e37dc48n%40googlegroups.com=20 >> >> >> .=20 >> >> >>=20 >> >>=20 >> >=20 >> > --=20 >> > You received this message because you are subscribed to the Google=20 >> Groups "pandoc-discuss" group.=20 >> > > To unsubscribe from this group and stop receiving emails from it, send= =20 >> an email to .=20 >> > > To view this discussion on the web visit=20 >> https://groups.google.com/d/msgid/pandoc-discuss/73f0ad6f-f17d-424a-abe6= -e8e29e9c7f2en%40googlegroups.com.=20 >> >> > --=20 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 e= mail 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. ------=_Part_6317_1784886884.1642610414746 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 and in tex.se. 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:3= 9:21 PM UTC+2 tch...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:

Dear John,

Thank you again for your super prompt response - very much appreciate= d, amazing.
Last thing I want is to waste your time and kindness = and support.
Therefore, I allowed myself to create a MWE, as I th= ink we are on different wavelengths.

Opened as a project in RStudio, i= t compiles with a single click=C2=A0 (build book radio button, bookdown::pd= f_book).
with Pandoc 2.6 - i get precisely what i look for - new = title slides for every lecture set, works perfect.
with pandoc &g= t;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 'temp= late:' to my YAML metadata.
As i said, I even see it in the c= ommand line when I build the book:=C2=A0"C:/PROGRA~1/Pandoc/pandoc&quo= t; =C2=A0+RTS -K512m -RTS ./index.split.md=C2= =A0--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 t= hings I tried.

Please do allow me to think you hav= e 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 conten= t was just ignored.
Post 2.7 *anything* above a slide level gets = slapped automatically onto a slide.
That's the new behavior t= hat's been causing me havoc.

hence my suggesti= on 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?
O= f course, I'd be happy with any other resolution.

<= div>Many thanks
thomas

=C2=A0
<= div class=3D"gmail_quote">
On Wednesday, August 26, 2020 at 2:14:14 AM UTC+8 Jo= hn 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 =C2=A0writes:

> Thank you again John for taking the time again and again to respon= d -=20
> totally appreciated, it's amazing.
>
> As a consequence, I took the entire day to try your solution, goog= le=20
> frantically, but I failed miserably.
> I will spare you the details of everything I tried, but here is wh= at i=20
> think is my best attempt:
>
> .1. =20
> Read carefully: https://bookdown.org/yihui/r= markdown/template-pandoc.html
>
> .2.=20
> Download default.latex from your website:=20
> http= s://github.com/jgm/pandoc-templates
>
> .3.=20
> Rename the file to my-template.tex and, as per your email, line 46= 0 just=20
> before $body$, add:
> $if(dayone)$
> \mode<presentation>
> {
> \title[\CourseName{} Lecture $lecture-number$]{\CourseName{} = \newline=20
> \, Lecture $lecture-number$}
> \date{\DayOne{}\Yr{}}
> }
> ###
> \titlepage
> $endif$
>
> .4.=20
> In my bookdown, add the $dayone$ custom Pandoc variable
> # Notations {#notations}
> ## Mathematics
> $dayone$
> ```{r Lecture1Outline, eval =3D (out_type=3D=3D"beamer")= , echo=3DFALSE,=20
> results=3D'asis'}
> ```
> ```{r Lecture1Slide1, eval =3D (out_type=3D=3D"beamer"),= echo=3DFALSE,=20
> results=3D'asis'}
> ```
> `r if (out_type=3D=3D"beamer") "- "` $h =3D \l= eft(h_{1}, h_{2}, \ldots,=20
> h_{n}\right)$ denotes a vector (lowercase)
>
> etc. etc...
>
> .5.
> add "template: my-template.tex" to my YAML so that "= ;--template=20
> my-template.tex" is being correctly added as an option to Pan= doc.
>
> OUTCOME:
>
> I still get the undesired slide...
> "...
> Mathematics
> =F0=9D=91=91=F0=9D=91=8E=F0=9D=91=A6=F0=9D=91=9C=F0=9D=91=9B=F0=9D= =91=92
> ..."
>
> I check the .rmd file.
> It has=20
> <!--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 afte= r so many=20
> hours and I Thank you in advance for any further help on this issu= e that=20
> has drawn me for nearly 18 months.
> Many thanks
> thomas
>
> PS: note that I have=20
> before_body: beamer_prefix.tex
> and that works well for setting the initial cover page (syllabus) = - the=20
> issue is really after, as I used this mode<presentation> to = redefine the=20
> elements of the title slide on the fly (day 1, 2, etc of the cours= e)
>
> On Tuesday, August 25, 2020 at 12:22:26 PM UTC+8 John MacFarlane w= rote:
>
>>
>> If that's what you need, then a custom template could prov= ide it.
>> Just add this stuff to a custom template, with variables in th= e
>> varying parts:
>>
>> \mode<presentation>
>> {
>> \title[\CourseName{} Lecture $lecture-number$]{\CourseName{} \= newline \,=20
>> Lecture $lecture-number$}
>> \date{\DayOne{}\Yr{}}
>> }
>> ###
>> \titlepage
>>
>> $body$
>>
>> "Chevrier, Thomas"=C2=A0writes:
>>
>> > First of all, thank you so much for taking the time to re= ply - really=20
>> much
>> > appreciated, all the more given how busy I see you are, w= ith 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 on= to 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=20
>> (!
>> > Illegal parameter number in definition of \iterate.).
>> > After 2.7 - there is no more option for me to write conte= nt outside a=20
>> frame
>> > - everything is forced into a frame.
>> > "raw beamer" attribute does not escape this beh= avior 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 le= vel -2 content=20
>> not
>> > being forced onto slides.
>> > From what I read, it looks like reveal.js users only need= level -1=20
>> content
>> > slapped onto slides?
>> > Of course, I'd be happy with any other solution you t= hink is best.
>> >
>> > Many thank
>> > thomas
>> >
>> >
>> > On Tue, Aug 25, 2020 at 4:00 AM John MacFarlane=C2=A0
=
>> wrote:
>> >
>> >>
>> >> If you use the raw attribute to mark up content as &q= uot;raw beamer,"
>> >> as suggested earlier in this thread, it will not appe= ar in
>> >> reveal.js output. Demo here:
>> >>
>> >>
>> >>=20
>> https://p= andoc.org/try/?text=3D%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=3Dmarkdown&to= =3Drevealjs&standalone=3D0
>> >>
>> >>
>> >> Thomas Chevrier =C2=A0writes:
>> >>
>> >> > 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 advers= e change.
>> >> > Indeed, the "upgrade" for reveal.js us= ers caused my latex beamer code=20
>> to
>> >> > break down.
>> >> > I have tried multiple things without luck - I al= so 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 abo= ut Pandoc at TUG 2020
>> >> > keynote address), I'd love to be able to sim= ply be able to have=20
>> content
>> >> > escape being slapped onto a slide - I believe th= at's precisely the
>> >> spirit
>> >> > of Beamer, which uses <mode> heavily for t= hat purpose.
>> >> > I also thought that was the spirit of pandoc - a= s you were setting in
>> >> the
>> >> > yaml header your level for displaying on slides,= but i have been=20
>> clearly
>> >> > proven wrong. :-(
>> >> > One option would be to recompile pandoc without = that change, but=20
>> because
>> >> of
>> >> > the bloomberg API, I am forced to be on windows,= which would make this
>> >> > solution cumbersome at best (would be straightfo= rward on linux=20
>> though).
>> >> >
>> >> > FYI, I posted back then on SO, got only 2 upvote= s and 2 bookmarks, but
>> >> no
>> >> > answer, not even a comment :-(
>> >> >
>> >>=20
>> 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=20
>> wrote:
>> >> >
>> >> >>
>> >> >> To summarize the issue here, which concerns = a change to slide
>> >> >> show formats:
>> >> >>
>> >> >> Prior to 2.7, versions of pandoc only put ma= terial under the "slide
>> >> >> level" headings on slides. If you set s= lide level to 2, then
>> >> >> only material under level-2 headings would a= ppear on slides,
>> >> >> and text under level-1 headings would not ap= pear at all
>> >> >> (though level-1 headings would create "= title slides" with
>> >> >> just the section title).
>> >> >>
>> >> >> Reveal.js users consistently complained (#43= 17, #5237) that
>> >> >> this made it hard to structure reveal.js 2D = slide shows, in
>> >> >> which it is common to have the "top&quo= t; slide on each column
>> >> >> contain both a title and some text.
>> >> >>
>> >> >> In response, I changed pandoc in 2.7 -- as t= he changelog says,
>> >> >>
>> >> >> > Slide show formats behavior change: con= tent under headers less
>> >> >> > than slide level is no longer ignored, = but included in the title
>> >> >> > slide (for HTML slide shows) or in a sl= ide after the title slide
>> >> >> > (for beamer). This change makes possibl= e 2D reveal.js slideshows
>> >> >> > with content in the top slide on each s= tack (#4317, #5237).
>> >> >>
>> >> >> The change to reveal.js has been welcomed by= reveal.js users,
>> >> >> but the change to beamer is apparently not w= elcome 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 revea= l.js, for example,
>> >> >> and the slides will look more or less the sa= me.)
>> >> >>
>> >> >> I had thought the beamer change was innocuou= s, since it could
>> >> >> be worked around by people who wanted to inc= lude content under
>> >> >> top-level section headings but not in the sl= ides, e.g. by using
>> >> >> a filter to strip out this content.
>> >> >>
>> >> >> Unfortunately, Thomas Chevrier's use cas= e can't be handled that
>> >> >> way. He wants to insert raw tex commands tha= t (a) can't be
>> >> >> stripped out but (b) only work if they'r= e outside the
>> >> >> 'frame' environment created for a sl= ide. I can't think of any
>> >> >> workaround for this.
>> >> >>
>> >> >> One possible course of action would be to re= vert the beamer
>> >> >> change while keeping the reveal.js change. T= his 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 cons= tructed 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 subscr= ibed to the Google
>> >> Groups "pandoc-discuss" group.
>> >> > To unsubscribe from this group and stop receivin= g emails from it, send
>> >> an email to .
>> >> > To view this discussion on the we= b visit
>> >>=20
>> https://groups.go= ogle.com/d/msgid/pandoc-discuss/c4db2ddc-b3b0-4c62-a8bb-8a601e37dc48n%40goo= glegroups.com
>> >> .
>> >>
>>
>
> --=20
> You received this message because you are subscribed to the Google= Groups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving e= mails from it, send an email to .

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@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.
------=_Part_6317_1784886884.1642610414746-- ------=_Part_6316_1093322390.1642610414746--