不同部分的页码

不同部分的页码

在所示的 MWE 中:

页码设置为章节-页面格式。但是:

  • 关于参考书目,页码编号正常地从上一页继续,页码中的章节标识符消失。我应该在每一章的末尾都有一个参考书目,在文档的末尾也有一个参考书目。

    • 对于文档末尾的页面,我需要它有单独的编号(页码从 1 开始,需要为其设置章节标识符)

    • 如何在每个章节末尾添加参考书目,同时在章节页码内正常延续页码

  • 关于附录:附录的页码从上一节继续,而不是从 1 开始,如何设置才能从 1 开始,而且有时章节标识符会从页码中消失。

以下是 MWE:

\documentclass[a4paper,12pt]{book}

\usepackage[nil,bidi=basic-r,layout=counters]{babel}
\babelprovide[import=ar,mapdigits,main]{arabic}
\babelprovide[import=en,language=Default]{english}
\babelfont{rm}{Latin Modern Roman}
\babelfont[arabic]{rm}{Amiri}

\usepackage{fancyhdr} 
\pagestyle{fancy}
\fancyhead[L]{\rightmark}
\fancyhead[R]{\leftmark}
\renewcommand{\headrulewidth}{2pt}
\renewcommand{\footrulewidth}{2pt}

\makeatletter
\renewcommand{\thepage}{\thechapter-\csname @arabic\endcsname\c@page}
\makeatother

\usepackage[hidelinks,colorlinks=true,allcolors=blue]{hyperref}

\usepackage{etoolbox}

\gappto\captionsarabic{\renewcommand{\chaptername}{الباب}}

\newcommand\words[1]{\expandafter\xwords\csname c@#1\endcsname}
\def\xwords#1{%
  \ifcase#1\or
  الأول\or
  الثاني\or
  الثالث\or
  الرابع\or
  \else
  I need more words\fi}    
\makeatletter
\pretocmd{\Hy@org@chapter}
  {\begingroup \renewcommand{\thechapter}{{\words{chapter}}}}
  {}
  {}
