From 24dab8e06ec3cdc66a6b6db0ebe17a586c2c67f6 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 17 Jul 2013 15:05:45 -0700 Subject: LaTeX/Beamer templates: Add classoption variable. This is intended for class options like `oneside`; it may be repeated with different options. --- default.beamer | 2 +- default.latex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/default.beamer b/default.beamer index 63dfdae5e..198be4b47 100644 --- a/default.beamer +++ b/default.beamer @@ -1,4 +1,4 @@ -\documentclass[$if(fontsize)$$fontsize$,$endif$$if(handout)$handout,$endif$$if(beamer)$ignorenonframetext,$endif$]{$documentclass$} +\documentclass[$if(fontsize)$$fontsize$,$endif$$if(handout)$handout,$endif$$if(beamer)$ignorenonframetext,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} $if(theme)$ \usetheme{$theme$} $endif$ diff --git a/default.latex b/default.latex index c188d49b2..32b77cbb9 100644 --- a/default.latex +++ b/default.latex @@ -1,4 +1,4 @@ -\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$lang$,$endif$$if(papersize)$$papersize$,$endif$]{$documentclass$} +\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$lang$,$endif$$if(papersize)$$papersize$,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{amssymb,amsmath} -- cgit v1.2.3 From 120bed772b4a235a0d17ea4560a682e23ac293ac Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 20 Jul 2013 10:51:18 -0700 Subject: LaTeX template: Added `biblio-style` variable. --- default.latex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/default.latex b/default.latex index 32b77cbb9..33df81e70 100644 --- a/default.latex +++ b/default.latex @@ -40,7 +40,7 @@ $if(geometry)$ $endif$ $if(natbib)$ \usepackage{natbib} -\bibliographystyle{plainnat} +\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} $endif$ $if(biblatex)$ \usepackage{biblatex} -- cgit v1.2.3 From 3eeb82fa9c9d052b755e1ffcf34b898fec3ddad8 Mon Sep 17 00:00:00 2001 From: Luis Osa Date: Mon, 5 Aug 2013 22:23:49 +0200 Subject: default.beamer: Add font theme option Add font theme option to choose one of the sets of structural fonts that come predefined with Beamer. --- default.beamer | 3 +++ 1 file changed, 3 insertions(+) diff --git a/default.beamer b/default.beamer index 198be4b47..eb4ac8754 100644 --- a/default.beamer +++ b/default.beamer @@ -5,6 +5,9 @@ $endif$ $if(colortheme)$ \usecolortheme{$colortheme$} $endif$ +$if(fonttheme)$ +\usefonttheme{$fonttheme$} +$endif$ \usepackage{amssymb,amsmath} \usepackage{ifxetex,ifluatex} \usepackage{fixltx2e} % provides \textsubscript -- cgit v1.2.3 From 0cb55f2289148b106ab78ce8f15efc8d0b8acda0 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 11 Aug 2013 17:06:48 -0700 Subject: opendocument template: fixed office:version. --- default.opendocument | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/default.opendocument b/default.opendocument index 4135cdea7..d659c4913 100644 --- a/default.opendocument +++ b/default.opendocument @@ -1,9 +1,9 @@ - + $automatic-styles$ $for(header-includes)$ $header-includes$ -$endfor$ +$endfor$ $if(title)$ -- cgit v1.2.3 From 7522c43bf723126e41168553ee67b86aaa8843ac Mon Sep 17 00:00:00 2001 From: Erik Evenson Date: Sat, 7 Sep 2013 22:03:36 -0500 Subject: Adds meta tag to allow scaling by the user. This makes things friendlier for smaller screen sizes. --- default.html5 | 1 + 1 file changed, 1 insertion(+) diff --git a/default.html5 b/default.html5 index 365ad0681..14bff6286 100644 --- a/default.html5 +++ b/default.html5 @@ -3,6 +3,7 @@ + $for(author-meta)$ $endfor$ -- cgit v1.2.3 From 605a8d351ef583865e83762a2c6283aacaa8d940 Mon Sep 17 00:00:00 2001 From: Václav Zeman Date: Wed, 25 Sep 2013 01:13:38 +0200 Subject: default.opendocument: Add $font-face-decls$ field. --- default.opendocument | 1 + 1 file changed, 1 insertion(+) diff --git a/default.opendocument b/default.opendocument index d659c4913..609c58762 100644 --- a/default.opendocument +++ b/default.opendocument @@ -1,5 +1,6 @@ + $font-face-decls$ $automatic-styles$ $for(header-includes)$ $header-includes$ -- cgit v1.2.3 From 0bb5f9ba204ea242e361c264f019490ead1cf313 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 24 Sep 2013 18:40:52 -0700 Subject: opendocument: Replaced fontface variable with actual declaration. --- default.opendocument | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/default.opendocument b/default.opendocument index 609c58762..afed83b76 100644 --- a/default.opendocument +++ b/default.opendocument @@ -1,6 +1,8 @@ - $font-face-decls$ + + + $automatic-styles$ $for(header-includes)$ $header-includes$ -- cgit v1.2.3 From 4bdebc73b0b2025cf01704e7e564088c34d8f86c Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 21 Oct 2013 14:29:08 -0700 Subject: Beamer template: put slide around bibliography with natbib or biblatex. --- default.beamer | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/default.beamer b/default.beamer index eb4ac8754..da081fae6 100644 --- a/default.beamer +++ b/default.beamer @@ -152,12 +152,16 @@ $else$ \renewcommand\refname{$biblio-title$} $endif$ $endif$ +\begin{frame}[allowframebreaks]{$biblio-title$} \bibliography{$biblio-files$} +\end{frame} $endif$ $endif$ $if(biblatex)$ -\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ +\begin{frame}[allowframebreaks]{$biblio-title$} +\printbibliography[heading=none] +\end{frame} $endif$ $for(include-after)$ -- cgit v1.2.3 From 6db8eff46ab97a133ed2b17e21455de8b9d4447d Mon Sep 17 00:00:00 2001 From: aaronwolen Date: Wed, 23 Oct 2013 20:50:33 -0400 Subject: Beamer template: Consistent styles for figure and table captions --- default.beamer | 3 +++ 1 file changed, 3 insertions(+) diff --git a/default.beamer b/default.beamer index da081fae6..ba61f124b 100644 --- a/default.beamer +++ b/default.beamer @@ -8,6 +8,9 @@ $endif$ $if(fonttheme)$ \usefonttheme{$fonttheme$} $endif$ +\setbeamertemplate{caption}[numbered] +\setbeamertemplate{caption label separator}{:} +\setbeamercolor{caption name}{fg=normal text.fg} \usepackage{amssymb,amsmath} \usepackage{ifxetex,ifluatex} \usepackage{fixltx2e} % provides \textsubscript -- cgit v1.2.3 From 8cadd4f2044c0c25842eeb5a2370a6e3384f4bd4 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 22 Nov 2013 19:50:26 -0800 Subject: ConTeXt template: setup captions with no numbering. See pandoc #1067. --- default.context | 2 ++ 1 file changed, 2 insertions(+) diff --git a/default.context b/default.context index 18c8429f3..03d260921 100644 --- a/default.context +++ b/default.context @@ -36,6 +36,8 @@ $endif$ \setupitemize[autointro] % prevent orphan list intro \setupitemize[indentnext=no] +\setupcaption[figure][number=no] % don't number figures + \setupthinrules[width=15em] % width of horizontal rules \setupdelimitedtext -- cgit v1.2.3 From 713a8f63d5589ab9313869e47b03cf7f49e00e98 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 30 Nov 2013 16:15:53 -0800 Subject: ConTeXt template: Setup up defaults for floats. This allows the user to adjust the figure and table placement and numbering globally. --- default.context | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/default.context b/default.context index 03d260921..6a4be1ed5 100644 --- a/default.context +++ b/default.context @@ -36,7 +36,8 @@ $endif$ \setupitemize[autointro] % prevent orphan list intro \setupitemize[indentnext=no] -\setupcaption[figure][number=no] % don't number figures +\setupfloat[figure][default={here,nonumber}] +\setupfloat[table][default={here,nonumber}] \setupthinrules[width=15em] % width of horizontal rules -- cgit v1.2.3 From f643a076d8c2b0b21391fd6aa1dedb2dd84c7e63 Mon Sep 17 00:00:00 2001 From: Jose Luis Duran Date: Mon, 2 Dec 2013 09:22:14 +0000 Subject: LaTeX template: Add booktabs package --- default.latex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/default.latex b/default.latex index 33df81e70..cfa3460f7 100644 --- a/default.latex +++ b/default.latex @@ -61,7 +61,7 @@ $if(verbatim-in-note)$ \usepackage{fancyvrb} $endif$ $if(tables)$ -\usepackage{longtable} +\usepackage{longtable,booktabs} $endif$ $if(graphics)$ \usepackage{graphicx} -- cgit v1.2.3 From ccdf08caeaed0b1d0abf12842ec97201985ad0e5 Mon Sep 17 00:00:00 2001 From: Kevin Date: Mon, 9 Dec 2013 18:40:44 +0000 Subject: Beamer template: add booktabs package --- default.beamer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/default.beamer b/default.beamer index da081fae6..4aaf50959 100644 --- a/default.beamer +++ b/default.beamer @@ -45,7 +45,7 @@ $if(verbatim-in-note)$ \usepackage{fancyvrb} $endif$ $if(tables)$ -\usepackage{longtable} +\usepackage{longtable,booktabs} % These lines are needed to make table captions work with longtable: \makeatletter \def\fnum@table{\tablename~\thetable} -- cgit v1.2.3 From dd178889f642f47fc74aaeeb1d8368f32a7cc258 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 11 Dec 2013 22:05:20 -0800 Subject: Added abstract variable in latex template. --- default.latex | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/default.latex b/default.latex index cfa3460f7..e9be55382 100644 --- a/default.latex +++ b/default.latex @@ -146,6 +146,11 @@ $endif$ $if(title)$ \maketitle $endif$ +$if(abstract)$ +\begin{abstract} +$abstract$ +\end{abstract} +$endif$ $for(include-before)$ $include-before$ -- cgit v1.2.3 From dd1d6374208359e2e2b4e2da2aafced917a172c9 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 11 Dec 2013 22:34:57 -0800 Subject: latex template: Put header includes after title. Closes pandoc#908. --- default.latex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/default.latex b/default.latex index e9be55382..6bb70bc4b 100644 --- a/default.latex +++ b/default.latex @@ -129,9 +129,6 @@ $if(lang)$ \usepackage[$lang$]{babel} \fi $endif$ -$for(header-includes)$ -$header-includes$ -$endfor$ $if(title)$ \title{$title$} @@ -141,6 +138,9 @@ $if(subtitle)$ $endif$ \author{$for(author)$$author$$sep$ \and $endfor$} \date{$date$} +$for(header-includes)$ +$header-includes$ +$endfor$ \begin{document} $if(title)$ -- cgit v1.2.3 From c1f20a285a3ef1a0ba9b342b31856e0045f305c8 Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 13 Dec 2013 11:06:31 +0000 Subject: Fixing default.beamer includegraphics redefinition to allow custom options --- default.beamer | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/default.beamer b/default.beamer index 4aaf50959..d57e19711 100644 --- a/default.beamer +++ b/default.beamer @@ -70,7 +70,10 @@ $if(graphics)$ } \makeatother \let\Oldincludegraphics\includegraphics -\renewcommand{\includegraphics}[2][]{\Oldincludegraphics[width=\ScaleIfNeeded]{#2}} +{% + \catcode`\@=11\relax% + \gdef\includegraphics{\@ifnextchar[{\Oldincludegraphics}{\Oldincludegraphics[width=\ScaleIfNeeded]}}% +}% $endif$ % Comment these out if you don't want a slide with just the -- cgit v1.2.3 From cf4e5f4520fa714fdd574478e918bfc68b3e0861 Mon Sep 17 00:00:00 2001 From: Alexander Belyaev Date: Wed, 12 Feb 2014 01:59:25 +0400 Subject: Moved $include-after$ to the closing See https://groups.google.com/forum/#!topic/pandoc-discuss/Fbfh8IIcVds --- default.revealjs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/default.revealjs b/default.revealjs index 4b90071b3..51962e30d 100644 --- a/default.revealjs +++ b/default.revealjs @@ -66,9 +66,7 @@ $endif$ $body$ -$for(include-after)$ -$include-after$ -$endfor$ + @@ -94,5 +92,8 @@ $endfor$ // { src: '$revealjs-url$/plugin/remotes/remotes.js', async: true, condition: function() { return !!document.body.classList; } } ]}); + $for(include-after)$ + $include-after$ + $endfor$ -- cgit v1.2.3 From 3a0ed995ca45648029a445302a16a92b8dfe6c86 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 20 Feb 2014 09:36:20 -0800 Subject: default.latex: include fontenc only if pdflatex engine is used. See pandoc #1164. --- default.latex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/default.latex b/default.latex index 6bb70bc4b..3f833f5fd 100644 --- a/default.latex +++ b/default.latex @@ -1,5 +1,4 @@ \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$lang$,$endif$$if(papersize)$$papersize$,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} -\usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{amssymb,amsmath} \usepackage{ifxetex,ifluatex} @@ -7,6 +6,7 @@ % use upquote if available, for straight quotes in verbatim environments \IfFileExists{upquote.sty}{\usepackage{upquote}}{} \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} $if(euro)$ \usepackage{eurosym} -- cgit v1.2.3 From 088fccaedafe1ffd8ecb65a75ff6822e73886719 Mon Sep 17 00:00:00 2001 From: KarolS Date: Wed, 26 Feb 2014 21:51:29 +0100 Subject: Backported changes from default.latex to default.beamer in order to improve Unicode support --- default.beamer | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/default.beamer b/default.beamer index d57e19711..f718413d4 100644 --- a/default.beamer +++ b/default.beamer @@ -11,17 +11,27 @@ $endif$ \usepackage{amssymb,amsmath} \usepackage{ifxetex,ifluatex} \usepackage{fixltx2e} % provides \textsubscript +\IfFileExists{upquote.sty}{\usepackage{upquote}}{} +\usepackage{lmodern} \ifxetex \usepackage{fontspec,xltxtra,xunicode} \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase} + \newcommand{\euro}{€} \else \ifluatex \usepackage{fontspec} \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase} + \newcommand{\euro}{€} \else + \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} + $if(euro)$ + \usepackage{eurosym} + $endif$ \fi \fi +% use microtype if available +\IfFileExists{microtype.sty}{\usepackage{microtype}}{} $if(natbib)$ \usepackage{natbib} \bibliographystyle{plainnat} -- cgit v1.2.3 From 7e808534ad30a1fe26e92534c6d92f635aeea9be Mon Sep 17 00:00:00 2001 From: mb21 Date: Sun, 1 Dec 2013 21:17:00 +0100 Subject: InDesign ICML template --- default.icml | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 default.icml diff --git a/default.icml b/default.icml new file mode 100644 index 000000000..81c2a142a --- /dev/null +++ b/default.icml @@ -0,0 +1,43 @@ + + + + + + + $charStyles$ + + + + + + + LeftAlign + . + + 10 + + + + + $parStyles$ + + + + + + + + + + + +$body$ + + + $hyperlinks$ + -- cgit v1.2.3 From 7de81bf0a5805c4a6c9d9e51481ddd452d40b1d8 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 4 Apr 2014 13:13:09 -0700 Subject: Added caption package to beamer template. Closes #1200. --- default.beamer | 1 + 1 file changed, 1 insertion(+) diff --git a/default.beamer b/default.beamer index f718413d4..b220a43b9 100644 --- a/default.beamer +++ b/default.beamer @@ -56,6 +56,7 @@ $if(verbatim-in-note)$ $endif$ $if(tables)$ \usepackage{longtable,booktabs} +\usepackage{caption} % These lines are needed to make table captions work with longtable: \makeatletter \def\fnum@table{\tablename~\thetable} -- cgit v1.2.3 From 44723bcc95a35d1e7958daab05921f3ac7e77ee2 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 4 Apr 2014 21:42:16 -0700 Subject: DocBook template: Use authorgroup. --- default.docbook | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/default.docbook b/default.docbook index 82f5f5ffb..5313c4083 100644 --- a/default.docbook +++ b/default.docbook @@ -9,11 +9,15 @@ $endif$
$title$ +$if(author)$ + $for(author)$ - - $author$ - + + $author$ + $endfor$ + +$endif$ $if(date)$ $date$ $endif$ -- cgit v1.2.3 From 79806d4417d02646158dcbdcc3686255098c9e3f Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 5 Apr 2014 15:23:36 -0700 Subject: reveal.js template: Fix PDF print function. See pandoc issue #1220. --- default.revealjs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/default.revealjs b/default.revealjs index 51962e30d..69bccac8d 100644 --- a/default.revealjs +++ b/default.revealjs @@ -27,10 +27,19 @@ $endfor$ $else$ $endif$ - - + + + $if(math)$ $math$ $endif$ -- cgit v1.2.3 From b8ae07eb09b921beec11d67ea35b4f79941fdd09 Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Wed, 9 Apr 2014 23:59:16 -0400 Subject: Fix issue #52: set max width and height of images in default.beamer --- default.beamer | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/default.beamer b/default.beamer index b220a43b9..0806e362f 100644 --- a/default.beamer +++ b/default.beamer @@ -66,25 +66,16 @@ $if(url)$ \usepackage{url} $endif$ $if(graphics)$ -\usepackage{graphicx} -% Redefine \includegraphics so that, unless explicit options are -% given, the image width will not exceed the width of the page. -% Images get their normal width if they fit onto the page, but -% are scaled down if they would overflow the margins. +\usepackage{letltxmacro} \makeatletter -\def\ScaleIfNeeded{% - \ifdim\Gin@nat@width>\linewidth - \linewidth - \else - \Gin@nat@width - \fi -} +\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} +\def\maxheight{\ifdim\Gin@nat@height>\textheight0.8\textheight\else\Gin@nat@height\fi} \makeatother -\let\Oldincludegraphics\includegraphics -{% - \catcode`\@=11\relax% - \gdef\includegraphics{\@ifnextchar[{\Oldincludegraphics}{\Oldincludegraphics[width=\ScaleIfNeeded]}}% -}% +\AtBeginDocument{ + \LetLtxMacro\Oldincludegraphics\includegraphics + \renewcommand{\includegraphics}[2][]{% + \Oldincludegraphics[#1,width=\maxwidth,height=\maxheight,keepaspectratio]{#2}} +} $endif$ % Comment these out if you don't want a slide with just the -- cgit v1.2.3 From 5f8d7968fe7c3d8da3363b7e3ff1a11914c081ae Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 11 Apr 2014 11:08:10 -0700 Subject: LaTeX template: Allow bibliography to be used in place of biblio-files. Closes #43. Thanks to nougad. --- default.latex | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/default.latex b/default.latex index 3f833f5fd..88c2bf693 100644 --- a/default.latex +++ b/default.latex @@ -47,6 +47,9 @@ $if(biblatex)$ $if(biblio-files)$ \bibliography{$biblio-files$} $endif$ +$if(bibliography)$ +\bibliography{$bibliography$} +$endif$ $endif$ $if(listings)$ \usepackage{listings} @@ -166,7 +169,6 @@ $endif$ $body$ $if(natbib)$ -$if(biblio-files)$ $if(biblio-title)$ $if(book-class)$ \renewcommand\bibname{$biblio-title$} @@ -174,8 +176,11 @@ $else$ \renewcommand\refname{$biblio-title$} $endif$ $endif$ +$if(biblio-files)$ \bibliography{$biblio-files$} - +$endif$ +$if(bibliography)$ +\bibliography($bibliography$} $endif$ $endif$ $if(biblatex)$ -- cgit v1.2.3 From 2afb0792ba411006f51cd078fb7c409f0df19dbb Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 11 Apr 2014 11:10:46 -0700 Subject: Revert "LaTeX template: Allow bibliography to be used in place of biblio-files." This reverts commit 5f8d7968fe7c3d8da3363b7e3ff1a11914c081ae. I'll use a different approach, setting the biblio-files variable in the LaTeX writer. This will also work for beamer. See #42. --- default.latex | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/default.latex b/default.latex index 88c2bf693..3f833f5fd 100644 --- a/default.latex +++ b/default.latex @@ -47,9 +47,6 @@ $if(biblatex)$ $if(biblio-files)$ \bibliography{$biblio-files$} $endif$ -$if(bibliography)$ -\bibliography{$bibliography$} -$endif$ $endif$ $if(listings)$ \usepackage{listings} @@ -169,6 +166,7 @@ $endif$ $body$ $if(natbib)$ +$if(biblio-files)$ $if(biblio-title)$ $if(book-class)$ \renewcommand\bibname{$biblio-title$} @@ -176,11 +174,8 @@ $else$ \renewcommand\refname{$biblio-title$} $endif$ $endif$ -$if(biblio-files)$ \bibliography{$biblio-files$} -$endif$ -$if(bibliography)$ -\bibliography($bibliography$} + $endif$ $endif$ $if(biblatex)$ -- cgit v1.2.3 From a3cce8d3594fd5da7a83c9926e39eb3ec210b83b Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Fri, 11 Apr 2014 17:22:45 -0500 Subject: Use \setkeys{Gin}{} to set appropriate defaults for \includegraphics, instead of entirely redefining this command. Note we also consider the height of images; if an image is too high, 0.8\textheight will be used for beamer slides, and \textheight is used for articles (see http://tex.stackexchange.com/q/11954/9128). If the user has explicitly provided the width/height options in \includegraphics[], our defaults will be overwritten, and this approach is better than the check `\@ifnextchar[` after \includegraphics because the latter approach simply gives up everything once it sees [, whereas \setkeys{Gin} can keep the good defaults unless they are explicitly overwritten in []. closes #30, closes #28, and closes #26 --- default.beamer | 11 +++++------ default.latex | 22 ++++++---------------- 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/default.beamer b/default.beamer index 102772aea..3291bb3f2 100644 --- a/default.beamer +++ b/default.beamer @@ -69,16 +69,15 @@ $if(url)$ \usepackage{url} $endif$ $if(graphics)$ -\usepackage{letltxmacro} +\usepackage{graphicx} \makeatletter \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} \def\maxheight{\ifdim\Gin@nat@height>\textheight0.8\textheight\else\Gin@nat@height\fi} \makeatother -\AtBeginDocument{ - \LetLtxMacro\Oldincludegraphics\includegraphics - \renewcommand{\includegraphics}[2][]{% - \Oldincludegraphics[#1,width=\maxwidth,height=\maxheight,keepaspectratio]{#2}} -} +% Scale images if necessary, so that they will not overflow the page +% margins by default, and it is still possible to overwrite the defaults +% using explicit options in \includegraphics[width, height, ...]{} +\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} $endif$ % Comment these out if you don't want a slide with just the diff --git a/default.latex b/default.latex index 3f833f5fd..f1b1d19b4 100644 --- a/default.latex +++ b/default.latex @@ -65,24 +65,14 @@ $if(tables)$ $endif$ $if(graphics)$ \usepackage{graphicx} -% Redefine \includegraphics so that, unless explicit options are -% given, the image width will not exceed the width of the page. -% Images get their normal width if they fit onto the page, but -% are scaled down if they would overflow the margins. \makeatletter -\def\ScaleIfNeeded{% - \ifdim\Gin@nat@width>\linewidth - \linewidth - \else - \Gin@nat@width - \fi -} +\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} +\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} \makeatother -\let\Oldincludegraphics\includegraphics -{% - \catcode`\@=11\relax% - \gdef\includegraphics{\@ifnextchar[{\Oldincludegraphics}{\Oldincludegraphics[width=\ScaleIfNeeded]}}% -}% +% Scale images if necessary, so that they will not overflow the page +% margins by default, and it is still possible to overwrite the defaults +% using explicit options in \includegraphics[width, height, ...]{} +\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} $endif$ \ifxetex \usepackage[setpagesize=false, % page size defined by xetex -- cgit v1.2.3 From 032af5eceed4cf832ced3348bd0b9013da4120a6 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Tue, 6 May 2014 00:21:02 -0700 Subject: upquote must be used after fontenc otherwise single quotes in verbatim environments will be in trouble; see an example at http://stackoverflow.com/a/12852815/559676 --- default.beamer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/default.beamer b/default.beamer index 3291bb3f2..9775b332b 100644 --- a/default.beamer +++ b/default.beamer @@ -14,7 +14,6 @@ $endif$ \usepackage{amssymb,amsmath} \usepackage{ifxetex,ifluatex} \usepackage{fixltx2e} % provides \textsubscript -\IfFileExists{upquote.sty}{\usepackage{upquote}}{} \usepackage{lmodern} \ifxetex \usepackage{fontspec,xltxtra,xunicode} @@ -33,6 +32,7 @@ $endif$ $endif$ \fi \fi +\IfFileExists{upquote.sty}{\usepackage{upquote}}{} % use microtype if available \IfFileExists{microtype.sty}{\usepackage{microtype}}{} $if(natbib)$ -- cgit v1.2.3 From 5de411030bfcf0b369d10ff084caaad8b37ccfd6 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 6 May 2014 09:05:46 -0700 Subject: Load upquote after fontenc in latex template. --- default.beamer | 1 + default.latex | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/default.beamer b/default.beamer index 9775b332b..3aa3c5963 100644 --- a/default.beamer +++ b/default.beamer @@ -32,6 +32,7 @@ $endif$ $endif$ \fi \fi +% use upquote if available, for straight quotes in verbatim environments \IfFileExists{upquote.sty}{\usepackage{upquote}}{} % use microtype if available \IfFileExists{microtype.sty}{\usepackage{microtype}}{} diff --git a/default.latex b/default.latex index f1b1d19b4..5cfd7620c 100644 --- a/default.latex +++ b/default.latex @@ -3,8 +3,6 @@ \usepackage{amssymb,amsmath} \usepackage{ifxetex,ifluatex} \usepackage{fixltx2e} % provides \textsubscript -% use upquote if available, for straight quotes in verbatim environments -\IfFileExists{upquote.sty}{\usepackage{upquote}}{} \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} @@ -33,6 +31,8 @@ $if(mathfont)$ \setmathfont(Digits,Latin,Greek){$mathfont$} $endif$ \fi +% use upquote if available, for straight quotes in verbatim environments +\IfFileExists{upquote.sty}{\usepackage{upquote}}{} % use microtype if available \IfFileExists{microtype.sty}{\usepackage{microtype}}{} $if(geometry)$ -- cgit v1.2.3 From fc5229df167aa61cdbcf14ce24581b36bb0a5b90 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 6 May 2014 09:48:18 -0700 Subject: latex template: conditionalize author and date. Thanks to ivoanjo for the patch. Closes #61. --- default.latex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/default.latex b/default.latex index 5cfd7620c..0364eea45 100644 --- a/default.latex +++ b/default.latex @@ -126,8 +126,12 @@ $endif$ $if(subtitle)$ \subtitle{$subtitle$} $endif$ +$if(author)$ \author{$for(author)$$author$$sep$ \and $endfor$} +$endif$ +$if(date)$ \date{$date$} +$endif$ $for(header-includes)$ $header-includes$ $endfor$ -- cgit v1.2.3 From 04e59d4df89bedfecea159efdf34cc2e6d56a409 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 6 May 2014 09:54:00 -0700 Subject: latex template: Added fontfamily variable. Thanks to tlvince for the patch. Closes #50. --- default.latex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/default.latex b/default.latex index 0364eea45..db73b59a5 100644 --- a/default.latex +++ b/default.latex @@ -1,5 +1,9 @@ \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$lang$,$endif$$if(papersize)$$papersize$,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} +$if(fontfamily)$ +\usepackage{$fontfamily$} +$else$ \usepackage{lmodern} +$endif$ \usepackage{amssymb,amsmath} \usepackage{ifxetex,ifluatex} \usepackage{fixltx2e} % provides \textsubscript -- cgit v1.2.3 From 620e8fe5e1ed1a1a4a2243587f3063ccfe745673 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 6 May 2014 10:16:09 -0700 Subject: latex template: Added linestretch variable that loads setspace. --- default.latex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/default.latex b/default.latex index db73b59a5..81bbdf348 100644 --- a/default.latex +++ b/default.latex @@ -4,6 +4,10 @@ $if(fontfamily)$ $else$ \usepackage{lmodern} $endif$ +$if(linestretch)$ +\usepackage{setspace} +\setstretch{$linestretch$} +$endif$ \usepackage{amssymb,amsmath} \usepackage{ifxetex,ifluatex} \usepackage{fixltx2e} % provides \textsubscript -- cgit v1.2.3 From 9f1636367e28deaa949c4377eaea2acdc13a148f Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 1 Jun 2014 15:26:23 -0700 Subject: LaTeX/Beamer templates: Remove conditionalization around date. This restores the old behavior, where no date was printed if no date was specified. If the `\date` command is removed entirely, standard document classes will print today's date. Closes #1321. Partially reverts fc5229df167aa61cdbcf14ce24581b36bb0a5b90. See #61. --- default.beamer | 2 -- default.latex | 2 -- 2 files changed, 4 deletions(-) diff --git a/default.beamer b/default.beamer index 3aa3c5963..58f8b7361 100644 --- a/default.beamer +++ b/default.beamer @@ -130,9 +130,7 @@ $endif$ $if(author)$ \author{$for(author)$$author$$sep$ \and $endfor$} $endif$ -$if(date)$ \date{$date$} -$endif$ \begin{document} $if(title)$ diff --git a/default.latex b/default.latex index 81bbdf348..6f6486a3d 100644 --- a/default.latex +++ b/default.latex @@ -137,9 +137,7 @@ $endif$ $if(author)$ \author{$for(author)$$author$$sep$ \and $endfor$} $endif$ -$if(date)$ \date{$date$} -$endif$ $for(header-includes)$ $header-includes$ $endfor$ -- cgit v1.2.3 From 20fab138d3a1bf070fd6e886f6cd22f89b42fad7 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 9 Jun 2014 22:29:21 -0700 Subject: LaTeX template: fix subtitles. The old code really requires scrartcl from koma-script. Closes #1327. --- default.latex | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/default.latex b/default.latex index 6f6486a3d..02e98874d 100644 --- a/default.latex +++ b/default.latex @@ -129,10 +129,8 @@ $if(lang)$ $endif$ $if(title)$ -\title{$title$} -$endif$ -$if(subtitle)$ -\subtitle{$subtitle$} +$if(title)$ +\title{$title$$if(subtitle)$\\\vspace{1em}{\large $subtitle$}$endif$} $endif$ $if(author)$ \author{$for(author)$$author$$sep$ \and $endfor$} -- cgit v1.2.3 From 2c51fb0c4045542dcfaa07aff37778adc9452e9d Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 9 Jun 2014 22:33:13 -0700 Subject: Fixed subtitle in latex template. See jgm/pandoc#1327. --- default.latex | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/default.latex b/default.latex index 02e98874d..28aa10d3d 100644 --- a/default.latex +++ b/default.latex @@ -129,8 +129,7 @@ $if(lang)$ $endif$ $if(title)$ -$if(title)$ -\title{$title$$if(subtitle)$\\\vspace{1em}{\large $subtitle$}$endif$} +\title{$title$$if(subtitle)$\\\vspace{0.5em}{\large $subtitle$}$endif$} $endif$ $if(author)$ \author{$for(author)$$author$$sep$ \and $endfor$} -- cgit v1.2.3 From f3b3f2dda6737b9c6af03e1f4701861394032778 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 18 Jun 2014 17:48:06 -0700 Subject: Added default.haddock. --- default.haddock | 1 + 1 file changed, 1 insertion(+) create mode 100644 default.haddock diff --git a/default.haddock b/default.haddock new file mode 100644 index 000000000..36d66c276 --- /dev/null +++ b/default.haddock @@ -0,0 +1 @@ +$body$ -- cgit v1.2.3