简体   繁体   中英

How can I add color to an anchor element in Overleaf?

Googled and tried couple of solutions added href attribute but the links after \begin doesn't get colored, please help me in this situation Here's the code

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Deedy - One Page Two Column Resume
% LaTeX Template
% Version 1.2 (16/9/2014)
%
% Original author:
% Debarghya Das (http://debarghyadas.com)
%
% Original repository:
% https://github.com/deedydas/Deedy-Resume
%
% IMPORTANT: THIS TEMPLATE NEEDS TO BE COMPILED WITH XeLaTeX
%
% This template uses several fonts not included with Windows/Linux by
% default. If you get compilation errors saying a font is missing, find the line
% on which the font is used and either change it to a font included with your
% operating system or comment the line out to use the default font.
% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 
% TODO:
% 1. Integrate biber/bibtex for article citation under publications.
% 2. Figure out a smoother way for the document to flow onto the next page.
% 3. Add styling information for a "Projects/Hacks" section.
% 4. Add location/address information
% 5. Merge OpenFont and MacFonts as a single sty with options.
% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% CHANGELOG:
% v1.1:
% 1. Fixed several compilation bugs with \renewcommand
% 2. Got Open-source fonts (Windows/Linux support)
% 3. Added Last Updated
% 4. Move Title styling into .sty
% 5. Commented .sty file.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Known Issues:
% 1. Overflows onto second page if any column's contents are more than the
% vertical limit
% 2. Hacky space on the first bullet point on the second column.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\documentclass[]{deedy-resume-openfont}
\usepackage{fancyhdr}
%  \definecolor{links}{HTML}{2A1B81}
% \hypersetup{colorlinks,linkcolor=,urlcolor=links}
\pagestyle{fancy}
\fancyhf{}


 \usepackage{titlesec}
\usepackage{color}

\usepackage{hyperref} 


\begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%     LAST UPDATED DATE
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%     TITLE NAME
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\namesection{Yuvraj}{A}{ \urlstyle{same}\href{https://yuvraj-agarkar.netlify.app/}{yuvraj-agarkar.com} \\
\href{mailto:yuvraj@gmail.com}{yuvraj@gmail.com} | +80 0000000 
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%     COLUMN ONE
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{minipage}[t]{0.33\textwidth} 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%     EDUCATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Education} 

\subsection{Savitribai Phule Pune University}
\descript{BTech IN Computer Engineering}
\location{2025 | college}
\sectionsep

\subsection{Computer Engineering}
\descript{Diploma in Computer Engineering}
\location{2019-2022 | Pune, Maharashtra}
Pimpri Chinchwad Polytechnic\\
\location{ Aggregate: 91.77\% }
\sectionsep


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%     LINKS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Links} 
Twitter:// \href{https://twitter.com/agarkaryuvraj?lang=en}{\bf @AgarkarYuvraj} \\
Github:// \href{https://github.com/Yuvraj102}{\bf yuvraj102} \\
Leetcode://  \href{https://leetcode.com/}{\bf foobar} \\
LinkedIn://  \href{https://www.linkedin.com/in/yuvraj-agarkar-770a861a4/?originalSubdomain=in}{\bf foobar} \\
GFG://  \href{https://auth.geeksforgeeks.org/user/yuvrajagarkar24}{\bf yuvrajagarkar24} \\
Website://  \href{https://yuvraj-agarkar.netlify.app/}{\bf Portfolio}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%     COURSEWORK
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Activities}
\subsection{Hackathons}
Participated in Girl Script Hackathon \\
Created a job portal for women's In rural areas \\
Used EJS for templating, Extendable templates\\
Nodejs as a runtime Environment\\
Expressjs on top of Nodejs\\
Firebase, Cloud Firestore\\
\sectionsep

