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.

  • General answer: Never ignore errors and try your best to fix the errors as well as to avoid warnings. – user156344 Nov 30 '18 at 15:57
  • Over[under]ful \hbox is a common warning. Ignoring them doesn't cause much harm. However it will be much better if you can avoid it :) – user156344 Nov 30 '18 at 16:00
  • 1
    Don't use \RaggedLeft there, use \raggedleft instead. – Ulrike Fischer Nov 30 '18 at 16:07
  • My impression is that you want to use titlepage. – egreg Nov 30 '18 at 17:37
  • Sorry, I did not understand. – Gustavo Reis Nov 30 '18 at 17:43
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

  • 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. – Gustavo Reis Nov 30 '18 at 18:35

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.