在 Texworks 中,虽然前几页的文本是对齐的,但突然间文本不再对齐,并且缩进不起作用

在 Texworks 中,虽然前几页的文本是对齐的,但突然间文本不再对齐,并且缩进不起作用

编辑:当我尝试在没有封面的新 texfile 中输入段落时,它完全对齐。所以问题似乎出在我的封面上。我正在添加以下代码和错误消息-

\RequirePackage{ifpdf}
\documentclass[11pt,oneside,  PhD]{muthesis}
\pagestyle{headings}
% Avoid some overfull boxes.
\emergencystretch=.1\hsize
\hbadness = 3000

\usepackage[utf8]{inputenc}
\usepackage[cyr]{aeguill}
\usepackage{graphicx}
\usepackage{url}
\usepackage{color}
\usepackage{moreverb}
\usepackage{indentfirst}
\usepackage{vmargin}
\usepackage{pstricks}
\usepackage{nameref}

\usepackage[T1]{fontenc}
\usepackage[utf8] {inputenc}
\usepackage{booktabs}
 \usepackage{setspace}
\usepackage{eso-pic,graphicx}
\usepackage{rotating}
\usepackage{lscape}

\usepackage[final]{pdfpages}

%\usepackage{cite}
\usepackage{varioref}
\usepackage{rotating} 
\usepackage{pifont}
\usepackage{gensymb}
\usepackage{wasysym}
\usepackage{float}
\usepackage[perpage,para,symbol*]{footmisc}

\graphicspath{c:\MyFiles-Latex\Thesis-Figures}
\setcounter{tocdepth}{4}    

\setcounter{secnumdepth}{3}  

\setpapersize{A4}
\setmarginsrb{40mm}{20mm}{25mm}{20mm}{10pt}{10mm}{10pt}{10mm}

%\renewcommand{\baselinestretch}{1.5}
\setlength{\parindent}{1cm}
\renewcommand\verbatimtabsize{2\relax}

\renewcommand{\bibname}{Bibliography}
\clubpenalty=9999 %theses two lines are
\widowpenalty=9999 
\usepackage{array,longtable}
\usepackage[T1]{fontenc}

