![回忆录 amsref 的奇怪分页问题](https://linux22.com/image/273907/%E5%9B%9E%E5%BF%86%E5%BD%95%20amsref%20%E7%9A%84%E5%A5%87%E6%80%AA%E5%88%86%E9%A1%B5%E9%97%AE%E9%A2%98.png)
我有一个奇怪的问题需要描述。请考虑以下代码:
\documentclass[a4paper,twoside,oldfontcommands,12pt]{memoir}
% \documentclass[a4paper,twoside,oldfontcommands,12pt]{memoir}
%%% A Hack to use amsrefs
\let\bibsection\relax
%%% INCLUDE THE PACKAGES
\usepackage[utf8x]{inputenc}
\usepackage[compact]{titlesec}
\usepackage{a4wide}
\usepackage{graphicx}
\usepackage{amssymb,amsmath,amsthm,amsfonts,amscd,amsrefs}
\usepackage{lipsum}
\usepackage{xcolor}
\usepackage{calc,graphicx,soul}
\usepackage{enumitem}
\usepackage[bookmarks=true]{hyperref}
\usepackage{bookmark}
\definecolor{nicered}{rgb}{.0588,.0941,.333}
\setsecheadstyle{\color{nicered}\Large\bfseries\sffamily\raggedright}
\setsubsecheadstyle{\large\bfseries\sffamily\raggedright}
\setsubsubsecheadstyle{\normalsize\bfseries\sffamily\raggedright}
%%%FORMATING FOR CHAPTER
\makeatletter
\newlength\dlf@normtxtw
\setlength\dlf@normtxtw{\textwidth}
\def\myhelvetfont{\def\sfdefault{mdput}}
\newsavebox{\feline@chapter}
\newcommand\feline@chapter@marker[1][4cm]{%
\sbox\feline@chapter{%
\resizebox{!}{#1}{\fboxsep=1pt%
\colorbox{nicered}{\color{white}\bfseries\sffamily\thechapter}%
}}%
\rotatebox{90}{%
\resizebox{%
\heightof{\usebox{\feline@chapter}}+\depthof{\usebox{\feline@chapter}}}%
{!}{\scshape\so\@chapapp}}\quad%
\raisebox{\depthof{\usebox{\feline@chapter}}}{\usebox{\feline@chapter}}%
}
\newcommand\feline@chm[1][4cm]{%
\sbox\feline@chapter{\feline@chapter@marker[#1]}%
\makebox[0pt][l]{% aka \rlap
\makebox[1cm][r]{\usebox\feline@chapter}%
}}
\makechapterstyle{daleif1}{
\renewcommand\chapnamefont{\normalfont\Large\scshape\raggedleft\so}
\renewcommand\chaptitlefont{\normalfont\huge\bfseries\scshape\color{nicered}}
\renewcommand\chapternamenum{}
\renewcommand\printchaptername{}
\renewcommand\printchapternum{\null\hfill\feline@chm[2.5cm]\par}
\renewcommand\afterchapternum{\par\vskip\midchapskip}
\renewcommand\printchaptertitle[1]{\chaptitlefont\raggedleft ##1\par}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatother
\chapterstyle{daleif1}
%===================================================
\setcounter{secnumdepth}{5}
\captionnamefont{\small\sffamily\bfseries}
\captiontitlefont{\small\sffamily}
\makepagestyle{myruled}
\makeheadrule {myruled}{\textwidth}{2pt}
\makefootrule {myruled}{\textwidth}{2pt}{\footruleskip}
\makeevenhead {myruled}{}{\small\sffamily\leftmark}{}
\makeoddhead {myruled}{}{\small\sffamily\rightmark}{}
\makeevenfoot {myruled}{\small\thepage}{}{}
\makeoddfoot {myruled}{}{}{\small\thepage}
\makeatletter % because of \@chapapp
\makepsmarks{myruled}{
\nouppercaseheads\createmark{chapter}{both}{shownumber}{
\@chapapp\ }{.\ }
\createmark{section}{right}{shownumber}{}{. \ }
\createmark{subsection}{right}{shownumber}{}{. \ }
\createmark{subsubsection}{right}{shownumber}{}{. \ }
\createplainmark {toc}{both} {\contentsname}
\createplainmark {lof}{both} {\listfigurename}
\createplainmark {lot}{both} {\listtablename}
\createplainmark {bib}{both} {\bibname}
\createplainmark {index}{both} {\indexname}
\createplainmark {glossary}{both} {\glossaryname}
}
\makeatother
\setsecnumdepth{subsubsection}
\linespread{1.5}
\renewcommand{\arraystretch}{1.0}
%==================================================================================================================
\newcommand{\mar}[1]{\marginpar{\small \it #1}}
\marginparwidth 1 in
\newcounter{cnt1}
\newcounter{cnt2}
\newcommand{\blr}{\begin{list}{$($\roman{cnt1}$)$}
{\usecounter{cnt1} \setlength{\topsep}{0pt}
\setlength{\itemsep}{0pt}}}
\newcommand{\bla}{\begin{list}{$(\alph{cnt2})$}
{\usecounter{cnt2} \setlength{\topsep}{0pt}
\setlength{\itemsep}{0pt}}}
\newcommand{\el}{\end{list}}
\renewcommand{\biblistfont}{%
\normalfont
\normalsize
}
\begin{document}
\pagenumbering{gobble}
\include{cover(mem)}
\cleardoublepage
\include{title(mem)}
\cleardoublepage
\include{dedication(mem)}
\cleardoublepage
% \include{acknowledgement}
% \cleardoublepage
\setcounter{tocdepth}{2}
\tableofcontents
\cleardoublepage
\pagenumbering{arabic}
\pagestyle{myruled}
\chapter{Introduction}
\lipsum[1-11]
% \createmark{chapter}{both}{nonumber}{}{}
% \pagenumbering{gobble}
\chapter*[Bibliography]{}
\begin{bibdiv}
% \pdfbookmark{\bibname}{Bibliography}{}
% \pagenumbering{arabic}
% \setcounter{page}{93}
\begin{biblist}
\bib{Darwin}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin1}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin2}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin3}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin4}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin5}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin6}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin7}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin8}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin9}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin10}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin11}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin12}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin13}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin14}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin15}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\end{biblist}
\end{bibdiv}
\end{document}
我意识到这也许不是正确的做法。问题是
(1)代码中,有一个新的章节(\chapter*
),可以清除双页。
(2) 相反地假设,如果我去掉它,我会在页眉和页脚中遇到麻烦。
而且,没有创建书目的书签。我通过使用[openany]
选项并\cleartorecto
根据需要在章节末尾使用解决了该问题(并且此解决方案是手动的,如果书目之前的最后一页非空页是偶数页,则不起作用);请参阅注释掉的代码段。
如果有人能告诉我正确的方法我会很高兴。
答案1
对于第一个问题,芭芭拉·比顿建议使用bibchapter
环境而不是bibdiv
;要恢复正确的标题,您可以重新定义bibchapter
为使用\bibmark
,如
\makeatletter
\renewenvironment{bibchapter}[1][\bibname]{%
\begingroup
\protected@edef\@{%
\endgroup
\protect\chapter*{#1}%
\protect\bib@div@mark{#1}%
}%
\@\bibmark
}{\par}
\makeatother
完整示例:
\documentclass[a4paper,twoside,oldfontcommands,12pt]{memoir}
% \documentclass[a4paper,twoside,oldfontcommands,12pt]{memoir}
%%% A Hack to use amsrefs
\let\bibsection\relax
%%% INCLUDE THE PACKAGES
\usepackage[utf8x]{inputenc}
\usepackage[compact]{titlesec}
\usepackage{a4wide}
\usepackage{graphicx}
\usepackage{amssymb,amsmath,amsthm,amsfonts,amscd,amsrefs}
\usepackage{lipsum}
\usepackage{xcolor}
\usepackage{calc,graphicx,soul}
\usepackage{enumitem}
\usepackage[bookmarks=true]{hyperref}
\usepackage{bookmark}
\definecolor{nicered}{rgb}{.0588,.0941,.333}
\setsecheadstyle{\color{nicered}\Large\bfseries\sffamily\raggedright}
\setsubsecheadstyle{\large\bfseries\sffamily\raggedright}
\setsubsubsecheadstyle{\normalsize\bfseries\sffamily\raggedright}
%%%FORMATING FOR CHAPTER
\makeatletter
\newlength\dlf@normtxtw
\setlength\dlf@normtxtw{\textwidth}
\def\myhelvetfont{\def\sfdefault{mdput}}
\newsavebox{\feline@chapter}
\newcommand\feline@chapter@marker[1][4cm]{%
\sbox\feline@chapter{%
\resizebox{!}{#1}{\fboxsep=1pt%
\colorbox{nicered}{\color{white}\bfseries\sffamily\thechapter}%
}}%
\rotatebox{90}{%
\resizebox{%
\heightof{\usebox{\feline@chapter}}+\depthof{\usebox{\feline@chapter}}}%
{!}{\scshape\so\@chapapp}}\quad%
\raisebox{\depthof{\usebox{\feline@chapter}}}{\usebox{\feline@chapter}}%
}
\newcommand\feline@chm[1][4cm]{%
\sbox\feline@chapter{\feline@chapter@marker[#1]}%
\makebox[0pt][l]{% aka \rlap
\makebox[1cm][r]{\usebox\feline@chapter}%
}}
\makechapterstyle{daleif1}{
\renewcommand\chapnamefont{\normalfont\Large\scshape\raggedleft\so}
\renewcommand\chaptitlefont{\normalfont\huge\bfseries\scshape\color{nicered}}
\renewcommand\chapternamenum{}
\renewcommand\printchaptername{}
\renewcommand\printchapternum{\null\hfill\feline@chm[2.5cm]\par}
\renewcommand\afterchapternum{\par\vskip\midchapskip}
\renewcommand\printchaptertitle[1]{\chaptitlefont\raggedleft ##1\par}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatother
\chapterstyle{daleif1}
%===================================================
\setcounter{secnumdepth}{5}
\captionnamefont{\small\sffamily\bfseries}
\captiontitlefont{\small\sffamily}
\makepagestyle{myruled}
\makeheadrule {myruled}{\textwidth}{2pt}
\makefootrule {myruled}{\textwidth}{2pt}{\footruleskip}
\makeevenhead {myruled}{}{\small\sffamily\leftmark}{}
\makeoddhead {myruled}{}{\small\sffamily\rightmark}{}
\makeevenfoot {myruled}{\small\thepage}{}{}
\makeoddfoot {myruled}{}{}{\small\thepage}
\makeatletter % because of \@chapapp
\makepsmarks{myruled}{
\nouppercaseheads\createmark{chapter}{both}{shownumber}{
\@chapapp\ }{.\ }
\createmark{section}{right}{shownumber}{}{. \ }
\createmark{subsection}{right}{shownumber}{}{. \ }
\createmark{subsubsection}{right}{shownumber}{}{. \ }
\createplainmark {toc}{both} {\contentsname}
\createplainmark {lof}{both} {\listfigurename}
\createplainmark {lot}{both} {\listtablename}
\createplainmark {bib}{both} {\bibname}
\createplainmark {index}{both} {\indexname}
\createplainmark {glossary}{both} {\glossaryname}
}
\makeatother
\setsecnumdepth{subsubsection}
\linespread{1.5}
\renewcommand{\arraystretch}{1.0}
%==================================================================================================================
\newcommand{\mar}[1]{\marginpar{\small \it #1}}
\marginparwidth 1 in
\newcounter{cnt1}
\newcounter{cnt2}
\newcommand{\blr}{\begin{list}{$($\roman{cnt1}$)$}
{\usecounter{cnt1} \setlength{\topsep}{0pt}
\setlength{\itemsep}{0pt}}}
\newcommand{\bla}{\begin{list}{$(\alph{cnt2})$}
{\usecounter{cnt2} \setlength{\topsep}{0pt}
\setlength{\itemsep}{0pt}}}
\newcommand{\el}{\end{list}}
\makeatletter
\renewenvironment{bibchapter}[1][\bibname]{%
\begingroup
\protected@edef\@{%
\endgroup
\protect\chapter*{#1}%
\protect\bib@div@mark{#1}%
}%
\@\bibmark
}{\par}
\makeatother
\renewcommand{\biblistfont}{%
\normalfont
\normalsize
}
\begin{document}
\pagenumbering{gobble}
\include{cover(mem)}
\cleardoublepage
\include{title(mem)}
\cleardoublepage
\include{dedication(mem)}
\cleardoublepage
% \include{acknowledgement}
% \cleardoublepage
\setcounter{tocdepth}{2}
\tableofcontents
\cleardoublepage
\pagenumbering{arabic}
\pagestyle{myruled}
\chapter{Introduction}
\lipsum[1-11]
% \pagenumbering{gobble}
%\chapter*[Bibliography]{}
\begin{bibchapter}
%\begin{bibdiv}
% \pdfbookmark{\bibname}{Bibliography}{}
% \pagenumbering{arabic}
% \setcounter{page}{93}
\begin{biblist}
\bib{Darwin}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin1}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin2}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin3}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin4}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin5}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin6}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin7}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin8}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin9}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin10}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin11}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin12}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin13}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin14}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\bib{Darwin15}{article}{
author={Darwin, Charles.},
title={Elephants, A New Perspective},
date={1972},
ISSN={1234},
journal={Nature},
volume={90},
pages={90\ndash 128},
}
\end{biblist}
%\end{bibdiv}
\end{bibchapter}
\end{document}
书目和前几页的图片: