From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/25994 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thomas Chevrier Newsgroups: gmane.text.pandoc Subject: Re: Pandoc #4317 side effect Date: Tue, 25 Aug 2020 13:39:21 -0700 (PDT) Message-ID: 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_2089_2142534361.1598387961843" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24429"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCI5RYHTR4KRB67NSX5AKGQEQDR5SFY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Aug 25 22:39:27 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oi1-f190.google.com ([209.85.167.190]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kAfj5-0006Cn-B6 for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 25 Aug 2020 22:39:27 +0200 Original-Received: by mail-oi1-f190.google.com with SMTP id w25sf6498972oic.17 for ; Tue, 25 Aug 2020 13:39:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; 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=IDT9SFrgPJRCnBtsSTckcK9RVbbUXPSblcdkYLfFYCI=; b=UNL4EqvV+symnpa/Bg32BmU1I2UQes6oQxH/woseMdDK0Gf+b2QPuI+d3XaP+PxI9S WRMG/+kSCs3VLTThpx/HmTICnp6H7L9yrcAlnFD97IpIcLS5o/LPiQnu7bg51tfzh/AS KNuh+pO8uE6rTNJGEPmyCzcLhDMLQ3KUrCJhbHaRLgQNs1KoRG8F2+Q6sW+mi0uWelO1 kVF3hGz5jwYZY1pQabonO9yMG83Bu6Wsm1q/x7tY/mH2/pdk+WeDRc0zgRU60W9OqHV/ +mdVbAZ2i3trqwX0K9MxPv5K7hafEcvsvk4RnyvMsDAxK2KjcsN77QLZTXA1nRW9ncCn BBUw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; 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=IDT9SFrgPJRCnBtsSTckcK9RVbbUXPSblcdkYLfFYCI=; b=rOMvCGGtYmrFBOGjaScfuTNX0QdrGtycni8gtndFvudVH2Oa6Vr+kY1wPlwJjl+OX6 RxMGiww2VGcQpXNPhWfa72f7WNoGndsvy5ssELLkgWVFz6chDpvIi/mxcl2mWrkJ0Pdj XANyM/qZqXCiz4O3HUPcNiJ6CEBCbnYRc7lCL6BmO6ElOs+A4s3zjyUcaa97WD19383P eq/fxH8TtQrVLCQuCgFfc1U0AyqLYfbGIL/OjHUgz+ISDoy8Jcf5Tu2fCrbgBJZD3Blo MRsY9u1PzDR8cxQKaGCIHGzu0QCqnzT8FXxPx4cE/nR7dce5dTXo1TpDcc+vkAvYt4l7 Gggw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=IDT9SFrgPJRCnBtsSTckcK9RVbbUXPSblcdkYLfFYCI=; b=iUErcj3/C795Nb7fUwMa8XQKnEXjn5CeX6/8ROmhPhBriJ55I0xf4Q9k0QGYKyByVS QO9ry7x08o/PUGLRhoG22ICGdelOcT1Pq8hLqIabQ+XxDimWQxeeoc6t8dDDJuQSU+ul XpQPxm3oxYaPUYuHD2I+w1jblJM+K+hJtHrNpMrZKJycuQ7Maht/EVMwaIZqy2+ys0ma 0TFDxCz2QSp60RWy3AV/mop1pT7kNWmIGukF8E3aToWT+CnRqYsNYALk7R0O40dYpaNt FVD+DnKUOAn4TbdN+5wE5u7k629wUdYg0h6+W5ZSoroLrY/iXGk0Otgchdx0ql5TH42i j7Ww== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM531H7nwlqJGRFn7ypbJ3osTmmE7qd+LqVxm55GwVgi34azmX9iBZ Yzk9KwmipRFokC2P2Vdr5TE= X-Google-Smtp-Source: ABdhPJwoMgAc+ze15sd6EHFJephDL7sAEZSN/GzKAFb6ANyrZx45vRZukUmJm/ik3BNg8gZgMjsddg== X-Received: by 2002:aca:fc12:: with SMTP id a18mr1960089oii.20.1598387966187; Tue, 25 Aug 2020 13:39:26 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6808:181:: with SMTP id w1ls6712oic.9.gmail; Tue, 25 Aug 2020 13:39:23 -0700 (PDT) X-Received: by 2002:aca:5401:: with SMTP id i1mr2075732oib.33.1598387962782; Tue, 25 Aug 2020 13:39:22 -0700 (PDT) In-Reply-To: X-Original-Sender: tchevri-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:25994 Archived-At: ------=_Part_2089_2142534361.1598387961843 Content-Type: multipart/alternative; boundary="----=_Part_2090_1408963217.1598387961843" ------=_Part_2090_1408963217.1598387961843 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 different= =20 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 use= =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=20 ./index.split.md --template my-template.tex etc etc.... I tried so many things - setting the variable in the YAML metadata or with= =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 level= =20 1 be not slapped onto a slide, only content below level 2, if that makes=20 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 jus= t=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 tha= t=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) - the= =20 > > issue is really after, as I used this mode to redefine th= e=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 - reall= y=20 > >> much=20 > >> > appreciated, all the more given how busy I see you are, with so many= =20 > >> > awesome improvements.=20 > >> > I love this "raw beamer" attribute, might make my document a lot mor= e=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 = 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%3Dbeame= r%7D%0AHey+this+is+raw+beamer!%0A%60%60%60%0A%0A%23%23+Slide+one%0A%0Aconte= nt%0A%0A%23%23%23+Vertical+slide%0A%0Acontent+vertical%0A&from=3Dmarkdown&t= o=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 m= y=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 th= e=20 > >> >> spirit=20 > >> >> > of Beamer, which uses heavily for that purpose.=20 > >> >> > I also thought that was the spirit of pandoc - as you were settin= g=20 > 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 make= =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 bookmarks= ,=20 > but=20 > >> >> no=20 > >> >> > answer, not even a comment :-(=20 > >> >> >=20 > >> >>=20 > >>=20 > https://stackoverflow.com/questions/57614387/pandoc-4317-forces-content-u= nder-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 MacFarlan= e=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 less= =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 potentiall= y=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 Googl= e=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/d70cf350-f53a-4b7b-80ef-1bb1526e849fn%40googlegroups.com. ------=_Part_2090_1408963217.1598387961843 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Dear John,

