3

I'm compiling my thesis, and the same error is constantly returned: enter image description here

It's frustrating as in all the other forum posts I have found, the error has referred to a specific thing (such as: Unused global option(s) [english]) so it is possible to find the section of code at fault. Since my error just states main.tex it is very difficult to find the issue.

EDIT: added MWE:

%------METADATA-------
\def\myauthor{Author} % Author
\def\mytitle{Title} % title

%% ----------------------------Setting up the Preamble---------------------------

\documentclass[12pt,oneside,onehalfspacing]{report}  %[font size, same margins 
on both sides, line spacing] - ***change to twoside if getting bound!!!***
\usepackage[utf8]{inputenc}  %input coding method
\usepackage[T1]{fontenc}  %makes copy and pasteable
\usepackage{graphicx}   %allows input of images
\usepackage{float}   %positioning of figures
\graphicspath{ {figures/} }  %where the images are kept
\usepackage[raggedright]{titlesec}  %stops titles using too much space

\pagenumbering{roman} %set front matter page numbering to roman

%%----------PAGE LAYOUT--------
\usepackage[a4paper,left=40mm,right=20mm,top=20mm,bottom=20mm,includehead,includefoot]{geometry} 

\usepackage{fancyhdr}
\pagestyle{fancy} %adds page headers
\setlength{\headwidth}{150mm}

\fancyhead{}  %clears header format
\fancyhead[L]{\leftmark} %adds chapter title in left position
\fancyhead[R]{\myauthor}  %adds author in right position
\fancyfoot{}
\fancyfoot[R]{\textbf{\thepage}} %bold page number


\renewcommand{\headrulewidth}{0.4pt} %alters head/foot ruler line width
\renewcommand{\footrulewidth}{0.4pt}

\setlength{\headheight}{15pt} % header height

\setlength{\parskip}{1em} %adds return between paragraphs

%%------Font-------
\usepackage{lmodern}
\renewcommand*\familydefault{\sfdefault} %% Only if the base font of the 
document is to be sans serif
\usepackage[T1]{fontenc}
%%---------------------------------

\title{
    {\mytitle}\\
    \vspace{15mm}
%   {\large UoD}
    \vspace{10mm}
{\includegraphics[width=8cm]{dundee_logo.png}}\\
\vspace{5mm}
}
\author{\myauthor}
\date{2017}

%------------------BIBTEX------------------------
\usepackage[style=nature,citestyle=numeric-comp,sorting=none]{biblatex}
\addbibresource{library.bib}

\AtEveryBibitem{\clearfield{isbn}}    % clears isbn
\AtEveryBibitem{\clearfield{url}}    % clears url
\AtEveryBibitem{\clearfield{doi}}    % clears doi
\AtEveryBibitem{\clearfield{issn}}    % clears issn
\usepackage{hyperref} %treats in text references as hyperlinks

%% --------------------------------End of Preamble--------------------------------------
\begin{document}
Here is my document
\end{document}

Sorry for the terrible LaTex writing, this is my first attempt at using it!

  • Welcome to the site. It's a generic error and we can't answer with this much info. where is your thesis style file? You can remove all the content and leave the preamble with a simple dummy document that replicates the error so we can have a look. – percusse Jul 6 '17 at 19:48
3

The following is a minimal example that replicates the behaviour on ShareLaTeX:

\documentclass[notused]{article}

\begin{document}

Lorem ipsum.

\end{document}

In order to identify the "global option that wasn't used", you have to click on View Raw Logs:

enter image description here

Then you can scroll through the log (towards the bottom) and find the actual warning:

LaTeX Warning: Unused global option(s):
    [notused].

This is probably a bug in the ShareLaTeX engine, or could be submitted as a feature request. I think the interpretation of the .log by the ShareLaTeX engine assumes the LaTeX Warning will be available on the line that it's published in the .log. However, since the list of unused options is displayed in the subsequent line, it only reports Unused global option(s) as the warning. For example, consider the warnings and their display in the following example:

\documentclass[notused]{article}

\begin{document}

Lorem ipsum \ref{abc}.

\end{document}

enter image description here

LaTeX Warning: Unused global option(s):
    [notused].

...

LaTeX Warning: Reference `abc' on page 1 undefined on input line 5.

...

LaTeX Warning: There were undefined references.
  • Thanks for your response, @Werner ! I had a look in the raw logs and it turns out the issue is with my onehalfspacing command in the \documentclass line - I'll post an MWE in an edit to my question. – louden255 Jul 7 '17 at 7:16

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.