交叉引用(\cite)分离 - TeX4ht

交叉引用(\cite)分离 - TeX4ht

我的代码如下:

\documentclass{article}
\usepackage{ifthen}


\makeatletter
\newboolean{Journal}
\newboolean{Proceedings}
\newboolean{NewProceedings}%                                     02-14-13

\renewcommand{\maketitle}{
  \begingroup
    \renewcommand{\thefootnote}{\arabic{footnote}}%
    \ifthenelse{\boolean{@twocolumn}}
      {\ifthenelse{\equal{\col@number}{\@ne}}
                  {\@maketitle}
                  {\twocolumn[\@maketitle]}}%
      {\newpage
       \global\@topnum\z@   % Prevents figures from going at top of page.
       \@maketitle}
    \@thanks
  \endgroup
  \setcounter{footnote}{0}%
  \let\thanks\relax
  \let\maketitle\relax\let\@maketitle\relax
%  \gdef\@thanks{}\gdef\@author{}\gdef\@title{}
}
%
\renewcommand{\@maketitle}{%
  \newpage
  \null
% \begin{center}%
    \ifthenelse{\boolean{Journal}}
               {\vspace{0.00in}}
               {\ifthenelse{\boolean{NewProceedings}}%               02-14-13
                 {\vspace{1.40in}}%                                  02-14-13
                 {\vspace{1.40in}}}
    \centering
    {\large\bfseries\@title\par}%
     \vspace{1.0em}%
    {\normalsize\normalfont
      \begin{tabular}[t]{c}%
        \@author
      \end{tabular}\par}%
% \end{center}%
  \par
  \vspace{0.5em}}%

%%Modified and derived from chicago.sty
\let\@internalcite\cite
\newcommand{\citedata}%
   {\@ifnextchar [{\@tempswatrue\@citedatax}%
                  {\@tempswafalse\@citedatax[]}}
%
\def\@citedatax[#1]#2{%
\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
  \def\@citea{}\@cite{\@for\@citeb:=#2\do%
    {\@citea\def\@citea{, }\@ifundefined% by Young
       {b@\@citeb}{{\bf ?}%
       \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
{\csname b@\@citeb\endcsname}}}{#1}}%
%
\def\@citex[#1]#2{%
\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
  \def\@citea{}\@cite{\@for\@citeb:=#2\do%
    {\@citea\def\@citea{; }\@ifundefined% by Young
       {b@\@citeb}{{\bf ?}%
       \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
{\csname b@\@citeb\endcsname}}}{#1}}%
%
\renewcommand{\cite}%
   {\def\@citeseppen{-1000}%
    \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
    \def\citeauthoryear##1##2##3{##2 ##3}\@internalcite}
\newcommand{\citeNP}%
   {\def\@citeseppen{-1000}%
    \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
    \def\citeauthoryear##1##2##3{##2 ##3}\@internalcite}
\newcommand{\citeN}%
   {\def\@citeseppen{-1000}%
    \def\@cite##1##2{##1\if@tempswa , ##2)\else{)}\fi}%
    \def\citeauthoryear##1##2##3{##2 (##3}\citedata}
\newcommand{\citeA}%
   {\def\@citeseppen{-1000}%
    \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
    \def\citeauthoryear##1##2##3{##2}\@internalcite}
\newcommand{\citeyear}%
   {\def\@citeseppen{-1000}%
    \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
    \def\citeauthoryear##1##2##3{##3}\citedata}
\newcommand{\citeyearNP}%
   {\def\@citeseppen{-1000}%
    \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
    \def\citeauthoryear##1##2##3{##3}\citedata}
\makeatother
\begin{document}

\makeatletter
\let\@fnsymbol\@arabic
\makeatother

\title{Article Title}

\author{
Author 1
%
% ---- The first of two styles for addresses: using footnotes and \thanks ----
\thanks{
Research Associate, Research Centre, University, GPO Box 000, Perth,
WA 000 (corresponding author). E-mail: [email protected]},
%
% Adding a second author with the same affiliation (still using \thanks):
%  \\
Author 2
\thanks{
Research, Research Centre, University, GPO Box, WA 000.},
%
Author 3
\thanks{Professor, Research Centre, University, GPO Box 000, 6845,;
Department of Maths, University of Technology, PO Box 000.}
%
and
Author 4
\thanks{
Research Fellow, Research Centre, University, GPO Box 0000.}
}

\maketitle


This is for test deviation \cite{ALLAN:1987}
Using undifferenced and uncombined GPS L1 observations in PPP-RTK
network processing, with the help of the \textsl{S}-system theory
\cite{BAARDA:1981}, rank deficiencies  \citeN{TEUNISSEN:2015}
continuous cite \cite{ALLAN:1987,BANVILLE:2014}

\begin{thebibliography}{}

\bibitem[\protect\citeauthoryear{}{Allan}{1987}]{ALLAN:1987}
Allan, D.~W. (1987).
\newblock ``{Time and Frequency (Time-Domain) Characterization, Estimation, and
  Prediction of Precision Clocks and Oscillators}.''\ {\em IEEE T. Ultrason.
  Ferr.}, 34(6), 647--654.

\bibitem[\protect\citeauthoryear{}{Baarda}{1981}]{BAARDA:1981}
Baarda, W. (1981).
\newblock {\em {S-transformations and criterion matrices, in Publications on
  geodesy (Vol. 5, Nr. 1)}}.
\newblock Netherlands Geodetic Commission, Delft, the Netherlands, second
  revised edition.

\bibitem[\protect\citeauthoryear{}{Banville et~al.\@}{2014}]{BANVILLE:2014}
Banville, S., Collins, P., Zhang, W., and Langley, R.~B. (2014).
\newblock ``{Global and Regional Ionospheric Corrections for Faster PPP
  Convergence}.''\ {\em Navigation: Journal of The Institute of Navigation},
  61(2), 115--124.

\bibitem[\protect\citeauthoryear{}{Teunissen and
  Khodabandeh}{2015}]{TEUNISSEN:2015}
Teunissen, P. J.~G. and Khodabandeh, A. (2015).
\newblock ``{Review and principles of PPP-RTK methods}.''\ {\em J. Geodesy},
  89(3), 217--240.

\end{thebibliography}

\end{document}

如果我们在 LaTeX 中运行该文件,则引用分隔符将以分号显示,这是正确的,但如果我在 htlatex 中运行该文件,则分隔符将更改为逗号,但我只需要获取分号。请指教...

答案1

\@citex以下是该宏的修改版本latex.4ht

\Preamble{xhtml}
\makeatletter
\def\@citex[#1]#2{%
  \let\@citea\@empty
  \csname a:cite\endcsname
\@cite{\@for\@citeb:=#2\do
    {\@citea\def\@citea{;\penalty\@m\ }%
     {\SUBOff \SUPOff
\xdef\@citeb{\expandafter\@firstofone\@citeb}}%
     \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
     \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}%
       \G@refundefinedtrue
       \@latex@warning
         {Citation `\@citeb' on page \thepage \space undefined}}%
       {{\cIteLink {X\@citeb}{}%
\csname b@\@citeb\endcsname
         \EndcIteLink
}}}}{#1}\csname b:cite\endcsname
}
\makeatother
\begin{document}
\EndPreamble

唯一的区别是那{\@citea\def\@citea{;\penalty\@m\ }%行。结果如下:

在此处输入图片描述

相关内容