Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helvetica/Arial #12

Open
da5nsy opened this issue Apr 4, 2019 · 12 comments
Open

Helvetica/Arial #12

da5nsy opened this issue Apr 4, 2019 · 12 comments
Assignees

Comments

@da5nsy
Copy link
Contributor

da5nsy commented Apr 4, 2019

Hi! (The template is awesome, thank you so much.)

The guidelines recommend using Arial or Helvetica.
Afraid I'm relatively new to LaTeX and so I'm not sure how to properly implement this.

I tried adding \usepackage{helvet} to MainPackages.tex to no avail.

@ikirker
Copy link
Contributor

ikirker commented Apr 9, 2019

That particular guideline is not a good guideline: using a sans-serif typeface for body text of a long document is stylistically highly questionable. I think it used to recommend Times New Roman; I wonder if the branding people in OVPR got to it. (In any case, I used a typeface called Utopia for mine.)

Cf. Serif vs. Sans for Text in Print

Having said that, you can use Helvetica if you want: add the snippet below anywhere in MainPackages.tex, and re-run your preferred LaTeX command or make if you're using that.

The extra step you have to do is set the sans-serif family as the default: just loading the helvet package makes Helvetica the current sans-serif family, but LaTeX is still using the loaded serif family (Times New Roman in our case, set in the times package loaded in ucl_thesis.cls) for all text.

% Loads a scaled version of the Helvetica font
\usepackage{helvet}
% Sets the sans-serif family as the default family
\renewcommand{\familydefault}{\sfdefault}

If you really want to use Arial specifically, you'll have to be using LuaLaTeX or XeLaTeX for your build command, because these provide support for native system fonts instead of LaTeX's own format. Then, instead of the snippet above, add the one below to MainPackages.tex. If you have a native version of the Helvetica typeface installed on your own machine (most common on macOS) you can also replace Arial with Helvetica here to use Helvetica, instead of using the snippet above (you may get a better quality version that way -- I haven't done the comparison).

\usepackage{fontspec}
\setmainfont{Arial}

@da5nsy
Copy link
Contributor Author

da5nsy commented Apr 9, 2019

Thank you for such an informative answer. I will certainly think twice about whether to follow this guidelines.

The only thing which the above snippet doesn't seem to change is the page headers. Any suggestions?

@ikirker
Copy link
Contributor

ikirker commented Apr 9, 2019

Ah, looks like the class file switches explicitly to the serif (a.k.a. 'Roman') family in headers, here in the file ucl_thesis.cls (lines 194 & 195):

    \def \@oddhead{\normalfont \rmfamily \slshape \hfill \rightmark \hfill \thepage}%
    \def \@evenhead{\normalfont \rmfamily \slshape \thepage \hfill \leftmark \hfill}%

Change this to:

    \def \@oddhead{\normalfont \sffamily \slshape \hfill \rightmark \hfill \thepage}%
    \def \@evenhead{\normalfont \sffamily \slshape \thepage \hfill \leftmark \hfill}%

Oh, and, whatever you end up using, if you keep the Colophon section in the appendices, remember to update it.

@da5nsy
Copy link
Contributor Author

da5nsy commented Apr 9, 2019

It appears as though excluding the specific call to a family, e.g.

\def \@oddhead{\normalfont \slshape \hfill \rightmark \hfill \thepage}%
\def \@evenhead{\normalfont \slshape \thepage \hfill \leftmark \hfill}%

... means that this works for either serif/sans serif. Would it lose anything if the template was updated such?

Oh, and, whatever you end up using, if you keep the Colophon section in the appendices, remember to update it.

Good point. Also, there should definitely be a link to the template in the default colophon.

@ikirker
Copy link
Contributor

ikirker commented Apr 9, 2019

I thought about just removing it, but I wasn't 100% sure whether it would cause odd results. You wouldn't want to end up with monospaced page numbers because a code sample has been split over multiple pages.

@da5nsy
Copy link
Contributor Author

da5nsy commented Apr 9, 2019

I bow to your superior judgement and shall leave it be! :)

@da5nsy
Copy link
Contributor Author

da5nsy commented Apr 9, 2019

Just noticed - the only error I get when I compile is:
Package nag Warning: Package times is obsolete. Use the mathptmx, helvet (option scaled=.9), courier packages instead.

To my untrained eye, nothing seems to break, and the error goes away, when line 159 of ucl_thesis.cls (\RequirePackage{times}) is commented out.

@ikirker
Copy link
Contributor

ikirker commented Apr 9, 2019

The nag package doesn't break anything, it just checks for old things and some classes of mistake, I think.

It should be fine, but I'll take a look when I get a chance and update the fonts. (And maybe contact someone over the Arial/Helvetica guideline...)

@da5nsy
Copy link
Contributor Author

da5nsy commented Apr 9, 2019

The nag package is working perfectly as intended - it is alerting me to the fact that the times package is obsolete.

(I'm rather enamored by nag, great idea)

@PPPI
Copy link

PPPI commented Jul 24, 2020

As someone using this lovely template currently, and opting to use Helvetica, I reached the solution somewhat similarly to here. Except I replaced the times import from the cls file with helvet.
Specifically, same edit of lines 194 and 195 as above. While on line 159, I changed the times import to:

\RequirePackage{helvet}

This has the added benefit of removing the nag warning :)

Hope this helps others in the future.

@paddyroddy
Copy link
Member

for reference, these changes now change to Helvetica
image

@ikirker
Copy link
Contributor

ikirker commented Jun 7, 2021

If I get around to it, I'll see if I can make it a quickly-settable option for the class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants