Add option to force HTTP to homepage

This commit is contained in:
Ingemar Berg 2023-03-08 10:56:56 +01:00
commit 829d94961f
8 changed files with 27 additions and 14 deletions

View file

@ -233,8 +233,9 @@
\newcommand*{\email}[1]{\def\@email{#1}} \newcommand*{\email}[1]{\def\@email{#1}}
% defines one's home page (optional) % defines one's home page (optional)
% usage: \homepage{<url>} % usage: \homepage[<optional protocol>]{<url>}
\newcommand*{\homepage}[1]{\def\@homepage{#1}} % where <optional protocol> should be either "https" (default) or "http"
\NewDocumentCommand{\homepage}{O{https}m}{\def\@homepageprotocol{#1}\def\@homepage{#2}}
% adds a fixed/mobile/fax number to one's personal information (optional) % adds a fixed/mobile/fax number to one's personal information (optional)
% usage: \phone[<optional type>]{<number>} % usage: \phone[<optional type>]{<number>}

View file

@ -89,7 +89,8 @@
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\addtofoot{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}% \addtofoot{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@email}}{}{\addtofoot{\emailsymbol\emaillink{\@email}}}% \ifthenelse{\isundefined{\@email}}{}{\addtofoot{\emailsymbol\emaillink{\@email}}}%
\ifthenelse{\isundefined{\@homepage}}{}{\addtofoot{\homepagesymbol\httpslink{\@homepage}}}% \ifthenelse{\isundefined{\@homepage}}{}{\addtofoot{\homepagesymbol%
\ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}}%
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\addtofoot{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}% \addtofoot{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\addtofoot{\@extrainfo}}% \ifthenelse{\isundefined{\@extrainfo}}{}{\addtofoot{\@extrainfo}}%
@ -121,7 +122,8 @@
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\addtofoot{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}% \addtofoot{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@email}}{}{\addtofoot{\emailsymbol\emaillink{\@email}}}% \ifthenelse{\isundefined{\@email}}{}{\addtofoot{\emailsymbol\emaillink{\@email}}}%
\ifthenelse{\isundefined{\@homepage}}{}{\addtofoot{\homepagesymbol\httpslink{\@homepage}}}% \ifthenelse{\isundefined{\@homepage}}{}{\addtofoot{\homepagesymbol%
\ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}}%
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\addtofoot{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}% \addtofoot{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\addtofoot{\@extrainfo}}% \ifthenelse{\isundefined{\@extrainfo}}{}{\addtofoot{\@extrainfo}}%

View file

@ -86,7 +86,8 @@
\ifthenelse{\isundefined{\@born}}{}{\makenewline\bornsymbol\@born}% \ifthenelse{\isundefined{\@born}}{}{\makenewline\bornsymbol\@born}%
\phonesdetails% needs to be pre-rendered as loops and tabulars seem to conflict \phonesdetails% needs to be pre-rendered as loops and tabulars seem to conflict
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}% \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httpslink{\@homepage}}% \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol%
\ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}%
\socialsdetails% needs to be pre-rendered as loops and tabulars seem to conflict \socialsdetails% needs to be pre-rendered as loops and tabulars seem to conflict
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}% \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}%
\end{tabular} \end{tabular}
@ -169,7 +170,8 @@
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}% \makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}% \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httpslink{\@homepage}}% \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol%
\ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}\fi% \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}\fi%
\end{minipage}\\[2em] \end{minipage}\\[2em]
% recipient block % recipient block

View file

@ -144,7 +144,8 @@
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\addtomakeheaddetails{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}% \addtomakeheaddetails{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@email}}{}{\addtomakeheaddetails{\emailsymbol\emaillink{\@email}}}% \ifthenelse{\isundefined{\@email}}{}{\addtomakeheaddetails{\emailsymbol\emaillink{\@email}}}%
\ifthenelse{\isundefined{\@homepage}}{}{\addtomakeheaddetails{\homepagesymbol\httpslink{\@homepage}}}% \ifthenelse{\isundefined{\@homepage}}{}{\addtomakeheaddetails{\homepagesymbol%
\ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}}%
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\addtomakeheaddetails{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}% \addtomakeheaddetails{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\addtomakeheaddetails{\@extrainfo}}% \ifthenelse{\isundefined{\@extrainfo}}{}{\addtomakeheaddetails{\@extrainfo}}%

View file

