diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/cmpj/cmpj2.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/cmpj/cmpj2.sty | 93 |
1 files changed, 59 insertions, 34 deletions
diff --git a/Master/texmf-dist/tex/latex/cmpj/cmpj2.sty b/Master/texmf-dist/tex/latex/cmpj/cmpj2.sty index af69d961a76..ccbd9cede8b 100644 --- a/Master/texmf-dist/tex/latex/cmpj/cmpj2.sty +++ b/Master/texmf-dist/tex/latex/cmpj/cmpj2.sty @@ -7,7 +7,7 @@ %%% http://www.icmp.lviv.ua/journal/ %%% %%% using LaTeX2e %%% %%% %%% -%%% Last time modified: March 23, 2014 %%% +%%% Last time modified: May 8, 2017 %%% %%% %%% %%% Copyright (C) 2013 by the Institute for Condensed Matter Physics %%% %%% of the National Academy of Sciences of Ukraine %%% @@ -22,17 +22,17 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{cmpj2} - [2014/03/23 v2.05 + [2017/05/08 v2.07 The Condensed Matter Physics journal package] \def\filename{cmpj2.sty} -\def\fileversion{2.05} -\def\filedate{2014/03/23} +\def\fileversion{2.07} +\def\filedate{2017/05/08} \immediate\write32{This is '\filename' v\fileversion \space <\filedate> ^^J% the Condensed Matter Physics journal package} \if\@ptsize0 \else - \PackageWarning{cmpj.sty}{Bad \noexpand\documentclass option, use 10pt} + \PackageWarning{cmpj2.sty}{Bad \noexpand\documentclass option, use 10pt} \fi \RequirePackage{fancyhdr} @@ -42,7 +42,53 @@ \RequirePackage[pdfstartview=FitH]{hyperref} %\def\href#1#2{} \RequirePackage{url} -\RequirePackage{doi} +%%\RequirePackage{doi} +%%%%%%%%% doi.sty modified to follow CrossRef rules %%%%%%%%%%%%%%%%%%%%%%%% +%% To change the default prefix, redefine this command within your own code. +%% It takes no argument, which is different from the doipubmed package. +\newcommand{\doitext}{doi:} +\newcommand{\doiURL}{https://doi.org/} + +%% the meat of the code +%% the first command opens a group, and changes a few catcodes. +\newcommand*{\doi}{% + \begingroup + \lccode`\~=`\#\relax + \lowercase{\def~{\#}}% + \lccode`\~=`\_\relax + \lowercase{\def~{\_}}% + \lccode`\~=`\<\relax + \lowercase{\def~{\textless}}% + \lccode`\~=`\>\relax + \lowercase{\def~{\textgreater}}% + \lccode`\~=0\relax + \catcode`\#=\active + \catcode`\_=\active + \catcode`\<=\active + \catcode`\>=\active + \@doi +} + +%% this is the actual command which processes the argument, with the catcodes +%% set in the previous command +%% it closes the group, and spits out the url. +\def\@doi#1{% + \let\#\relax + \let\_\relax + \let\textless\relax + \let\textgreater\relax + \edef\x{\toks0={{#1}}}% + \x + \edef\#{\@percentchar23}% + \edef\_{_}% + \edef\textless{\@percentchar3C}% instead of {\string<} for Apple + \edef\textgreater{\@percentchar3E}% instead of {\sting>} for Apple + \edef\x{\toks1={\noexpand\href{\doiURL#1}}}% + \x + \edef\x{\endgroup\doitext\the\toks1 \the\toks0}% + \x +} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \DeclareOption{preprint}{% \renewcommand{\@ptsize}{2}% @@ -390,9 +436,11 @@ \def\articletype#1{\def\article@type{#1}} \def\article@page{\article@number-\arabic{page}} \def\doinumber#1{\def\doi@number{#1}} -%\def\bibdoi#1{\href{http://dx.doi.org/#1}{doi:#1}} +%\def\bibdoi#1{\href{\doiURL#1}{\doitext#1}} \def\bibdoi{\doi} \def\arxiv#1{\href{http://arxiv.org/abs/#1}{arXiv:#1}} +\def\archive[#1]#2{Preprint #1:#2} +\def\eprint{\@ifnextchar[\archive{Preprint \arxiv}} \def\print@title{{\LARGE \hv@sf\bfseries\upshape\mathversion{bold} \@title \par}} \def\print@author{% @@ -420,10 +468,10 @@ % \article@number\space[\pageref{last@page}\space page(s)] \\ [0.6ex] \@ifundefined{doi@number}{\phantom{DOI:\space10.XXXX/CMP.XX.XXXXX}}% - {DOI:\space\href{http://dx.doi.org/\doi@number}{\doi@number}} + {DOI:\space\href{\doiURL\doi@number}{\doi@number}} % {\doi{\doi@number}} -% \phantom{\href{http://dx.doi.org/\doi@number}{DOI:\doi@number}} -% \href{http://dx.doi.org/\doi@number}{DOI:\doi@number} +% \phantom{\href{\doiURL\doi@number}{DOI:\doi@number}} +% \href{\doiURL\doi@number}{DOI:\doi@number} \\ [0.6ex] \href{http://www.icmp.lviv.ua/journal}{http://www.icmp.lviv.ua/journal}}\hfill \newlength{\@logoheight} @@ -521,29 +569,6 @@ %% Bibliography %% -% \renewenvironment{thebibliography}[1] -% {\section*{\refname -% \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}}% -% \normalsize% -% \list{\@biblabel{\@arabic\c@enumiv}}% -% {\settowidth\labelwidth{\@biblabel{#1}}% -% \leftmargin\labelwidth -% \advance\leftmargin\labelsep -% \parsep\z@\itemsep\z@ -% \@openbib@code -% \usecounter{enumiv}% -% \let\p@enumiv\@empty -% \renewcommand\theenumiv{\@arabic\c@enumiv}}% -% \sloppy -% \clubpenalty4000 -% \@clubpenalty \clubpenalty -% \widowpenalty4000% -% \sfcode`\.\@m} -% {\def\@noitemerr -% {\@latex@warning{Empty `thebibliography' environment}}% -% \endlist\normalsize} -% %\def\@biblabel#1{#1.} - \bibsep=0pt \renewcommand{\bibnumfmt}[1]{#1.} \@ifundefined{bibfont}{\newcommand{\bibfont}{\small}}{\renewcommand{\bibfont}{\small}} @@ -661,7 +686,7 @@ \addtolength{\topmargin}{-\headheight} \addtolength{\topmargin}{-\headsep} \addtolength{\topmargin}{-1in} -\oddsidemargin 35mm +\oddsidemargin 30mm \setlength{\evensidemargin}{210mm} \addtolength{\evensidemargin}{-\textwidth} \addtolength{\evensidemargin}{-\oddsidemargin} |