Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions configuration
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
export DENO=v2.7.14
# TODO figure out where 0.1.41 apple silicon libs are available
export DENO_DOM=v0.1.41-alpha-artifacts
export PANDOC=3.8.3
export DARTSASS=1.87.0
export ESBUILD=0.25.10
export TYPST=0.14.2
export PANDOC=3.10
export DARTSASS=1.101.0
export ESBUILD=0.28.1
export TYPST=0.15.0
export TYPST_GATHER=0.2.3
export VERAPDF=1.28.2
export VERAPDF=1.30.2


# NB: we can't put comments in the same line as export statements because it
Expand Down
6 changes: 3 additions & 3 deletions src/command/check/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,10 @@ async function checkVersions(conf: CheckConfiguration) {
// file is in an awkward format and it is not packaged
// with our installers
const versionConstraints: [string | undefined, string, string][] = [
[pandocVersion, "3.8.3", "Pandoc"],
[sassVersion, "1.87.0", "Dart Sass"],
[pandocVersion, "3.10", "Pandoc"],
[sassVersion, "1.101.0", "Dart Sass"],
[denoVersion, "2.7.14", "Deno"],
[typstVersion, "0.14.2", "Typst"],
[typstVersion, "0.15.0", "Typst"],
];
const checkData: [string | undefined, string, string][] = versionConstraints
.map(([version, ver, name]) => [
Expand Down
3 changes: 3 additions & 0 deletions src/resources/filters/modules/jog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ local function recurse (element, tp, jogger)
elseif tp == 'pandoc TableHead' or tp == 'pandoc TableFoot' or
tp == 'TableHead' or tp == 'TableFoot' then
element.rows = jogger(element.rows)
elseif tp == 'pandoc TableBody' or tp == 'TableBody' then
element.head = jogger(element.head)
element.body = jogger(element.body)
elseif tp == 'Blocks' or tp == 'Inlines' then
local expected_itemtype = tp == 'Inlines' and 'Inline' or 'Block'
local pos = 0
Expand Down
5 changes: 4 additions & 1 deletion src/resources/filters/modules/mediabag.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ local function write_mediabag_entry(src)
if contents == nil then return nil end

local mediabagDir = param("mediabag-dir", nil)
local mediaFile = pandoc.path.join{mediabagDir, src}
-- Always use forward slashes: this path is assigned to el.src and can flow
-- into writers (e.g. Typst 0.15+) that reject backslash path separators,
-- while forward slashes work fine for the actual file write on Windows too.
local mediaFile = pandoc.path.join{mediabagDir, src}:gsub('\\', '/')

local file = _quarto.file.write(mediaFile, contents)
if not file then
Expand Down
2 changes: 1 addition & 1 deletion src/resources/formats/beamer/pandoc/beamer.template
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ $for(titlegraphic)$
$endfor$}
$endif$
$if(logo)$
\logo{\includegraphics{$logo$}}
\logo{\includegraphics$if(logooptions)$[$for(logooptions)$$logooptions$$sep$, $endfor$]$endif${$logo$}}
$endif$

\begin{document}
Expand Down
6 changes: 5 additions & 1 deletion src/resources/formats/beamer/pandoc/hypersetup.latex
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
% fallback for those not using the hyperref driver hyperxmp:
\makeatletter
\@ifundefined{xmpquote}{\newcommand{\xmpquote}[1]{#1}}{}
\makeatother
\hypersetup{
$if(title-meta)$
pdftitle={$title-meta$},
Expand All @@ -12,7 +16,7 @@ $if(subject)$
pdfsubject={$subject$},
$endif$
$if(keywords)$
pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$},
pdfkeywords={$for(keywords)$\xmpquote{$keywords$}$sep$, $endfor$},
$endif$
$if(colorlinks)$
colorlinks=true,
Expand Down
2 changes: 1 addition & 1 deletion src/resources/formats/beamer/pandoc/title.tex
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
$endfor$}
$endif$
$if(logo)$
\logo{\includegraphics{$logo$}}
\logo{\includegraphics$if(logooptions)$[$for(logooptions)$$logooptions$$sep$, $endfor$]$endif${$logo$}}
$endif$
10 changes: 7 additions & 3 deletions src/resources/formats/html/pandoc/html.styles
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ div.abstract-title {
}
$endif$
code {
white-space: pre-wrap;
font-family: $if(monofont)$$monofont$$else$Menlo, Monaco, Consolas, 'Lucida Console', monospace$endif$;
$if(monobackgroundcolor)$
background-color: $monobackgroundcolor$;
Expand Down Expand Up @@ -183,10 +184,13 @@ header {
text-decoration: none;
}
$endif$
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.columns{display: flex; gap: 1.5em;}
div.column{flex: auto;}
@media screen {
div.columns{gap: min(4vw, 1.5em);}
div.column{overflow-x: auto;}
}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
/* The extra [class] is a hack that increases specificity enough to
override a similar rule in reveal.js */
Expand Down
4 changes: 2 additions & 2 deletions src/resources/formats/html/pandoc/html.template
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="$lang$" xml:lang="$lang$"$if(dir)$ dir="$dir$"$endif$>
<html xmlns="http://www.w3.org/1999/xhtml"$if(lang)$ lang="$lang$" xml:lang="$lang$"$endif$$if(dir)$ dir="$dir$"$endif$>
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="generator" content="pandoc $pandoc-version$" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
$for(author-meta)$
<meta name="author" content="$author-meta$" />
Expand Down
10 changes: 7 additions & 3 deletions src/resources/formats/html/pandoc/styles.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
}
$endif$
code {
white-space: pre-wrap;
font-family: $if(monofont)$$monofont$$else$Menlo, Monaco, Consolas, 'Lucida Console', monospace$endif$;
$if(monobackgroundcolor)$
background-color: $monobackgroundcolor$;
Expand Down Expand Up @@ -190,10 +191,13 @@
text-decoration: none;
}
$endif$
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.columns{display: flex; gap: 1.5em;}
div.column{flex: auto;}
@media screen {
div.columns{gap: min(4vw, 1.5em);}
div.column{overflow-x: auto;}
}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
ul.task-list li input[type="checkbox"] {
Expand Down
2 changes: 1 addition & 1 deletion src/resources/formats/html/pandoc/template.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="$lang$" xml:lang="$lang$"$if(dir)$ dir="$dir$"$endif$>
<html xmlns="http://www.w3.org/1999/xhtml"$if(lang)$ lang="$lang$" xml:lang="$lang$"$endif$$if(dir)$ dir="$dir$"$endif$>

<head>

Expand Down
6 changes: 5 additions & 1 deletion src/resources/formats/pdf/pandoc/hypersetup.latex
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
% fallback for those not using the hyperref driver hyperxmp:
\makeatletter
\@ifundefined{xmpquote}{\newcommand{\xmpquote}[1]{#1}}{}
\makeatother
\hypersetup{
$if(title-meta)$
pdftitle={$title-meta$},
Expand All @@ -12,7 +16,7 @@ $if(subject)$
pdfsubject={$subject$},
$endif$
$if(keywords)$
pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$},
pdfkeywords={$for(keywords)$\xmpquote{$keywords$}$sep$, $endfor$},
$endif$
$if(colorlinks)$
colorlinks=true,
Expand Down
1 change: 1 addition & 0 deletions src/resources/formats/pdf/pandoc/latex.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
$document-metadata.latex()$
$passoptions.latex()$
\documentclass[
$for(babel-otherlangs)$
Expand Down
25 changes: 22 additions & 3 deletions src/resources/formats/revealjs/pandoc/revealjs.template
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ $if(theme)$
$else$
<link rel="stylesheet" href="$revealjs-url$/dist/theme/black.css" id="theme">
$endif$
$if(highlight-js)$
<link rel="stylesheet" href="$revealjs-url$/plugin/highlight/$highlightjs-theme$.css">
$endif$
$for(css)$
<link rel="stylesheet" href="$css$"/>
$endfor$
Expand Down Expand Up @@ -87,6 +90,9 @@ $body$
$if(mathjax)$
<script src="$revealjs-url$/plugin/math/math.js"></script>
$endif$
$if(highlight-js)$
<script src="$revealjs-url$/plugin/highlight/highlight.js"></script>
$endif$

<script>

Expand Down Expand Up @@ -237,13 +243,23 @@ $if(view)$
// Enable scroll view
view: '$view/nowrap$',
// see https://revealjs.com/scroll-view/#scrollbar
$if(scrollProgressAuto)$
scrollProgress: 'auto',
$elseif(scrollProgress)$
scrollProgress: $scrollProgress$,
$else$
scrollProgress: false,
$endif$
// see https://revealjs.com/scroll-view/#url-activation
scrollActivationWidth: '$scrollActivationWidth$',
scrollActivationWidth: $scrollActivationWidth$,
// see https://revealjs.com/scroll-view/#scroll-snapping
scrollSnap: '$scrollSnap$',
$if(scrollSnap)$
scrollSnap: '$scrollSnap/nowrap$',
$else$
scrollSnap: false,
$endif$
// Experimental. see https://revealjs.com/scroll-view/#scroll-snapping
scrollLayout: '$scrollLayout$',
scrollLayout: '$scrollLayout/nowrap$',
$endif$
$if(parallaxBackgroundImage)$

Expand Down Expand Up @@ -320,6 +336,9 @@ $endif$
plugins: [
$if(mathjax)$
RevealMath,
$endif$
$if(highlight-js)$
RevealHighlight,
$endif$
RevealNotes,
RevealSearch,
Expand Down
9 changes: 9 additions & 0 deletions src/resources/formats/revealjs/pandoc/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
$else$
<link rel="stylesheet" href="$revealjs-url$/dist/theme/black.css">
$endif$
$if(highlight-js)$
<link rel="stylesheet" href="$revealjs-url$/plugin/highlight/$highlightjs-theme$.css">
$endif$
$for(css)$
<link rel="stylesheet" href="$css$"/>
$endfor$
Expand Down Expand Up @@ -70,6 +73,9 @@
<script src="$revealjs-url$/plugin/zoom/zoom.js"></script>
$if(mathjax)$
<script src="$revealjs-url$/plugin/math/math.js"></script>
$endif$
$if(highlight-js)$
<script src="$revealjs-url$/plugin/highlight/highlight.js"></script>
$endif$
<script>window.define = window.backupDefine; window.backupDefine = undefined;</script>

Expand Down Expand Up @@ -313,6 +319,9 @@
plugins: [
$if(mathjax)$
RevealMath,
$endif$
$if(highlight-js)$
RevealHighlight,
$endif$
RevealNotes,
RevealSearch,
Expand Down
79 changes: 40 additions & 39 deletions src/resources/formats/typst/pandoc/template.typst
Original file line number Diff line number Diff line change
Expand Up @@ -73,47 +73,48 @@
}
}

block(below: 1em, width: 100%)[
#if title != none {
align(center, block[
#text(weight: "bold", size: 1.5em)[#title #if thanks != none {
footnote(thanks, numbering: "*")
counter(footnote).update(n => n - 1)
}]
#(
if subtitle != none {
parbreak()
text(weight: "bold", size: 1.25em)[#subtitle]
}
)])
}

#if authors != none and authors != [] {
let count = authors.len()
let ncols = calc.min(count, 3)
grid(
columns: (1fr,) * ncols,
row-gutter: 1.5em,
..authors.map(author => align(center)[
#author.name \
#author.affiliation \
#author.email
])
)
}
if title != none {
place(top, float: true, scope: "parent", clearance: 4mm, block(below: 1em, width: 100%)[
#if title != none {
align(center, block[
#text(weight: "bold", size: 1.5em, hyphenate: false)[#title #if thanks != none {
footnote(thanks, numbering: "*")
counter(footnote).update(n => n - 1)
}]
#(
if subtitle != none {
parbreak()
text(weight: "bold", size: 1.25em, hyphenate: false)[#subtitle]
}
)])
}

#if date != none {
align(center)[#block(inset: 1em)[
#date
]]
}
#if authors != none and authors != [] {
let count = authors.len()
let ncols = calc.min(count, 3)
grid(
columns: (1fr,) * ncols,
row-gutter: 1.5em,
..authors.map(author => align(center)[
#author.name \
#author.affiliation \
#author.email
])
)
}

#if abstract != none {
block(inset: 2em)[
#text(weight: "semibold")[#abstract-title] #h(1em) #abstract
]
}
]
#if date != none {
align(center)[#block(inset: 1em)[
#date
]]
}

