我正在修改现有模板,因此我必须遵守某些条件。
\documentclass
是book
。参考书目由包管理cite
,我不能使用bibtex
nor biblatex
。有几个操作标题的命令我不明白(它们是由其他人编写的):
\newcommand{\Author}[2]{\begin{center}\textbf{\large #1} \end{center} \medskip
\renewcommand{\@evenhead}{\raisebox{1mm}[\headheight][0pt]%
{\vbox{\hbox to\textwidth{\thepage \hfill\strut {\small #2}\hfill}\hrule}}} }
\newcommand{\shorttitle}[1]{\renewcommand{\@oddhead}{\raisebox{1mm}[\headheight][0pt]%
{\vbox{\hbox to\textwidth{\strut \hfill{\small #1}\hfill\thepage}\hrule}}} }
它们似乎没有什么效果,但我害怕改变它们。
REFERENCES
问题是:当我使用环境时,如何抑制出现在标题规则上方的文本\thebibliography
?理想的情况是不清除而抑制任何改变\thebibliography
由环境完成的标题。
我已经调整了书目标题的设计
\usepackage{etoolbox}
\patchcmd{\thebibliography}
{\chapter*}
{\vmmshbibcaption}
{}
{}
其中\vmmshbibcaption
是自定义设计命令。
我尝试过
\patchcmd{\thebibliography}
{\chaptermark}
{}
{}
{}
但没有效果。
如果这很重要,我必须支持两种不同的语言相关的参考书目标题,我使用
\addto\captionsenglish{
\renewcommand\bibname{References}
}
MWE 是:
\documentclass[a4paper,10pt]{book}
\usepackage{cite}
\newcommand{\vmmshbibcaption}[1]{
\par\bigskip\centerline{\bf #1}\smallskip
}
% Setting the desired design for bibliographies
\usepackage{etoolbox}
\patchcmd{\thebibliography}
{\chapter*}
{\vmmshbibcaption}
{}
{}
\makeatletter%{@}
\patchcmd{\thebibliography}
{\chaptermark}
{}
{}
{}
\makeatother%{@}
\usepackage{amsmath, amsfonts, amssymb}
\usepackage{amscd}
\usepackage[english,russian]{babel}
\input diagxy
\begin{document}
\makeatletter%{@}
\newcommand{\Title}[1]{\begin{center}\large\uppercase{#1}\end{center}\par}
\newcommand{\Author}[2]{\begin{center}\textbf{\large #1} \end{center} \medskip
\renewcommand{\@evenhead}{\raisebox{1mm}[\headheight][0pt]%
{\vbox{\hbox to\textwidth{\thepage \hfill\strut {\small #2}\hfill}\hrule}}} }
\newcommand{\shorttitle}[1]{\renewcommand{\@oddhead}{\raisebox{1mm}[\headheight][0pt]%
{\vbox{\hbox to\textwidth{\strut \hfill{\small #1}\hfill\thepage}\hrule}}} }
\headsep=2mm
\newcommand{\l@abcd}[2]{{\begin{center}\par\medskip\normalsize\par\smallskip\noindent\hangindent5pt\hangafter=1{\bf #1}\end{center}}\par\medskip}
\renewcommand{\section}{\@startsection{section}{1}{\parindent}
{3ex plus 1ex minus .2ex}{2ex plus .2ex}{\bf\centering}}
\renewcommand{\l@section}[2]{\small\leftskip0pt\par\noindent\hangindent27pt\hangafter=1{\qquad#1} \dotfill~~#2\par}
\renewcommand{\l@part}[2]{\normalsize\leftskip0pt\par\smallskip\noindent\hangindent17pt\hangafter=1{\bf #1} \normalsize\dotfill~~#2\smallskip\par}
\makeatother%@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\addto\captionsenglish{
\renewcommand\bibname{References}
}
\Title{THESIS CAPTION} % обязательное поле!
%
% Авторы
\Author{Smith J.}
\cite{A01}, \cite{A02}
\begin{thebibliography}{99}
\bibitem{A01} Book 1
\bibitem{A02} Book 2
\end{thebibliography}
\cite{b01}, \cite{A01}
\selectlanguage{english}
\begin{thebibliography}{99}
\bibitem{b01} Book 1
\bibitem{b02} Book 2
\end{thebibliography}
\clearpage
kkk
\clearpage
kkk
\end{document}
答案1
终于搞定了。我曾经获取过环境\meaning\thebibliography
开头的定义,并在那里找到了命令。因此,我用包修补了命令。请注意,我需要一个虚拟命令:否则文本只会在参考书目开头打印两次。thebibliography
\@mkboth
\thebibliography
etoolbox
\vmmshnothing
References
\makeatletter%{@}
\newcommand{\vmmshnothing}[2]{}
\patchcmd{\thebibliography}
{\@mkboth}
{\vmmshnothing}
{}
{}
\makeatother%{@}