\newcommand*{\Quote}[1]{\textquotedblleft#1\textquotedblright}

\def\Hanh{H\`an Th\^e\llap{\raise 0.5ex\hbox{\'{}}} Th\`anh}

\ifpdf
  \usepackage[%
    pdftex,%
    colorlinks,%
    hyperindex,%
    plainpages=false,%
    filecolor=black,
    urlcolor=black,
    a4paper,
    linkcolor=black,
    citecolor=blue,
  ]{hyperref}
  %%?? \def\pdfBorderAttrs{/Border [0 0 0] } % No border arround Links
  \usepackage{thumbpdf}
\else
  \usepackage{hyperref}
\fi

\usepackage{fancyhdr}
\pagestyle{fancy}
\cfoot{\thepage} 
\lhead[\fancyplain{}{}]
      {\fancyplain{}{}}
%\renewcommand{\chaptermark}[1]{%  %Make the Chapter title in low case
%\markboth{\chaptername
%\ \thechapter.\ #1}{}}
\renewcommand{\headrulewidth}{0pt} % This removes the line added by Fancy header

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Beginning of Document - First Page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\begin{figure}
\begin{center}
 \makebox[\textwidth][c]{\includegraphics[width=1.2\textwidth]{Monash's LOGO.png}}
\title {\huge {\textbf{Investigating the impact of flavonoid compounds on the cGAS-STING pathway}}}
\author {{\textbf{XXX}\\ Student ID: 6789976\\Jan 2018-December 2021}}
\date{}
\maketitle

A thesis submitted for the degree of Doctor of Philosophy \\at XXX University\\

Research was carried out\\in the ABCD\\ affiliated with XXX\\
Under the supervision of \\
A/Prof ASD (75\%)\\
and ASC(25\%)}
 \end{center}
\end{figure}

**错误信息如下:**论文Tom.tex

106 Missing } inserted.
<inserted text> 
                }
l.106
thesis Tom.tex
110 LaTeX Error: There's no line here to end.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.110 \newline
              {Research was carried out\\in XX ...

答案1

序言中有几个问题(例如你肯定使用了 latin-1 吗),但主要错误是

\author {{\textbf{XXX}\\ Student ID: 6789976\\Jan 2018-December 2021}}

应该是

\author {\textbf{XXX}\\ Student ID: 6789976\\Jan 2018-December 2021}

没有额外的支撑组。

您还应该删除\begin{figure}那些\end{figure}您不希望标题页处于浮动状态的内容。

我不确定您想要什么布局,但如果内置的\maketitle不是您想要的设计,您可以titlepage手动使用和设置:

在此处输入图片描述

\RequirePackage{ifpdf}
\def\MyFiles{?myfiles}
\def\Thesis{?thesis}
\documentclass[11pt,oneside,  PhD]{muthesis}
\pagestyle{headings}
% Avoid some overfull boxes.
\emergencystretch=.1\hsize
\hbadness = 3000

\usepackage[utf8]{inputenc}
\usepackage[cyr]{aeguill}
\usepackage{graphicx}
\usepackage{url}
\usepackage{color}
\usepackage{moreverb}
\usepackage{indentfirst}
\usepackage{vmargin}
\usepackage{pstricks}
\usepackage{nameref}

\usepackage[T1]{fontenc}
\usepackage[utf8] {inputenc}
\usepackage{booktabs}
 \usepackage{setspace}
\usepackage{eso-pic,graphicx}
\usepackage{rotating}
\usepackage{lscape}

\usepackage[final]{pdfpages}

%\usepackage{cite}
\usepackage{varioref}
\usepackage{rotating} 
\usepackage{pifont}
\usepackage{gensymb}
\usepackage{wasysym}
\usepackage{float}
\usepackage[perpage,para,symbol*]{footmisc}

\graphicspath{c:\MyFiles-Latex\Thesis-Figures}
\setcounter{tocdepth}{4}    

\setcounter{secnumdepth}{3}  

\setpapersize{A4}
\setmarginsrb{40mm}{20mm}{25mm}{20mm}{10pt}{10mm}{10pt}{10mm}

%\renewcommand{\baselinestretch}{1.5}
\setlength{\parindent}{1cm}
\renewcommand\verbatimtabsize{2\relax}

\renewcommand{\bibname}{Bibliography}
\clubpenalty=9999 %theses two lines are
\widowpenalty=9999 
\usepackage{array,longtable}
\usepackage[T1]{fontenc}

\newcommand*{\Quote}[1]{\textquotedblleft#1\textquotedblright}

\def\Hanh{H\`an Th\^e\llap{\raise 0.5ex\hbox{\'{}}} Th\`anh}

\ifpdf
  \usepackage[%
    pdftex,%
    colorlinks,%
    hyperindex,%
    plainpages=false,%
    filecolor=black,
    urlcolor=black,
    a4paper,
    linkcolor=black,
    citecolor=blue,
  ]{hyperref}
  %%?? \def\pdfBorderAttrs{/Border [0 0 0] } % No border arround Links
  \usepackage{thumbpdf}
\else
  \usepackage{hyperref}
\fi

\usepackage{fancyhdr}
\pagestyle{fancy}
\cfoot{\thepage} 
%\lhead[\fancyplain{}{}]
%      {\fancyplain{}{}}
%\renewcommand{\chaptermark}[1]{%  %Make the Chapter title in low case
%\markboth{\chaptername
%\ \thechapter.\ #1}{}}
\renewcommand{\headrulewidth}{0pt} % This removes the line added by Fancy header

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Beginning of Document - First Page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

\begin{titlepage}
\centering
\makebox[\textwidth][c]{\includegraphics[width=1.2\textwidth,height=2cm]{example-image.png}}

{\huge \textbf{Investigating the impact of flavonoid compounds on the cGAS-STING pathway}\par}

\vspace{1cm}

\textbf{XXX}\\ Student ID: 6789976\\Jan 2018-December 2021


\vspace{2cm}

A thesis submitted for the degree of Doctor of Philosophy \\at XXX University\\

Research was carried out\\in the ABCD\\ affiliated with XXX\\
Under the supervision of \\
A/Prof ASD (75\%)\\
and ASC(25\%)
 \end{titlepage}


\end{document}

相关内容