I'm fine-tuning the presentation of a book written using XeLaTeX, ready to send to the printers. The book has lots of tables which are all formatted in the same way. In one, column headings are just a little too wide, and I'd like to tweak the font size just a tiny bit to give a little more space around them without making them obviously smaller. I'm trying to use \textscale from the relsize package to do this, but I'm finding it doesn't allow arbitrary scaling of the font. Here's a MWE showing this:



When I compile this using xelatex, the second and third "Test" appear to be the same size, while there's a noticeable difference between the third and fourth, despite the fact the third should be more than 10% smaller than the second, while the fourth should be barely 0.1% smaller which ought not to be perceptible. Viewing the PDF output, it appears these are being rounded to 10pt, 9pt, 9pt and 8pt, respectively. Is there a way of achieving this without rounding?

  • 1
    the relsize package seems mainly focussed on picking one of the standard sizss, \small, \tiny etc that is closest to the requested size. Apr 18 at 11:28

relsize is picking the nearest standard size \small or \footnotesize so you are getting the same size in two cases. The much simpler scalefnt package just does what you ask.

enter image description here


Note that visually you still see a difference around 8.5pt as you are changing fonts, the default declaration for lm is

  {<-5.5>    \UnicodeFontFile{lmroman5-regular}{\UnicodeFontTeXLigatures}
   <5.5-6.5> \UnicodeFontFile{lmroman6-regular}{\UnicodeFontTeXLigatures}
   <6.5-7.5> \UnicodeFontFile{lmroman7-regular}{\UnicodeFontTeXLigatures}
   <7.5-8.5> \UnicodeFontFile{lmroman8-regular}{\UnicodeFontTeXLigatures}
   <8.5-9.5> \UnicodeFontFile{lmroman9-regular}{\UnicodeFontTeXLigatures}
   <9.5-11>  \UnicodeFontFile{lmroman10-regular}{\UnicodeFontTeXLigatures}
   <11-15>   \UnicodeFontFile{lmroman12-regular}{\UnicodeFontTeXLigatures}
   <15-> \UnicodeFontFile{lmroman17-regular}{\UnicodeFontTeXLigatures}

so in the last two you are seeing the 8pt design font and the 9pt design font scaled to more or less 8.5pt in each case.

  • Thanks. I hadn't come across the scalefnt package before, but it's exactly what I need.
    – richard
    Apr 19 at 12:05

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.