## LaTeX forum ⇒ General ⇒ Float text and front/color Topic is solved

LaTeX specific issues not fitting into one of the other forums of this category.
Jchen066
Posts: 5
Joined: Tue Aug 28, 2018 12:50 am

### Float text and front/color

hi all,

Is anyone can tell me how to change the font/size/color/effect of the text in the float text book? prefer to use Neutra Display Titling as font. 36pt for the right box and 24pt for the left box. Attached the picture of the final outcome for reference

Below is the code I used:

Attachments
Title Page.PNG (134.75 KiB) Viewed 120 times

Stefan Kottwitz
Posts: 9019
Joined: Mon Mar 10, 2008 9:44 pm
Hi!

In this \titleTextBox command, there are already some text formatting commands, such as \huge\textcolor{white}. Your own formatting commands can go there. To be flexible (different sizes or styles), you could use further parameters. Here, I change to 6 parameters and use them in the macro as #4, #5, and #6.

\newcommand{\titleTextBox}[6]{% {horizontal pos}{vertical pos}{text}  \setbox0=\hbox{#3}% Put <stuff> in a box  \AddToShipoutPictureFG*{\put(\LenToUnit{#1\paperwidth},\LenToUnit{#2\paperheight}){\makebox[0pt][c]{\textbf{#4\fontsize{#5}{#6}\selectfont\textcolor{white}{\begin{tabular}{c}#3\end{tabular}}}}}  }}

Later on, one could call it by

\titleTextBox{0.78}{0.475}{Year 11 \\ Mathematics \\ Extension 1}{\sffamily}{36}{42}\titleTextBox{0.3}{0.17}{Volume (i) \\ Term 1 Week 7 \\ Theory Book}{\itshape}{24}{30}

Those options mean horizontal position, vertical position, text (as before), and font type, font height, base line height.

Instead of \sffamily or \itshape you could use another font selection command, such as for the desired title font.

Stefan

Jchen066
Posts: 5
Joined: Tue Aug 28, 2018 12:50 am
Thanks Stefan.

When I increased the number for #5 and #6... The text size hasn't increased accordingly. Is that because font 36 is the larges one available

Stefan Kottwitz
Posts: 9019
Joined: Mon Mar 10, 2008 9:44 pm
It seems to depend on the font.

\usepackage{lmodern}

I can use 80 and 90 and more and it gets bigger.

Stefan

Jchen066
Posts: 5
Joined: Tue Aug 28, 2018 12:50 am
Stefan Kottwitz wrote:It seems to depend on the font.

\usepackage{lmodern}

I can use 80 and 90 and more and it gets bigger.

Stefan

thanks a lot. it works