posquit0 / Awesome-CV

:page_facing_up: Awesome CV is LaTeX template for your outstanding job application
LaTeX Project Public License v1.3c
22.28k stars 4.71k forks source link

How to change icon pictures of socials, add a new category #420

Open shadizx opened 2 years ago

shadizx commented 2 years ago

Hello, I am wondering how to change the icon picture (ex. linkedin icon picture) to something of my liking. Additionally, how can I move the location line to be in the same line as my socials, maybe along with a world icon or something.

Excuse me for my lack of knowledge, I just started learning LaTex

github-actions[bot] commented 2 years ago

:wave: Welcome! Looks like this is your first issue.

Hey, thanks for your contribution! Please give us a bit of time to review it. 😄

dcsim commented 2 years ago

Social header definitions are between lines 480 and 600 (roughly) in the awesome-cv.cls file.

Linkedin begins at line 529 and the icon is set with \faLinkedin on line 533:

      \ifthenelse{\isundefined{\@linkedin}}%
        {}%
        {%
          \ifbool{isstart}{\setbool{isstart}{false}}{\acvHeaderSocialSep}%
          \href{https://www.linkedin.com/in/\@linkedin}{\faLinkedin\acvHeaderIconSep\@linkedin}%
        }%

Inserting something like this between lines 479 and 480 should give you an easy way to add location to the social header:

      \ifthenelse{\isundefined{\@homecity}}%
        {}%
        {
          \faHome\acvHeaderIconSep\@homecity%
          \setbool{isstart}{false}%
        }

You will also need to add something like this in a reasonable place in social definitions of awesome-cv.cls, likely somewhere in the line 300s:

% Define writer's address
% Usage: \address{<address>}
\newcommand*{\homecity}[1]{\def\@homecity{#1}}

And you will need to add this to your cv.tex or resume.tex file around line 77:

\homecity{Sol III, Alpha Quadrant}

You could of course change the favicons to whatever favicon you want or you could make more substantive changes to the class file.

You could also add a href to homecity and link to a wikipage (or anything else).

Might need some minor tweaks, too.

I hope this was helpful and that your journey with LaTex is rewarding.

OJFord commented 2 years ago

I'd like to make it easier to configure new 'social' icon/links, it's perhaps the main source of issues & PRs; I've mentioned it a couple of times elsewhere but this is perhaps the clearest cut issue I'll link to from now on.

I'm thinking of refactoring the existing ones to use a new function taking icon and link template, which will reduce the boilerplate in adding new ones.

It'd also make it easier to change behaviour for all of them at once, such as also allowing an optional icon override as described above.

(Thanks as usual @dcsim for your prompt & thorough advice/workaround 🙂 - nothing wrong with it, I just think we can make it easier.)

OJFord commented 2 years ago

409 is one such issue, and what I've described is actually implemented in #315.