0

I have the following org document:

#+LATEX_HEADER: \usepackage[scaled=1.5]{helvet} \renewcommand\familydefault{\sfdefault}

Testing equation
#+BEGIN_EXPORT latex
\begin{equation*}
1 + 1 = 2
\end{equation*}
#+END_EXPORT

The first line can be used to change the fontsize with scaled option. Unfotunately, it does not seem to change the math font size from the Latex export block. You can see in the image below: enter image description here

As you can see, the body text is large (because I set scaled=1.5). But the displayed equation's font size is still the same, no matter what scaled I set. How do I change this font size? In addition, how to make this global, in case I have many export block like this?

Many thanks

7
  • Your equation will use the math font, not the roman or sans serif. You'd have to scale the math font proper. Or, just set a larger font for the whole document, as it seems you want all of it to be larger.
    – gusbrs
    Mar 14 at 15:17
  • This is another instance of a question (here is another one) that is about LaTeX rather than about Org mode or Emacs and in that sense it is better asked on the TeX SE site. However, heed my comments in the linked question: don't post Org mode files on TeX SE - instead, do the export to a TeX file (C-c C-e l l) and post the resulting TeX file. Just as Emacs SE is not a TeX/LaTeX question site, TeX SE is not an Emacs/Org mode question site.
    – NickD
    Mar 14 at 17:10
  • @NickD While this is true, configuring the LaTeX export results of an Org file, stands somewhat of a middle ground. That question you linked was later asked at TeX.SX (tex.stackexchange.com/q/636960/105447), as the OP was instructed to do that. True, poorly asked..., but anyway, it was rendered off-topic there. Whether a question can be better asked on either site, depends a little on the ability of the OP to decouple the two layers, which is not a given.
    – gusbrs
    Mar 14 at 17:23
  • I don't disagree (and the fate of the other question on TeX SE was why I added more details here). But the point is that you cannot write a document in Org mode and export to LaTeX/PDF without problems, except in the simplest cases. So it behooves you to learn a bit about LaTeX and, at the very least, look at the resulting TeX file for obvious problems and even compile it from the command line to decouple what Org mode is doing from what LaTeX is doing. Consider this as my encouragement to the OP to do just that.
    – NickD
    Mar 14 at 17:40
  • 1
    Org is advertised as a way to "get LaTeX quality output, without the need to deal with LaTeX complexities" : that is false advertising and needs to be squashed wherever it rears its ugly face. BTW, despite my fulminations, I upvoted your answer, so I'm not as absolutist as I might appear at first sight :-) And BTW, you might revisit the linked question: it has a happier outcome.
    – NickD
    Mar 14 at 18:19

1 Answer 1

2

With your current settings, you are just scaling the sans serif font, however this does not handle the math font, as you noticed. You'd be better off by setting a larger fontsize for the whole document. Since the standard classes offer only 10pt, 11pt, and 12pt as document font sizes, you'll have to rely either on other document classes, or on packages to get a size this large. KOMA-Script classes support more sizes, memoir too, and you can also use the extsizes classes. But, as using a different class requires some Org setup, it is probably easier to use a package, and KOMA-Script's scrextend offers the same possibility to other document classes.

#+LATEX_HEADER: \usepackage[fontsize=16pt]{scrextend}
#+LATEX_HEADER: \usepackage{helvet} \renewcommand\familydefault{\sfdefault}

Testing equation
#+BEGIN_EXPORT latex
\begin{equation*}
1 + 1 = 2
\end{equation*}
#+END_EXPORT

enter image description here

Your whole document is thus set to a larger font, and thus this should affect all export blocks (and everything else), if that's what you mean by "global".

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.