Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
\documentclass[a4paper,11pt]{article}

\usepackage[utf8]{inputenc}
\usepackage[MeX]{polski}

\makeatletter
\renewcommand\@seccntformat[1]{\csname the#1\endcsname.\quad}
\renewcommand\numberline[1]{#1.\hskip0.7em}
\makeatother


\usepackage{indentfirst}
\usepackage{url}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyfoot[C]{\thepage}
\fancyhead[R]{{\small Krakowskie Centrum Psychodynamiczne\\
\url{www.kcp.krakow.pl}}}
\fancyhead[L]{{\small Diagnoza strukturalna cz. I\\Otto F. Kernberg}}
      \renewcommand{\headrulewidth}{0.2pt}
\fancypagestyle{plain}
{
 \fancyhead{}
        \renewcommand{\headrulewidth}{0.2pt} % pozioma kreska
}

%\usepackage[hyphens]{url}
\usepackage{hyperref}
\hypersetup
{   
 colorlinks,
 citecolor=black,
 filecolor=black,
 linkcolor=black,
 urlcolor=black,
 pdftex
}

\frenchspacing




\begin{document}
Some text
\end{document}

All time I have problems whit hyperref. Doesn't matter what I do, it still doesn't work. Any suggestions why is that? What, exactly am I doing wrong?

share|improve this question
    
The method I suggested in this answer works for me. Please precise what "doesn't work". –  egreg Jun 24 '12 at 13:24
    
After I genreted a pdf, a when I go to the TeXStudio View I click on a hiperlink and it does work. But when I open a normal pdf, from my hard memory - after a click on a link, nothing happen. What is most important, when I download a pdf[Latex one] from a web, and there is a hiperlink inside this document -- it does work, so my pdf viewer works fine. So I wonder, what is wrong? –  Daniel Miliński Jun 24 '12 at 13:32
    
Sorry, but Paulo Cereda helped testing the example with my suggested syntax and it works on a GNU/Linux box and on Windows, other than on Mac OS X (this is where I tested). –  egreg Jun 24 '12 at 13:51

1 Answer 1

up vote 5 down vote accepted

I suggest you to write

\fancyhead[R]{%
  \small Krakowskie Centrum Psychodynamiczne\\
  \href{http://www.kcp.krakow.pl}{\nolinkurl{www.kcp.krakow.pl}}%
}

that will print only www.kcp.krakow.pl but will refer internally to http://www.kcp.krakow.pl.

You can check that it's considered indeed a URL by changing the option

urlcolor=red

and see that www.kcp.krakow.pl appears in red.

As an aside, put also

\setlength{\headheight}{25pt}

in your preamble, to ensure correct positioning of the header.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.