Thank you again for= your super prompt response - very much appreciated, amazing.
Las= t thing I want is to waste your time and kindness and support.
Th= erefore, I allowed myself to create a MWE, as I think we are on different w= avelengths.

=
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, w= orks perfect.
with pandoc >2.7, because of the reveal.js reque= st that impacted beamer, I am getting a spurious slide, which I cannot get = rid of, containing the current section header.

I a= m using XieYiHui's bookdown, so i think yes, I can make my bookdown use a c= ustom template by adding 'template:' to my YAML metadata.
As i sa= id, I even see it in the command line when I build the book: "C:/PROGR= A~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 wou= ld not be able to).
pre 2.7, non slide level content was just ign= ored.
Post 2.7 *anything* above a slide level gets slapped automa= tically onto a slide.
That's the new behavior that's been causing= me havoc.

hence my suggestion that if I have leve= l 3 slides, then content below level 1 be not slapped onto a slide, only co= ntent 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:1= 4: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 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=3DF= ALSE,=20
> results=3D'asis'}
> ```
> ```{r Lecture1Slide1, eval =3D (out_type=3D=3D"beamer"), echo=3DFA= LSE,=20
> results=3D'asis'}
> ```
> `r if (out_type=3D=3D"beamer") "- "` $h =3D \left(h_{1}, h_{2}, \l= dots,=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 Pandoc.
>
> 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 provide = 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" writes:
>>
>> > 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 documen= t 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 behavior unfo= rtunately.
>> >
>> > Hence my suggestion last night - i don't know if that wou= ld 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 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 "r= aw 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  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 advers= e change.
>> >> > Indeed, the "upgrade" for reveal.js users 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 simply = 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 slide = 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" slide o= n 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 case ca= n'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're ou= tside the
>> >> >> 'frame' environment created for a slide. I c= an'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 web 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 emails from it, = send an email to .
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/73f0= ad6f-f17d-424a-abe6-e8e29e9c7f2en%40googlegroups.com.

--
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/d70cf350-f53a-4b7b-80ef-1bb1526e849fn%40googlegroups.= com.
------=_Part_2090_1408963217.1598387961843-- ------=_Part_2089_2142534361.1598387961843--