Getting compilation error with latex file in overleaf - latex

This is my first time with overleaf. I have a latex template, and when I try to compile it shows the following error:
Emergency stop.
<*> header.tex
*** (job aborted, no legal \end found)
Here is how much of TeX's memory you used:
28699 strings out of 480906
561966 string characters out of 5908280
1147859 words of memory out of 5000000
43764 multiletter control sequences out of 15000+600000
539149 words of font info for 32 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
73i,1n,97p,10101b,276s stack positions out of 5000i,500n,10000p,200000b,80000s! ==> Fatal error
occurred, no output PDF file produced!
I am not sure what to do.
Can someone please suggest how I can solve this problem?
In case you need some more information, then please let me know. I will add here.
Edit: header file that is throwing error: http://www.itextpad.com/pH0GJ5Bfmg

The document you have provided is simply a preamble file. It does not contain the document body \begin{document} ... \end{document} hence the Emergency stop fatal error.
What you should do is save this file under some name, say mypreamble.tex. Create a new .tex file and have both files under the same file directory. Finally, in the new file
\include{mypreamble.tex}
\begin{document}
\thesistitle
\section{Section 1}
/*
* Write stuff and commands here
*/
\end{document}
The file you have provided does not seem to be a classic template which you copy-paste, change some fields and have your product. It seems to look more like a file containing some functions and predefinitions which helps you structure your file in a certain way. I would suggest looking for another template that includes a document main body, which you would be able to implement and use immediately.

Related

latex in text citations error: citation undefined

