1

I m a student, i m finishing my big article, i would like to make a separate webography but it doesnt work. In two weeks i have to send it ^^ YOU ARE MY LAST HOPE What s going on ? Thanks a lot ! ( i m in 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}
    }
  • Welcome! Can you please provide a minimal but complete example which reproduces your error? – luki Mar 22 '20 at 15:33
  • This may not be the main cause of the problem, but note that the file name in \addbibresource must be given name with file extension. So \addbibresource{references} should be \addbibresource{references.bib}. – moewe Mar 22 '20 at 15:38
  • Remove the bibencoding=ascii,. You may have to clear your cache after that to be able to compile again: https://tex.stackexchange.com/q/479736/35864 – moewe Mar 22 '20 at 15:41
  • I put my script below, i tryed to add .bib to references, it didn t worked, i also tryed to remove bibendocing = ascii + clear cache but didn t worked too :'( thanks for helping me – HopelessStudent Mar 22 '20 at 15:50
  • There are several errors when one runs the code you have shown (I think they are mostly package clashes), but none of them is related to the bibliography. If I just ignore those errors and remove the bibencoding=ascii,, the document compiles fine for me. – moewe Mar 22 '20 at 16:01
  • I delete it but the bug is the same – HopelessStudent Mar 22 '20 at 16:38
  • Try deleting \usepackage[squaren,Gray]{SIunits}. You should in general clean up your preamble: There are a lot of packages in there and I doubt you need or use all of them. – moewe Mar 22 '20 at 17:05
  • Yh sry i know, it is a collaborative work and everybody put different packages, so it is just a " too much packages " bug ? – HopelessStudent Mar 22 '20 at 17:12
  • Well the bibencoding=ascii, from my answer is definitely an issue and must be fixed. Additionally the packages SIunits and gensymb are incompatible and can't be used together: You need to choose one of the two. I'd probably remove both in favour of siunitx. In general long preambles are of course more likely to break, especially if you don't know what each package does or why you load it. Best would be to keep only packages for which you know what they do – moewe Mar 22 '20 at 17:20
  • Thanks for your answer, i will clean the preamble, hope it will get better. I wanted to do the same as link Thanks again all for the help ! – HopelessStudent Mar 22 '20 at 17:27
  • Thanks ! It worked, it was in fact a package bug ! Thanks a lot – HopelessStudent Mar 22 '20 at 21:45

1 Answers1

1

Remove the

bibencoding=ascii,

from

\usepackage[style=numeric-comp, bibencoding=ascii, defernumbers=true, maxnames=10]{biblatex}

In the following 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 complains

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

With bibencoding=ascii, you explicitly tell Biber to read your .bib file in US-ASCII. the problem is that your .bib file contains non-ASCII characters (É, à). Now Biber doesn't know what to do with them and throws an error.

The solution is to let biblatex figure out the correct bibencoding automatically: This is best done by not setting bibencoding in the options.


The updated much longer preamble causes more errors: The packages SIunits and gensymb are incompatible and can't be used together, since they both try to define the same command: You need to choose one of the two. I'd probably remove both in favour of siunitx.

You also load some packages twice (graphicx, eurosym, longtable, ...), this is another source of possible errors: If you load the same package twice with different options, LaTeX will throw an error.

In general long preambles are of course more likely to break, especially if you don't know what each package does or why you load it. Best would be to keep only packages you really need.

If you still have some time you should seriously consider cleaning up your preamble.


On my machine I also got errors from

\quickwordcount{main}

\quickcharcount{main}

but depending on what external commands Overleaf allows, that may not be an error for you.


After that change you may have to remove all temporary files (in Overleaf speak: clear the cache Overleaf does not compile after using Biblatex) to be able to compile again.

moewe
  • 175,683