Wie färbe ich Querverweise mit der Latex-Vorlage „Oxford Bioinformatics“ ein?

Wie färbe ich Querverweise mit der Latex-Vorlage „Oxford Bioinformatics“ ein?

Ich verwende die Latex-Vorlage „Oxford Bioinformatics“, verfügbar unter:

http://www.oxfordjournals.org/our_journals/bioinformatics/for_authors/cabios-template.zip

Der Inhalt der Hauptdatei wird nur durch das Hinzufügen von Paketen und einer leeren Tabelle im Methodenabschnitt geändert.

Wenn ich das Hyperref-Paket lade (Zeile 6), wird ein Fehler ausgelöst:Package calc Error: 'D' invalid at this point.

Ist es möglich, Hyperref auf dieser Latex-Vorlage zu verwenden?

Vielen Dank für Ihre Hilfe

Notiz:Ich habe die Vorlage auf Sharelatex gestellt, Sie können sie live testen (2 Kompilierungen sind erforderlich):https://fr.sharelatex.com/project/582c3477343d34b37017330e

\documentclass{bioinfo}
\usepackage{caption, slashbox,multirow}
\usepackage{algorithm,algorithmicx}
\usepackage{amsmath,mathtools}
\usepackage{lmodern,microtype}
%\usepackage[unicode,colorlinks,citecolor={blue},urlcolor={blue},breaklinks]{hyperref}
\usepackage{hypcap}
\copyrightyear{2015} \pubyear{2015}
\access{Advance Access Publication Date: Day Month Year}
\appnotes{Manuscript Category}

\begin{document}
\firstpage{1}

\subtitle{Subject Section}

\title[short Title]{This is a title}
\author[Foo \textit{et~al}]{Foo\,$^{\text{\sfb1,2,3,}*}$ \footnote{to whom correspondence should be addressed}}
\address{Bar}


\corresp{$^\ast$To whom correspondence should be addressed.}

\history{Received on XXXXX; revised on XXXXX; accepted on XXXXX}

\editor{Associate Editor: XXXXXXX}

\abstract{\textbf{Motivation:} Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text
Text Text Text Text Text.\\
\textbf{Results:} Text  Text Text Text Text Text Text Text Text Text  Text Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text  Text Text Text Text Text Text\\
\textbf{Availability:} Text  Text Text Text Text Text Text Text Text Text  Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text Text  Text\\
\textbf{Contact:} \href{[email protected]}{[email protected]}\\
\textbf{Supplementary information:} Supplementary data are available at \textit{Bioinformatics}
online.}

\maketitle

\section{Introduction}

\section{Approach}


\begin{methods}
\section{Methods}

Table~\ref{table:new}

\begin{table*}[!ht]
    \processtable{A table \label{table:new}}{}{This is a footnote}
\end{table*}

\end{methods}



\section{Discussion}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%     please remove the " % " symbol from \centerline{\includegraphics{fig01.eps}}
%     as it may ignore the figures.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\section{Conclusion}



\section*{Acknowledgements}

\section*{Funding}

This work has been supported by the... Text Text  Text Text.\vspace*{-12pt}

\bibliographystyle{natbib}
%\bibliographystyle{achemnat}
%\bibliographystyle{plainnat}
%\bibliographystyle{abbrv}
%\bibliographystyle{bioinformatics}
%
%\bibliographystyle{plain}
%
%\bibliography{Document}
\bibliography{document}

\end{document}

Antwort1

Hinzufügen

\let\href\undefined

kurz bevor \usepackage{hyperref}.


Vielen Dank an Dai Bowen für die Identifizierung des Problems und an Stefan Kottwitz für die Bereitstellung einer ähnlichen Lösung in„So patchen Sie ein Paket“.

Antwort2

Nur ein Kommentar zu Lösung Nr. 3: ( \let\href\undefined): es funktioniert NICHT, wenn Sie mit pdflatex kompilieren. Das hyperrefPaket steht im Konflikt mit bioinfo.clsund die Ränder sind nicht festgelegt, was das Dokument völlig desformatiert.

Die Lösung, die ich gefunden habe, ist diese:

\let\href\undefined
\usepckage[divpdfm]{hyperref}

und dann mit LaTeX kompilieren und später make dvipdfm your_file.dvi. Ein weiterer Nebeneffekt ist, dass Sie, wenn Sie das Paket verwenden , als grafisches Format für Ihre Abbildungen graphicxverwenden müssen (nicht , , usw.). Eines der vielen Programme, die Sie zum Ändern des Formats verwenden können, ist der Befehl im ImakeMagik-Paket..eps.png.jpgconvert

Antwort3

Overleaf bietet eineVorlagedes Bioinformatik-Journals und es scheint gut mit dem hyperrefPaket zu funktionieren.

Ich habe es mit der .zipVorlage verglichen, die von der Bioinformatik-Website heruntergeladen wurde, und dann festgestellt, dass es daran chngpage.styschuld ist. (Es ist immer noch eine alte Version v1.1b, während in v1.2 einige Änderungen vorgenommen wurden hyperref.)

Es wird daher empfohlen, alle .styDateien in der heruntergeladenen Vorlage zu löschen.

Antwort4

Die akzeptierte Lösung hat bei mir nicht funktioniert. Ich habe jedoch festgestellt, dass sich dieses Problem am einfachsten lösen lässt, indem man die Zitatfarbe manuell wie folgt ändert:

\renewcommand{\cite}[1]{{\color{blue} \textsc{\citeauthor{#1}} (\citeyear{#1})}} \renewcommand{\citep}[1]{({\color{blue} \textsc{\citeauthor{#1}} \citeyear{#1}})}

verwandte Informationen