1

I'm trying to get uppercase numbers for Linux Libertine/Biolinum with PdfLaTeX because Libertine font numbers have a different height than text and I think it doesn't look nice in headers and captions. (same problem here) Is there another way to get uppercase numbers without using fontspec? I can't use that because I need to use PdfLaTeX to compile.

\documentclass[paper=a4,pagesize=auto, fontsize = 14pt]{scrbook}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[lf, sflf]{libertine}
\usepackage{graphicx}
\renewcommand{\thefigure}{\Alph{section}-\arabic{figure}}

\begin{document}
    \chapter{Appendix}  
    \section{Figures}

    \begin{figure}
        \centering
        \includegraphics[scale=0.5]{example-image-a}
        \captionbelow{Default}
    \end{figure}

\end{document}

bottom example is what I want with pdflatex

6
  • 1
    I'm not sure what you mean by “uppercase numbers”. The size of the digits in Linux Libertine is a precise design choice. – egreg Sep 18 '19 at 8:33
  • I added a picture of what I need. You can use the case feature with fontspec for Libertine, but I can't use fontspec because I want to use pdflatex. See also the Link in the description. Overall the numbers of Libertine are optimized for the use in Text. With the case feature you can have uppercase numbers. But I don't know how to use it with pdflatex. – Bolle Sep 18 '19 at 8:40
  • Simply put, you can't, unless you regenerate the Type1 fonts from the OpenType version using the higher digits. – egreg Sep 18 '19 at 8:55
  • how can i do that? is there no other alternative? – Bolle Sep 18 '19 at 11:32
  • You could use otftotfm to generate tfm files while providing an encoding vector with /one replaced by /one.cap etc. Not a trivial thing to do. Why do you want to use pdftex instead of luatex or xetex? – Ralf Stubner Sep 18 '19 at 18:52
0

Here a very rough way of getting cap figures with pdfTeX. Since you are using T1 encoding, I am starting with ec.enc:

cp $(kpsewhich ec.enc) myec.enc

Next edit myec.enc to replace /zero to /nine with /zero.cap to /nine.cap. Now we call oftotfm with this encoding vector:

otftotfm -e myec -fliga -fkern $(kpsewhich LinLibertine_R.otf)

This outputs a map-line for pdftex and creates various TFM and VF files. Finally a simple test using plain TeX:

\pdfmapline{LinLibertineO--myec--Fkern--Fliga--base LinLibertineO "AutoEnc_4axnaqv5awcfmflkbhnm6b5u5e ReEncodeFont" <[a_4axnaq.enc <LinLibertineO.pfb}

\font\myfont=LinLibertineO--myec--Fkern--Fliga at 10pt
{\myfont DIN4322 ffi Vo}
\bye

Result:

enter image description here

Of course, you will also need LaTeX integration with FD files etc. See the otftotfm man page for details.

9
  • thank you very much, it works great for the the regular libertine font. Now I'm trying to apply this method for LinuxBiolinum Bold, but it doesn't work. I'm using the same myec.enc file with /one.cap etc. As a result I'm getting bold small numbers. I'm using \pdfmapline{LinBiolinumOB--myec--Fkern--Fliga--base LinBiolinumOB "AutoEnc_s7bqtneobpox3hv5uycpl47aqe ReEncodeFont" <[a_s7bqtn.enc <LinBiolinumOB.pfb} \font\mybold=LinBiolinumOB--myec--Fkern--Fliga at 14pt {\mybold DIN4322 ffi Vo} – Bolle Sep 26 '19 at 20:45
  • In the end I want to use it for captions, sections, chapters etc. – Bolle Sep 26 '19 at 20:49
  • @Bolle Linux Biolinum does not include these glyphs. You could use Libertinus Sans instead. And mabe Libertinus Serif instead of Linux Libertine. – Ralf Stubner Sep 26 '19 at 20:58
  • it works nicely for specific text parts with libertinus now. But if I want to use it together with the microtype package I get a "pdfTeX error (font expansion): auto expansion is only possible with scalable fonts". I already updated everything with updmap and mktexlsr, still the same error. How can I avoid that and still use the microtype package? – Bolle Sep 27 '19 at 16:18
  • @Bolle Can you create a minimal example for this? Possibly in a new question. – Ralf Stubner Sep 27 '19 at 19:34

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.