Quantcast

in PDFs - change url color, font of explicit html href, etc. ?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

in PDFs - change url color, font of explicit html href, etc. ?

Monique Semp
Hello, Doxygen users,
 
I’m using Doxygen 1.8.10 (on Windows) to generate LaTeX files, and MiKTex 2.9 to generate a PDF. The PDF is functional, but not very pretty. I’ve figured out how to customize the title page (I added graphics and non-default text) and how to get the images into the PDF.
 
1. But... how do I change the styling for things such as the color of URLs (which are just text in the Doxygen comments, and then Doxygen turns them into \href items)?
 
**** I believe I need to change something in the hyperref package’s config or what Doxygen writes to the .tex files, but I’m not sure which approach is right, nor how to do either one...
 
I’ve created a custom_doxygen.sty file, and assigned it to the LATEX_EXTRA_STYLESHEET. I assume that it’s being picked up by Doxygen because Doxygen is successfully picking up my custom LATEX_HEADER file, which is in the same directory as the custom_doxygen.sty file. But what I don’t know is what to put into the custom_doxygen.sty file?
 
If I run everything as default (that is, no LATEX_EXTRA_STYLESHEET), the following code gets written to the refman.tex file:
 
% Hyperlinks (required, but should be loaded last)
\usepackage{ifpdf}
\ifpdf
  \usepackage[pdftex,pagebackref=true]{hyperref}
\else
  \usepackage[ps2pdf,pagebackref=true]{hyperref}
\fi
\hypersetup{%
  colorlinks=true,%
  linkcolor=blue,%
  citecolor=blue,%
  unicode%
}
 
And what I need is for the “urlcolor” to also be blue (its default in the hyperref package is magenta—an odd choice for sure).
 
I tried just basically copying what was in the refman.tex file to the custom_doxygen.sty file (and making sure that the custom_doxygen.sty file *is* assigned to the LATEX_EXTRA_STYLESHEET setting in my Doxyfile) and adding a “urlcolor=blue,%” to the setup section, but there’s no change in the output.
 
2. And a similar issue to fix: links that are in the Doxygen comments as explicit <a href> entities are appearing in the PDF as light blue stretched out courier font. I’ve no idea what is setting this styling, nor how to change it?
 
Thanks for your help to figure this out!
-Monique
 

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: in PDFs - change url color, font of explicit html href, etc. ?

Monique Semp
> I’ve created a custom_doxygen.sty file, and assigned it to the LATEX_EXTRA_STYLESHEET. I assume that it’s being picked up by Doxygen ...
 
Turns out that my custom_doxygen.sty file was NOT being picked up by Doxygen. With the help of this Stack Overflow Q&A, http://stackoverflow.com/questions/1977596/how-can-i-change-the-margins-on-a-pdf-document-created-by-doxygen, I found that in addition to assigning the custom_doxygen.sty file to the Doxyfile LATEX_EXTRA_STYLESHEET option, it’s also necessary to assign it (minus the .sty extension) to the EXTRA_PACKAGES option.
 
So now I know how to effect changes, and the work becomes figuring out the appropriate LaTeX packages to use and their options/arguments. Still lots to deal with, but now the customization can proceed :-).
 
-Monique
 
 

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: in PDFs - change url color, font of explicit html href, etc. ?

Monique Semp
> I found that in addition to assigning the custom_doxygen.sty file to the Doxyfile LATEX_EXTRA_STYLESHEET option, it’s also necessary to assign it (minus the .sty extension) to the EXTRA_PACKAGES option.
 
No, that wasn’t it. I was accidentally looking at the wrong PDF, which had been produced by my manually-edited refman.tex file. So I still don’t know how to get Doxygen to add the custom commands to the refman.tex file...
 
-Monique

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: in PDFs - change url color, font of explicit html href, etc. ?

Monique Semp
In reply to this post by Monique Semp
Well, I tried putting my customization into the custom_header.tex file instead of the custom_doxygen.sty file, and Doxygen successfully picks up my settings for link colors, border colors, and PDF properties (such as initial settings, title, and author).
 
So a great deal of success :-).
 
But the expected usage of the “\urlstyle” command to change the font for links to websites and external files (vs. the links to sections/modules/entities that are within the resultant PDF) from courier (which ends up as “\tt” in the Doxygen-produced .tex files) doesn’t have any effect.
 
There’s no warning or error thrown by MiKTex/TeXworks, so the correct package(s) – hyperref, which uses urlstyle; and the ulr package that hyperref uses – seem to be correctly used (via \usepackage). But whether I set “\urlstyle{same}”, “\urlstyle{sf}”, or even “\urlstyle{Arial}”, the links to websites and external files stubbornly remain in code/courier/tt font.
 
Any suggestions?
 
Thanks so much,
-Monique

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users
Loading...