summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/komacv-rg/komacv-lco.sty
blob: 81758dbb617ec186118734a38c6a8312d79ad6a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
%%
%% This is file `komacv-lco.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% komacv-lco.dtx  (with options: `package')
%% 
%% Copyright (C) 2016-2018 by Richard Grewe <r-g+tex@posteo.net>
%% 
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.2 of this license
%% or (at your option) any later version.  The latest version of this
%% license is in:
%% 
%%    http://www.latex-project.org/lppl.txt
%% 
%% and version 1.2 or later is part of all distributions of LaTeX version
%% 1999/12/01 or later.
%% 
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{komacv-lco}
    [2018/11/02 v0.9b Letter class options usable for komacv]
\RequirePackage{etoolbox}
\RequirePackage{scrkbase}
\RequirePackage{marvosym,fontawesome}
\providecommand{\newkomavar}{%
  \@ifstar{\kcvlco@newkomavar}{\kcvlco@newkomavar}}
\newcommand{\kcvlco@newkomavar}[2][\relax]{%
  \ifkomavar{#2}%
    {\kcvlco@error{KOMA variable `#2' already defined}}%
    {\csdef{kcvlco@@var@#2}{\empty}%
     \begingroup\def\@tempa{#1}\def\@tempb{\relax}%
     \ifx\@tempa\@tempb\endgroup\else
     \endgroup\csdef{kcvlco@@desc@#2}{#1}\fi}}
\providecommand{\setkomavar}{%
  \@ifstar{\kcvlco@setkomadesc}{\kcvlco@setkomavar}}
\newcommand{\kcvlco@setkomavar}[1]{\kcvlco@onlyifdef{#1}{\@ifnextchar[%
  {\kcvlco@setkomavar@i{#1}}{\kcvlco@setkomavar@i{#1}[\relax]}}}
\long\def\kcvlco@setkomavar@i#1[#2]#3{%
  \csdef{kcvlco@@value@#1}{#3}%
  \csuse{scr@#1@postsetvar}%
  \begingroup\def\@tempa{#2}\def\@tempb{\relax}%
  \ifx\@tempa\@tempb\endgroup\else
  \endgroup\csdef{kcvlco@@desc@#1}{#2}\fi}
\newcommand{\kcvlco@setkomadesc}[2]{%
  \csdef{kcvlco@@desc@#1}{#2}}
\providecommand{\usekomavar}{%
  \@ifstar{\kcvlco@usekomadesc}{\kcvlco@usekomavar}}
\newcommand{\kcvlco@usekomavar}[2][\@firstofone]{%
  \kcvlco@onlyifdef{#2}{#1{\csuse{kcvlco@@value@#2}}}}
\newcommand{\kcvlco@usekomadesc}[2][\@firstofone]{%
  \kcvlco@onlyifdef{#2}{#1{\csuse{kcvlco@@desc@#2}}}}
\providecommand{\ifkomavarempty}{%
  \@ifstar{\kcvlco@ifemptydesc}{\kcvlco@ifemptyvar}}
\newcommand{\kcvlco@ifemptyvar}[1]{\ifcsvoid{kcvlco@@value@#1}}
\newcommand{\kcvlco@ifemptydesc}[1]{\ifcsvoid{kcvlco@@desc@#1}}
\providecommand{\ifkomavar}[1]{\ifcsdef{kcvlco@@var@#1}}
\providecommand{\ifkomavarenabled}[1]{\csuse{kcvlco@@enab@#1}}
\providecommand\LoadLetterOption[1]{\input{#1.lco}}
\providecommand\LoadLetterOptions[1]{\forcsvlist{\LoadLetterOption}{#1}}
\providecommand*{\emaillink}[2][]{%
  \ifstrempty{#1}{%
    \href{mailto:#2}{\usefontofkomafont{emaillinkfont}#2}}{%
    \href{mailto:#2}{\usefontofkomafont{emaillinkfont}#1}}}
\IfExistskomafont{emaillinkfont}{}{\newkomafont{emaillinkfont}{}}
\providecommand*{\httplink}[2][]{%
  \ifstrempty{#1}{%
    \href{http://#2}{\usefontofkomafont{httplinkfont}#2}}{%
    \href{http://#2}{\usefontofkomafont{httplinkfont}#1}}}
\IfExistskomafont{httplinkfont}{}{\newkomafont{httplinkfont}{}}
\providecommand*{\httpslink}[2][]{%
  \ifstrempty{#1}{%
    \href{https://#2}{\usefontofkomafont{httplinkfont}#2}}{%
    \href{https://#2}{\usefontofkomafont{httplinkfont}#1}}}
\newcommand\kcvlco@newvar[4][\relax]{%
  \ifkomavar{#2}%
    {\begingroup\def\@tempa{#1}\def\@tempb{\relax}%
     \ifx\@tempa\@tempb\endgroup\else
     \endgroup\setkomavar*{#2}{#1}\fi}
    {\newkomavar[{#1}]{#2}}%
  \ifstrempty{#4}%
    {\csdef{kcvlco@@enab@#2}{\ifbool{true}}}%
    {\csdef{kcvlco@@enab@#2}{\ifbool{#4}}\KOMA@ifkey{#2}{#4}}%
  \@ifclassloaded{komacv}{%
    \ifstrempty{#4}%
      {\csappto{scr@#2@postsetvar}{\ifkomavarempty{#2}%
          {\let#3=\empty}%
          {\kcvlco@storekomavar{#2}{#3}}}}%
      {\csappto{scr@#2@postsetvar}{\ifkomavarempty{#2}%
          {\let#3=\empty}%
          {\ifbool{#4}{\kcvlco@storekomavar{#2}{#3}}{\let#3=\empty}}}}%
    \csuse{scr@#2@postsetvar}}{}}
\providecommand{\kcvlco@error}[1]{%
  \PackageError{komacv-lco}{#1}{}}
\providecommand{\kcvlco@errundef}[1]{%
  \kcvlco@error{KOMA variable `#1' undefined}}
\providecommand{\kcvlco@onlyifdef}[2]{%
  \ifkomavar{#1}{#2}{\kcvlco@errundef{#1}}}
\newcommand{\kcvlco@storekomavar}[2]{\letcs#2{kcvlco@@value@#1}}
\kcvlco@newvar[\Telefon]{fromphone}{\phonenr}{@phone}
\kcvlco@newvar[\Mobilefone]{frommobilephone}{\mobile}{@mobilephone}
\kcvlco@newvar[\FAX]{fromfax}{\faxnr}{@fax}
\kcvlco@newvar[\Letter]{fromemail}{\email}{@email}
\kcvlco@newvar{fromurl}{\homepage}{@www}
\ifkomavar{fromname}{}{\newkomavar{fromname}}
\setkomavar{fromname}{%
  \usekomavar{fromfirstname}~\usekomavar{fromfamilyname}}
\ifkomavar{fromaddress}{}{\newkomavar{fromaddress}}
\setkomavar{fromaddress}{%
  \usekomavar{fromaddressstreet}\\ \usekomavar{fromaddresscity}}
\ifkomavar{place}{}{\newkomavar{place}}
\ifkomavar{location}{}{\newkomavar{location}}
\kcvlco@newvar{fromfirstname}{\firstname}{}
\kcvlco@newvar{fromfamilyname}{\familyname}{}
\kcvlco@newvar{fromacadtitle}{\acadtitle}{}
\kcvlco@newvar{fromaddressstreet}{\addressstreet}{}
\kcvlco@newvar{fromaddresscity}{\addresscity}{}
\kcvlco@newvar[\faTwitter]{fromtwitter}{\twitter}{kcvlco@@twitter}
\kcvlco@newvar[\faGithub]{fromgithub}{\github}{kcvlco@@github}
\kcvlco@newvar[\faFacebook]{fromfacebook}{\facebook}{kcvlco@@facebook}
\kcvlco@newvar[\faLinkedin]{fromlinkedin}{\linkedin}{kcvlco@@linkedin}
\kcvlco@newvar{fromextrainfo}{\extrainfo}{kcvlco@@extrainfo}
\endinput
%%
%% End of file `komacv-lco.sty'.