File tree Expand file tree Collapse file tree 5 files changed +65
-5
lines changed
rmarkdown/templates/rjournal/skeleton Expand file tree Collapse file tree 5 files changed +65
-5
lines changed Original file line number Diff line number Diff line change 1212% should be specified in RJwrapper.tex
1313
1414\NeedsTeXFormat {LaTeX2e}[1995/12/01]
15- \ProvidesPackage {RJournal}[2025/05/07 v0.15 RJournal package]
15+ \ProvidesPackage {RJournal}[2025/07/15 v0.16 RJournal package]
1616
1717\RequirePackage {tikz}
1818
313313
314314% Figures ----------------------------------------------------------------------
315315
316+ % For use with pandoc > 3.2.1
317+ \newsavebox\pandoc@box
318+ \newcommand *\pandocbounded [1]{% scales image to fit in text height/width
319+ \sbox\pandoc@box {#1}%
320+ \Gscale@div\@tempa {\textheight }{\dimexpr\ht\pandoc@box +\dp\pandoc@box\relax }%
321+ \Gscale@div\@tempb {\linewidth }{\wd\pandoc@box }%
322+ \ifdim \@tempb\p@ <\@tempa\p@\let\@tempa\@tempb \fi % select the smaller of both
323+ \ifdim \@tempa\p@ <\p@\scalebox {\@tempa }{\usebox\pandoc@box }%
324+ \else \usebox {\pandoc@box }%
325+ \fi %
326+ }
327+
316328\RequirePackage [font=small,labelfont=bf]{caption}
317329
318330% Wide environments for figures and tables -------------------------------------
Original file line number Diff line number Diff line change 1212% should be specified in RJwrapper.tex
1313
1414\NeedsTeXFormat {LaTeX2e}[1995/12/01]
15- \ProvidesPackage {RJournal}[2025/05/07 v0.15 RJournal package]
15+ \ProvidesPackage {RJournal}[2025/07/15 v0.16 RJournal package]
1616
1717\RequirePackage {tikz}
1818
313313
314314% Figures ----------------------------------------------------------------------
315315
316+ % For use with pandoc > 3.2.1
317+ \newsavebox\pandoc@box
318+ \newcommand *\pandocbounded [1]{% scales image to fit in text height/width
319+ \sbox\pandoc@box {#1}%
320+ \Gscale@div\@tempa {\textheight }{\dimexpr\ht\pandoc@box +\dp\pandoc@box\relax }%
321+ \Gscale@div\@tempb {\linewidth }{\wd\pandoc@box }%
322+ \ifdim \@tempb\p@ <\@tempa\p@\let\@tempa\@tempb \fi % select the smaller of both
323+ \ifdim \@tempa\p@ <\p@\scalebox {\@tempa }{\usebox\pandoc@box }%
324+ \else \usebox {\pandoc@box }%
325+ \fi %
326+ }
327+
316328\RequirePackage [font=small,labelfont=bf]{caption}
317329
318330% Wide environments for figures and tables -------------------------------------
Original file line number Diff line number Diff line change 1212% should be specified in RJwrapper.tex
1313
1414\NeedsTeXFormat {LaTeX2e}[1995/12/01]
15- \ProvidesPackage {RJournal}[2025/05/07 v0.15 RJournal package]
15+ \ProvidesPackage {RJournal}[2025/07/15 v0.16 RJournal package]
1616
1717\RequirePackage {tikz}
1818
313313
314314% Figures ----------------------------------------------------------------------
315315
316+ % For use with pandoc > 3.2.1
317+ \newsavebox\pandoc@box
318+ \newcommand *\pandocbounded [1]{% scales image to fit in text height/width
319+ \sbox\pandoc@box {#1}%
320+ \Gscale@div\@tempa {\textheight }{\dimexpr\ht\pandoc@box +\dp\pandoc@box\relax }%
321+ \Gscale@div\@tempb {\linewidth }{\wd\pandoc@box }%
322+ \ifdim \@tempb\p@ <\@tempa\p@\let\@tempa\@tempb \fi % select the smaller of both
323+ \ifdim \@tempa\p@ <\p@\scalebox {\@tempa }{\usebox\pandoc@box }%
324+ \else \usebox {\pandoc@box }%
325+ \fi %
326+ }
327+
316328\RequirePackage [font=small,labelfont=bf]{caption}
317329
318330% Wide environments for figures and tables -------------------------------------
Original file line number Diff line number Diff line change 1212% should be specified in RJwrapper.tex
1313
1414\NeedsTeXFormat {LaTeX2e}[1995/12/01]
15- \ProvidesPackage {RJournal}[2025/05/07 v0.15 RJournal package]
15+ \ProvidesPackage {RJournal}[2025/07/15 v0.16 RJournal package]
1616
1717\RequirePackage {tikz}
1818
313313
314314% Figures ----------------------------------------------------------------------
315315
316+ % For use with pandoc > 3.2.1
317+ \newsavebox\pandoc@box
318+ \newcommand *\pandocbounded [1]{% scales image to fit in text height/width
319+ \sbox\pandoc@box {#1}%
320+ \Gscale@div\@tempa {\textheight }{\dimexpr\ht\pandoc@box +\dp\pandoc@box\relax }%
321+ \Gscale@div\@tempb {\linewidth }{\wd\pandoc@box }%
322+ \ifdim \@tempb\p@ <\@tempa\p@\let\@tempa\@tempb \fi % select the smaller of both
323+ \ifdim \@tempa\p@ <\p@\scalebox {\@tempa }{\usebox\pandoc@box }%
324+ \else \usebox {\pandoc@box }%
325+ \fi %
326+ }
327+
316328\RequirePackage [font=small,labelfont=bf]{caption}
317329
318330% Wide environments for figures and tables -------------------------------------
Original file line number Diff line number Diff line change 1212% should be specified in RJwrapper.tex
1313
1414\NeedsTeXFormat {LaTeX2e}[1995/12/01]
15- \ProvidesPackage {RJournal}[2025/05/07 v0.15 RJournal package]
15+ \ProvidesPackage {RJournal}[2025/07/15 v0.16 RJournal package]
1616
1717\RequirePackage {tikz}
1818
313313
314314% Figures ----------------------------------------------------------------------
315315
316+ % For use with pandoc > 3.2.1
317+ \newsavebox\pandoc@box
318+ \newcommand *\pandocbounded [1]{% scales image to fit in text height/width
319+ \sbox\pandoc@box {#1}%
320+ \Gscale@div\@tempa {\textheight }{\dimexpr\ht\pandoc@box +\dp\pandoc@box\relax }%
321+ \Gscale@div\@tempb {\linewidth }{\wd\pandoc@box }%
322+ \ifdim \@tempb\p@ <\@tempa\p@\let\@tempa\@tempb \fi % select the smaller of both
323+ \ifdim \@tempa\p@ <\p@\scalebox {\@tempa }{\usebox\pandoc@box }%
324+ \else \usebox {\pandoc@box }%
325+ \fi %
326+ }
327+
316328\RequirePackage [font=small,labelfont=bf]{caption}
317329
318330% Wide environments for figures and tables -------------------------------------
You can’t perform that action at this time.
0 commit comments