参考书目从目录中省略页码

参考书目从目录中省略页码

我想从目录中省略参考书目页码,我正在使用memoir类和biblatex包来处理参考书目。为什么我想要这样做,因为我没有计算页码,现在它显示了错误的页码。谢谢

    \documentclass[french,12pt,oneside,openright]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[a4paper]{geometry}
\usepackage[french]{babel} %langue francaise
\usepackage{graphicx,xcolor}%insertion d'images
\usepackage{titlesec}
\graphicspath{{Annexes/images/}} %directory of the images
\usepackage{lipsum} %paragraphes prédéfinis
%\usepackage{fancyhdr} %decoration des en tetes
\usepackage[sonny]{fncychap}
\usepackage{verbatim}
\usepackage{usnomencl}%pour la nomenclature
\usepackage{nomencl}
\usepackage{pgfplots}
\usepackage{titlesec, blindtext, color}
\definecolor{gray75}{gray}{0.75}
\newcommand{\hsp}{\hspace{20pt}}
\titleformat{\chapter}[hang]{\Huge\bfseries}{\thechapter\hsp\textcolor{gray75}{|}\hsp}{0pt}{\Huge\bfseries}
\usepackage{multirow,array}
%\usepackage{longtable}%pour la liste des symbole en format tableau
%\usepackage{SIstyle} %Pour les unités dans la liste des symboles
%\usepackage{SIunits}
\usepackage{tabu}
\usepackage{siunitx}
\usepackage{tocloft} %costumize the list of...
\usepackage{amssymb}
\usepackage{amsmath} %add mathematic symbols
\usepackage{caption}  %for tables andfigures
\usepackage{subcaption} %add many sub (tables/figures) with the same caption
%\usepackage{biblatex}
%\addbibresource{references.bib}
\usepackage{chemfig}
\renewcommand*\printatom[1]{\ensuremath{\mathsf{#1}}}
\usepackage{tikz}
\usepackage{hyperref} %add a hyperlink to the contents
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{setspace}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepgfplotslibrary{groupplots}
\usetikzlibrary{matrix,positioning}
\usepgfplotslibrary{dateplot}
\pgfplotsset{compat=newest}
\usepackage{datetime}
\newdate{date}{00}{06}{2015}
\date{}
%\linespread{1.5}
\usepackage[backend=bibtex,style=numeric]{biblatex}
\addbibresource{WALID.bib}
\usepackage{vmargin}
\setmarginsrb           { 1.5in}  % left margin
                        { 0.6in}  % top margin
                        { 1.0in}  % right margin
                        { 0.8in}  % bottom margin
                        {  20pt}  % head height
                        {0.25in}  % head sep
                        {   9pt}  % foot height
                        { 0.3in}  % foot sep
\raggedbottom
\aliaspagestyle{part}{empty}
\renewcommand{\printpartname}{}
\renewcommand{\partnamenum}{}
\renewcommand{\printpartnum}{}
\usepackage{booktabs}
\usepackage{chemmacros}
\usepackage{chemformula}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PART PART PART%
%\setlength\epigraphwidth{\textwidth}
%\titleformat{\part}[display]
 % {\normalfont\huge\filcenter\bfseries\thispagestyle{epigraph}}{Partie\ \thepart}{20pt}{\Huge}
%\titlespacing*{\part} 
 % {0pt}{0pt}{40pt}
\renewcommand\partnumberlinebox[2]{#2\hspace{1em}}
 \makenomenclature

并打印参考书目我使用这个

    \addtocontents{toc}{\protect\contentsline{chapter}{\protect\hyperlink{bibtoc}{\bibname}}{}{}}
\renewcommand{\bibsetup}{\thispagestyle{empty}\pagestyle{empty}}
\printbibliography

答案1

该类memoir具有开关宏bibintoc\nobibintoc。默认将参考书目添加到目录中。使用\nobibintoc将完全阻止此操作,因此必须手动添加它,并使用删除页码\addtocontents{\contentsline{...}(参见代码

如果hyperref涉及到,手动添加将会抑制自动超链接,所以这也必须转移。

\documentclass{memoir}
\usepackage[backend=biber]{biblatex}

\usepackage{hyperref}


\begin{filecontents}{mybiblo.bib}
  @article{MBBL2014,
    author = {Ministeriet for by Bolig og Landdistrikter},
    title = {{Matriklens Udvidelse}},
    url = {http://grunddata-ejendom-adresse.dk/matriklens\_udvidelse},
    urldate = {2015-04-20},
    year = {2014} 
  }
\end{filecontents}


\addbibresource{mybiblo.bib}

\usepackage{blindtext}



\begin{document}
\tableofcontents
\blinddocument

\cite{MBBL2014}


\nobibintoc
\clearpage
\hypertarget{bibtoc}{}%
\addtocontents{toc}{\protect\contentsline{chapter}{\protect\hyperlink{bibtoc}{\bibname}}{}{}}
\printbibliography


\end{document}

相关内容