#if abstract != none {
block(inset: 2em)[
#text(weight: "semibold")[#abstract-title] #h(1em) #abstract
]
}
])
}
doc
}
12 changes: 4 additions & 8 deletions src/resources/formats/typst/pandoc/typst.template
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
#let horizontalrule = line(start: (25%,0%), end: (75%,0%))

#show terms: it => {
it.children
.map(child => [
#strong[#child.term]
#block(inset: (left: 1.5em, top: -0.4em))[#child.description]
])
.join()
}
#show terms.item: it => block(breakable: false)[
#text(weight: "bold")[#it.term]
#block(inset: (left: 1.5em, top: -0.4em))[#it.description]
]

#set table(
inset: 6pt,
Expand Down
10 changes: 10 additions & 0 deletions src/resources/lua-types/pandoc/components.lua
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,16 @@ number of row header columns.
pandoc.TableBody = {}


--[[
Creates a table body
]]
---@param body? pandoc.List List of `Row`
---@param head? pandoc.List Intermediate head (list of `Row`)
---@param row_head_columns? integer Number of columns taken up by the row head of each row of a `TableBody`
---@param attr? pandoc.Attr Table body attributes
---@return pandoc.TableBody
function pandoc.TableBody(body, head, row_head_columns, attr) end

--[[
Make a clone
]]
Expand Down
Loading
Loading