I am wanting to do in text citations for my dissertation. I will upload a simplified version of what i am seeing. The issue is that i keep getting "undefined citations" where i only get the citation key out in my pdf irrespective of which compiler i use.
I also keep getting an error saying that the bibliography is empty. But when my friend uses the exact code i have and copies the references and everything into his overleaf environment it works. I could not get it working with miktex and texmaker. Please help
I have checked a lot of articles of what is available and i swear im following what they are doing but i cant get any further
Initially, my idea is to pull the citations from another file because ill be using these citations in multiple documents. I have successfully setup the .bib file which will update as i add more references to Zotero (my reference manager). I tried to pull citations from the .bib file by coding in the file directory, but no luck there.
I then tried to not use the "file directory approach" and just have a references file in the same folder as the .tex file. But that didnt work either.
my code is as follows:
\documentclass[11pt]{article}
\usepackage{geometry}
\usepackage{latexsym}
\usepackage{graphicx}
\usepackage[style=ieee]{biblatex}
\addbibresource{refs.bib} %%updated from References.bib
%document headings
\title{Practice}
\author{Justin Smith}
\begin{document}
%Cover Page
\maketitle
\textbf{This page represents the cover page}\newline
\textit{Report will begin here}
\thispagestyle{empty}
\pagebreak
%Introduction
\section{Introduction}
The introduction for the report will be inserted here
\pagebreak
%end Introduction
%Literature Survey
\section{Literature Survey}
\subsection{Referencing Examples}
This section serves to use a reference and understand how to implement references as well as generate a reference list at the end of this report.\\
The citation test \cite{schmidtPreprocessingMethodologyEnhance2019}\\
\pagebreak
%Reference List
\section*{Reference List}
%%\bibliographystyle{IEEE}
%%\bibliography{C:/Users66smi/OneDrive/University of Pretoria/Zotero/MyZoteroLibrary.bib}
%%\printbibliography[title = Reference List]
%%\bibliography{MyZoteroLibrary.bib}
\end{document}
EDIT:
Upon trying to do what #celdor initially said said i still run into the same issue. The following screenshots add to the initial question.
Screenshot showing code and issue directly
Screenshot showing Latex "Configure" settings
From the Log file, the following logs detail relevant warnings
LaTeX Warning: Citation 'schmidtPreprocessingMethodologyEnhance2019' on page 3
undefined on input line 36.
Underfull \hbox (badness 10000) in paragraph at lines 36--37
[]
[3]
LaTeX Warning: Empty bibliography on input line 39.
(Latex test.aux)
LaTeX Warning: There were undefined references.
Package biblatex Warning: Please (re)run Biber on the file:
(biblatex) "Latex test"
(biblatex) and rerun LaTeX afterwards.
Package logreq Info: Writing requests to '"Latex test".run.xml'.
\openout1 = `"Latex test.run.xml"'.
)
Extra information:
The following screenshots are of the Project folder
First, latexsym is an old package superseded by amssymb. I looked at the file and its last update was in 1998!
As to your issues, assuming your text file is main.tex, try the following:
Clean your project folder from all auxiliary *.aux; the best way to do that is to issue latexmk -C in your project folder.
Additionally, remove main.bbl
make sure your *.bib file is in the root project folder
add backend=biber to list of options of biblatex.
Then, run:
pdflatex main.tex # or xelatex main.tex or lualatex main.tex etc.
biber main
pdflatex main.tex # see above
Without *.bbl file, the first run of pdflatex does not produce any reference list and latex may issue a warning. With an old *.bbl file, you will get wrong citations. After the whole sequence is executed, main.pdf should have the correct citation and a reference list.
Remember \bibliography is incompatible with biblatex. The correct macro to create bibliography list is \printbibliography. It will issue \section* in article or \chapter* in report/book for a title and format it according to settings in a document class.
Here, I created References.bib with a dummy article:
#ARTICLE{schmidtPreprocessingMethodologyEnhance2019,
author = {Other, Anthony Norman},
title = {Some things I did},
year = {2014},
journal = {J.~Irrep. Res.},
volume = {1},
number = {1},
pages = {1-10}
}
and run the code as suggested, and frankly I get expected results without any errors!
The full code:
\documentclass[11pt]{article}
\usepackage{geometry}
\usepackage{amssymb} %superseds latexsym
\usepackage{graphicx}
\usepackage[backend=biber,style=ieee]{biblatex}
\addbibresource{References.bib}
%document headings
\title{Practice}
\author{Justin Smith}
\begin{document}
%Cover Page
\maketitle
\textbf{This page represents the cover page}\newline
\textit{Report will begin here}
\thispagestyle{empty}
\pagebreak
%Introduction
\section{Introduction}
The introduction for the report will be inserted here
\pagebreak
%end Introduction
%Literature Survey
\section{Literature Survey}
\subsection{Referencing Examples}
This section serves to use a reference and understand how to implement references as well as generate a reference list at the end of this report.\\
The citation test \cite{schmidtPreprocessingMethodologyEnhance2019}\\
\clearpage
\printbibliography[title = Reference List]
\end{document}
and here's the screenshot:
The answer as suggested by #samcarter_is_at_topanswers.xyz
is that I was not using biber.
To do this on textmaker proceed to Options/Configure Textmaker. A configuration window will appear. Under the Commands Window locate "Bib(la)tex" and set the designation to "biber %". This will solve the issue.
Setting Update
A similar procedure can be followed on texstudios
See the below link on how to make sure textmaker uses this setting for reference.
https://tex.stackexchange.com/questions/44040/biblatex-biber-texmaker-miktex
thank you for everyones efforts in solving this problem.

Can we use the bib file from web for pdf_book in Bookdown?

In Rmarkdown,
we can generate pdf file if we use the bib file from a url.
For example, we set
bibliography: [https://raw.githubusercontent.com/ChoCho66/test/main/text.bib]
In bookdown, we can also generate html book (gitbook, bs4_book)
if we use the bib file from a url.
But pdf_book doesn't work.
It has the following message.
! Undefined control sequence.
\hyper#normalise ...M{ }\catcode `\%\active \let %
\#percentchar \let \%\#per...
l.430 ...content.com/ChoCho66/test/main/text.bib}}
The tex file has wrong since the following:
\bibliography{\url{https://raw.githubusercontent.com/ChoCho66/test/main/text.bib}}
Is there any way to solve this problem?
I want a common code that can compile both html book and pdf book if we use bib url file.

I couldn't open style file IEEEbib.bst

I am trying to complete a paper in latex downloaded from an online template.
there shows an error while compiling:
This is BibTeX, Version 0.99d (MiKTeX 21.6)
The top-level auxiliary file: Islam2021.aux
I couldn't open style file IEEEbib.bst
---line 69 of file Islam2021.aux
: \bibstyle{IEEEbib
: }
I'm skipping whatever remains of this command
I found no style file---while reading file Islam2021.aux
(There were 2 error messages)
Process exited with error(s)
How can I fix this?
IEEEbib.bst is not a default style include in tex distributions. Either you can download it from wherever you have your online template from or you could try your luck with a random version of the file from somewhere on the internet, e.g.
https://2021.ieeeicassp.org/Papers/PaperFormat/IEEEbib.bst
(this might be a different version and might give different results ...)

Chinese fonts in English Document of Latex

I would like to ask how to write some Chinese characters (simplified) within an English Latex document? I followed some methods suggested online but none of them are working for me. I am using Texworks to compile my document (pdfLatex).
\usepackage{CJKutf8}
\documentclass{article}
\usepackage{CJKutf8}
\begin{document}
\begin{CJK}{UTF8}{bsmi}
你好吗
\end{CJK}
\end{document}
another method is mentioned here,
\usepackage{CJKutf8}
\newcommand{\zh}[1]{\begin{CJK}{UTF8}{gbsn}#1\end{CJK}}
insert whatever Chinese characters you like into the document by typing
\zh{中文}
The error I receive is as following when using the method of CJKutf8 with pdfLaTeX mentioned here,
The log file hopefully contains the information to get MiKTeX going again:
C:\Users\muhd_\AppData\Local\MiKTeX\2.9\miktex\log\miktex-makepk.log
)
!pdfTeX error: miktex-pdftex.exe (file bsmiu30): Font bsmiu30 at 600 not found
==> Fatal error occurred, no output PDF file produced!
Log file is attached here.
The first error in the log file
The process terminated due to an access violation.
suggests that there are some problems with permissions while trying to create the necessary files to use the font for the Chinese letters.
Based on this answer https://tex.stackexchange.com/a/419809/36296 the problem can be fixed by either runing updmap from the command line or Refresh font map files from within the miktex console (in user mode).

Load a single symbol from a LaTeX package

When using the MnSymbol package, pdflatex gives two font warnings:
LaTeX Font Warning: Encoding 'OMS' has changed to 'U' for symbol font
(Font) 'symbols' in the math version 'normal' on input line 120.
LaTeX Font Info: Overwriting symbol font 'symbols' in version 'normal'
(Font) OMS/cmsy/m/n --> U/MnSymbolF/m/n on input line 120.
It turns out that this is probably due to a clash with the AMSSymb package.
Since I need just a few symbols from the package: is there a way to load one symbol from a package, in stead of all?
Here's how I solved this:
Download the perl script "makefakeMnSymbol" from the comprehensive latex symbol document source:
http://mirror.ctan.org/info/symbols/comprehensive/source/makefakeMnSymbol
Next, at command line do chmod +x makefakeMnSymbol to make it executable. Then, run
./makefakeMnSymbol `kpsewhich MnSymbol.sty` > fakeMnSymbol.sty
Put fakeMnSymbol.sty in a texmf directory of choice (global or local), and run texhash
If you now put
\usepackage{fakeMnSymbol}
in your preamble, you can now use any MnSymbol, like \powerset by prefixing it like \MNSpowerset
Big thanks to Scott Pakin for this hack... and for his comprehensive symbol guide...
This hack has problems with symbols in subscripts/superscripts. A work-around is to use look at the fakeMnSymbol.sty source to find which font the symbol you want was loaded from, along with its number. Here's an example from one of my preambles where I override the built-in \boxminus with an MnSymbol:
\usepackage[]{fakeMnSymbol}
\DeclareSymbolFont{mnsymbolc}{U}{MnSymbolC}{m}{n}
\let\boxminus=\undefined
\DeclareMathSymbol{\boxminus}{2}{mnsymbolc}{112}
These warnings are nothing to worry about. In fact, in the next LaTeX release they'll disappear (see the original bug report). No ETA on that, however.
Moreover, is there any real chance this affects the typesetting of the document?
Nope.
is there any way to prevent this?
Can patch the LaTeX warning message code before loading the package, and then restore it again afterwards (this is what I've done in the past in my own packages), but as a user I'd just learn to ignore the warning.
The following might help. This is the code I had to add in order to get just the \bigominus symbol out of the MnSymbol package.
\DeclareFontFamily{U}{MnSymbolF}{}<br>
\DeclareSymbolFont{mnsymbols}{U}{MnSymbolF}{m}{n}<br>
\DeclareFontShape{U}{MnSymbolF}{m}{n}{<br>
<-6> MnSymbolF5<br>
<6-7> MnSymbolF6<br>
<7-8> MnSymbolF7<br>
<8-9> MnSymbolF8<br>
<9-10> MnSymbolF9<br>
<10-12> MnSymbolF10<br>
<12-> MnSymbolF12}{}<br>
\DeclareMathSymbol{\bigominus}{\mathop}{mnsymbols}{55}

Resources