TransWikia.com

How to link one word to a second word and then link the second word to a third word

TeX - LaTeX Asked on June 6, 2021

enter image description here

Here I want to link the words ‘Round 1 Problem 1’, ‘Round 1 Problem 2’ to the words ‘A 1’, ‘A 2’ of the second page (The picture just below). So that whenever I click on Round 1 Problem 1 it takes me to A 1enter image description here Now again in the second page I want to link the word ‘A 1’ to the words of ‘A 1’ the third page (The picture just below) so that whenever I click on A 1 on second page it takes me to the Solution of the A 1

enter image description here

I am using hyperlink and hypertarget for this. Here is the code i am using.

  colframe=black,colback=Chartreuse1,
  boxrule=0.5pt,arc=4pt,boxsep=0pt,left=6pt,right=6pt,top=6pt,bottom=6pt}

begin{center}
section*{huge{underline{Round 1 Problems}}}
    mybox{hyperlink{R1P1}{Round 1 P1}}  vspace{4mm}
    mybox{Round 1 P2} vspace{4mm}
    mybox{Round 1 P3}  vspace{4mm}
    mybox{Round 1 P4}  vspace{4mm}
    mybox{Round 1 P5}}  vspace{4mm}
    mybox{Round 1 P6}   vspace{4mm}
section*{huge{underline{Round 2 Problems}}}
    mybox{Round 2 P1}  vspace{4mm}
    mybox{Round 2 P2}  vspace{4mm}
    mybox{Round 2 P3}  vspace{4mm}
    mybox{Round 2 P4}  vspace{4mm}
    mybox{Round 2 P5}  vspace{4mm}
    mybox{Round 2 P6}  vspace{4mm}
end{center} 


mybox{{Problem 1 : }}
Prove the inequality which states that if you let $x_{1}, x_{2}, ldots, x_{n}$ be positive real numbers, with $n geq 2,$ then you have the inequality
$$
frac{x_{1}}{x_{2}+x_{3}+cdots+x_{n}}+frac{x_{2}}{x_{1}+x_{3}+x_{4}+cdots+x_{n}}+cdots+frac{x_{n}}{x_{1}+x_{2}+cdots+x_{n-1}} geq frac{n}{n-1}
$ 

One Answer

You can nest a hypertarget inside a hyperlink, if you want. But even the following works without problem:

enter image description here

documentclass{article}

usepackage{hyperref}

begin{document}

Jump to hyperlink{Problem-1}{Problem~1}.

bigskip

hypertarget{Problem-1}{}hyperlink{Solution-1}{textbf{Problem~1}}.

bigskip

hypertarget{Solution-1}{textbf{Solution~1}}.

end{document}

Clicking on the first Problem 1 jumps you to Problem 1. Clicking on Problem 1 jumps you to Solution 1. The key is to use unique target names.

Correct answer by Werner on June 6, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP