0

I tried to solve by middle of the following questions:

I use the class memoir, the packages polyglossia, textpos and ragged2e. I added \linebreak. I compile in XeLaTeX. I use Linux and macOS.

I am not sure if it is OK to igonre the errors of Underful \hbox because they are very common, but someone counselled me to keep my document clean and free of errors, economic and optimised.

Here is the small code:

\documentclass[12pt, a4paper, oneside, oldfontcommands, dvipsnames]{memoir}

\usepackage{polyglossia}
\usepackage{fontspec}
\usepackage[absolute, overlay]{textpos}
\usepackage{ragged2e}

\definecolor{solitudeblue3}{HTML}{E5E9F0}

\newfontfamily\alegreya{Alegreya}[Path = ./fontes/,
  FontFace = {xb}{n}  {* Black},
  FontFace = {xb}{it} {* Black Italic},
  UprightFont       = * Regular,
  ItalicFont        = * Regular Italic,
  BoldFont          = * Bold,
  BoldItalicFont    = * Bold Italic,
  NFSSFamily        = alegreyaot
]

\newcommand{\ProfCurso}[1]
{
    \alegreya{\fontsize{15pt}{18pt}\selectfont \color{solitudeblue3} #1}
}

\begin{document}

  \begin{textblock*}{15cm}(4cm, 15cm) 
    \RaggedLeft 
    \ProfCurso{Profª Lígia Brezolin} 
    \linebreak
    \ProfCurso{Administração do Sistema de Informação II}
  \end{textblock*}

  \maketitle

\end{document}

Update

\maketitle is also accused of Underfull hbox due to ragged2e.

Oo'-
  • 269

1 Answers1

1

You want to use the titlingpage environment:

\documentclass[12pt, a4paper, oneside]{memoir}

\usepackage{polyglossia}
\usepackage{fontspec}
\usepackage{xcolor}

\definecolor{solitudeblue3}{HTML}{E5E9FF}

\newfontfamily\alegreya{Alegreya}[
  %Path = ./fontes/,
  FontFace = {xb}{n}  {*-Black},
  FontFace = {xb}{it} {*-BlackItalic},
  UprightFont       = *-Regular,
  ItalicFont        = *-Italic,
  BoldFont          = *-Bold,
  BoldItalicFont    = *-BoldItalic,
  NFSSFamily        = alegreyaot
]

\begin{document}

\begin{titlingpage}

\vspace*{\stretch{3}}

\fontsize{15pt}{24pt}\alegreya

\raggedleft
%\color{solitudeblue3}
Profª Lígia Brezolin \\
Administração do Sistema de Informação II

\vspace*{\stretch{2}}

\end{titlingpage}

\end{document}

I commented out the \color instruction as that color is unreadable on white background.

enter image description here

egreg
  • 1,121,712
  • I was going to update, but I have tested with your codes, it worked and overfull has disappeared. I also have just discovered that \pagestyle{fancyheads} was caused by overfull, causing error to this textpos. because I have changed the layout measures to make page wider. I will correct. – Oo'- Nov 30 '18 at 18:35