TexPad 卡在排版中

TexPad 卡在排版中

你能帮我吗,因为我的排版卡住了。我的操作系统是 Texpad。

当我添加这一段时,排版就开始卡住了

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}

非常感谢,感激

卢卡

以下是完整文档:

\documentclass[11pt]{article}
\usepackage{booktabs}
\usepackage{wrapfig,lipsum,booktabs}
\usepackage[margin=2cm]{geometry}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage[utf8]{inputenc}
\fancyhead{}
\fancyhead[CO,CE]{Country Profile - Morocco}
\fancyfoot{}
\fancyfoot[RE,LO]{\textbf{\thepage}}
\fancyfoot[RO,LE]{\leftmark}
\fancyfoot[CO,CE]{Luca Canepa}
\renewcommand{\headrulewidth}{2pt}
\renewcommand{\footrulewidth}{1pt}
\addtolength{\headheight}{0pt}
\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}

答案1

您的代码中有两件事会导致编译问题:

  • 导致错误Muḥammad VI

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

    如果 Wikipedia 是正确的,则不需要 上的下划线h,因此您可以写Muhammad VI。如果您确实需要它,您可以写

    Mu\d hammad VI
    
  • 之后\label导致\begin{tabular}{..}错误

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

    但只需将\label外部移至tabular之后(或 之内)\caption

此外,请注意,在段落末尾到处使用\noindent\\是错误的做法。在代码中仅用空行表示段落分隔符,如果您想修改段落分隔符在 PDF 中的显示方式,请在序言中更改一次。要获得垂直空间而不是缩进,只需添加

\usepackage{parskip}

完整代码:

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

\usepackage{parskip}


\fancyhead{}
\fancyhead[CO,CE]{Country Profile - Morocco}
\fancyfoot{}
\fancyfoot[RE,LO]{\textbf{\thepage}}
\fancyfoot[RO,LE]{\leftmark}
\fancyfoot[CO,CE]{Luca Canepa}
\renewcommand{\headrulewidth}{2pt}
\renewcommand{\footrulewidth}{1pt}
\addtolength{\headheight}{0pt}
\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}

相关内容