0

I have a Tex report in which I define some bibliography entries in my references.bib file like this:

@manual{darpadataset,
title = {DARPA Intrusion Detection Data Sets},
author = {Massachusetts Institute of Technology, Linclon Laboratory},
url = {https://www.ll.mit.edu/ideval/data/},
year = {1998-2000}
}

@online{RansomwareTracker,
title = {Ransomware Tracker Website},
url = {\url{https://ransomwaretracker.abuse.ch/tracker/}},
year = {2018}
}
@online{UNBCIC2017IDSDATASET,
title = {{UNBCIC 2017 IDS Dataset}},
url = {\url{http://www.unb.ca/cic/datasets/ids-2017.html}},
year = {2017}
}

and the following is how I import the file:

\bibliographystyle{plain}
\bibliography{references}

When I try to generate the PDF file using: PDFLatex and BibTex; the first execution shows no errors and the bibliography does not appear in my PDF file. However, during the second execution, I get the following errors:

! Use of \/ doesn't match its definition.
\do ... ~}{\mathchar \number \mathcode `#1\sb {\/}
                                              }\mathcode `#1=32768 \fi 
l.112 ...-intrusion-detection-evaluation-data-set}
                                              .
If you say, e.g., `\def\a1{...}', then you must always
put `1' after `\a', since control sequence names are
made up of letters only. The macro here has not been
followed by the required stuff, so I'm ignoring it.

)
Runaway definition?
->\mathchar 96\sb {}\mathcode `\unhbox \voidb@x \bgroup \let \unhbox 
\ETC.
! File ended while scanning definition of `.
<inserted text> 
            }
l.30 \bibliography{references.bib}

Apparently it also suggests to me a solution but I don't get it very well. Could somebody help me fix it. Thanks.

The following is the code for my main file:

\documentclass[10pt,a4paper]{report}
\include{config}
\include{constants}



\begin{document}
\long\def\/*#1*/{}

\include{pages/abstract}
\include{pages/acknowledgements}


\include{chapters/chapter1/main}
\include{chapters/chapter2/main}
\include{chapters/chapter3/main}
\include{chapters/chapter4/main}
\include{chapters/chapter5/main}
\include{chapters/chapter6/main}


\bibliographystyle{plain}
\bibliography{references}


\end{document}

In the config files I define the following packages:

\usepackage{graphicx}




\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{titlesec}
\usepackage{algorithmicx}
%\usepackage{natbib}
\usepackage{tikz}
\usepackage{caption}
\usepackage{subcaption}

\usepackage{array}
\usepackage{smartdiagram}
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\usepackage{tabularx}% http://ctan.org/pkg/tabularx
\usepackage{longtable}
\usepackage{mathtools}
\usepackage{setspace}
\usepackage{amsfonts}
\usepackage{algorithm,algpseudocode}
\usepackage{multirow}
\usepackage{makecell} % for more vertical space in cells
\usepackage[table,xcdraw]{xcolor}
\usepackage{rotating}

\usepackage{PTSansNarrow}
\usepackage[T1]{fontenc}
\usepackage{array,tabularx}
\usepackage[most]{tcolorbox}
\usepackage{hyperref}

\usepackage{adjustbox}


\newcounter{inlineenum}
\renewcommand{\theinlineenum}{\alph{inlineenum}}
\newenvironment{inlineenum}
{\unskip\ignorespaces\setcounter{inlineenum}{0}%
\renewcommand{\item}{\refstepcounter{inlineenum} 
{\textit{\theinlineenum})~}}}
{\ignorespacesafterend}






\setcounter{secnumdepth}{3}

% subhead
\newcommand{\subhead}[1]{\vspace {0.03in}\noindent{\textbf{#1.}}}
\usepackage[inline]{enumitem}
\setlist[enumerate,1]{label=\textit{\alph*)}}

\def\bibfont{\footnotesize}
\usepackage{url}%
\def\UrlBreaks{\do\/\do-}%

\usepackage{subfig}

\usepackage[edges]{forest}
\usepackage{hyperref}
3
  • 1
    Please, make a full example from \documentclass to \end{document}.
    – egreg
    Sep 24 '18 at 14:11
  • 2
    \long\def\/*#1*/{} is a really bad idea! Note your error message is about \/ Sep 24 '18 at 14:23
  • Okay, it is working. Thanks for your quick reply @DavidCarlisle , it helped me fixing it. Sep 24 '18 at 14:32
2

\/ is a core latex comand for italic correction that is used internally for example in commands such as \textit but also lots of other places, and is likely to be explicitly inserted in some bibtex styles.

Doing a redefinition such as

\long\def\/*#1*/{}

will break all these uses.

In general you should use \newcommand rather than \def so that you do not accidentally redefine internal commands in this way.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.