将单词居中,如标题所示

将单词居中,如标题所示

我想将单词向上移动,\huge 就像下面屏幕截图中的标题一样。我试图使用标题参数中的内容,因为我不想添加名称或日期,\maketitle如果添加会产生很大的空间,\date{}所以我决定采用这种方法。我将删除\title{}\maketitle管理它。

代码:

\documentclass[paper=a4, fontsize=11pt]{scrartcl}   % 
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage[ngerman, english]{babel}
\usepackage[protrusion=true,expansion=true]{microtype}      
\renewcommand{\baselinestretch}{1.5}
\newcommand{\horrule}[1]{\rule{\linewidth}{#1}}     % 
\newcommand{\twoobjects}[2]{%
  \centering \leavevmode\vbox{\hbox{#1}\nointerlineskip\hbox{#2}} %
}
\usepackage[backend=bibtex]{biblatex}

\addbibresource{references.bib}

\title{
        %\vspace{-1in}  
        \usefont{OT1}{bch}{b}{n}
        \normalfont \normalsize \textsc{SmartBusTraffic: Estimation of Bus positions based on Crowd Sourcing Monitoring} \\ [25pt]
        \horrule{0.5pt} \\[0.4cm]
        \huge Handbook
        \horrule{2pt} \\[0.5cm]
        \date{}
}


\begin{document}

\maketitle

        \begin{center}
                \usefont{OT1}{bch}{b}{n}
        \normalfont \normalsize \textsc{SmartBusTraffic: Estimation of Bus positions based on Crowd Sourcing Monitoring} \\ [25pt]
        \end{center}


        \horrule{0.5pt} \\[0.4cm]
        \begin{center}
        \huge Handbook \\
        \end{center}

        \horrule{2pt} \\[0.5cm]



Public transit service plays an important ...

\printbibliography
\end{document}

在此处输入图片描述

答案1

使用\centering代替\begin{center}...\end{center},但在组内使用它,例如一{...}对。center环境在居中内容的前后添加一些垂直空间。

\par答:埃利特(Ellett)提出了很好的意见:在结束组之前需要一个空行(或) \centering,否则就不会居中(对于这个实际上是单行的文本)。

\documentclass[paper=a4, fontsize=11pt]{scrartcl}   % 
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage[ngerman, english]{babel}
\usepackage[protrusion=true,expansion=true]{microtype}      
\renewcommand{\baselinestretch}{1.5}
\newcommand{\horrule}[1]{\rule{\linewidth}{#1}}     % 

\title{%
  \usefont{OT1}{bch}{b}{n}%
  \normalfont \normalsize \textsc{SmartBusTraffic: Estimation of Bus positions based on Crowd Sourcing Monitoring} \\[25pt]
  \horrule{0.5pt} \\[0.4cm]
  \huge Handbook
  \horrule{2pt} \\[0.5cm]
  \date{}%
}


\begin{document}

\maketitle
\begin{center}
  \usefont{OT1}{bch}{b}{n}
  \normalfont \normalsize \textsc{SmartBusTraffic: Estimation of Bus positions based on Crowd Sourcing Monitoring} \\ [25pt]
\end{center}


\horrule{0.5pt} %\\[0.4cm]
{
  \centering
  \huge Handbook

}
\horrule{2pt} \\[0.5cm]
Public transit service plays an important ...


\end{document}

相关内容