\patchcmd{\Hy@org@chapter}
  {\addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}}
  {\addcontentsline{toc}{chapter}{\@chapapp\space\words{chapter}\space#1}}
  {}
  {}
\apptocmd{\Hy@org@chapter}
  {\endgroup}
  {}
  {}
\patchcmd{\@makechapterhead}
  {\thechapter}
  {\words{chapter}}
  {}
  {}
\makeatother


%==================================================
%References%
%===================================================
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{Sharoni1969,
 author = {ميخائيل، ملاك  and  الشاروني، حبيب},
 date = {1969},
 title = {المرجع فى قواعد اللغة القبطية},
 location = {الاسكندرية},
 publisher = {جمعية مارمينا العجايبي},
 langid = {arabic}
}
@book{Browning1983,
 author = {Browning, Robert},
 date = {1983},
 title = {Medieval and Modern Greek},
 publisher = {Cambridge University Press},
 langid = {english}
}
@misc{CBible2015,
 date = {2015},
 title = {\foreignlanguage{english}{Coptic Bible} الكتاب المقدس القبطي},
 langid = {arabic}
}
@online{Website:Elpenor,
 title = {ELPENOR - Home of the Greek Word - Ellopos},
 date = {2015-05},
 url = {https://www.ellopos.net/elpenor/Default.asp},
 langid = {english}
}
\end{filecontents}



%=============================================================
%BIBLIOGRAPHY SETTINGS%
%=============================================================
%Translate Bibaltex localization strings to another language, Those are known as localization strings, since currently there is no arabic, so you replace the english ones, these settings do the following:
% make footnote citations and bibliography change from right to left or left to right according to language
%Localized items (the words edition, page,seenote,and), how to remove them or make them appear according to the citation language
% You have to create arabic.lbx for strings for biblatex and define Arabic quotes for csquotes (Arabic quotes are created لاثمخص)

\begin{filecontents}{arabic.lbx}
\ProvidesFile{arabic.lbx}
\InheritBibliographyExtras{english}
% Translations thanks to Google Translate.
% I haven't provided abbreviations, because I don't know Arabic.
% You'll need to add more for other strings you use.
% Look in `english.lbx` for the string name.
\DeclareBibliographyStrings{%
  inherit          = {english},
  and              = {{و}{و}},
  page             = {{صفحة}{صفحة}},
  pages            = {{صفحات}{صفحة}},
  references       = {{مراجع}{مراجع}},
  seenote          = {{انظر الملاحظة}{انظر الملاحظة}},
}
\end{filecontents}


\usepackage{csquotes}
\DeclareQuoteStyle{arabic}
  {\guillemotleft}
  {\guillemotright}
  {\textquotedblright}
  {\textquotedblleft}



\usepackage[%
  language=auto,
  autolang=other,
  citestyle=verbose-note,
  bibstyle=authortitle,
  doi=false,
  isbn=false]{biblatex} 
\addbibresource{\jobname.bib} % Onlyused with biblatex, do not put spaces in the original file name, this is the file where citations are placed

\defbibenvironment{bibliography}
  {\list
     {}
     {\setlength{\leftmargin}{\bibhang}%
      \setlength{\itemindent}{-\leftmargin}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}}
  {\endlist}
  {\item\leavevmode}% add \leavevmode to align English bibliography items RTL

% Always use Arabic digits for see note.
\usepackage{xpatch}
\xpatchbibmacro{footcite:note}
  {\ref{cbx@\csuse{cbx@f@\thefield{entrykey}}}}
  {\foreignlanguage{arabic}{\ref{cbx@\csuse{cbx@f@\thefield{entrykey}}}}}
  {}
  {}

% Just to test if quotes work
\DeclareFieldFormat{title}{\mkbibquote{\mkbibemph{#1}}}

\begin{document}
\tableofcontents{}

\chapter{سيسس}
يبيسبسيبسيبسيبسيب
\footcite{Browning1983}
\section{سيسس}
بيسببببببببببببببيسيب
\footcite{Website:Elpenor}
\subsection{سيسس}
بيسيببببببببببببببببب
\footcite{Sharoni1969}
\subsection{سيسس}
بيسسسسسسسسسببس
\subsection{سيسس}

\clearpage

\section{سيسس}

\subsection{سيسس}

\subsection{سيسس}

\subsection{سيسس}
\newpage
\printbibliography
\appendix
\chapter{تعريفات}
\section{اffggfgf}
\begin{center}
\textbf{
يسبسيبسيبيسب
}
\end{center}
\newpage
\newpage
sdfffffffffffffff
sddddddddddddd

dddddddddddddd\\
\\
\\
\\
\\

\end{document}

答案1

对于最终的参考书目,您可以简单地将页码计数器(\setcounter{page}{0})和\thepage宏重置为其正常值(\arabic{page},以您想要的章节名称作为前缀)最后\printbibliography

关于每章的书目,它们没有出现在您的(不是真正最小的)示例中,并且您的问题不清楚:假设本章有 30 页,您是否希望第二章的书目列表第三页显示类似 '2-33' 的内容?还是其他内容?无论如何,您都必须添加refsection=chapter到传递给包的选项中,以自动按章节解析参考文献。然后,章节末尾的biblatex命令 将添加预期的书目。\printbibliography[heading=subbibliograhy]\section

关于附录的问题也不太清楚。特别是“有时章节标识符会从页码中消失“ 相当模糊。您应该考虑到\appendix格式的改变\thechapter会从 切换\arabic\Alph编号。再一次,\setcounter{page}{0}之前\appendix可能会有所帮助。

如果这些部分答案不符合您的需求,请为每个子问题发布一个新问题,并为每个子问题提供一个非常简单的示例,并说明您得到的内容以及您想要得到的内容。

相关内容