{ core, phonenumbers, symbols, styles, urls, ... }: { ... }: let inherit(core) indentation list string; inherit(symbols.forkAwesome) email-bulk fax git github gitlab gitea globe gnupg graduation-cap linkedin matrix-org medium mobile orcid phone reddit skype stackoverflow twitter wikipedia xing; acvHeaderSocialSep = "\\unskip\\enspace\\cleaders\\copy\\acvHeaderSocialSepBox\\hskip\\wd\\acvHeaderSocialSepBox\\enspace\\ignorespaces"; formatEmail = address: urls.formatEmailTeX address "${email-bulk}\\,${address}"; formatGit = { name, domain, isGitea ? false, ... }: let icon = { "github" = github; "github.com" = github; "gitlab" = gitlab; "gitlab.com" = gitlab; }.${domain} or null; icon' = if isGitea then gitea else git; in if icon != null then urls.formatHttpsTeX "${domain}/${name}" "${icon}\\,${name}" else urls.formatHttpsTeX "${domain}/${name}" "${icon'}\\,\\texttt{${domain}/${name}}"; formatGoogleScholar = { id, name }: urls.formatHttpsTeX "scholar.google.com/citations?user=${id}" "${graduation-cap}\\,${id}"; formatHomePage = homepage: urls.formatHttpsTeX homepage "${globe}\\,\\texttt{${homepage}}"; formatLinkedIn = { id, name }: urls.formatHttpsTeX "www.linkedin.com/in/${id}" "${linkedin}\\,${id}"; formatMatrix = { name, domain }: urls.formatHttpsTeX "${domain}/${name}" "${matrix-org}\\,@${name}:${domain}"; formatMedium = { id, name }: urls.formatHttpsTeX "medium.com/@${id}" "${medium}\\,${name}"; formatOrcid = { id, name }: urls.formatHttpsTeX "orcid.org/${id}" "${orcid}\\,${id}"; formatPGP = { fingerprint, url }: urls.formatHttpsTeX url "${gnupg}\\,\\texttt{${url} (\\texttt{${fingerprint}})}"; formatPhoneNumber = icon: number: "${icon}\\,${phonenumbers.formatTeX number}"; formatReddit = name: urls.formatHttpsTeX "www.reddit.com/user/${name}" "${reddit}\\,u/${name}"; formatSkype = name: "${skype}\\,${name}"; formatStackOverflow = { id, name }: urls.formatHttpsTeX "stackoverflow.com/users/${id}" "${stackoverflow}\\,${name}"; formatTwitter = name: urls.formatHttpsTeX "www.twitter.com/${name}" "${twitter}\\,${name}"; formatWikipedia = { language ? "en", name }: urls.formatHttpsTeX "${language}.wikipedia.org/wiki/User:${name}" "${wikipedia}\\,${name}"; formatXing = { id, name }: urls.formatHttpsTeX "www.xing.com/profile/${id}" "${xing}\\,${name}"; mapGit = list.map formatGit; mapPhone = { cell ? null, fax ? null, home ? null }: [] ++ (list.ifOrEmpty (cell != null) (formatPhoneNumber mobile cell)) ++ (list.ifOrEmpty (home != null) (formatPhoneNumber phone home)) ++ (list.ifOrEmpty (fax != null) (formatPhoneNumber fax fax)); in { email ? null, git ? null, googleScholar ? null, homepage ? null, linkedIn ? null, matrix ? null, medium ? null, orcid ? null, pgp ? null, phone ? null, reddit ? null, show ? true, skype ? null, stackOverflow ? null, twitter ? null, wikipedia ? null, xing ? null, ... }: let items = (list.ifOrEmpty (matrix != null) (formatMatrix matrix)) ++ (list.ifOrEmpty (skype != null) (formatSkype skype)) ++ (list.ifOrEmpty' (git != null) (mapGit git)) ++ (list.ifOrEmpty (stackOverflow != null) (formatStackOverflow stackOverflow)) ++ (list.ifOrEmpty (linkedIn != null) (formatLinkedIn linkedIn)) ++ (list.ifOrEmpty (xing != null) (formatXing xing)) ++ (list.ifOrEmpty (twitter != null) (formatTwitter twitter)) ++ (list.ifOrEmpty (reddit != null) (formatReddit reddit)) ++ (list.ifOrEmpty (googleScholar != null) (formatGoogleScholar googleScholar)) ++ (list.ifOrEmpty (orcid != null) (formatOrcid orcid)) ++ (list.ifOrEmpty (medium != null) (formatMedium medium)) ++ (list.ifOrEmpty (wikipedia != null) (formatWikipedia wikipedia)) ++ (list.ifOrEmpty (homepage != null) (formatHomePage homepage)) ++ (list.ifOrEmpty' (phone != null) (mapPhone phone)) ++ (list.ifOrEmpty (email != null) (formatEmail email)) ++ (list.ifOrEmpty (pgp != null) (formatPGP pgp)); in list.ifOrEmpty' show ( [ "\\begin{center}%" indentation.more styles.headerSocialOpen indentation.more ] ++ ( list.fold ( result: item: if result != [] then result ++ [ "${acvHeaderSocialSep}{${item}}%" ] else result ++ [ "{${item}}%" ] ) [] items ) ++ [ indentation.less styles.headerSocialClose indentation.less "\\end{center}%" ] )