1

I am working on a document in which I use the environment titlepage for the cover. My problem is that I use later \@autor, \@title, etc, and since they are formatted on the cover; when I use these commands later on throughout the document, I got the title, author's name in this font colour, size, etc.

Is there a way that when later called, they have the same font that the rest of the body of the document?

My MWE is the following:

  \documentclass[12pt,twoside,titlepage]{article}

  \usepackage[portuguese]{babel}

  \usepackage[defaultfam,thin,tabular,lining,alternates]{montserrat} %% Option 'defaultfam'
  \renewcommand*\oldstylenums[1]{{\fontfamily{Montserrat-TOsF}\selectfont #1}}

  \usepackage{etoolbox}
  \usepackage{xcolor} 
  \definecolor{coolblack}{rgb}{0.0, 0.18, 0.39}
    \definecolor{darkcerulean}{rgb}{0.03, 0.27, 0.49}
\definecolor{blue(ncs)}{rgb}{0.0, 0.53, 0.74}

 \makeatletter
  \author{\textcolor{blue(ncs)}{You}}   \let\Author\@author
 \title{\Huge \textcolor{darkcerulean}{Random title}} \let\Title\@title

 \date{Today}

 \makeatother


 \begin{document} 
 \makeatletter

 \begin{titlepage}

  \vspace*{6.7cm}

    \textcolor{blue(ncs)}{\Huge Autor:} \Huge \@author

    \vspace{1.5cm}
    \@title
     \vspace{1.5cm}

     \normalsize \textbf{Keywords:} \textit{Keyword 1, keyword 3, keyword 4\ldots}

   \end{titlepage}
    \makeatother
  \footnotesize

  Hello, the author is  \Author and title is \Title
  \end{document}

Thank you in advance

user151562
  • 630
  • 5
  • 19
  • 5
    I guess the idea would be to write \author{You} and apply the formatting, e.g. \textcolor{blue(ncs)}{...} in the titlepage directly, i.e. {\Huge \textcolor{blue(ncs)}{Autor: \@author}\par} etc. etc. – moewe Jul 10 '18 at 12:22
  • 1
    You might find the titling package useful. But \author{} should just give the data - not the format. Similarly for the other commands. – cfr Jul 11 '18 at 00:28
  • Have a look at http://tex.stackexchange.com/questions/209993/how-to-customize-my-titlepage/210280#210280 and https://en.wikibooks.org/wiki/LaTeX/Title_Creation – Johannes_B Jul 11 '18 at 05:01

0 Answers0