2

In latex, I can change the overall font size of my document in the \documentclass line.

\documentclass[11pt]{lncs}
\begin{document}
....
\end{document}

How can I change the font size of my document using Scribble?

One possibility is to use exact and insert latex code to change the font:

(define (exact . items)
  (make-element (make-style "identity" '(exact-chars))
                items))

But the problem is that the font is specified on on the \documentclass line, which is generated by scribble.

So is there any way to either set the font size from within scribble, or use some latex package to change the font size after the \documentclass line?

Leif Andersen
  • 21,580
  • 20
  • 67
  • 100

1 Answers1

3

That depends on the Scribble language and backend you are using. For example, the scribble/sigplan language lets you set some font sizes using the language options and targets the PDF backend primarily.

In general, you can override any backend properties like that by using either a style file or a prefix file. A prefix file is probably what you want here, so that you can directly modify the \documentclass declaration.

Add something like this to your prefix.tex:

\documentclass[11pt]{lncs}
% other stuff here that you need

Then supply --prefix prefix.tex when you invoke Scribble. You should copy and paste the whole prefix file that comes with the LNCS language if you're using that to avoid losing any preamble commands you need.

If you ever target a non-PDF backend you will need a different prefix file, but it sounds like you are interested in the PDF case primarily.


As an aside, if you want to change the font size only locally you can supply the 'smaller and 'larger styles on an element. Like (elem #:style 'smaller "Smaller").

Asumu Takikawa
  • 8,447
  • 1
  • 28
  • 43
  • So, if I use a prefix file, it will replace the normal prefix with the one in the file? (Meaning I am responsible for setting the documentclass), yes? – Leif Andersen Sep 14 '15 at 19:03
  • Yes, that's why you'll have to copy and paste the prefix file from the LNCS package for example. The default Scribble LaTeX prefix file is very minimal though. – Asumu Takikawa Sep 14 '15 at 19:13