diff options
Diffstat (limited to 'macros')
-rw-r--r-- | macros/latex/contrib/moderntimeline/moderntimeline.dtx | 123 | ||||
-rw-r--r-- | macros/latex/contrib/moderntimeline/moderntimeline.pdf | bin | 184501 -> 186431 bytes | |||
-rw-r--r-- | macros/latex/contrib/ocgx2/ChangeLog | 5 | ||||
-rw-r--r-- | macros/latex/contrib/ocgx2/ocgx2.sty | 11 |
4 files changed, 116 insertions, 23 deletions
diff --git a/macros/latex/contrib/moderntimeline/moderntimeline.dtx b/macros/latex/contrib/moderntimeline/moderntimeline.dtx index ff31f0fcdc..6fcef55c70 100644 --- a/macros/latex/contrib/moderntimeline/moderntimeline.dtx +++ b/macros/latex/contrib/moderntimeline/moderntimeline.dtx @@ -26,12 +26,12 @@ %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package>\ProvidesPackage{moderntimeline} %<*package> - [2015/08/31 0.9 Add timelines to moderncv entries] + [2020/06/11 0.11 Add timelines to moderncv entries] %</package> % %<*driver> \documentclass{ltxdoc} -\usepackage{moderntimeline}[2012/04/26] +\usepackage{moderntimeline}[2020/06/11] \EnableCrossrefs \CodelineIndex \RecordChanges @@ -43,7 +43,7 @@ %</driver> % \fi % -% \CheckSum{352} +% \CheckSum{413} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -62,6 +62,7 @@ % Right brace \} Tilde \~} % % +% \changes{0.11}{2020/06/11}{Add support for timeline bar marks, thanks to jordieh} % \changes{0.10}{2019/03/04}{Add support to specify label for end date, thanks to ypid and Astrinus} % \changes{0.9}{2015/08/31}{Add month support, thanks to Astrinus} % \changes{0.8}{2015/02/25}{Add the tlsetnotshadedfraction command, thanks to Stefano Gronchi} @@ -102,12 +103,16 @@ % and can be loaded with: % % \begin{verbatim} -% \usepackage[firstyear=1999,lastyear=2012]{moderntimeline} +% \usepackage[firstyear=1999,lastyear=2012, +% marksyr=0.4ex,marksmo=0.2ex +% ]{moderntimeline} % \end{verbatim} % % The \texttt{firstyear} and \texttt{lastyear} options indicate the maximum dates used % to calibrate the time line. They are not mandatory and can be set later % by means of the |\ltmaxdates| macro. +% The \texttt{marksyr} and \texttt{marksmo} options behave exactly the same as +% the |\tlenablemarksyr| and |\tlenablemarksmo| (and associated) macros. % % \subsection{Settings} % @@ -228,6 +233,21 @@ % the beginning of the year, so is not advisable to use months in dates. % Default. % +% \DescribeMacro{\tlenablemarksmo} +% This macro places vertical lines on the timeline bar at every month and year. +% You can set the height of the marks with |\tlmarkheightmo| (default = 0.2ex). +% +% \DescribeMacro{\tlenablemakrsyr} +% This macro places vertical lines on the timeline bar at every year. +% You can set the height of the marks with |\tlmarkheightyr| (default = 0.4ex). +% +% \DescribeMacro{\tldisablemarksyr} +% Disables the vertical lines marking years on the timeline bar. +% This is the opposite of |\tlenablemarksyr|. +% +% \DescribeMacro{\tldisablemarksmo} +% Disables the vertical lines marking months and years on the timeline bar. +% This is the opposite of |\tlenablemarksmo|. % % \subsection{CV entries} % @@ -341,6 +361,8 @@ } \DeclareStringOption{firstyear} \DeclareStringOption{lastyear} +\DeclareStringOption{marksmo}[0.2ex] +\DeclareStringOption{marksyr}[0.4ex] \ProcessKeyvalOptions* \newif\ifstartyear \newif\ifissince @@ -371,6 +393,22 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\tlmarkheightmo} +% \begin{macrocode} +\newcommand{\tlmarkheightmo}[1]{% + \def\tl@marksmo{#1} +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\tlmarkheightyr} +% \begin{macrocode} +\newcommand{\tlmarkheightyr}[1]{% + \def\tl@marksyr{#1} +} +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\tlsince} % \begin{macrocode} \newcommand{\tlsince}[1]{% @@ -469,6 +507,42 @@ % \end{macro} % % +% \begin{macro}{\tldisablemarksyr} +% \begin{macrocode} +\newcommand{\tldisablemarksyr}{% + \def\tl@marksyr{} +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\tlenablemarksyr} +% \begin{macrocode} +\newcommand{\tlenablemarksyr}{% + \def\tl@marksyr{0.4ex} +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\tldisablemarksmo} +% \begin{macrocode} +\newcommand{\tldisablemarksmo}{% + \def\tl@marksmo{} +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\tlenablemarksmo} +% \begin{macrocode} +\newcommand{\tlenablemarksmo}{% + \def\tl@marksmo{0.2ex} +} +% \end{macrocode} +% \end{macro} +% +% % Defaults % \begin{macrocode} \tltext{\scriptsize} @@ -532,6 +606,28 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\tl@tlcvbar} +% \begin{macrocode} +\newcommand{\tl@tlcvbar}{ + \pgfmathsetmacro\tl@yearrange{\tl@lastyear-\tl@firstyear} + \pgfmathsetmacro\tl@totalmonths{12*\tl@yearrange}% + \pgfmathsetmacro\tl@tickdistmo{\hintscolumnwidth/\tl@totalmonths}% + \pgfmathsetmacro\tl@tickdistyr{\hintscolumnwidth/\tl@yearrange}% + \useasboundingbox (0,-1.5ex) rectangle (\hintscolumnwidth,1ex); + \fill [\tl@runningcolor] (0,0) + rectangle (\hintscolumnwidth,\tl@runningwidth); + \ifx\tl@marksyr\empty\relax\else + \foreach \x in {0, ..., \tl@yearrange} + \draw [\tl@runningcolor](\x*\tl@tickdistyr pt,0ex) -- (\x*\tl@tickdistyr pt,\tl@marksyr); + \fi + \ifx\tl@marksmo\empty\relax\else + \foreach \x in {0, ..., \tl@totalmonths} + \draw [\tl@runningcolor](\x*\tl@tickdistmo pt,0ex) -- (\x*\tl@tickdistmo pt,\tl@marksmo); + \fi +} +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\tl@splitlabels} % \begin{macrocode} \newcommand{\tl@splitlabels}[1]{ @@ -605,9 +701,7 @@ \issincefalse \tl@formatstartyear{#2} \cventry{\tikz[baseline=0pt]{ - \useasboundingbox (0,-1.5ex) rectangle (\hintscolumnwidth,1ex); - \fill [\tl@runningcolor] (0,0) - rectangle (\hintscolumnwidth,\tl@runningwidth); + \tl@tlcvbar \fill [#1] (0,0) ++(\tl@startfraction*\hintscolumnwidth,0pt) node [tl@startyear] {#3} @@ -627,9 +721,7 @@ \issincefalse \tl@formatstartyear{#2} \cventry{\tikz[baseline=0pt]{ - \useasboundingbox (0,-1.5ex) rectangle (\hintscolumnwidth,1ex); - \fill [\tl@runningcolor] (0,0) - rectangle (\hintscolumnwidth,\tl@runningwidth); + \tl@tlcvbar \fill [#1] (0,0) ++(\tl@startfraction*\hintscolumnwidth,0pt) node [tl@singleyear] {#2} @@ -649,9 +741,7 @@ \tl@formatendyear{#3} \tl@formatstartyear{#2} \cventry{\tikz[baseline=0pt]{ - \useasboundingbox (0,-1.5ex) rectangle (\hintscolumnwidth,1ex); - \fill [\tl@runningcolor] (0,0) - rectangle (\hintscolumnwidth,\tl@runningwidth); + \tl@tlcvbar \fill [#1] (0,0) ++(\tl@startfraction*\hintscolumnwidth,0pt) node [tl@startyear] {\tl@startlabel} @@ -665,7 +755,7 @@ (\tl@startfraction*\hintscolumnwidth,0) rectangle (\fullcolorwidth,\tl@width); \shade [left color=#1] (\fullcolorwidth,0) - rectangle (\tl@endfraction*\hintscolumnwidth,\tl@width); + rectangle (\tl@endfraction*\hintscolumnwidth + 1,\tl@width); \else \fill [#1] (\tl@startfraction*\hintscolumnwidth,0) rectangle (\tl@endfraction*\hintscolumnwidth,\tl@width); @@ -686,10 +776,7 @@ \tl@formatstartyear{#2} \tl@splitlabels{#4} \cventry{\tikz[baseline=0pt]{ - \fill [\tl@runningcolor] (0,0) - rectangle (\hintscolumnwidth,\tl@runningwidth); - \useasboundingbox (0,-1.5ex) - rectangle (\hintscolumnwidth,1ex); + \tl@tlcvbar \fill [#1] (0,0) ++(\tl@startfraction*\hintscolumnwidth,0pt) node [tl@startyear] {\tl@startlabel} diff --git a/macros/latex/contrib/moderntimeline/moderntimeline.pdf b/macros/latex/contrib/moderntimeline/moderntimeline.pdf Binary files differindex e6f1786cd7..725a2f0bd9 100644 --- a/macros/latex/contrib/moderntimeline/moderntimeline.pdf +++ b/macros/latex/contrib/moderntimeline/moderntimeline.pdf diff --git a/macros/latex/contrib/ocgx2/ChangeLog b/macros/latex/contrib/ocgx2/ChangeLog index 1296880342..bbf9411f31 100644 --- a/macros/latex/contrib/ocgx2/ChangeLog +++ b/macros/latex/contrib/ocgx2/ChangeLog @@ -1,3 +1,8 @@ +2020-06-11 + * v0.49: ocgx2.sty + * fix: `ocgcolorlinks': fixing misplaced page content resulting from + \pdfliteral{} inserted by others (such as TikZ) + 2019-11-07 * v0.48: ocgx2.sty * fix: link-making commands failed with empty option arg diff --git a/macros/latex/contrib/ocgx2/ocgx2.sty b/macros/latex/contrib/ocgx2/ocgx2.sty index bd2e4cb96a..a0dce3b500 100644 --- a/macros/latex/contrib/ocgx2/ocgx2.sty +++ b/macros/latex/contrib/ocgx2/ocgx2.sty @@ -40,8 +40,8 @@ \RequirePackage{xparse} \RequirePackage{l3keys2e} -\def\g@ocgxii@date@tl{2019/11/07} -\def\g@ocgxii@version@tl{0.48} +\def\g@ocgxii@date@tl{2020/06/11} +\def\g@ocgxii@version@tl{0.49} \ProvidesExplPackage{ocgx2}{\g@ocgxii@date@tl}{\g@ocgxii@version@tl} {ports `ocgx' functionality to dvips+ps2pdf, xelatex and dvipdfmx} @@ -1120,9 +1120,7 @@ % (dingbats) font at the end of every ocgcolorlink in order to prevent % empty links from flooding the page with link colour \cs_new_nopar:Npn\ocgxii_tiny_space_char:{ - \group_begin: - \font\l_tmpa_tl=pzdr~scaled~1\l_tmpa_tl\char32 - \group_end: + \group_begin: \font\l_tmpa_tl=pzdr~scaled~1\l_tmpa_tl\char32 \group_end: } \bool_if:nTF{\sys_if_output_dvi_p: && !\g_ocgxii_dvipdfmx_bool}{ @@ -1181,6 +1179,9 @@ } \bool_if:NT\l_ocgxii_ocgcolorlinks_bool{ \cs_gset_nopar:Nn\ocgxii_colourlink_begin:{ + %tiny space char put here in order to neutralise possible transformation + %matrix modifications from previous \pdfliteral{} (TikZ makes a lot use of it) + \hbox_overlap_left:n{\ocgxii_tiny_space_char:} \pbs_literal:nn{page}{q~7~Tr} } \cs_gset_nopar:Nn\ocgxii_colourlink_end:{ |