# TexPad stuck in typesetting

could you please help me because my typesetting is stuck. I use Texpad for OS.

The typesetting began being stuck when I added this paragraph

The Gross Enrolment Ratio is the \number of students enrolled in a given level of education, regardless of age, expressed as a percentage of the official school-age population corresponding to the same level of education''(Gross enrolment ratio - UNESCO UIS", 2017). Figure \ref{GER} shows the GRE for Morocco for both primary and secondary school: education is improving every year\footnote{A GER value approaching or exceeding 100\% indicates that a country is, in principle, able to accommodate all of its school-age population}, reaching a peak of 115\% for primary and 85\% for secondary school.\\
Figure \ref{POP} shows the population data for Morocco: from 1990 the population kept growing at an average rate of 1.45\% yearly. Total population in 2016 amounted to slightly more than 35 million.


and the following picture

\begin{figure}[h]
\centering
\caption{Demographics}
\bigskip
\label{POP}
\includegraphics[scale=0.25]{POP.png}
\end{figure}


Thank you very much, appreciate

Luca

Here's the whole document:

\documentclass[11pt]{article}
\usepackage{booktabs}
\usepackage{wrapfig,lipsum,booktabs}
\usepackage[margin=2cm]{geometry}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage[utf8]{inputenc}
\fancyhead[CO,CE]{Country Profile - Morocco}
\fancyfoot{}
\fancyfoot[RE,LO]{\textbf{\thepage}}
\fancyfoot[RO,LE]{\leftmark}
\fancyfoot[CO,CE]{Luca Canepa}
\renewcommand{\footrulewidth}{1pt}
\author{Luca Canepa - 17-606-385}
\date{\today}
\title{Economic Development - 8,372 - Assignment\\
\bigskip
\Huge{\textbf{Country Profile\\
\bigskip
Morocco}}}
\begin{document}
\maketitle
\section{Introduction}
The Kingdom of Morocco is an independent country in north-west Africa, bordered by Algeria in the east, West Sahara in the south, the Atlantic Ocean in the west and north-west and the Mediterranean Sea in the north-east. The northernmost part of Morocco is characterised by the Gibraltar strait, a narrow sea corridor that connects the Atlantic Ocean and the Mediterranean Sea. On the other side of the strait lays Spain, as well as the British Overseas Territory of Gibraltar. \\
An important feature of northern Morocco is the presence of two Spanish city-exclaves (not directly connected to the rest of the country): Ceuta and Melilla. \\

\noindent  Morocco's history followed closely the neighbouring countries of Algeria and Tunisia: first controlled by Carthage, then Rome, then conquered by the Arabs. Afterwards, the broader area of North Africa came to be known as the Maghrib (Arabic: the West''), and the majority of its people accepted Islam. Morocco was annexed by the French and became a protectorate in 1912 but regained independence in 1956. Today it is the only monarchy in North Africa (Gilson Miller, Swearingen, Barbour, Brown \& Laroui, 2017).\\

\noindent There's currently an international dispute on the southern territory of Western Sahara: once occupied by Spain, its territory has been \textit{de facto} divided by Morocco and the southern country of Mauritania. The local autonomy front (the Polisario Front) does not accept either state as sovereign, while spontaneous insurgents moved on a guerrilla warfare against both countries. In the early 1990 a UN decision was about to bring peace in the region, however Morocco kept settling the region and expanding its control, hence having the indigenous population relocate in other areas (for example, Algeria); the dispute continues in the present with Morocco treating Western Sahara as one of its own regions (Western Sahara", 2017).
\section{Politics and demographics}
Morocco's largest and most important city is Casablanca, while the political capital is Rabat. Morocco is a constitutional monarchy with the power shared between the monarch and the bicameral parliament. The government is led by a prime minister. In July 2011, Moroccan voters approved a new constitution proposed by King Muḥammad VI. The new constitution expanded the powers of the parliament and the prime minister but left the king with broad authority over all branches of government (Gilson Miller, Swearingen, Barbour, Brown \& Laroui, 2017).\\

\noindent The following tables and graphs show some of the main country indicators regarding demographics\footnote{all data is from the World Development Indicators database}:
\begin{wraptable}{l}{10cm}

\caption{Demographics indicators}
\bigskip
\begin{tabular}{@{}lc@{}}
\label{DI}
\toprule
& \textbf{2016}       \\ \midrule
Life expectancy at birth (years)                            & \textit{76}         \\
Mortality rate, under-5 (per 1,000 live births)                    & \textit{27}         \\
Prevalence of underweight (\% of children under 5) & \textit{2.48} \\
Urban population growth (annual \%) & \textit{2.2}\\ \bottomrule
\end{tabular}
\end{wraptable}\\
Table \ref{DI} shows the life expectancy at birth, which is 76 years (against the average European life expectancy of 81\footnote{World Population Data Sheet 2017, page 17}) as well as the mortality rate for kids under 5 years old (27 per 1000 live births, much higher than European Union's 7 deaths per 1000 births\footnote{Estimates Developed by the UN Inter-agency Group for Child Mortality Estimation}). The mortality rate is also strengthened by the fact that 2.5\% of the same age group is underweight.\\
On the other side, it is noted that the urban population slightly grew in the last year considered, hence it is seen a positive migration of the population from the countryside to the cities. \\
\begin{figure}[h]
\centering
\caption{Gross Enrolment Ratio}
\bigskip
\label{GER}
\includegraphics[scale=0.25]{GER.png}
\end{figure}
The Gross Enrolment Ratio is the number of students enrolled in a given level of education, regardless of age, expressed as a percentage of the official school-age population corresponding to the same level of education''(Gross enrolment ratio - UNESCO UIS", 2017). Figure \ref{GER} shows the GRE for Morocco for both primary and secondary school: education is improving every year\footnote{A GER value approaching or exceeding 100\% indicates that a country is, in principle, able to accommodate all of its school-age population}, reaching a peak of 115\% for primary and 85\% for secondary school.\\
Figure  shows the population data for Morocco: from 1990 the population kept growing at an average rate of 1.45\% yearly. Total population in 2016 amounted to slightly more than 35 million.
\begin{figure}[h]
\centering
\caption{Demographics}
\bigskip
\label{POP}
\includegraphics[scale=0.25]{POP.png}
\end{figure}

2937 (Source: World Development Indicators database)
2893 (Source: World Bank national accounts data, and OECD National Accounts data files)

\end{document}

• There's nothing in what you show that on it's own would cause problems with generating a PDF, I think. So the process just stops, no errors or the like? And if you remove the paragraph and figure, it starts working again? – Torbjørn T. Mar 14 '18 at 9:53
• Nope it does not. It doesn't stop, it just goes on and on and on... I'll attach the whole .tex document – Luca Canepa Mar 14 '18 at 10:07
• If you can reduce it to the smallest complete document that demonstrates the problem (a minimal working example), that would be better than the whole thing. – Torbjørn T. Mar 14 '18 at 10:09
• PRoblem is I have absolutely no idea why it does not work anymore... even if I delete tables, text and figures it does not typeset – Luca Canepa Mar 14 '18 at 10:15
• I get an error from the ḥ in Muḥammad VI, and I get an error because of the \label placed right after \begin{tabular}{..} (move it outside the tabular, to right after the \caption), but having fixed those two things it works fine. Doesn't TexPad indicate errors? – Torbjørn T. Mar 14 '18 at 10:19

There are two things in your code that causes compilation problems:

• The ḥ in Muḥammad VI causes the error

! Package inputenc Error: Unicode char ḥ (U+1E25)
(inputenc)                not set up for use with LaTeX.


If Wikipedia is correct, you don't need the underdot on the h, so you can write Muhammad VI. If you do want it, you can write

Mu\d hammad VI

• The \label right after \begin{tabular}{..} causes the error

! Misplaced \noalign.
\toprule ->\noalign
{\ifnum 0=}\fi \@aboverulesep =\abovetopsep \global \@b...
l.85 \label{DI}\toprule

?


But just move the \label outside the tabular, to immediately after (or within) the \caption.

In addition, note that using \noindent everywhere, and \\ at the end of paragraphs is the wrong way to go about things. Indicate paragraph breaks in the code only by an empty line, and if you want to modify how a paragraph break is displayed in the PDF, change that once in the preamble. To get vertical space instead of indentation, just add

\usepackage{parskip}


Complete code:

\documentclass[11pt]{article}
\usepackage{booktabs}
\usepackage{wrapfig}
\usepackage[margin=2cm]{geometry}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage[utf8]{inputenc}

\usepackage{parskip}

\fancyhead[CO,CE]{Country Profile - Morocco}
\fancyfoot{}
\fancyfoot[RE,LO]{\textbf{\thepage}}
\fancyfoot[RO,LE]{\leftmark}
\fancyfoot[CO,CE]{Luca Canepa}
\renewcommand{\footrulewidth}{1pt}
\author{Luca Canepa - 17-606-385}
\date{\today}
\title{Economic Development - 8,372 - Assignment\\
\bigskip
\Huge{\textbf{Country Profile\\
\bigskip
Morocco}}}
\begin{document}
\maketitle

\section{Introduction}
The Kingdom of Morocco is an independent country in north-west Africa, bordered
by Algeria in the east, West Sahara in the south, the Atlantic Ocean in the west
and north-west and the Mediterranean Sea in the north-east. The northernmost
part of Morocco is characterised by the Gibraltar strait, a narrow sea corridor
that connects the Atlantic Ocean and the Mediterranean Sea. On the other side of
the strait lays Spain, as well as the British Overseas Territory of Gibraltar.

An important feature of northern Morocco is the presence of two Spanish
city-exclaves (not directly connected to the rest of the country): Ceuta and
Melilla.

Morocco's history followed closely the neighbouring countries of Algeria and
Tunisia: first controlled by Carthage, then Rome, then conquered by the Arabs.
Afterwards, the broader area of North Africa came to be known as the Maghrib
(Arabic: the West''), and the majority of its people accepted Islam. Morocco
was annexed by the French and became a protectorate in 1912 but regained
independence in 1956. Today it is the only monarchy in North Africa (Gilson
Miller, Swearingen, Barbour, Brown \& Laroui, 2017).

There's currently an international dispute on the southern territory of Western
Sahara: once occupied by Spain, its territory has been \textit{de facto} divided
by Morocco and the southern country of Mauritania. The local autonomy front (the
Polisario Front) does not accept either state as sovereign, while spontaneous
insurgents moved on a guerrilla warfare against both countries. In the early
1990 a UN decision was about to bring peace in the region, however Morocco kept
settling the region and expanding its control, hence having the indigenous
population relocate in other areas (for example, Algeria); the dispute continues
in the present with Morocco treating Western Sahara as one of its own regions
(Western Sahara", 2017).

\section{Politics and demographics}
Morocco's largest and most important city is Casablanca, while the political
capital is Rabat. Morocco is a constitutional monarchy with the power shared
between the monarch and the bicameral parliament. The government is led by a
prime minister. In July 2011, Moroccan voters approved a new constitution
proposed by King Muhammad VI. The new constitution expanded the powers of the
parliament and the prime minister but left the king with broad authority over
all branches of government (Gilson Miller, Swearingen, Barbour, Brown \& Laroui,
2017).

The following tables and graphs show some of the main country indicators
regarding demographics\footnote{all data is from the World Development
Indicators database}:
\begin{wraptable}{l}{10cm}
\caption{Demographics indicators}
\label{DI}
\bigskip
\begin{tabular}{@{}lc@{}}
\toprule
& \textbf{2016}       \\ \midrule
Life expectancy at birth (years)                   & \textit{76}         \\
Mortality rate, under-5 (per 1,000 live births)    & \textit{27}         \\
Prevalence of underweight (\% of children under 5) & \textit{2.48} \\
Urban population growth (annual \%)                & \textit{2.2}  \\
\bottomrule
\end{tabular}
\end{wraptable}

Table \ref{DI} shows the life expectancy at birth, which is 76 years (against
the average European life expectancy of 81\footnote{World Population Data Sheet
2017, page 17}) as well as the mortality rate for kids under 5 years old (27 per
1000 live births, much higher than European Union's 7 deaths per 1000
births\footnote{Estimates Developed by the UN Inter-agency Group for Child
Mortality Estimation}). The mortality rate is also strengthened by the fact that
2.5\% of the same age group is underweight.

On the other side, it is noted that the urban population slightly grew in the
last year considered, hence it is seen a positive migration of the population
from the countryside to the cities.

\begin{figure}[h]
\centering
\caption{Gross Enrolment Ratio}
\bigskip
\label{GER}
\includegraphics[scale=0.25]{GER.png}
\end{figure}
The Gross Enrolment Ratio is the number of students enrolled in a given level
of education, regardless of age, expressed as a percentage of the official
school-age population corresponding to the same level of education''(Gross
enrolment ratio - UNESCO UIS", 2017). Figure \ref{GER} shows the GRE for Morocco
for both primary and secondary school: education is improving every
year\footnote{A GER value approaching or exceeding 100\% indicates that a
country is, in principle, able to accommodate all of its school-age population},
reaching a peak of 115\% for primary and 85\% for secondary school.

Figure \ref{POP} shows the population data for Morocco: from 1990 the population kept
growing at an average
rate of 1.45\% yearly. Total population in 2016 amounted to slightly more than
35 million.

\begin{figure}[h]
\centering
\caption{Demographics}
\bigskip
\label{POP}
\includegraphics[scale=0.25]{POP.png}
\end{figure}

2937 (Source: World Development Indicators database)
2893 (Source: World Bank national accounts data, and OECD National Accounts data
files)

\end{document}
`