Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to do few modifications to Gonzalo Medina(GM)'s award winning contest entry. I want to change the fonts GM used in the header box. I achieved partial success by changing following lines in GM's gridleno.sty

\color{headtitle}\Huge\lecturenotename \\[6pt]
      \fontfamily{cmr}\fontsize{17pt}{20pt}\selectfont\scshape\@topic \\[6pt]
      {\normalsize\rmfamily\scshape\@professor}%

to

 \color{headtitle}\fontfamily{ptm}\fontsize{16pt}{20pt}\selectfont\scshape\lecturenotename \\[6pt]
      \fontfamily{ptm}\fontsize{24pt}{20pt}\selectfont\scshape\@topic \\[6pt]
      {\normalsize\rmfamily\scshape\@professor}%

See the attached figure. [I made few other changes, of course.]

enter image description here

In a comment to GM's entry, @dochar mentioned the following site.

It says

If the font can be made generally available on your computer (e.g., to other word processing programs), you can use XeTeX or LuaTeX to access it directly, without any TeX-specific installation at all.

How can I do that? That is, what do I have to change in GM's above lines to use, say, Braggadocio regular, a font available in my computer?

share|improve this question
    
You need the package fontspec which makes all the fonts available. –  Marco Daniel Dec 22 '11 at 11:36
    
@Marco Daniel: It is in GM's contest.tex file. Perhaps I should move it to gridleno.sty? –  Sony Dec 22 '11 at 12:52
    
In fact it is important to load fontspec. If you load the package you can create a new font face \newfontface. An example is given in the documentation of fontspec (page 9). –  Marco Daniel Dec 22 '11 at 13:02
add comment

1 Answer

up vote 4 down vote accepted

This is a minimal answer to the question.

Add the following to gridleno.sty (preferably, after the 20th line of gridleno.sty).

\@ifpackageloaded{fontspec}{}{\RequirePackage{fontspec}}

Change line 88 from

\color{headtitle}\Huge\lecturenotename \\[6pt]

to

\color{headtitle}\fontspec{Braggadocio}\fontsize{20pt}{24pt}\selectfont\scshape\lecturenotename \\[6pt]

Make sure you compile Gonzalo Medina's contest.tex using XeLaTeX.

The following is the heading box of the output. enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.