LaTeX forum ⇒ GeneralHYPERREF HELP pls

LaTeX specific issues not fitting into one of the other forums of this category.
Drake
Posts: 6
Joined: Sun Mar 30, 2008 2:31 pm

HYPERREF HELP pls

Postby Drake » Sun Mar 30, 2008 2:40 pm

Hi.
I´m begining with LaTeX and I have a problem.
I need use hyperref inside tabular. I have big tabular rotate 90 degree (\begin{sidewaystable}[!ht]...) and in some cells I need write hyperref (citation) on literature(bibliography)
I try:

Poznámka -- zdroj informací & \begin{minipage}{3cm}{\centering{\cite{MRR}, \cite{MV300a}, \cite{MV300b}}} \end{minipage} & ................

and that same with \parbox
And when I compile file and look in to pdf then hyperref do not work.
Can anyone help me, how I can solve it?
Thanks all. ;)
Sorry, for my english

User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Postby Juanjo » Sun Mar 30, 2008 10:52 pm

Why do you need a minipage inside the table? What is the argument of the tabular environment? You should try to build and provide a minimal working example. Anyway, the following code works:
  1. \documentclass{article}
  2. \usepackage{rotating}
  3. \usepackage{hyperref}
  4.  
  5. \begin{document}
  6.  
  7. \begin{sidewaystable}
  8. \centering
  9. \begin{tabular}{|c|c|}
  10. \hline
  11. \cite{Knuth} & \cite{Lamport} \\
  12. \hline
  13. \cite[p.~100]{Knuth} & \cite{Knuth,Lamport} \\
  14. \hline
  15. \end{tabular}
  16. \caption{Text text}
  17. \end{sidewaystable}
  18.  
  19. \begin{thebibliography}{9}
  20. \bibitem{Knuth} D. Knuth, \emph{The \TeX{}book}.
  21. \bibitem{Lamport} L. Lamport, \emph{\LaTeX: A document preparation system}.
  22. \end{thebibliography}
  23.  
  24. \end{document}

By the way, the \centering command has no arguments. So, in an expression like \centering{text}, the braces are superfluous. Likewise, you may join the three citations \cite{MRR}, \cite{MV300a}, \cite{MV300b} in a single \cite command: \cite{MRR,MV300a,MV300b}

Drake
Posts: 6
Joined: Sun Mar 30, 2008 2:31 pm

Postby Drake » Mon Mar 31, 2008 9:40 am

Hi, thanks a lot for your answer :-)
But I think that my table is the same like yours example that you wrote me. If you can please look at my table how i wrote it.
Here´s the code:
  1. \begin{sidewaystable}[!ht]
  2. \centering
  3. \caption{Shrnutí parametrů výše uvedených armádních systémů.}
  4. \label{Tab6}
  5. \def\arraystretch{1.3}
  6. \begin{tabular}{|c||c|c|c|c|c|}
  7. \hline
  8. \hline
  9. Výrobce & KONGSBERG & KONGSBERG & ITT & THALES & Q--MAC \\
  10. \hline
  11. Frekvenční rozsah & 30 $÷$ 87,975\,MHz & 610 $÷$ 960\,MHz & 30 $÷$ 87,975\,MHz & 30 $÷$ 88\,MHz & 2 $÷$ 30\,MHz\\
  12. \hline
  13. Šířka pásma (c) & 57,975\,MHz & 350\,MHz & 57,975\,MHz & 58\,MHz & 28\,MHz \\
  14. \hline
  15. Šířka pásma & 45\,kHz & -- & -- & -- & 256\,kHz \\
  16. \hline
  17. Odstup kanálů & 25\,kHz & 125\,kHz & 25\,kHz & 25\,kHz & -- \\
  18. \hline
  19. ........
  20. ........
  21. ........
  22. \hline
  23. Poznámka -- zdroj informací & {\parbox{3cm}{\centering{\cite{MRR}, \cite{MV300a}, \cite{MV300b}}}} & \cite{EriTac}, \cite{EritacK}, \cite{RL424A}& \cite{SINCGARS}, \cite{SINCGARSITT} & \cite{PantherEDR}, \cite{PantherEDRa} & \cite{HF90}, \cite{HF90trans}, \cite{RadioFrek}\\
  24. \hline
  25. \end{tabular}
  26. \end{sidewaystable}


