From 7cf50ba5a3e942b928fbe8a02f8c204a3cbbf2dc Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 16 Oct 2025 17:31:11 +0200 Subject: update extension ruc-play to sync with Quarto 1.7.19 --- .../ruc-play/stylish-report/_extension.yaml | 2 +- _extensions/ruc-play/stylish-report/doc-class.tex | 18 +- .../ruc-play/stylish-report/hypersetup.latex | 30 ++ _extensions/ruc-play/stylish-report/template.tex | 455 --------------------- _extensions/ruc-play/stylish-report/title.tex | 14 +- _extensions/ruc-play/stylish-report/toc.tex | 10 - 6 files changed, 38 insertions(+), 491 deletions(-) create mode 100644 _extensions/ruc-play/stylish-report/hypersetup.latex delete mode 100644 _extensions/ruc-play/stylish-report/template.tex (limited to '_extensions') diff --git a/_extensions/ruc-play/stylish-report/_extension.yaml b/_extensions/ruc-play/stylish-report/_extension.yaml index 6b0afc7..4bdcc51 100644 --- a/_extensions/ruc-play/stylish-report/_extension.yaml +++ b/_extensions/ruc-play/stylish-report/_extension.yaml @@ -22,9 +22,9 @@ contributes: csquotes: true papersize: a4 fontsize: 12pt - template: template.tex template-partials: - doc-class.tex + - hypersetup.latex - title.tex - toc.tex diff --git a/_extensions/ruc-play/stylish-report/doc-class.tex b/_extensions/ruc-play/stylish-report/doc-class.tex index 8eff486..a9dbfaa 100644 --- a/_extensions/ruc-play/stylish-report/doc-class.tex +++ b/_extensions/ruc-play/stylish-report/doc-class.tex @@ -50,24 +50,18 @@ $if(pdftestphasestrict)$ \ExplSyntaxOff $endif$ \documentclass[ +$for(babel-otherlangs)$ + $babel-otherlangs$, +$endfor$ +$if(babel-lang)$ + $babel-lang$, +$endif$ $if(fontsize)$ $fontsize$, $endif$ $if(papersize)$ $papersize$paper, $endif$ -$if(beamer)$ - ignorenonframetext, -$if(handout)$ - handout, -$endif$ -$if(aspectratio)$ - aspectratio=$aspectratio$, -$endif$ -$if(babel-lang)$ - $babel-lang$, -$endif$ -$endif$ $for(classoption)$ $classoption$$sep$, $endfor$ diff --git a/_extensions/ruc-play/stylish-report/hypersetup.latex b/_extensions/ruc-play/stylish-report/hypersetup.latex new file mode 100644 index 0000000..7bee191 --- /dev/null +++ b/_extensions/ruc-play/stylish-report/hypersetup.latex @@ -0,0 +1,30 @@ +\hypersetup{ +$if(title-meta)$ + pdftitle={$title-meta$}, +$endif$ +$if(author-meta)$ + pdfauthor={$for(by-author)$$if(it.metadata.credit.supervision)$$else$$it.name.literal$$endif$$sep$,$endfor$}, +$endif$ +$if(lang)$ + pdflang={$lang$}, +$endif$ +$if(subject)$ + pdfsubject={$subject$}, +$endif$ +$if(keywords)$ + pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$}, +$endif$ +$if(colorlinks)$ + colorlinks=true, + $if(linkcolor)$linkcolor={$linkcolor$}$endif$, + $if(filecolor)$filecolor={$filecolor$}$endif$, + $if(citecolor)$citecolor={$citecolor$}$endif$, + $if(urlcolor)$urlcolor={$urlcolor$}$endif$, +$else$ +$if(boxlinks)$ +$else$ + hidelinks, +$endif$ +$endif$ + pdfcreator={LaTeX via pandoc}} + diff --git a/_extensions/ruc-play/stylish-report/template.tex b/_extensions/ruc-play/stylish-report/template.tex deleted file mode 100644 index c64ceab..0000000 --- a/_extensions/ruc-play/stylish-report/template.tex +++ /dev/null @@ -1,455 +0,0 @@ -% Options for packages loaded elsewhere -\PassOptionsToPackage{unicode$for(hyperrefoptions)$,$hyperrefoptions$$endfor$}{hyperref} -\PassOptionsToPackage{hyphens}{url} -$if(colorlinks)$ -\PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor} -$endif$ -$if(CJKmainfont)$ -\PassOptionsToPackage{space}{xeCJK} -$endif$ -% -$doc-class.tex()$ - -$if(beamer)$ -$if(background-image)$ -\usebackgroundtemplate{% - \includegraphics[width=\paperwidth]{$background-image$}% -} -% In beamer background-image does not work well when other images are used, so this is the workaround -\pgfdeclareimage[width=\paperwidth,height=\paperheight]{background}{$background-image$} -\usebackgroundtemplate{\pgfuseimage{background}} -$endif$ -\usepackage{pgfpages} -\setbeamertemplate{caption}[numbered] -\setbeamertemplate{caption label separator}{: } -\setbeamercolor{caption name}{fg=normal text.fg} -\beamertemplatenavigationsymbols$if(navigation)$$navigation$$else$empty$endif$ -$for(beameroption)$ -\setbeameroption{$beameroption$} -$endfor$ -% Prevent slide breaks in the middle of a paragraph -\widowpenalties 1 10000 -\raggedbottom -$if(section-titles)$ -\setbeamertemplate{part page}{ - \centering - \begin{beamercolorbox}[sep=16pt,center]{part title} - \usebeamerfont{part title}\insertpart\par - \end{beamercolorbox} -} -\setbeamertemplate{section page}{ - \centering - \begin{beamercolorbox}[sep=12pt,center]{section title} - \usebeamerfont{section title}\insertsection\par - \end{beamercolorbox} -} -\setbeamertemplate{subsection page}{ - \centering - \begin{beamercolorbox}[sep=8pt,center]{subsection title} - \usebeamerfont{subsection title}\insertsubsection\par - \end{beamercolorbox} -} -\AtBeginPart{ - \frame{\partpage} -} -\AtBeginSection{ - \ifbibliography - \else - \frame{\sectionpage} - \fi -} -\AtBeginSubsection{ - \frame{\subsectionpage} -} -$endif$ -$endif$ -$if(beamerarticle)$ -\usepackage{beamerarticle} % needs to be loaded first -$endif$ - -\usepackage{amsmath,amssymb} -$if(linestretch)$ -\usepackage{setspace} -$endif$ -\usepackage{iftex} -\ifPDFTeX - \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} - \usepackage[utf8]{inputenc} - \usepackage{textcomp} % provide euro and other symbols -\else % if luatex or xetex -$if(mathspec)$ - \ifXeTeX - \usepackage{mathspec} % this also loads fontspec - \else - \usepackage{unicode-math} % this also loads fontspec - \fi -$else$ - \usepackage{unicode-math} -$endif$ - \defaultfontfeatures{Scale=MatchLowercase}$-- must come before Beamer theme - \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} -\fi -$if(fontfamily)$ -$else$ -$-- Set default font before Beamer theme so the theme can override it -\usepackage{lmodern} -$endif$ -$-- Set Beamer theme before user font settings so they can override theme -$if(beamer)$ -$if(theme)$ -\usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$} -$endif$ -$if(colortheme)$ -\usecolortheme{$colortheme$} -$endif$ -$if(fonttheme)$ -\usefonttheme{$fonttheme$} -$endif$ -$if(mainfont)$ -\usefonttheme{serif} % use mainfont rather than sansfont for slide text -$endif$ -$if(innertheme)$ -\useinnertheme{$innertheme$} -$endif$ -$if(outertheme)$ -\useoutertheme{$outertheme$} -$endif$ -$endif$ -$-- User font settings (must come after default font and Beamer theme) -$if(fontfamily)$ -\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$} -$endif$ -\ifPDFTeX\else - % xetex/luatex font selection -$if(mainfont)$ - $if(mainfontfallback)$ - \ifLuaTeX - \usepackage{luaotfload} - \directlua{luaotfload.add_fallback("mainfontfallback",{ - $for(mainfontfallback)$"$mainfontfallback$"$sep$,$endfor$ - })} - \fi - $endif$ - \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$$if(mainfontfallback)$,RawFeature={fallback=mainfontfallback}$endif$]{$mainfont$} -$endif$ -$if(sansfont)$ - $if(sansfontfallback)$ - \ifLuaTeX - \usepackage{luaotfload} - \directlua{luaotfload.add_fallback("sansfontfallback",{ - $for(sansfontfallback)$"$sansfontfallback$"$sep$,$endfor$ - })} - \fi - $endif$ - \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$$if(sansfontfallback)$,RawFeature={fallback=sansfontfallback}$endif$]{$sansfont$} -$endif$ -$if(monofont)$ - $if(monofontfallback)$ - \ifLuaTeX - \usepackage{luaotfload} - \directlua{luaotfload.add_fallback("monofontfallback",{ - $for(monofontfallback)$"$monofontfallback$"$sep$,$endfor$ - })} - \fi - $endif$ - \setmonofont[$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$if(monofontfallback)$,RawFeature={fallback=monofontfallback}$endif$]{$monofont$} -$endif$ -$for(fontfamilies)$ - \newfontfamily{$fontfamilies.name$}[$for(fontfamilies.options)$$fontfamilies.options$$sep$,$endfor$]{$fontfamilies.font$} -$endfor$ -$if(mathfont)$ -$if(mathspec)$ - \ifXeTeX - \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} - \else - \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} - \fi -$else$ - \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} -$endif$ -$endif$ -$if(CJKmainfont)$ - \ifXeTeX - \usepackage{xeCJK} - \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} - $if(CJKsansfont)$ - \setCJKsansfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKsansfont$} - $endif$ - $if(CJKmonofont)$ - \setCJKmonofont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmonofont$} - $endif$ - \fi -$endif$ -$if(luatexjapresetoptions)$ - \ifLuaTeX - \usepackage[$for(luatexjapresetoptions)$$luatexjapresetoptions$$sep$,$endfor$]{luatexja-preset} - \fi -$endif$ -$if(CJKmainfont)$ - \ifLuaTeX - \usepackage[$for(luatexjafontspecoptions)$$luatexjafontspecoptions$$sep$,$endfor$]{luatexja-fontspec} - \setmainjfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} - \fi -$endif$ -\fi -$if(zero-width-non-joiner)$ -%% Support for zero-width non-joiner characters. -\makeatletter -\def\zerowidthnonjoiner{% - % Prevent ligatures and adjust kerning, but still support hyphenating. - \texorpdfstring{% - \TextOrMath{\nobreak\discretionary{-}{}{\kern.03em}% - \ifvmode\else\nobreak\hskip\z@skip\fi}{}% - }{}% -} -\makeatother -\ifPDFTeX - \DeclareUnicodeCharacter{200C}{\zerowidthnonjoiner} -\else - \catcode`^^^^200c=\active - \protected\def ^^^^200c{\zerowidthnonjoiner} -\fi -%% End of ZWNJ support -$endif$ -% Use upquote if available, for straight quotes in verbatim environments -\IfFileExists{upquote.sty}{\usepackage{upquote}}{} -\IfFileExists{microtype.sty}{% use microtype if available - \usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype} - \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts -}{} -$if(indent)$ -$else$ -\makeatletter -\@ifundefined{KOMAClassName}{% if non-KOMA class - \IfFileExists{parskip.sty}{% - \usepackage{parskip} - }{% else - \setlength{\parindent}{0pt} - \setlength{\parskip}{6pt plus 2pt minus 1pt}} -}{% if KOMA class - \KOMAoptions{parskip=half}} -\makeatother -$endif$ -$if(verbatim-in-note)$ -\usepackage{fancyvrb} -$endif$ -\usepackage{xcolor} -$if(geometry)$ -$if(beamer)$ -\geometry{$for(geometry)$$geometry$$sep$,$endfor$} -$else$ -\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} -$endif$ -$endif$ -$if(beamer)$ -\newif\ifbibliography -$endif$ -$if(listings)$ -\usepackage{listings} -\newcommand{\passthrough}[1]{#1} -\lstset{defaultdialect=[5.3]Lua} -\lstset{defaultdialect=[x86masm]Assembler} -$endif$ -$if(lhs)$ -\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} -$endif$ -$if(svg)$ -\usepackage{svg} -$endif$ -$if(strikeout)$ -$-- also used for underline -\ifLuaTeX - \usepackage{luacolor} - \usepackage[soul]{lua-ul} -\else - \usepackage{soul} -$if(beamer)$ - \makeatletter - \let\HL\hl - \renewcommand\hl{% fix for beamer highlighting - \let\set@color\beamerorig@set@color - \let\reset@color\beamerorig@reset@color - \HL} - \makeatother -$endif$ -$if(CJKmainfont)$ -\ifXeTeX - % soul's \st doesn't work for CJK: - \usepackage{xeCJKfntef} - \renewcommand{\st}[1]{\sout{#1}} -\fi -$endif$ -\fi -$endif$ -\setlength{\emergencystretch}{3em} % prevent overfull lines -$if(numbersections)$ -\setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$} -$else$ -\setcounter{secnumdepth}{-\maxdimen} % remove section numbering -$endif$ -$if(beamer)$ -$else$ -$if(block-headings)$ -% Make \paragraph and \subparagraph free-standing -\makeatletter -\ifx\paragraph\undefined\else - \let\oldparagraph\paragraph - \renewcommand{\paragraph}{ - \@ifstar - \xxxParagraphStar - \xxxParagraphNoStar - } - \newcommand{\xxxParagraphStar}[1]{\oldparagraph*{#1}\mbox{}} - \newcommand{\xxxParagraphNoStar}[1]{\oldparagraph{#1}\mbox{}} -\fi -\ifx\subparagraph\undefined\else - \let\oldsubparagraph\subparagraph - \renewcommand{\subparagraph}{ - \@ifstar - \xxxSubParagraphStar - \xxxSubParagraphNoStar - } - \newcommand{\xxxSubParagraphStar}[1]{\oldsubparagraph*{#1}\mbox{}} - \newcommand{\xxxSubParagraphNoStar}[1]{\oldsubparagraph{#1}\mbox{}} -\fi -\makeatother -$endif$ -$endif$ -$if(pagestyle)$ -\pagestyle{$pagestyle$} -$endif$ -$pandoc.tex()$ - -$if(lang)$ -\ifLuaTeX -\usepackage[bidi=basic]{babel} -\else -\usepackage[bidi=default]{babel} -\fi -$if(babel-lang)$ -\babelprovide[main,import]{$babel-lang$} -$if(mainfont)$ -\ifPDFTeX -\else -\babelfont{rm}[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$$if(mainfontfallback)$,RawFeature={fallback=mainfontfallback}$endif$]{$mainfont$} -\fi -$endif$ -$endif$ -$for(babel-otherlangs)$ -\babelprovide[import]{$babel-otherlangs$} -$endfor$ -$for(babelfonts/pairs)$ -\babelfont[$babelfonts.key$]{rm}{$babelfonts.value$} -$endfor$ -% get rid of language-specific shorthands (see #6817): -\let\LanguageShortHands\languageshorthands -\def\languageshorthands#1{} -$if(selnolig-langs)$ -\ifLuaTeX - \usepackage[$for(selnolig-langs)$$it$$sep$,$endfor$]{selnolig} % disable illegal ligatures -\fi -$endif$ -$endif$ -$if(dir)$ -\ifPDFTeX - \TeXXeTstate=1 - \newcommand{\RL}[1]{\beginR #1\endR} - \newcommand{\LR}[1]{\beginL #1\endL} - \newenvironment{RTL}{\beginR}{\endR} - \newenvironment{LTR}{\beginL}{\endL} -\fi -$endif$ -$if(biblio-config)$ -$if(natbib)$ -\usepackage[$natbiboptions$]{natbib} -\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} -$endif$ -$if(biblatex)$ -\usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex} -$for(bibliography)$ -\addbibresource{$bibliography$} -$endfor$ -$endif$ -$endif$ -$if(nocite-ids)$ -\nocite{$for(nocite-ids)$$it$$sep$, $endfor$} -$endif$ -$if(csquotes)$ -\usepackage{csquotes} -$endif$ -\usepackage{bookmark} - -\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available -\urlstyle{same} % disable monospaced font for URLs -$if(links-as-notes)$ -% Make links footnotes instead of hotlinks: -\DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}} -$endif$ -$if(verbatim-in-note)$ -\VerbatimFootnotes % allow verbatim text in footnotes -$endif$ -\hypersetup{ -$if(title-meta)$ - pdftitle={$title-meta$}, -$endif$ -$if(author-meta)$ - pdfauthor={$for(by-author)$$if(it.metadata.credit.supervision)$$else$$it.name.literal$$endif$$sep$,$endfor$}, -$endif$ -$if(lang)$ - pdflang={$lang$}, -$endif$ -$if(subject)$ - pdfsubject={$subject$}, -$endif$ -$if(keywords)$ - pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$}, -$endif$ -$if(colorlinks)$ - colorlinks=true, - $if(linkcolor)$linkcolor={$linkcolor$}$endif$, - $if(filecolor)$filecolor={$filecolor$}$endif$, - $if(citecolor)$citecolor={$citecolor$}$endif$, - $if(urlcolor)$urlcolor={$urlcolor$}$endif$, -$else$ -$if(boxlinks)$ -$else$ - hidelinks, -$endif$ -$endif$ - pdfcreator={LaTeX via pandoc}} - -$before-title.tex()$ - -$title.tex()$ - -\begin{document} -$before-body.tex()$ - -$for(include-before)$ -$include-before$ - -$endfor$ -$toc.tex()$ - -$if(linestretch)$ -\setstretch{$linestretch$} -$endif$ -$if(has-frontmatter)$ -\mainmatter -$endif$ -$body$ - -$before-bib.tex()$ - -$if(has-frontmatter)$ -\backmatter -$endif$ -$biblio.tex()$ - -$for(include-after)$ -$include-after$ - -$endfor$ -$after-body.tex()$ - -\end{document} diff --git a/_extensions/ruc-play/stylish-report/title.tex b/_extensions/ruc-play/stylish-report/title.tex index 98f4e5a..e7dcedf 100644 --- a/_extensions/ruc-play/stylish-report/title.tex +++ b/_extensions/ruc-play/stylish-report/title.tex @@ -2,17 +2,15 @@ $if(title)$ \title{$title$$if(thanks)$\thanks{$thanks$}$endif$} $endif$ $if(subtitle)$ -$if(beamer)$ -$else$ \usepackage{etoolbox} \makeatletter \providecommand{\subtitle}[1]{% add subtitle to \maketitle \apptocmd{\@title}{\par {\large #1 \par}}{}{} } \makeatother -$endif$ \subtitle{$subtitle$} $endif$ +$-- This supports Quarto's authors normalization \usepackage{marvosym} \usepackage{authblk,academicons} %\renewcommand*{\Authand}{ og } @@ -86,13 +84,3 @@ $endif$ $endfor$ $endif$ \date{$date$} -$if(beamer)$ -$if(institute)$ -\institute{$for(institute)$$institute$$sep$ \and $endfor$} -$endif$ -$if(titlegraphic)$ -\titlegraphic{\includegraphics$if(titlegraphicoptions)$[$for(titlegraphicoptions)$$titlegraphicoptions$$sep$, $endfor$]$endif${$titlegraphic$}}$endif$ -$if(logo)$ -\logo{\includegraphics{$logo$}} -$endif$ -$endif$ diff --git a/_extensions/ruc-play/stylish-report/toc.tex b/_extensions/ruc-play/stylish-report/toc.tex index 95cffff..8f99215 100644 --- a/_extensions/ruc-play/stylish-report/toc.tex +++ b/_extensions/ruc-play/stylish-report/toc.tex @@ -2,15 +2,6 @@ $if(toc)$ $if(toc-title)$ \renewcommand*\contentsname{$toc-title$} $endif$ -$if(beamer)$ -\begin{frame}[allowframebreaks] -$if(toc-title)$ - \frametitle{$toc-title$} -$endif$ - \setcounter{tocdepth}{$toc-depth$} - \tableofcontents -\end{frame} -$else$ { $if(colorlinks)$ \hypersetup{$if(toccolor)$linkcolor=$toccolor$$endif$} @@ -19,7 +10,6 @@ $endif$ \tableofcontents } $endif$ -$endif$ $if(lof)$ \listoffigures $endif$ -- cgit v1.2.3