\subsection{Tech Twitter}
Consistently Interacting With the Tech Community on Twitter\\
Built >followers\\
Twitter tech spaces, threads etc\\
Writing Blogs on Medium\\
Tech Lead at E-cell Rscoe club\\


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%     SKILLS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Skills}
\subsection{Programming}
% \location{Over 5000 lines:}
C/C++ \textbullet{}   HTML/CSS \textbullet{} Python \textbullet{} Javascript \\
Nestjs \textbullet{} Reactjs \textbullet{} Expressjs  \\
\textbullet{} Native iOS \textbullet{} Swift \textbullet{} DBMS \textbullet{} MongoDB \textbullet{} SQL \textbullet{} Various Other Libraries
\\ \location{Tools used:}
Vscode \textbullet{} Atom \textbullet{} Git and Github \textbullet{} Postman \textbullet{} npm \textbullet{} DBeaver


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%     COLUMN TWO
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\end{minipage} 
\hfill
\begin{minipage}[t]{0.66\textwidth} 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%     EXPERIENCE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Experience}
\runsubsection{Bell}
\descript{| Frontend Developer }
\location{August 2022 – Present | Remote}
\vspace{\topsep} % Hacky fix for awkward extra vertical space
\begin{tightemize}
\item Building scalable backend platform for bells, 
\item Nodejs Developer, Nestjs framework, Typescript and Javascript. 
\item Postgres Sql, Heroku and AWS, Node mailer, Google Auth, 
\end{tightemize}
\sectionsep

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%     RESEARCH
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Projects}
\runsubsection{Student's Portal}
\descript{| Social Student's Community}
Created a social platform for students to share their doubts \textbf{\href{https://sd.netlify.app/}{Live here}} \textbf {Implemented roles management, Google Auth, Cloud storage, Deployment, Sockets, Nodejs, Expressjs, Reactjs}  \\ 
Student's and Teachers can interact, Upload Notes, Create Profile, Doubts, Upvote/Downvote posts
\sectionsep

\runsubsection{Daily Journal}
\descript{| Journaling Platform }
Created a journaling platform, \textbf {Implemented Auth, Follow and Unfollow other users, Image Upload and Retrive from Cloud (Cloudinary Storage), Nodejs, Expressjs, pug templating, Nodemailer for sending email updates, HTML/CSS, Onrender, MongoDB and Mongoose etc.}
Live platform \textbf{\href{https://daily-journal-co.com/}{here}, \href{https://github.com/Yuvraj102/daily_journal_public}{source code}}
\sectionsep

\runsubsection{Object Detection}
Created an iOS App for detecting object using machine learning via phone camera, \textbf {used REST api (wikipedia), Swift programming, Xcode editor, Machine learning model, MVC design pattern, Cocoa pods}
\textbf{\href{https://github.com/yuvraj/ObjectsDetectionApp/}{(Source Code)}} \\
\textbf{\emph{Other Projects}} \href{https://github.com/Yuvraj102/spotifyClone}{Spotify}, \href{https://github.com/Yuvraj102/Airbnb-clone}{Airbnb}, \href{https://github.com/Yuvraj102/Amazon-Ui}{Amazon}, 
\href{https://github.com/Yuvraj102/Niyati-Trail}{Niyati Trail (Group Project)}, 
\href{https://github.com/Yuvraj102/Slack-Clone}{Slack} \\
\textbf{\emph{\href{https://drive.google.com/drive/folders/abc}{Video Demonstration}}} 
\sectionsep

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%     AWARDS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Articles}
\textbf{[1].} \href{https://yuvraj-agarkar.medium.com/your-very-first-react-app-building-a-react-app-from-scratch-939c542a828c}{Your Very First React App} \\[1\baselineskip]
\textbf{[2].} \href{https://yuvraj-agarkar.medium.com/your-very-first-sass-project-what-is-sass-how-to-use-it-d947e61d1713} {Your Very First SASS project} \\[1\baselineskip]
\textbf{[3].} \href{https://yuvraj-agarkar.medium.com/filemanager-in-swift-ios-storing-in-plist-file-4fb1ec94855}{Filemanager in Swift and How to Use it ?} \\ [1\baselineskip]
\textbf{[4].} \href{https://yuvraj-agarkar.medium.com/database-connectivity-with-java-using-mysql-5bf9c1802786}{Databse connectivity with java} \\ [1\baselineskip]
\textbf{[5].} \href{https://yuvraj-agarkar.medium.com/threading-multithreading-made-easy-using-java-dfa2c298aa45}{Threading, Multithreading made easy (using java)}
\sectionsep


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%     PUBLICATIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\end{minipage} 
\end{document}  \documentclass[]{article}

here's the entire code, i have tried couple of solutions but it just doesnt work for href link after \begin{document} tag All the links before that work but just the links after that tag shows no effect on their color property

This template tries very, very hard to switch off all possibilities of coloured links:


% !TeX TS-program = lualatex
\documentclass[]{deedy-resume-openfont}

\hypersetup{colorlinks=true,linkcolor=red}

\setmainfont[Path = fonts/lato/,BoldItalicFont=Lato-RegIta,BoldFont=Lato-Reg,ItalicFont=Lato-LigIta]{Lato-Lig}


\begin{document}

test

\href{example.com}{link text}

\end{document}  

在此处输入图像描述

To add color to an anchor element in Overleaf, you can use the \color{color} command from the xcolor package. Here's an example of how you can use it to change the color of an anchor element:

First, add the xcolor package to your document by including the following line at the beginning of your document: \usepackage{xcolor} Next, enclose the text of your anchor element in the \color command, like this: \color{color}{\textnormal{anchor text}} Replace color with the name of the color you want to use (eg, red, blue, green, etc.). You can also use hex codes for colors, like #FF0000 for red or #0000FF for blue.

Here's an example of how you could use the \color command to create a red anchor element: \color{red}{\textnormal{This is a red anchor element}}

You can also use the \colorbox command to create a colored box around your anchor element. To do this, use the following syntax: \colorbox{color}{\textnormal{anchor text}} Replace color with the name or hex code of the color you want to use, and anchor text with the text of your anchor element.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM