我是一名学生,我正在完成我的长篇文章,我想制作一个单独的网络书目,但它不起作用。两周后我必须发送它^^你是我最后的希望发生了什么事?非常感谢!(我在 Overleaf )
\documentclass[10pt,letterpaper]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{lscape}
\usepackage{subfigure}
\usepackage{graphicx,caption}
\usepackage[svgnames]{}
\usepackage{caption}
%\usepackage[font={color=ocre,it,small},figurename=Fig.,labelfont={it}]{caption}
\usepackage{textcomp}
\usepackage[a4paper,left=2cm,right=2cm,top=2cm,bottom=2.5cm]{geometry}
\usepackage{float}
\usepackage[table,xcdraw]{xcolor}
\usepackage[UKenglish]{babel}
\usepackage{enumitem}
\usepackage[T1]{fontenc}
\usepackage[squaren,Gray]{SIunits}
\renewcommand{\baselinestretch}{1,2}
\usepackage{chemist}
\usepackage{gensymb}
\usepackage{url}
\usepackage{amsbsy}
\usepackage{color}
\usepackage{lipsum}
\usepackage{lscape}
\usepackage{eurosym}
\usepackage{multicol}
\usepackage{longtable}
\usepackage{afterpage}
\usepackage[style=numeric-comp, bibencoding=ascii, defernumbers=true, maxnames=10]{biblatex}
\addbibresource{references}
\usepackage{csquotes}
\usepackage[normalem]{ulem}
\useunder{\uline}{\ul}{}
\usepackage{tikz}
\usepackage{tikz-qtree}
\usepackage[super]{nth}
\usepackage{multirow}
\newcommand\blankpage{%
\null
\thispagestyle{empty}%
\addtocounter{page}{-1}%
\newpage}
\usepackage{titlesec}
\usepackage{hyperref}
\usepackage{eurosym}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[C]{\upshape\scriptsize\rightmark}
%\fancyhead[LE,RO]{}
%\fancyhead[LO,RE]{}
\fancyhead[L]{}
\fancyhead[R]{}
%\fancyhead[CE]{\upshape\scriptsize\leftmark}
%\fancyhead[CO]{\upshape\scriptsize\rightmark}
\fancyfoot[C]{\thepage}
%\fancyfoot[C]{\thepage}
\titleclass{\subsubsubsection}{straight}[\subsection]
\newcounter{subsubsubsection}[subsubsection]
\renewcommand\thesubsubsubsection{\thesubsubsection.\arabic{subsubsubsection}}
\titleformat{\subsubsubsection}
{\normalfont\normalsize\bfseries}{\thesubsubsubsection}{1em}{\textit}
\titlespacing*{\subsubsubsection}
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{5}{\z@}%
{3.25ex \@plus1ex \@minus.2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}
\renewcommand\subparagraph{\@startsection{subparagraph}{6}{\parindent}%
{3.25ex \@plus1ex \@minus .2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}
\def\toclevel@subsubsubsection{4}
\def\toclevel@paragraph{5}
\def\toclevel@paragraph{6}
\def\l@subsubsubsection{\@dottedtocline{4}{7em}{4em}}
\def\l@paragraph{\@dottedtocline{5}{10em}{5em}}
\def\l@subparagraph{\@dottedtocline{6}{14em}{6em}}
\makeatother
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
%\newcounter {subsubsubsection}[subsubsubsection]
\usepackage{pifont}
\usepackage{multirow}
%\usepackage[table,xcdraw]{xcolor}
\usepackage{longtable}
\usepackage{amssymb}
\usepackage{xpatch}
\usepackage{nomencl}
%\renewcommand{\nomname}{Liste des acronymes et symboles mathématiques}
\xpatchcmd{\thenomenclature}{%
\section*{\nomname}% Look for `\section*... etc.
}{% Replace it by 'nothing'
}{\typeout{Success}}{\typeout{Failure}}
\RequirePackage{ifthen}
\makenomenclature
\usepackage{etoolbox}
\renewcommand\nomgroup[1]{%
\item[\bfseries
\ifstrequal{#1}{A}{Acronymes}{%
\ifstrequal{#1}{M}{Variables et paramètres (équations)}{%
\ifstrequal{#1}{C}{Other Symbols}{}}}%
]}
\makenomenclature
\addto\captionsfrench{\renewcommand{\listfigurename}{Liste des figures}}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% You can pass in your own texcount params, e.g. -chinese to turn on Chinese mode, or -char to do a character count instead (which does NOT include spaces!)
%%% http://app.uio.no/ifi/texcount/documentation.html
%% To include references.
%TC:nobib
%% To include tabulars in main text count.
%TC:group table 0 1
%TC:group tabular 1 1
\newcommand{\detailtexcount}[1]{%
\immediate\write18{texcount -merge -sum -q #1.tex output.bbl > #1.wcdetail }%
\verbatiminput{#1.wcdetail}%
}
\newcommand{\quickwordcount}[1]{%
\immediate\write18{texcount -1 -sum -merge -q #1.tex output.bbl > #1-words.sum }%
\input{#1-words.sum} words%
}
% -sum, -sum= Make sum of all word and equation counts. May also use
% -sum=#[,#] with up to 7 numbers to indicate how each of the
% counts (text words, header words, caption words, #headers,
% #floats, #inlined formulae, #displayed formulae) are summed.
% The default sum (if only -sum is used) is the same as
% -sum=1,1,1,0,0,1,1.
\newcommand{\quickcharcount}[1]{%
\immediate\write18{texcount -1 -sum -merge -char -q #1.tex output.bbl > #1-chars.sum }%
\input{#1-chars.sum} characters (not including spaces)%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%TC:ignore
> Then we have the text with many \footnote{} or \cite
{}
%TC:ignore
\newpage
\newrefcontext[labelprefix= A]
\printbibliography[heading=subbibintoc, keyword={A},title={Sources internet}]
\newrefcontext[labelprefix= B]
\printbibliography[heading=subbibintoc, keyword={B},title={Les articles}]
%TC : endignore
\newpage
\section*{Word Counts}
%TC:ignore
This section is \textit{not} included in the word count.
\quickwordcount{main}
\quickcharcount{main}
%\detailtexcount{main}
%TC:endignore
\end{document}
> Really thanks a lot for your help !
>
> My ref is for exemple :
@book{Directive2009-128,
title = {{DIRECTIVE} 2009/128/{CE} {DU} {PARLEMENT} {EUROPÉEN} {ET} {DU} {CONSEIL} du 21 octobre 2009 instaurant un cadre d’action communautaire pour parvenir à une utilisation des pesticides compatible avec le développement durable},
author = {{Journal officiel de l'Union Européenne et du Conseil}},
month = nov,
year = {2009},
keywords = {B}
}
答案1
去除
bibencoding=ascii,
从
\usepackage[style=numeric-comp, bibencoding=ascii, defernumbers=true, maxnames=10]{biblatex}
在以下 MWE 中
\documentclass[french]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=numeric-comp, bibencoding=ascii, defernumbers=true, maxnames=10]{biblatex}
\begin{filecontents}{\jobname.bib}
@book{Directive2009-128,
title = {{DIRECTIVE} 2009/128/{CE} {DU} {PARLEMENT} {EUROPÉEN} {ET} {DU} {CONSEIL} du 21 octobre 2009 instaurant un cadre d’action communautaire pour parvenir à une utilisation des pesticides compatible avec le développement durable},
author = {{Journal officiel de l'Union Européenne et du Conseil}},
month = nov,
year = {2009},
keywords = {B}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\cite{Directive2009-128}
\printbibliography
\end{document}
Biber 抱怨
ascii "\xC3" does not map to Unicode at C:\Users\Moritz\AppData\Local\Temp\par-4d6f7269747a\cache-fdb7483801244becd81fb01b3ab99423d7614d1b\inc\lib/File/Slurper.pm line 59.
INFO - This is Biber 2.14
INFO - Logfile is 'Namenlos-21.blg'
INFO - Reading 'Namenlos-21.bcf'
INFO - Found 1 citekeys in bib section 0
INFO - Processing section 0
INFO - Globbing data source 'Namenlos-21.bib'
INFO - Globbed data source 'Namenlos-21.bib' to Namenlos-21.bib
INFO - Looking for bibtex format file 'Namenlos-21.bib' for section 0
当bibencoding=ascii,
您明确告诉 Biber 以 US-ASCII 格式读取.bib
文件时,问题在于文件.bib
包含非 ASCII 字符 ( É
, à
)。现在 Biber 不知道如何处理它们并抛出错误。
解决方案是让它自动biblatex
找出正确的答案bibencoding
:最好不要bibencoding
在选项中进行设置。
更新的很多较长的前导码会导致更多错误:软件包SIunits
和gensymb
不兼容,无法一起使用,因为它们都试图定义相同的命令:您需要在两者中选择一个。我可能会删除两个都赞成siunitx
。
您还加载了一些包两次(,,,graphicx
... ),这是另一个可能的错误来源:如果您使用不同的选项加载同一个包两次,LaTeX 将会抛出一个错误。eurosym
longtable
一般来说,较长的前言当然更容易出错,特别是如果你不知道每个包的作用或为什么要加载它。最好的办法是只保留你真正需要的包。
如果你还有时间,你应该严重地考虑清理你的序言。
在我的计算机上我也遇到了错误
\quickwordcount{main}
\quickcharcount{main}
但根据 Overleaf 允许的外部命令,这对您来说可能不是一个错误。
完成此更改后,你可能必须删除所有临时文件(在 Overleaf 中:清除缓存使用 Biblatex 后 Overleaf 无法编译) 才能再次进行编译。