超链接没有响应

超链接没有响应

在我的输出 PDF 中,\href似乎不起作用。我使用 pdfLaTeX 生成 PDF 文件,但在编译的文件中,链接未连接到网站。我该如何修复它?

\documentclass[a4paper,12pt,final]{memoir}
\usepackage[utf8]{inputenc}
\usepackage{polski}


\pagestyle{empty}   
\setlength{\parindent}{0pt} 


% required packages 
\usepackage{flowfram}                                   
\usepackage[top=1cm,left=1cm,right=1cm,bottom=1cm]{geometry}
\usepackage{graphicx}                                       
\usepackage{url}                                            
\usepackage[usenames,dvipsnames]{xcolor}                
\usepackage{multicol}
        \setlength{\multicolsep}{0pt}
\usepackage{paralist}
\usepackage{tikz}
\frenchspacing

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Create column layout
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% define length commands
\setlength{\vcolumnsep}{\baselineskip}
\setlength{\columnsep}{\vcolumnsep}

% frame setup (flowfram package)
% left frame
% left frame
\newflowframe{0.2\textwidth}{\textheight}{0pt}{0pt}[left]
        \newlength{\LeftMainSep}
        \setlength{\LeftMainSep}{0.2\textwidth}
        \addtolength{\LeftMainSep}{1\columnsep}

% small static frame for the vertical line
\newstaticframe{1.5pt}{\textheight}{\LeftMainSep}{0pt}

% content of the static frame
\begin{staticcontents}{1}
\hfill
\tikz{%
        \draw[loosely dotted,color=RoyalBlue,line width=1.5pt,yshift=0]
        (0,0) -- (0,\textheight);}%
\hfill\mbox{}
\end{staticcontents}

% right frame
\addtolength{\LeftMainSep}{1.5pt}
\addtolength{\LeftMainSep}{1\columnsep}
\newflowframe{0.7\textwidth}{\textheight}{\LeftMainSep}{0pt}[main01]
% horizontal rule between frames (using TikZ)
\renewcommand{\ffvrule}[3]{%
\hfill
\tikz{%
        \draw[loosely dotted,color=Orange,line width=1.5pt,yshift=-#1] 
        (0,0) -- (0pt,#3);}%
\hfill\mbox{}}
\insertvrule{flow}{1}{flow}{2}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% define macros (for convience)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\Sep}{\vspace{1.5em}}
\newcommand{\SmallSep}{\vspace{0.5em}}

\newenvironment{OMnie}
        {\ignorespaces{\color{RoyalBlue} O Sobie}}
        {\Sep\ignorespacesafterend}

\newcommand{\CVSection}[1]
        {\Large\textbf{#1}\par
        \SmallSep\normalsize\normalfont}

\newcommand{\CVItem}[1]
{\textbf{\color{RoyalBlue} #1}}
\usepackage{hyperref}
\usepackage{hyperref}
\hypersetup
{   
        colorlinks,
        citecolor=black,
        filecolor=black,
        linkcolor=gray,
        urlcolor=orange,
        pdftex
}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Begin document
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

% Left frame
%%%%%%%%%%%%%%%%%%%%
\begin{figure}
        \hfill
        %\includegraphics[width=0.9\columnwidth]{daniel}
        \vspace{-7cm}
\end{figure}

\begin{flushright}\small
        Daniel Miliński \\
        \href{mailto:[email protected]}        {\nolinkurl{[email protected]}}  \\
        \url{www.kognitywistyka.net} \\
        (791) 26 05 29
\end{flushright}\normalsize
\framebreak


% Right frame
%%%%%%%%%%%%%%%%%%%%
\Huge\bfseries{\color{RoyalBlue} Daniel Miliński} \\
\Large\bfseries  Kognitywista \
\normalsize\normalfont

\begin{OMnie}
\href{http://kcp.krakow.pl}{KCP}
Kognitywisci stanowią -- ludzie chcą się nauczyć myśleć jak mszyny, m y próbujemy [po więcej informacji na temat: Czym jest Kognitwistyka?
Multydyscyplinaren wykształcenie pozwala na 
\href{http://kognitywistyka.net}{go to button}


\end{OMnie}

\end{document}

答案1

如果你说\url{www.kognitywistyka.net}hyperref就无法知道你声明的是哪种链接。

我会输入地址

\begin{flushright}\small
Daniel Miliński \\
\footnotesize
  \ignorewidth{\href{mailto:[email protected]}{\nolinkurl{[email protected]}}}  \\
  \ignorewidth{\href{http://www.kognitywistyka.net}{\nolinkurl{www.kognitywistyka.net}}} \\
(791) 26 05 29
\end{flushright}

因此它保留在四行中。该\ignorewidth命令定义为

\newcommand{\ignorewidth}[2][r]{\makebox[0pt][#1]{#2}}

你应该把它添加到你的序言中。

相关内容