如何使用牛津生物資訊乳膠模板進行顏色交叉引用?

如何使用牛津生物資訊乳膠模板進行顏色交叉引用?

我使用牛津生物資訊乳膠模板,可在以下位置找到:

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

僅透過在方法部分新增套件和空表來修改主文件內容。

如果我載入 hyperref 套件(第 6 行),則會出現錯誤:Package calc Error: 'D' invalid at this point.

是否可以在此乳膠模板上使用 hyperref ?

感謝您的協助

筆記:我把模板放在sharelatex上,你可以即時測試它(需要2次編譯):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}

答案1

添加

\let\href\undefined

就在之前\usepackage{hyperref}


感謝 Dai Bowen 發現了問題,感謝 Stefan Kottwitz 在 中提供了類似的解決方案“如何修補軟體包”

答案2

只是對解決方案 #3 的評論:( \let\href\undefined):如果使用 pdflatex 編譯,它不起作用。包hyperref與 衝突bioinfo.cls且頁邊距未設置,這完全改變了紙張的格式。

我找到的解決方案是這樣的:

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

然後,用 LaTeX 編譯,然後 make dvipdfm your_file.dvi。另一個副作用是,如果您使用該graphicx包,則必須使用.eps圖形格式(不是.png.jpg等)。您可以用來更改格式的眾多程式之一是convertImakeMagik 套件中的命令。

答案3

背面提供了範本生物資訊學雜誌的,它似乎與該hyperref包配合得很好。

我將它與.zip從生物資訊網站下載的模板進行了比較,然後意識到這是chngpage.sty罪魁禍首。 (它仍然是舊版本 v1.1b,而其 v1.2 對 進行了一些更改hyperref。)

所以建議是刪除.sty下載的模板中的所有檔案。

答案4

接受的解決方案對我來說不起作用。但是,我發現解決此問題的最簡單方法是手動更改引文顏色,如下所示:

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

相關內容