@ -95,7 +95,8 @@
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\addtomakeheaddetails{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}% \addtomakeheaddetails{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@email}}{}{\addtomakeheaddetails{\emailsymbol\emaillink{\@email}}}% \ifthenelse{\isundefined{\@email}}{}{\addtomakeheaddetails{\emailsymbol\emaillink{\@email}}}%
\ifthenelse{\isundefined{\@homepage}}{}{\addtomakeheaddetails{\homepagesymbol\httpslink{\@homepage}}}% \ifthenelse{\isundefined{\@homepage}}{}{\addtomakeheaddetails{\homepagesymbol%
\ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}}%
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\addtomakeheaddetails{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}% \addtomakeheaddetails{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\addtomakeheaddetails{\@extrainfo}}% \ifthenelse{\isundefined{\@extrainfo}}{}{\addtomakeheaddetails{\@extrainfo}}%
@ -147,7 +148,8 @@
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}% \makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}% \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httpslink{\@homepage}}% \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol%
\ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}\fi% \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}\fi%
\end{minipage}\\[2em] \end{minipage}\\[2em]
% recipient block % recipient block

View file

@ -111,7 +111,8 @@
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\makenewline\hbox to 1.0em{\csname\collectionloopkey phonesymbol\endcsname}~\collectionloopitem}% \makenewline\hbox to 1.0em{\csname\collectionloopkey phonesymbol\endcsname}~\collectionloopitem}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline\hbox to 1.0em{\emailsymbol}~\emaillink{\@email}}% \ifthenelse{\isundefined{\@email}}{}{\makenewline\hbox to 1.0em{\emailsymbol}~\emaillink{\@email}}%
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\hbox to 1.0em{\homepagesymbol}~\httpslink{\@homepage}}% \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\hbox to 1.0em{\homepagesymbol}~%
\ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}%
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\makenewline\hbox to 1.0em{\csname\collectionloopkey socialsymbol\endcsname}~\collectionloopitem}% \makenewline\hbox to 1.0em{\csname\collectionloopkey socialsymbol\endcsname}~\collectionloopitem}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}\fi} \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}\fi}
@ -159,7 +160,8 @@
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\makenewline\hbox to 1.0em{\csname\collectionloopkey phonesymbol\endcsname}~\collectionloopitem}% \makenewline\hbox to 1.0em{\csname\collectionloopkey phonesymbol\endcsname}~\collectionloopitem}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline\hbox to 1.0em{\emailsymbol}~\emaillink{\@email}}% \ifthenelse{\isundefined{\@email}}{}{\makenewline\hbox to 1.0em{\emailsymbol}~\emaillink{\@email}}%
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\hbox to 1.0em{\homepagesymbol}~\httpslink{\@homepage}}% \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\hbox to 1.0em{\homepagesymbol}~%
\ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}%
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\makenewline\hbox to 1.0em{\csname\collectionloopkey socialsymbol\endcsname}~\collectionloopitem}% \makenewline\hbox to 1.0em{\csname\collectionloopkey socialsymbol\endcsname}~\collectionloopitem}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}}% \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}}%

View file

@ -83,7 +83,8 @@
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\makenewline\csname\collectionloopkey phonesymbol\endcsname~\collectionloopitem}% \makenewline\csname\collectionloopkey phonesymbol\endcsname~\collectionloopitem}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol~\emaillink{\@email}}% \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol~\emaillink{\@email}}%
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol~\httpslink{\@homepage}}% \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol~%
\ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}%
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\makenewline\csname\collectionloopkey socialsymbol\endcsname~\collectionloopitem}% \makenewline\csname\collectionloopkey socialsymbol\endcsname~\collectionloopitem}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}\fi}% \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}\fi}%
@ -146,7 +147,8 @@
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}% \makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}% \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
\ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httpslink{\@homepage}}% \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol%
\ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}\fi% \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}\fi%
\end{minipage}\\[2em] \end{minipage}\\[2em]
% recipient block % recipient block

View file

@ -116,7 +116,8 @@
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\addtomakeheaddetails{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}% \addtomakeheaddetails{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@email}}{}{\addtomakeheaddetails{\emailsymbol\emaillink{\@email}}}% \ifthenelse{\isundefined{\@email}}{}{\addtomakeheaddetails{\emailsymbol\emaillink{\@email}}}%
\ifthenelse{\isundefined{\@homepage}}{}{\addtomakeheaddetails{\homepagesymbol\httpslink{\@homepage}}}% \ifthenelse{\isundefined{\@homepage}}{}{\addtomakeheaddetails{\homepagesymbol%
\ifthenelse{\equal{\@homepageprotocol}{http}}{\httplink{\@homepage}}{\httpslink{\@homepage}}}}%
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\addtomakeheaddetails{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}% \addtomakeheaddetails{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\addtomakeheaddetails{\@extrainfo}}% \ifthenelse{\isundefined{\@extrainfo}}{}{\addtomakeheaddetails{\@extrainfo}}%