Font size of LaTeX embeds can't be changed

Tobias's Avatar

Tobias

15 May, 2020 03:59 PM

Hello, I have a problem that I can't solve on my own. When I write something in the LaTeX enviroment, it always appears way too big. Changing the font size in the style of the card doesn't change anything (it just changes the size of normal text) and changing it in the LaTeX settings of the card type (where "\documentclass[8pt]{article}" is) doesn't change anything at all. Oddly enough, this is only the case if the text is in a sentence when I am using [$] code [/$]. When I use \[ code \] then the font size can be changed with the font size of the card style (and then it looks good). How can I fix that? Or in other ways, how can I make Latex embeds in a sentence to be the same size as the rest of the text?

I attached a picture how it looks, the bigger words are the parts that won't change it's size (and thus look horrible).

  1. 1 Posted by Tobias on 15 May, 2020 08:17 PM

    Tobias's Avatar

    I figured out how to solve the size issues. It's by not using [$]...[/$] which creates .png embeds but rather the way prettier MathJax with \(...)\ .
    Still, I wonder why changing the font size directly in the LaTeX settings didn't do anything. I also noticed that I can't include custom LaTeX packages (they just aren't recognized), which I don't understand yet.

  2. 2 Posted by addons_zz on 15 May, 2020 10:09 PM

    addons_zz's Avatar

    Changing the font size in the style of the card doesn't change anything (it just changes the size of normal text)

    You have to change the size of the latex font: https://docs.ankiweb.net/#/math?id=latex

    I figured out how to solve the size issues. It's by not using [$]...[/$] which creates .png embeds but rather the way prettier MathJax with (...)\ .

    Latex support works by creating images and embedding them on your cards (where the latex code is on). To generate all the images, please go to Tools>Check Media. After that, syncing should upload the generated media to AnkiWeb and the other clients. You can learn more about how Anki handles Latex reading the Anki Documentation: Latex

    changing it in the LaTeX settings of the card type (where "\documentclass[8pt]{article}" is) doesn't change anything at all

    Latex is a quite big and complex system. Changing the latex document font size does not change the math latex font sizes. To learn more about latex see:

    1. font size in math mode
    2. Larger font size in math display equation environment?
    3. Reducing font size in equation

Comments are closed, but you can start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac