moderncvcompatibility.sty 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. %% start of file `moderncvcompatibility.sty'.
  2. %% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
  3. %
  4. % This work may be distributed and/or modified under the
  5. % conditions of the LaTeX Project Public License version 1.3c,
  6. % available at http://www.latex-project.org/lppl/.
  7. %-------------------------------------------------------------------------------
  8. % identification
  9. %-------------------------------------------------------------------------------
  10. \NeedsTeXFormat{LaTeX2e}
  11. \ProvidesPackage{moderncvcompatibility}[2015/07/28 v2.0.0 modern curriculum vitae and letter compatibility patches]
  12. %-------------------------------------------------------------------------------
  13. % required packages
  14. %-------------------------------------------------------------------------------
  15. %-------------------------------------------------------------------------------
  16. % package options
  17. %-------------------------------------------------------------------------------
  18. % old casual option (version 0.1)
  19. %\DeclareOption{casual}{\input{moderncvstylecasual.sty}}
  20. % old classic option (version 0.1)
  21. %\DeclareOption{classic}{\input{moderncvstyleclassic.sty}}
  22. \DeclareOption*{}
  23. % process given options
  24. \ProcessOptions\relax
  25. %-------------------------------------------------------------------------------
  26. % definitions
  27. %-------------------------------------------------------------------------------
  28. % compatibility with version 0.1
  29. \newcommand*{\cvresume}[2]{\cvlistdoubleitem{#1}{#2}}
  30. % compatibility with versions <= 0.2
  31. % section, cvline, ... with width argument...
  32. %\newcommand*{\section}[2][0.825]{%
  33. % \closesection{}%
  34. % \@sectionopentrue%
  35. % \addcontentsline{toc}{part}{#2}
  36. % \begin{longtable}[t]{@{}r@{\hspace{.025\textwidth}}@{}p{#1\textwidth}@{}}%
  37. %% \colorrule{.15\textwidth}&\mbox{\color{sectiontitlecolor}\sectionfont#2}\\[1ex]}%
  38. % {\color{sectionrectanglecolor}\rule{0.15\textwidth}{1ex}}&\mbox{\color{sectiontitlecolor}\sectionfont#2}\\[1ex]}%
  39. %\newcommand*{\cvline}[3][.825]{%
  40. % \begin{minipage}[t]{\hintscolumnwidth}\raggedleft\small\sffamily#2\end{minipage}&\begin{minipage}[t]{\maincolumnwidth}#3\end{minipage}\\}
  41. %\newcommand*{\cvitem}[3][.825]{%
  42. % \cvline[#1]{#2}{#3\vspace*{.75em}}} % the \vspace*{} inside the cvline environment is a hack... (should conceptually be outside the environment)
  43. % compatibility with versions <= 0.5
  44. %\newcommand*{\cvitem}[2]{\cvline{#1}{#2}}
  45. %\newcommand*{\moderncvstyle}[1]{\moderncvtheme{#1}}
  46. % compatibility with versions <= 0.7
  47. \newcommand*{\closesection}{}
  48. \newcommand*{\emptysection}{}
  49. \newcommand*{\sethintscolumnlength}[1]{%
  50. \setlength{\hintscolumnwidth}{#1}%
  51. \recomputelengths}
  52. \newcommand*{\sethintscolumntowidth}[1]{%
  53. \settowidth{\hintscolumnwidth}{#1}%
  54. \recomputelengths}
  55. % compatibility with versions <= 0.15
  56. \newcommand*{\cvline}[2]{\cvitem{#1}{#2}}
  57. \newcommand*{\cvlanguage}[3]{\cvitemwithcomment{#1}{#2}{#3}}
  58. \newcommand*{\cvcomputer}[4]{\cvdoubleitem{#1}{\small#2}{#3}{\small#4}}
  59. \newcommand*{\moderncvtheme}[2][blue]{%
  60. \moderncvcolor{#1}%
  61. \moderncvstyle{#2}}
  62. % compatibility with versions <= 0.19
  63. \newcommand*{\maketitle}{\makecvtitle}%
  64. \title{}% to avoid LaTeX complaining that \maketitle is a called without first a call to \title
  65. \newcommand*{\maketitlenamewidth}{\makecvtitlenamewidth}
  66. % compatibility with versions <= 1.3.0
  67. \newcommand*{\firstname}[1]{\def\@firstname{#1}}
  68. \newcommand*{\lastname}[1]{\def\@lastname{#1}}
  69. \newcommand*{\givenname}[1]{\def\@firstname{#1}}
  70. \newcommand*{\familyname}[1]{\def\@lastname{#1}}
  71. \def\@familyname{\@lastname}
  72. % compatibility with versions <= 1.4.0
  73. \newcommand*{\mobile}[1]{\collectionadd[mobile]{phones}{#1}}
  74. %\newcommand*{\phone}[1]{\collectionadd[fixed]{phones}{#1}}% implicit, as \phone{...} defaults to \phone[fixed]{...}
  75. \newcommand*{\fax}[1]{\collectionadd[fax]{phones}{#1}}
  76. \newcommand*{\@mobile}{\collectionfindbykey{phones}{mobile}}
  77. \newcommand*{\@phone}{\collectionfindbykey{phones}{fixed}}
  78. \newcommand*{\@fax}{\collectionfindbykey{phones}{fax}}
  79. \newcommand*{\phonesymbol}{\fixedphonesymbol}
  80. \newcommand*{\mobilesymbol}{\mobilephonesymbol}
  81. \newcommand*{\faxsymbol}{\faxphonesymbol}
  82. \endinput
  83. %% end of file `moderncvcompatibility.sty'.