2

I want two have two links, one bold and one normal.

As a MWE:

\setupinteraction[state=start,style=normal]
\starttext

{\bf\goto{Link 1}[url(http://www.example.com)]}

\goto{Link 2}[url(http://www.example2.com)]

\stoptext

These two links have the same style (neither are bold). If I omit the style=normal, then they still have the same style (both are bold). Is there no way to style links individually?

2

You can define a new interaction and style it differently. For example:

\setupinteraction[state=start,style=normal]
\defineinteraction[bold][state=start,style=bold]
\starttext

{\setinteraction[bold] \goto{Link 1}[url(http://www.example.com)]}

\goto{Link 2}[url(http://www.example2.com)]

\stoptext

If you want the interaction to follow the style of the surrounding style, simply unset style. For example,

\setupinteraction[state=start,style=]
\starttext

{\bf \goto{Link 1}[url(http://www.example.com)]}

\goto{Link 2}[url(http://www.example2.com)]

\stoptext
| improve this answer | |
  • Thanks for your help. I'm very new to ConTeXt and I keep forgetting to try basic stuff like this. – dreamlax Jul 28 '15 at 23:15
  • Don't worry. ConTeXt has a very consistent user interface. It takes some time to get used to, but once it clicks, you'll just be able to guess the solutions. – Aditya Jul 29 '15 at 1:00
2

If I change the position of the \bf directive, I seem to get your desired result:

\setupinteraction[state=start,style=normal]
\starttext

{\goto{\bf Link 1}[url(http://www.example.com)]}

\goto{Link 2}[url(http://www.example2.com)]

\stoptext

However, I am uncertain if there might be side effects to this.

| improve this answer | |

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.