소스 검색

Update \gitrevision command definition

Samuel W. Flint 5 년 전
부모
커밋
67fbaa8b8a
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      texmf/version-and-copyright.sty

+ 6 - 1
texmf/version-and-copyright.sty

@@ -7,7 +7,12 @@
 \ProcessOptions\relax
 
 \newcommand\vc@getRev{\ShellEscape{git rev-parse --short HEAD > \jobname.ver}}
-\newcommand\gitrevision{\vc@getRev\input{\jobname.ver}}
+\newcommand\gitrevision{%
+  \vc@getRev%
+  \edef\RestoreEndlinechar{\endlinechar=\the\endlinechar\relax}%
+  \endlinechar=-1%
+  \input{\jobname.ver}%
+  \RestoreEndlinechar}
 
 \newcommand\copyrightRange[1]{\copyright~#1\ifnumgreater{\year}{#1}{--\the\year}{}}