LyXMove the Title, Author Name and Date

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
EigenGoofy
Posts: 42
Joined: Fri Jul 22, 2011 12:26 am

Move the Title, Author Name and Date

Post by EigenGoofy »

I select my document class as "report" in LyX. The current title stays at the center of the title page, however, I wanna put the title on the top of the page. And put the author name right below the title, and the date should be on the bottom of the page.

How Can I Do that Please? Thank You~
Last edited by EigenGoofy on Tue Dec 13, 2011 8:09 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

5gon12eder
Posts: 126
Joined: Sun Feb 13, 2011 8:36 pm

Move the Title, Author Name and Date

Post by 5gon12eder »

If it is just for one document, a foolproof solution is to omit the \maketitle and instead manually put your stuff as you want it. If it should be a general solution, consider redefining \maketitle.

Here is a minimal example:

Code: Select all

\documentclass{report}

\author{John \and Fred\thanks{Slightly insane\dots}}
\title{The Infinite Everything}
\date{\today}

\makeatletter
\renewcommand{\maketitle}{
  \begin{titlepage}
    \begin{center}
      \large
      {\LARGE\@title}
      \par\vspace{1ex}
      \begin{tabular}[t]{c}
        \@author
      \end{tabular}
      \vfill
      \@date
    \end{center}
    \@thanks
  \end{titlepage}
}
\makeatother

\begin{document}
  \maketitle
  
  The text follows...
\end{document}
Note that the definition must go between \makeatletter and \makeatother to use the macros \@author, \@title and \@date. Also note that \@author should appear inside a tabular as shown to make the \and macro work correctly. You can look up the original definition of \maketitle in the file .../tex/latex/base/report.cls.
I'm using pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian).
EigenGoofy
Posts: 42
Joined: Fri Jul 22, 2011 12:26 am

Move the Title, Author Name and Date

Post by EigenGoofy »

Thank you, 5gon12eder!

Although I have not tried your code yet, I guess it will work!

By the way, I'd solved my problem in the following way. I put the following code on the front of the document without using LyX to explicitly specify any title, author, and date environment.

Code: Select all

\begin{titlepage}
\raggedleft
\definecolor{brownie}{RGB}{85,65,40}
\pagecolor{brownie}
\textcolor{white}{
{\large Oinker\\[1in]}
{\Huge\scshape The Story of Pig\\[.2in]}
\vfill
{\itshape Dec. 5th 2011}
}
\end{titlepage}
Post Reply