From 30c0a7e937262deb33c9d2df7323349ab24cabb9 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Thu, 3 May 2018 21:05:53 +0000
Subject: dccpaper (3may18)

git-svn-id: svn://tug.org/texlive/trunk@47600 c570f23f-e606-0410-a88d-b1316a301751
---
 .../tex/latex/dccpaper/dccpaper-base.sty           | 74 +++++++++++++++++-----
 1 file changed, 57 insertions(+), 17 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/dccpaper/dccpaper-base.sty')

diff --git a/Master/texmf-dist/tex/latex/dccpaper/dccpaper-base.sty b/Master/texmf-dist/tex/latex/dccpaper/dccpaper-base.sty
index c368b048892..be0915c1067 100644
--- a/Master/texmf-dist/tex/latex/dccpaper/dccpaper-base.sty
+++ b/Master/texmf-dist/tex/latex/dccpaper/dccpaper-base.sty
@@ -14,24 +14,57 @@
 %% See:     http://www.latex-project.org/lppl.txt
 %% ----------------------------------------------------------------
 %% 
-\def\Version{2017/10/20 v1.6}
+\def\Version{2018/05/01 v1.7}
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
 \ProvidesPackage{dccpaper-base}
     [\Version\space Common class code for IJDC and IDCC papers.]
 \RequirePackage[british]{babel}
 \RequirePackage{etoolbox}
-\RequirePackage[T1]{fontenc}
-\IfFileExists{newtxtext.sty}%
-  {\RequirePackage{newtxtext,newtxmath}}%
-  {\RequirePackage{times}}
-\RequirePackage[scaled=0.92]{helvet}
-\renewcommand{\ttdefault}{cmtt}
+\RequirePackage{iftex}
+\ifPDFTeX
+  \RequirePackage[T1]{fontenc}
+  \IfFileExists{newtxtext.sty}%
+    {\RequirePackage{newtxtext,newtxmath}}%
+    {\RequirePackage{times}}
+  \IfFileExists{tgheros.sty}%
+    {\ifx\undefined\qhv@scale\RequirePackage[scale=0.92]{tgheros}\fi}
+    {\RequirePackage[scaled=0.92]{helvet}}
+  \renewcommand{\ttdefault}{cmtt}
+\else
+  \RequirePackage[no-math]{fontspec}
+  \IfFileExists{newtxtext.sty}{%
+    \setmainfont{TeXGyreTermesX}
+    \RequirePackage{newtxmath}
+  }{%
+    \RequirePackage[T1]{fontenc}
+    \RequirePackage{times}
+    \renewcommand{\ttdefault}{cmtt}
+  }
+  \IfFontExistsTF{texgyreheros-regular.otf}{%
+    \setsansfont{texgyreheros}%
+      [ Extension = .otf
+      , UprightFont = *-regular
+      , ItalicFont = *-italic
+      , BoldFont = *-bold
+      , BoldItalicFont = *-bolditalic
+      , Scale = 0.92
+      ]
+  }{%
+    \RequirePackage[T1]{fontenc}
+    \RequirePackage[scaled=0.92]{helvet}
+  }
+\fi
 \RequirePackage{graphicx}
 \IfFileExists{xcolor.sty}%
   {\RequirePackage{xcolor}}%
   {\RequirePackage{color}}
-\definecolor[named]{struct}{rgb}{0,0.5,0.5}
-\definecolor[named]{links}{rgb}{0,0.4,0.4}
+\ifdcp@proposal
+  \definecolor[named]{struct}{rgb}{0.862,0.420,0.184}
+  \definecolor[named]{links}{rgb}{0.862,0.420,0.184}
+\else
+  \definecolor[named]{struct}{rgb}{0,0.5,0.5}
+  \definecolor[named]{links}{rgb}{0,0.4,0.4}
+\fi
 \RequirePackage{calc}
 
 \let\OrigLineBreak\\
@@ -53,9 +86,16 @@
   \everypar{}}
 
 \RequirePackage{ifpdf}
-\ifpdf
-  \ifdef{\pdfinterwordspaceon}{\pdfinterwordspaceon}{}
-\fi
+\newtoggle{dccp@dummyspaces}
+\def\fixspaces{\toggletrue{dccp@dummyspaces}}
+\def\nofixspaces{\togglefalse{dccp@dummyspaces}}
+\AtBeginDocument{%
+\iftoggle{dccp@dummyspaces}{%
+  \ifpdf
+    \ifdef{\pdfinterwordspaceon}{\pdfinterwordspaceon}{}%
+  \fi
+}{}%
+}
 
 \def\thecorrespondence{}
 \newcommand*{\correspondence}[1]{\def\thecorrespondence{#1}}
@@ -147,7 +187,7 @@
 \newcommand*{\theissue}{0}
 \newcommand*{\issue}[1]{\renewcommand*{\theissue}{#1}}
 \newcommand*{\thesubno}{0}
-\newcommand*{\subno}[1]{\renewcommand*{\thesubno}{#1}}
+\newcommand*{\subno}[1]{\renewcommand*{\thesubno}{#1}\fixspaces}
 \newcommand*{\thedoi}{10.2218/ijdc.v\thevolume i\theissue .\thesubno}
 \newcounter{lastpage}
 \setcounter{lastpage}{0}
@@ -479,7 +519,7 @@
     \defbibheading{bibliography}[\refname]{\section{#1}}%
     \DeclareFieldFormat{doi}{%
       \ifhyperref{%
-        \href{http://dx.doi.org/#1}{\nolinkurl{doi:#1}}%
+        \href{https://doi.org/#1}{\nolinkurl{doi:#1}}%
       }{%
         \nolinkurl{doi:#1}%
       }%
@@ -558,7 +598,7 @@
         }%
         \urlstyle{APACrm}
        }%
-      \newcommand{\doi}[1]{\href{http://dx.doi.org/#1}{\nolinkurl{doi:#1}}}%
+      \newcommand{\doi}[1]{\href{https://doi.org/#1}{\nolinkurl{doi:#1}}}%
       \renewcommand{\doiprefix}{\unskip}%
     }{}%
   }%
@@ -569,7 +609,7 @@
 }
 \PassOptionsToPackage{numberedbib}{apacite}
 
-\usepackage
+\RequirePackage
   [ colorlinks=true
   , linkcolor=black
   , anchorcolor=black
@@ -761,7 +801,7 @@
   \endgroup
 }
 %% 
-%% Copyright (C) 2015 Digital Curation Centre, University of Edinburgh
+%% Copyright (C) 2018 Digital Curation Centre, University of Edinburgh
 %% <info@dcc.ac.uk>
 %%
 %% End of file `dccpaper-base.sty'.
-- 
cgit v1.2.3

