2

First time using Latex, I have searched the whole document for an extra { or a missing }, to no avail.

\documentclass[oneside,12pt,a4paper]{article}

\setlength{\parindent}{0mm}
\setlength{\oddsidemargin}{-5mm}
\setlength{\evensidemargin}{-5mm}
\setlength{\textwidth}{165mm}
\setlength{\textheight}{230mm}
\setlength{\topmargin}{-10mm}
\setlength{\marginparwidth}{15mm}
\setlength{\marginparsep}{7mm}

\usepackage{pslatex,palatino,avant,graphicx,color}
\usepackage[margin=2cm]{geometry}
\usepackage{hyperref}
\usepackage{amsmath}
\usepackage{indentfirst}
%\usepackage{gensymb}
\usepackage{setspace}
\doublespacing
\usepackage{graphicx}
\graphicspath{ {C:/Users/hill/Documents/Literature Review/Thesis_pictures/} }
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath}
\usepackage{graphicx}

\begin{document}

\begin{titlepage}

\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}

%----------------------------------------------------------------------------------------
%   HEADING SECTIONS
%----------------------------------------------------------------------------------------

\textsc{\LARGE A Literature Review;}\\[1.5cm] % Name of your university/college

%----------------------------------------------------------------------------------------
%   TITLE SECTION
%----------------------------------------------------------------------------------------

\HRule \\[0.4cm]
{ \huge {\color {blue}\bfseries Enhancing the efficiency of RF sources for future colliders}\\[0.4cm] % Title of your document
\HRule \\[1.5cm]

%----------------------------------------------------------------------------------------
%   AUTHOR SECTION
%----------------------------------------------------------------------------------------

\begin{minipage}{0.4\textwidth}
\begin{flushleft} \large
\emph{Author:}\\
Victoria \textsc{Hill} % Your name
\end{flushleft}
\end{minipage}
~
\begin{minipage}{0.4\textwidth}
\begin{flushright} \large
\emph{Supervisor:} \\
Dr. Chris \textsc{Lingwood} % Supervisor's Name
\end{flushright}
\end{minipage}\\[2cm]


%----------------------------------------------------------------------------------------
%   DATE SECTION
%----------------------------------------------------------------------------------------

{\large \today}\\[2cm] 

%----------------------------------------------------------------------------------------
%   LOGO SECTION
%----------------------------------------------------------------------------------------

\begin{figure}[fragile]
        \setbox0\hbox{%
                \includegraphics[width=0.45\textwidth]{UniLogo.jpg}%
        }%
        \setbox2\hbox{%
                \includegraphics[width=0.45\textwidth]{STFCLogo.jpg}%
        }%
        \ifdim\ht0>\ht2
                \setbox0\hbox{%
                        \includegraphics[height=\ht2]{UniLogo.jpg}%
        }%
        \else
                \setbox2\hbox{%
                        \includegraphics[height=\ht0]{STFLogo.jpg}%
         }%
        \fi
        \noindent
 \end{figure}[fragile]

%----------------------------------------------------------------------------------------


\end{titlepage}

    \clearpage
    \tableofcontents
\clearpage
    \section{Introduction}
    \label{Intro}
    \clearpage
%\chapter{Literature Review}

\begin{thebibliography}{20}
    \bibitem{One}
        First reference.

\end{thebibliography}


\end{document}
  • 4
    There is one unclosed brace in the title section. In this case the document is not long and it's rather easy to find, but a good tip in a long document is to use a text editor highlighting pairs, and to insert a } at the end of the document: it should highlight the innermost (last) unclosed {. – T. Verron Apr 21 '15 at 12:49
  • @T.Verron, perhaps you should post your comment as an answer so this question does not remain unanswered. – Joel Reyes Noche Apr 23 '15 at 5:06
3

In the title section:

\HRule \\[0.4cm]
{ \huge {\color {blue}\bfseries Enhancing the efficiency of RF sources for future colliders}\\[0.4cm] % Title of your document
\HRule \\[1.5cm]

The first brace on the second line is unclosed.

To find it, several methods are available:

  • By just looking at the document, that's feasible when the document is not too long. With experience you will also learn where you are most likely to forget missing braces. When the document is long, or the brace is well hidden in the middle of a paragraph, you will not find it easily with this method.

  • By dichotomy: comment out half of the document (making sure that it is still syntactically correct), see if the error still appears. The risk here, for long documents, is that you may accidentally cut the document in the middle of an environment, creating more errors to filter out.

  • With help of your editor: modern text editors can highlight paired delimiters. So if you insert a closing brace at the end of the document, the corresponding opening brace (which was unclosed) will be highlighted. Depending on your editor, this may not work if the delimiters are crossed: for example with ${$}, it may not pair the two braces.

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.