4

I want to move the word up after \huge as in the title in the screenshot below. I am trying to use the stuff in the title argument since I do not want to add a name or date and \maketitle generate a big space if I add \date{} so I decided to get through with this approach. I will delete \title{} and \maketitle after managing it.

code:

\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}

enter image description here

  • Please note, that \\[...] is always a little bit awkward – user31729 Dec 24 '15 at 15:18
  • 2
    Why didn't you link to the new question in your other one? We could have closed that and i would have saved time. Now we have almost two identical answers two different problems. – Johannes_B Dec 24 '15 at 16:06
  • You probably want to add \noindent in front of the \horrule so that you're not getting a paragraph indentation at that point. Currently, you are. – A.Ellett Dec 24 '15 at 19:14
5

Use \centering instead of \begin{center}...\end{center}, but use it within a group, i.e. a {...} pair, for example. The center environment adds some vertical space before and after the centered content.

A. Ellett made a good comment: The blank line (or a \par) before closing the group is needed by \centering, otherwise there would be no centering (for this effectively one - line text).

\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}
  • Just wondering, would you get the same effect by using centering as an environment? – daleif Dec 24 '15 at 15:19
  • @daleif: You mean \begin{centering}...? I never use macros as environments – user31729 Dec 24 '15 at 15:24
  • I do sometimes as it provides better structure, not sure if there is a down side – daleif Dec 24 '15 at 15:31
  • 1
    @daleif: I know, I've asked a question here about one year ago about \end... stuff macros defined with \newcommand – user31729 Dec 24 '15 at 15:51
  • 1
    It would probably be a good idea to explain why you left the blank line before closing the group for centering. I think this is a point newbies may not grasp. – A.Ellett Dec 24 '15 at 19:13

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.