2

The following URL in modernCV -

\cventry{2016}{Volunteering organizer}{Reversim Summit 2016}{Israel}{}{Organized one of the \small \textcolor{cyan}{\href{https://medium.com/@rantav/reversim-summit-2016-by-the-numbers-32046c36c9e#.a9fng7yyj}{largest community conferences in Israel}}, coording a team of 25 volunteers, 53 spakers and 925 unique visitors.}

Gives me this trouble:

! Illegal parameter number in definition of \Hy@tempa.
<to be read again>
                   .
l.77 ...eers, 53 spakers and 925 unique visitors.}

I've tried escaping the & with \&, without success.

Using a shortened link works perfectly:

\cventry{2016}{Volunteering organizer}{Reversim Summit 2016}{Israel}{}{Organized one of the \small \textcolor{cyan}{\href{SHORTENED-LINK-I-CAN-NOT-PASTE-IN-THIS-SITE}{largest community conferences in Israel}}, coording a team of 25 volunteers, 53 spakers and 925 unique visitors.}

Any idea how to escape https://medium.com/@rantav/reversim-summit-2016-by-the-numbers-32046c36c9e#.a9fng7yyj in modernCv tech?

  • 1
    Please, add a minimal but complete example showing the issue. – egreg Mar 7 '17 at 23:32
3

The problem with your url is the letter # used inside it.

The only way I know is to define a robust url (see documentation of package url, chapter "2 Defining a defined-url"): \urldef{\myself}\url{myself%node@gateway.net}.

In your case you can use

\urldef{\med1}\url{https://medium.com/@rantav/reversim-summit-2016-by-the-numbers-32046c36c9e#.a9fng7yyj}

or with %40 instead of @ (URL encoding):

\urldef{\medium}\url{https://medium.com/%40rantav/reversim-summit-2016-by-the-numbers-32046c36c9e#.a9fng7yyj}

To call the url in your code you simple have to use the command \med1 or \medium.

@Heiko-Oberdiek mentioned in his answer, that \# instead of # is accepted by hyperref. See the explanaition in his answer please. The following \url command is also possible (see \#):

\url{https://medium.com/@rantav/reversim-summit-2016-by-the-numbers-32046c36c9e\#.a9fng7yyj}

The following MWE

\RequirePackage[hyphens]{url}
\documentclass[11pt,a4paper,sans]{moderncv}

\moderncvstyle{classic} % casual, classic, banking, oldstyle and fancy
\moderncvcolor{blue} 

\usepackage[utf8]{inputenc}
\usepackage[scale=0.75]{geometry}

% personal data
\name{John}{Doe}
\title{Resumé title}
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890}
\phone[fixed]{+2~(345)~678~901}
\phone[fax]{+3~(456)~789~012}
\email{john@doe.org}
\homepage{www.johndoe.com}
\social[linkedin]{john.doe}
\social[twitter]{jdoe}
\social[github]{jdoe}
\extrainfo{additional information}
\photo[64pt][0.4pt]{example-image-a}
\quote{Some quote}

\setlength{\footskip}{66pt}
\urldef{\medium}\url{https://medium.com/%40rantav/reversim-summit-2016-by-the-numbers-32046c36c9e#.a9fng7yyj}
\urldef{\med1}\url{https://medium.com/@rantav/reversim-summit-2016-by-the-numbers-32046c36c9e#.a9fng7yyj}


\begin{document}

\makecvtitle

\cventry{2016}{Volunteering organizer}{Reversim Summit 2016}{Israel}{}{%
  Organized one of the \small \textcolor{cyan}{\medium} largest community 
  conferences in Israel, coording a team of 25 volunteers, 53 spakers 
  and 925 unique visitors.}

\cventry{2016}{Volunteering organizer}{Reversim Summit 2016}{Israel}{}{%
  Organized one of the \small \textcolor{cyan}{\med1} largest community 
  conferences in Israel, coording a team of 25 volunteers, 53 spakers and 
  925 unique visitors.}

\cventry{2016}{Volunteering organizer}{Reversim Summit 2016}{Israel}{}{%
  Organized one of the \small \textcolor{cyan}{%
  \url{https://medium.com/@rantav/reversim-summit-2016-by-the-numbers-32046c36c9e\#.a9fng7yyj}} 
  largest community conferences in Israel, coording a team of 25 volunteers, 
  53 spakers and 925 unique visitors.}

\end{document}

shows both possibilities and gives the following result:

resulting pdf

  • @ should be fine, unlike # (also per Heiko's answer). Otherwise good (upvoted meanwhile, expecting a fix either way). – Blaisorblade Aug 2 '17 at 2:03
1

The problem is #. It is used for parameters in macro definitions in TeX. Usually, \href changes the category codes to allow # in its first argument. But here, \href is used in the arguments of other macros (\textcolor, \cventry) and the category changes come to late, because the arguments of \href are already tokenized.

For this reasons, \href also supports the usage of \# instead of #:

\href{https://example.com/foobar\#anchor}{...}
  • Second \# should be # I guess? Otherwise great. – Blaisorblade Aug 2 '17 at 2:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.