From 2ddf2257dcba7554606ea96b259e81842c5bcbb3 Mon Sep 17 00:00:00 2001 From: Václav Haisman Date: Sun, 18 Mar 2018 04:20:57 +0100 Subject: Provide `bidi` package's option using `\PassOptionsToPackage` (#4357). * Provide `bidi` package's option using `\PassOptionsToPackage`. This avoid clash when `polyglossia` loads it first and then it is loaded again for XeLaTeX when `latex-dir-rtl` defined. * Adjust test suite for LaTeX template change. --- data/templates/default.latex | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'data/templates') diff --git a/data/templates/default.latex b/data/templates/default.latex index c36bf8576..e989f27d9 100644 --- a/data/templates/default.latex +++ b/data/templates/default.latex @@ -2,8 +2,9 @@ \PassOptionsToPackage{hyphens}{url} $if(colorlinks)$ \PassOptionsToPackage{dvipsnames,svgnames*,x11names*}{xcolor} -$endif$ -% +$endif$$if(dir)$$if(latex-dir-rtl)$ +\PassOptionsToPackage{RTLdocument}{bidi} +$endif$$endif$% \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$endif$$if(beamer)$ignorenonframetext,$if(handout)$handout,$endif$$if(aspectratio)$aspectratio=$aspectratio$,$endif$$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} $if(beamer)$ \setbeamertemplate{caption}[numbered] @@ -287,11 +288,7 @@ $endif$ $if(dir)$ \ifxetex % load bidi as late as possible as it modifies e.g. graphicx - $if(latex-dir-rtl)$ - \usepackage[RTLdocument]{bidi} - $else$ \usepackage{bidi} - $endif$ \fi \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex \TeXXeTstate=1 -- cgit v1.2.3 From 46f4238a2a40b5542612bc745e63ce503ce12a32 Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Sun, 18 Mar 2018 17:05:55 +1300 Subject: ConTeXt template: pdfa variable to generate PDF/A (#4294) The resulting PDF can be verified using the Apache PDFBox preflight app. ``` $ java -jar preflight-app-2.0.8.jar test.pdf The file test.pdf is a valid PDF/A-1b file ``` Instructions on how to install the ICC profiles on ConTeXt standalone can be found in the wiki: . If the ICC profiles are not available the log will contain messages like these ``` backend > profiles > profile specification 'sRGB.icc' loaded from '/usr/local/texlive/2017/texmf-dist/tex/context/colors/icc/context/colorprofiles.xml' backend > profiles > error, couldn't locate profile 'srgb.icc' backend > profiles > no default profile 'srgb.icc' for colorspace 'rgb' backend > profiles > profile specification 'sRGB IEC61966-2.1' loaded from '/usr/local/texlive/2017/texmf-dist/tex/context/colors/icc/context/colorprofiles.xml' backend > profiles > error, couldn't locate profile 'srgb.icc' backend > profiles > invalid output intent 'sRGB IEC61966-2.1' ``` and the resulting PDF will not be valid PDF/A: ``` $ java -jar preflight-app-2.0.8.jar test.pdf The file test.pdf is not a valid PDF/A-1b file, error(s) : 2.4.3 : Invalid Color space, The operator "g" can't be used without Color Profile on page 1 2.4.3 : Invalid Color space, The operator "G" can't be used without Color Profile on page 1 2.4.3 : Invalid Color space, /DeviceGray default for operator "TJ" can't be used without Color Profile on page 1 2.4.3 : Invalid Color space, /DeviceGray default for operator "TJ" can't be used without Color Profile on page 1 2.4.3 : Invalid Color space, The operator "g" can't be used without Color Profile on page 1 2.4.3 : Invalid Color space, The operator "G" can't be used without Color Profile on page 1 2.4.3 : Invalid Color space, /DeviceGray default for operator "TJ" can't be used without Color Profile on page 1 ``` However, the PDF will still be generated and the "errors" shown in the log do not break anything. --- MANUAL.txt | 10 ++++++++++ data/templates/default.context | 7 +++++++ 2 files changed, 17 insertions(+) (limited to 'data/templates') diff --git a/MANUAL.txt b/MANUAL.txt index 8960d9bc3..cdfdcda2c 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -1624,12 +1624,22 @@ Variables for ConTeXt `lof`, `lot` : include list of figures, list of tables +`pdfa` +: adds to the preamble the setup necessary to generate PDF/A-1b:2005. + To successfully generate PDF/A the required ICC color profiles have to + be available and the content and all included files (such as images) + have to be standard conforming. The ICC profiles can be obtained + from [ConTeXt ICC Profiles]. See also [ConTeXt PDFA] for more + details. + [ConTeXt Paper Setup]: http://wiki.contextgarden.net/PaperSetup [ConTeXt Layout]: http://wiki.contextgarden.net/Layout [ConTeXt Font Switching]: http://wiki.contextgarden.net/Font_Switching [ConTeXt Color]: http://wiki.contextgarden.net/Color [ConTeXt Headers and Footers]: http://wiki.contextgarden.net/Headers_and_Footers [ConTeXt Indentation]: http://wiki.contextgarden.net/Indentation +[ConTeXt ICC Profiles]: http://wiki.contextgarden.net/PDFX#ICC_profiles +[ConTeXt PDFA]: http://wiki.contextgarden.net/PDF/A [`setupwhitespace`]: http://wiki.contextgarden.net/Command/setupwhitespace [`setupinterlinespace`]: http://wiki.contextgarden.net/Command/setupinterlinespace [`setuppagenumbering`]: http://wiki.contextgarden.net/Command/setuppagenumbering diff --git a/data/templates/default.context b/data/templates/default.context index 56f4e9cf7..039b6cdaf 100644 --- a/data/templates/default.context +++ b/data/templates/default.context @@ -38,6 +38,13 @@ $endif$ $if(pagenumbering)$ \setuppagenumbering[$for(pagenumbering)$$pagenumbering$$sep$,$endfor$] $endif$ +$if(pdfa)$ +% attempt to generate PDF/A +\setupbackend + [format=PDF/A-1b:2005, + intent=sRGB IEC61966-2.1, + profile=sRGB.icc] +$endif$ % use microtypography \definefontfeature[default][default][script=latn, protrusion=quality, expansion=quality, itlc=yes, textitalics=yes, onum=yes, pnum=yes] -- cgit v1.2.3 From 7f97b04862ffbe2bb9efaa648eee284f7949d20d Mon Sep 17 00:00:00 2001 From: Étienne BERSAC Date: Fri, 30 Mar 2018 18:20:06 +0200 Subject: Add -V beameroption variable (#4359) * LaTeX template: Use `pgfpages` package; this is needed for notes on second screen in beamer * LaTeX template: Add `beameroption` variable in template --- MANUAL.txt | 3 +++ data/templates/default.latex | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'data/templates') diff --git a/MANUAL.txt b/MANUAL.txt index 6bf20f1bc..127ab83e0 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -1468,6 +1468,9 @@ LaTeX variables are used when [creating a PDF]. : option for document class, e.g. `oneside`; may be repeated for multiple options +`beameroption` +: In beamer, add extra beamer option with `\setbeameroption{}` + `geometry` : option for [`geometry`] package, e.g. `margin=1in`; may be repeated for multiple options diff --git a/data/templates/default.latex b/data/templates/default.latex index e989f27d9..7f2d72340 100644 --- a/data/templates/default.latex +++ b/data/templates/default.latex @@ -7,10 +7,14 @@ $endif$$if(dir)$$if(latex-dir-rtl)$ $endif$$endif$% \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$endif$$if(beamer)$ignorenonframetext,$if(handout)$handout,$endif$$if(aspectratio)$aspectratio=$aspectratio$,$endif$$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} $if(beamer)$ +\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$ $endif$ $if(beamerarticle)$ \usepackage{beamerarticle} % needs to be loaded first -- cgit v1.2.3 From d0940c6e00ab8be5c40727daa65a5a1387645ace Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 25 Apr 2018 17:49:01 -0700 Subject: Ms template: Fix date. Previously .ND was used, but this only works if you have a title page, which we don't. Thanks to @teoric. --- data/templates/default.ms | 5 ++++- test/writer.ms | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'data/templates') diff --git a/data/templates/default.ms b/data/templates/default.ms index f4204338a..02bbc626a 100644 --- a/data/templates/default.ms +++ b/data/templates/default.ms @@ -90,7 +90,10 @@ $for(author)$ $author$ $endfor$ $if(date)$ -.ND "$date$" +.AU +.sp 0.5 +.ft R +$date$ $endif$ $if(abstract)$ .AB diff --git a/test/writer.ms b/test/writer.ms index 33dec71d3..e7ac44bb9 100644 --- a/test/writer.ms +++ b/test/writer.ms @@ -67,7 +67,10 @@ Pandoc Test Suite John MacFarlane .AU Anonymous -.ND "July 17, 2006" +.AU +.sp 0.5 +.ft R +July 17, 2006 .\" 1 column (use .2C for two column) .1C .LP -- cgit v1.2.3 From 91877692f399d46af0cfff151ce9ffde81af149d Mon Sep 17 00:00:00 2001 From: John Muccigrosso Date: Thu, 26 Apr 2018 14:32:48 -0400 Subject: Adding background-image variable to reveal.js template (#4600) --- data/templates/default.revealjs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'data/templates') diff --git a/data/templates/default.revealjs b/data/templates/default.revealjs index 65ab09049..6f847e23a 100644 --- a/data/templates/default.revealjs +++ b/data/templates/default.revealjs @@ -197,6 +197,11 @@ $endif$ $if(parallaxBackgroundImage)$ // Parallax background image parallaxBackgroundImage: '$parallaxBackgroundImage$', // e.g. "'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'" +$else$ +$if(background-image)$ + // Parallax background image + parallaxBackgroundImage: '$background-image$', // e.g. "'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'" +$endif$ $endif$ $if(parallaxBackgroundSize)$ // Parallax background size -- cgit v1.2.3 From 00e3c5c8c1af3cb288ea9b6a4129a6ac029df3cb Mon Sep 17 00:00:00 2001 From: John Muccigrosso Date: Thu, 26 Apr 2018 14:33:20 -0400 Subject: Add background-image variable to default.latex (#4601) New variable with same name as comparable variable in (proposed) reveal.js template, so that background images can indicated for both presentation formats with one variable. --- data/templates/default.latex | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'data/templates') diff --git a/data/templates/default.latex b/data/templates/default.latex index 7f2d72340..31093374f 100644 --- a/data/templates/default.latex +++ b/data/templates/default.latex @@ -7,6 +7,11 @@ $endif$$if(dir)$$if(latex-dir-rtl)$ $endif$$endif$% \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$endif$$if(beamer)$ignorenonframetext,$if(handout)$handout,$endif$$if(aspectratio)$aspectratio=$aspectratio$,$endif$$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} $if(beamer)$ +$if(background-image)$ +\usebackgroundtemplate{% +\includegraphics[width=\paperwidth]{$background-image$}% +} +$endif$ \usepackage{pgfpages} \setbeamertemplate{caption}[numbered] \setbeamertemplate{caption label separator}{: } -- cgit v1.2.3 From 5ced96c0cc296ab271b6b8d1a20ba535486d3f82 Mon Sep 17 00:00:00 2001 From: OvidiusCicero Date: Tue, 1 May 2018 20:29:04 +0200 Subject: Make template polyglot (#4606) This line: `` is not valid XML. Making it self-closing makes the template polyglot. --- data/templates/default.html5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data/templates') diff --git a/data/templates/default.html5 b/data/templates/default.html5 index 5c484f376..9c15107c0 100644 --- a/data/templates/default.html5 +++ b/data/templates/default.html5 @@ -29,7 +29,7 @@ $highlighting-css$ $endif$ $for(css)$ - + $endfor$ $if(math)$ $math$ -- cgit v1.2.3 From d5f085535ebd3d1d3477a51e9fc67c69a1eb0edf Mon Sep 17 00:00:00 2001 From: Pablo Rodríguez Date: Wed, 2 May 2018 06:22:56 +0200 Subject: new Greek fallback typeface (would fix #4405) (#4605) CMU Serif would give better typographic results than the current Greek fallback DejaVu Serif. --- data/templates/default.context | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data/templates') diff --git a/data/templates/default.context b/data/templates/default.context index 039b6cdaf..879269394 100644 --- a/data/templates/default.context +++ b/data/templates/default.context @@ -54,7 +54,7 @@ $endif$ \setupbodyfontenvironment[default][em=italic] % use italic as em, not slanted -\definefallbackfamily[mainface][rm][DejaVu Serif][preset=range:greek, force=yes] +\definefallbackfamily[mainface][rm][CMU Serif][preset=range:greek, force=yes] \definefontfamily[mainface][rm][$if(mainfont)$$mainfont$$else$Latin Modern Roman$endif$] \definefontfamily[mainface][mm][$if(mathfont)$$mathfont$$else$Latin Modern Math$endif$] \definefontfamily[mainface][ss][$if(sansfont)$$sansfont$$else$Latin Modern Sans$endif$] -- cgit v1.2.3