1

There is this command, to create an href link

\href{this is my text}{http://tex.stackexchange.com/q/275848/71471}

I want to change the this is my text to a rmfamily font (see the first line in the screen capture as an example)

Is there a way to do this?

Andy K
  • 189

1 Answers1

1

The \href take two arguments: the first is the URL to be linked and the second the text showed in the link, so it should be:

\href{http://tex.stackexchange.com/q/275848/71471}{this is my text}

The command do not change the font style in any way, so often it will be already in roman (serifed) font family, that is the default text style in most document classes.

Otherwise, you can change using \textrm{<text>} or \rmfamily <text> since the braces of the argument limit the scope of the command:

\href{http://tex.stackexchange.com/q/275848/71471}{\textrm{this is my text}}
\href{http://tex.stackexchange.com/q/275848/71471}{\rmfamily this is my text}
Fran
  • 80,769