0

I am using the Roboto font for section titles; I also want to use it for ttfamily kind of cases, such as \url, especially because it is more condensed than the default font. Looking at the font catalogue, there is a monospaced version. But how do I "enable" it?

\documentclass[a4paper,10pt]{article}
\usepackage[pdftex,hidelinks]{hyperref}

\usepackage[lf]{venturis}
\usepackage[condensed]{roboto}
\usepackage[T1]{fontenc}

\begin{document}

Foo: \url{https://tex.stackexchange.com/questions}

\end{document}

Whether or whether not I include the roboto package, the URL is always rendered the same in a relatively wide monospaced font which AFAICS is not Roboto:

enter image description here enter image description here

I think I need something like

\renewcommand*{\ttdefault}{roboto}

Only, the font name is invalid. I guess it's abbreviated, but how?

2

It's in the package read-me: there is a second package roboto-mono. E.g.

\usepackage[light,scaled=0.85]{roboto-mono}

It doesn't buy much horizontal space, though. enter image description here

| improve this answer | |
  • 1
    I just did a quick search, and it appears there is no roboto condensed mono font, just regular width. My test run gives `Font shape `T1/RobotoMono-TLF/l/n' undefined'. Is this just my situation, or is it true for all? Would \urlstyle{rm} be suitable? – Donald Arseneau May 18 at 0:09
  • I should say \urlstyle{sf} for vari-width Roberto. – Donald Arseneau May 18 at 0:31
  • @DonaldArseneau yes, here too, only regular width, so I can only scale it down completely. – Emit Taste May 18 at 9:11

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.