0

I use a template available https://www.overleaf.com/latex/templates/eusflat-2019-template/jmqvcrhkqhgx . The code which I am editing is

\documentclass{eusflat2019}
\title{\bf Paper Title}
\author{{\bf Author1$^1$} , {\bf Author2 $^2$} , {\bf Author3 $^3$}\\
$^1$CSE Department,University, email \\ $^2$CSE Department,Faculty, university, email \\
$^3$CSE Department,Faculty,University  G, email }
\usepackage{parskip}
\usepackage{graphicx}
\usepackage{url}
\usepackage{breakurl}
\usepackage{hyperref}
\setlength{\parskip}{0pt}
\setlength{\parindent}{1mm}
\begin{document}
\maketitle
\begin{abstract}
\end{abstract}

\section{Title}
some randomg paragraph \cite{resource1} some random text.
some thing random some thing random.something random.
 \bibliographystyle{unsrt} 
\bibliographystyle{eusflat2019} 
\bibliography{BIBeusflat2019}
\end{document}

now I go and add another item manually in the BIBeusflat2019.bib file and I use a doi to bib converter online https://www.doi2bib.org/bib/http://dx.doi.org/10.4236/jis.2015.62015 and add the entry in my .bib file.

@article{Sari2015,
  doi = {10.4236/jis.2015.62015},
  url = {https://doi.org/10.4236/jis.2015.62015},
  year = {2015},
  publisher = {Scientific Research Publishing,  Inc, },
  volume = {06},
  number = {02},
  pages = {142--154},
  author = {Arif Sari},
  title = {A Review of Anomaly Detection Systems in Cloud Networks and Survey of Cloud Security Measures in Cloud Storage Applications},
  journal = {Journal of Information Security}
}

now I cite the article and my new .tex file looks as following

\documentclass{eusflat2019}
\title{\bf Paper Title}
\author{{\bf Author1$^1$} , {\bf Author2 $^2$} , {\bf Author3 $^3$}\\
$^1$CSE Department,University, email \\ $^2$CSE Department,Faculty, university, email \\
$^3$CSE Department,Faculty,Uniersity G, email }
\usepackage{parskip}
\usepackage{graphicx}
\usepackage{url}
\usepackage{breakurl}
\usepackage{hyperref}
\setlength{\parskip}{0pt}
\setlength{\parindent}{1mm}
\begin{document}
\maketitle
\begin{abstract}
\end{abstract}

\section{Title}
some randomg paragraph \cite{resource1} some random text.
some thing random some thing random.something\cite{Sari2015} random.
 \bibliographystyle{unsrt} 
\bibliographystyle{eusflat2019} 
\bibliography{BIBeusflat2019}

\end{document}

Now when I try to compile the pdf for the preview then in Tex Studio I see an error

Misplaced alignment tab character &. \newblock {\em Computers &

so what I see in one of the references which previously had & in the bibliography entry is generated as & and this gives me an error. The entry in which it gave me this problem is following

\bibitem{CHEN20052617}
Wun-Hwa Chen, Sheng-Hsun Hsu, and Hwang-Pin Shen.
\newblock Application of svm and ann for intrusion detection.
\newblock {\em Computers & Operations Research}, 32(10):2617 -- 2634, 2005.
\newblock Applications of Neural Networks.

in file EUSFLAT2019_template.bbl (this file is automatically generated I did not do anything to generate it).The above entry was generated in EUSFLAT2019_template.bbl automatically. I manually go and edit the error location from & to \& and the error is gone.So new entry now looks like

\bibitem{CHEN20052617}
Wun-Hwa Chen, Sheng-Hsun Hsu, and Hwang-Pin Shen.
\newblock Application of svm and ann for intrusion detection.
\newblock {\em Computers \& Operations Research}, 32(10):2617 -- 2634, 2005.
\newblock Applications of Neural Networks.

Now I keep working and later on I add some more citations or do some other editing then this happens The entry in which this happened was following in BIBeusflat2019.bib file

@article{CHEN20052617,
    title = "Application of SVM and ANN for intrusion detection",
    journal = "Computers & Operations Research",
    volume = "32",
    number = "10",
    pages = "2617 - 2634",
    year = "2005",
    note = "Applications of Neural Networks",
    issn = "0305-0548",
    doi = "https://doi.org/10.1016/j.cor.2004.03.019",
    url = "http://www.sciencedirect.com/science/article/pii/S0305054804000711",
    author = "Wun-Hwa Chen and Sheng-Hsun Hsu and Hwang-Pin Shen",
    keywords = "Intrusion detection, Artificial neural networks, Support vector machine",
    abstract = "The popularization of shared networks and Internet usage demands increases attention on information system security, particularly on intrusion detection. Two data mining methodologies—Artificial Neural Networks (ANNs) and Support Vector Machine (SVM) and two encoding methods—simple frequency-based scheme and tf×idf scheme are used to detect potential system intrusions in this study. Our results show that SVM with tf×idf scheme achieved the best performance, while ANN with simple frequency-based scheme achieved the worst. The data used in experiments are BSM audit data from the DARPA 1998 Intrusion Detection Evaluation Program at MIT's Lincoln Labs."
}

so now I manually go and change & here to \&

and I compile the the program again to generate pdf. Now I still get the same error in file EUSFLAT2019_template.bbl \newblock {\em Computers & Operations Research}, 32(10):2617 -- 2634, 2005.

Misplaced alignment tab character &. \newblock {\em Computers &

I will go and do change & to \&. What I want to know is this kind of behavior with editing a usual thing or I need to check some thing else.Because adding citation entries or editing the text some times generates this situation. I previously have done manual sorting of citations to use in this template which I answered here sequence number in bibliographic text how is serial number decided could this problem be related to this? I basically want to know when using templates then the generation of .bbl files if it is automatic, then how does it happen. I want to read more about it.

  • 3
    You should correct the entry in the bib-file journal = "Computers \& Operations Research",. Then call bibtex again and it will create a corrected bbl. – Ulrike Fischer Mar 30 '20 at 15:19
  • Hi, Tom from Overleaf support here. If this happens in Overleaf, it may be necessary to clear the project's cache for the compiler (based on the latexmk tool) to catch up, see https://www.overleaf.com/learn/how-to/Clearing_the_cache – yo' Mar 30 '20 at 16:53
  • @UlrikeFischer I had applied those changes already before posting the question. But that did not help. A file EUSFLAT2019_template.bbl automatically generates bibitem entries and that automatic generation of entries create this problem, I have to then manually go and edit automatically generated *.bbl file \bibitem{CHEN20052617} and correct & to \& , @yo' Thanks Tom for your link I was not aware of any such thing on overleaf it will help me in various ways.I am trying to do on overleaf as well as MikTex installed on my laptop. Both the places. Current focus is on laptop miktex error. – koeradoera Mar 30 '20 at 17:40
  • The .bbl file is usually generated by BibTeX from your .bib file according to the style specifications in a .bst file. Generally, the .bib file is indicated in the argument of the \bibliography command in your document, while \bibliographystyle indicates the bibliography style. In the template on Overleaf we find \bibliographystyle{eusflat2019} and \bibliography{BIBeusflat2019}, which means that the bibliography style is eusflat2019.bst and that the bibliography entries are taken from BIBeusflat2019.bib. ... – moewe Mar 30 '20 at 19:43
  • ... BibTeX will generate a new .bbl file from the .bib entries whenever it is called. It will overwrite an existing .bbl file without warning. That is why it is usually ill-advised to manually edit the .bbl file: It is probably going to be overwritten anyway. Various software may call BibTeX automatically without you noticing it (some editors detect if BibTeX runs are necessary and automatically run it, Overleaf uses the amazing latexmk tool to automatically run BibTeX). So it may indeed happen that your changed .bbl file get overwritten without you explicitly requesting it. ... – moewe Mar 30 '20 at 19:45
  • ... In principle it should be enough to make sure the entry in the .bib file is correct (i.e. uses \& and not just &). If you then delete the .bbl file (to avoid an error) and run LaTeX, BibTeX, LaTeX, LaTeX you should get the desired output. This may be an important step: Sometimes errors in the .bbl that are fixed in the .bib can block compilation, because they won't allow the LaTeX run to finish and your software will only run BibTeX if LaTeX finished. In cases like this it helps to remove the problematic .bbl and recompile from scratch (clear the Cache in Overleaf speak). – moewe Mar 30 '20 at 19:49
  • You can read more about BibTeX and what it does in https://tex.stackexchange.com/q/63852/35864 (well worth a read). It is not quite clear to me what exactly you did and whether you actually tried to do what I suggested already, but this procedure (fix the .bib file, delete the .bbl, recompile) is the only method that I can think of that should work. Note that the code you posted will not produce any bibliography because it is lacking the two crucial commands \bibliographystyle and \bibliography. – moewe Mar 30 '20 at 19:52
  • @moewe thanks a lot for your detailed explanation. I while posting the question did not noticed that I should have posted \bibliographystyle to make it clear that it is same as the template entries. I did not changed that I did play with them but for this question I had used \bibliographystyle{unsrt} \bibliographystyle{eusflat2019} %\bibliographystyle{unsrt} \bibliography{BIBeusflat2019} in my .tex files. This process that you explained this is what I wanted to know. As it was pointed out in first comment to change the entry in .bib file from & to \& that was definitely a problem. – koeradoera Mar 30 '20 at 20:12
  • I read the full link that you mentioned. I kept it noted in a word file which I have made for questions and answers I have been doing from errors I get via tex.stackexchange.com or some tutorials on internet. The explanation you gave in comments is perfect and it answers my question to a great extent. I intutitvely had that understanding but I wanted to validate it so your comment clarified what I was thinking was correct. I did not new that EUSFLAT2019_template.bbl file is automatically genearated to when I will see a long url then I based on instructions here – koeradoera Mar 30 '20 at 20:30
  • https://norwied.wordpress.com/2012/07/10/how-to-break-long-urls-in-bibtex/ I also get error in breaking long urls so manually each time I will add the line \def\UrlBreaks{\do\/\do-} in EUSFLAT2019_template.bbl file generated (which is generated automatically now I understand this from your comment) at the top and

    \usepackage{url} \usepackage{breakurl} \usepackage{hyperref} in the EUSFLAT2019_template.tex

    – koeradoera Mar 30 '20 at 20:30
  • Template in tex files save the bibliographies in a notepad file to sort later because generated files may create problems. You can see my answer here https://tex.stackexchange.com/a/535767/208541 which will make you understand incimpletness of my knowledge lead me to that situation.So for me it was important to understand how this .bbl file comes. and then do rest of the editing. – koeradoera Mar 30 '20 at 20:35
  • I made a video tutorial regarding the first steps in setting up biber and biblatex. Maybe this helps to better understand how I recommend to work for newcomers like you: https://m.youtube.com/playlist?list=PL-Wl6F3zpJVwcDHK2rg9bDEEMjo70zp87 Even if you use bibtex, I believe it is good to have a look regarding the systematic approach and how minimal a code example can be. – Dr. Manuel Kuehner Apr 04 '20 at 06:52

0 Answers0