Document ClassesHyperref Colorlinks

Information and discussion about specific document classes and how to create your own document classes.
User avatar
renno
Posts: 54
Joined: Thu Jun 07, 2007 7:16 pm

Hyperref Colorlinks

Post by renno »

Dear all,

Karthik was very right. The problem is caused by the spacing code in the style file. If you comment this code, and instead use the following code (I found it somewhere online):

Code: Select all

%%      Redefine the macro used for floats (including figures and tables)
%%      so that single spacing is used.
%%      (Note \def\figure{\@float{figure}set single spacing} doesn't work
%%      because figure has an optional argument)

%% Fix from GT (RPI, thesis.cls)  03-18-2007 ve.

\let\latex@xfloat=\@xfloat
\def\@xfloat #1[#2]{%
  \latex@xfloat #1[#2]%
  \def \baselinestretch {1}\@normalsize  %%  GT: need \@normalsize?
  \normalsize
}
The problem is solved! Now, I could use the colorlinks option of hyperref, and all my references are colored. Moreover, the spacing of the floats is single-spaced...

Thanks for everyone who contributed to this...

Jamil Renno
If there is no way, we will make one...
Hanibal

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

karthik
Posts: 4
Joined: Wed Jun 13, 2007 7:39 am

Re: Hyperref Colorlinks

Post by karthik »

That's great... It now works for me too...

I just have an academic question... While I can't see an obvious difference in the output using the two styles, what was that huge loop trying to achieve...

Regards
Karthik
Marwa
Posts: 1
Joined: Mon Mar 26, 2012 9:14 pm

Re: Hyperref Colorlinks

Post by Marwa »

Hi,
I was getting the initial error message that began this thread, and commenting out the lines from the .sty file fixed that error. But then I added the new lines you suggested to add in order to have single spacing for figures, but I guess something is missing since this time I got a fatal error and my file failed to compile. Is there something missing from the new lines of code that you added?
Thanks,
M.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Hyperref Colorlinks

Post by localghost »

Marwa wrote:Hi,
I was getting the initial error message that began this thread, and commenting out the lines from the .sty file fixed that error. But then I added the new lines you suggested to add in order to have single spacing for figures, but I guess something is missing since this time I got a fatal error and my file failed to compile. Is there something missing from the new lines of code that you added?
Thanks,
M.
This thread is more than four(!) years old. Developments within this time may need different solutions from those proposed here. Please open a new topic and include an adequate problem description.
Post Reply