And the cite: I need to every citation in single bracket like [22], [23] ... that means it´s ok.
The problem is the every hyperref "box" is on end of page like this picture (attachement).
I don´t know where is problem because I have another smaller table when I use hyperref on figure like \ref{Figure3} and there is no problem. Only problem is hyperref on citation of literature in table :-(
Attachments
Picture_of_page1.jpg
Picture_of_page1.jpg (115.72 KiB) Viewed 4721 times

User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Postby Juanjo » Mon Mar 31, 2008 10:31 am

If I correctly understand the problem, hyperref does not establish a link between the cites to [13], [14], [15] and [16] (those you framed in green) and the corresponding entries in the bibliography. All the remaining cites in the bottom of the table are well linked to the bibliography. Am I right? Is really that the question?

At first sight, I cannot see any problem in the table. After playing with commands similar to yours (\parbox, \arraystretch...), I am unable to reproduce the error. So, until you provide a complete example, I cannot give futher help. Please, attach or copy something similar to the example in my previous post, as short as possible, which I can try to compile.

Drake
Posts: 6
Joined: Sun Mar 30, 2008 2:31 pm

Postby Drake » Mon Mar 31, 2008 11:08 am

Oki :-)
I try wrote example what I mean. I hope that is easy for example.
Maybe you should rewrite the preamble because I use \usepackage[cp1250]{inputenc}, \usepackage{czech} (for my language).
This code have 0 errors, 0 warnings and 0 bad boxes. If you compile this code in LaTeX and view it in (GhostScript or Acrobat like pdf) you can see two pages.
On the first page is tabular where I used citation and it works fine (green box and when you click on it then hyperref goto on "link" citation.
On the second page you can see exactly the same tabular like on page 1 but the table what I need is too big on width paper and than I must use "sidewaystable" (sidewaystable produce rotation and new page) --> the table is rotate 90degree. If you see there is the same citation but without "green box" around the [1]!!!And that is the problem what I have. The "green box" for this citation is on the right margin of paper. You see it?
Really sorry for my english I hope you can read it well and understand well too. :-)

  1. \documentclass[a4paper,12pt,dvipdfm]{article}
  2. %
  3. \usepackage[cp1250]{inputenc}
  4. \usepackage{czech}
  5. \usepackage{rotating}
  6. \usepackage{hyperref}
  7. %
  8. \begin{document}
  9. %
  10. \begin{table}[!ht]
  11. \centering
  12. \caption{Tabular1}
  13. \label{Tabular1}
  14. \def\arraystretch{1.3}
  15. \begin{tabular}{|c||c|c|}
  16. \hline
  17. Example & Example & Example\\
  18. \hline
  19. Citation & \cite{Hanus} & --\\
  20. \end{tabular}
  21. \end{table}
  22. %
  23. \begin{sidewaystable}[!ht]
  24. \centering
  25. \caption{Tabular2}
  26. \label{Tabular2}
  27. \def\arraystretch{1.3}
  28. \begin{tabular}{|c||c|c|}
  29. \hline
  30. Example & Example & Example\\
  31. \hline
  32. Citation & \cite{Hanus} & --\\
  33. \end{tabular}
  34. \end{sidewaystable}
  35. %
  36. \begin{thebibliography}{9}
  37. \bibitem{Hanus}
  38. Hanus, Stanislav.
  39. \emph{Wireless and Mobile Communication}
  40. Brno : Vysoke uceni technicke, 2001 -- 134 s. : ISBN: 80-214-1833-8.
  41. %
  42. \end{thebibliography}
  43. \end{document}

User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Postby Juanjo » Mon Mar 31, 2008 11:36 am

I think the problem is related with the driver you impose to use for generating the pdf file, that is, dvipdfm. Perhaps it does not work well with sidewaystable. I've removed dvipdfm from \documentclass. Then, after compiling with pdfLaTeX, everything goes fine. Try it.

I also suggest to replace \usepackage{czech} by \usepackage[czech]{babel}, which is the modern way to deal with languages.

Really sorry for my english I hope you can read it well and understand well too.

My english is not as good as I'd like too. ;)

Drake
Posts: 6
Joined: Sun Mar 30, 2008 2:31 pm

Postby Drake » Mon Mar 31, 2008 12:58 pm

Thanks, your solution is very simple and good.
When I removed dvipdfm then everything is ok and works good. :-)

I´m using a school template for project and there is defined only dvipdfm, dvips, pdftex. Usually I used dvipdfm and now I should try another way how compile project because another program and defined profile doesn´t know our special quotes ("" ) and generated some errors and warnings, but this can be repair easily I think (probably). :)

Thank you very much for your help and have a nice day ;)


Return to “General”

Who is online

Users browsing this forum: No registered users and 8 guests