Skip to content

Commit 1a4fe1f

Browse files
committed
Actualize to Pandoc 3.3
1 parent 523f4ef commit 1a4fe1f

File tree

6 files changed

+18
-50
lines changed

6 files changed

+18
-50
lines changed

R/sysdata.rda

-2 Bytes
Binary file not shown.

data-raw/pandoc_options.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sheets <- c("type", "opts", "lua")
66
pandoc_options <- lapply(sheets, \(.x) readxl::read_excel(data_excel, sheet = .x))
77
names(pandoc_options) <- sheets
88

9-
pandoc_req <- "3.2"
9+
pandoc_req <- "3.3"
1010
guri_version <- "1.0.0"
1111

1212
usethis::use_data(pandoc_options, guri_version, pandoc_req,

inst/files-pkg/filters/include-float-in-format.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ local function fig_latex(label, float_attr)
116116

117117
local raw_elem = '\\begin{figure}\n' ..
118118
'\\centering\n' ..
119-
'\\includegraphics[width=0.95\\textwidth]{' .. root .. label .. '}\n' ..
120-
'\\caption{' .. title .. '}\n' ..
119+
'\\pandocbounded{' .. '\\includegraphics[width=0.95\\textwidth,keepaspectratio]{' .. root .. label .. '}' .. '}\n' ..
120+
'\\caption{' .. title .. '}\n' ..
121121
source .. note ..
122122
'\\label{' .. label .. '}\n' ..
123123
'\\end{figure}'

inst/files-pkg/filters/zotero-SuppressAuthor.lua

Lines changed: 0 additions & 30 deletions
This file was deleted.

inst/files-pkg/template/template.html

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,8 @@
3131
$header-includes$
3232
$endfor$
3333
$if(math)$
34-
$if(mathjax)$
35-
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
36-
$endif$
3734
$math$
3835
$endif$
39-
<!--[if lt IE 9]>
40-
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
41-
<![endif]-->
4236
</head>
4337
<body>
4438
$for(include-before)$

inst/files-pkg/template/template.latex

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -219,15 +219,17 @@ $endif$
219219
$if(n_figs)$
220220
\usepackage{graphicx}
221221
\makeatletter
222-
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
223-
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
224-
\makeatother
225-
% Scale images if necessary, so that they will not overflow the page
226-
% margins by default, and it is still possible to overwrite the defaults
227-
% using explicit options in \includegraphics[width, height, ...]{}
228-
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
222+
\newsavebox\pandoc@box
223+
\newcommand*\pandocbounded[1]{% scales image to fit in text height/width
224+
\sbox\pandoc@box{#1}%
225+
\Gscale@div\@tempa{\textheight}{\dimexpr\ht\pandoc@box+\dp\pandoc@box\relax}%
226+
\Gscale@div\@tempb{\linewidth}{\wd\pandoc@box}%
227+
\ifdim\@tempb\p@<\@tempa\p@\let\@tempa\@tempb\fi% select the smaller of both
228+
\ifdim\@tempa\p@<\p@\scalebox{\@tempa}{\usebox\pandoc@box}%
229+
\else\usebox{\pandoc@box}%
230+
\fi%
231+
}
229232
% Set default figure placement to htbp
230-
\makeatletter
231233
\def\fps@figure{htbp}
232234
\makeatother
233235
$endif$
@@ -361,6 +363,11 @@ $endfor$
361363
% get rid of language-specific shorthands (see #6817):
362364
\let\LanguageShortHands\languageshorthands
363365
\def\languageshorthands#1{}
366+
$if(selnolig-langs)$
367+
\ifLuaTeX
368+
\usepackage[$for(selnolig-langs)$$it$$sep$,$endfor$]{selnolig} % disable illegal ligatures
369+
\fi
370+
$endif$
364371
$endif$
365372

366373
$for(header-includes)$
@@ -371,9 +378,6 @@ $endfor$
371378
${custom_journal.sty()}
372379
%%% CUSTOM JOURNAL (END)
373380

374-
\ifLuaTeX
375-
\usepackage{selnolig} % disable illegal ligatures
376-
\fi
377381
$if(dir)$
378382
\ifPDFTeX
379383
\TeXXeTstate=1

0 commit comments

Comments
 (0)