TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm not exactly familiar with how Anki processes the inline math expressions, but the developer advised me to ask this question on a Tex discussion platform:

The problem is that the rendered formulas are always placed a bit too high in the text. Like this:

enter image description here

How can I change this?


All Anki does is combine the text on your card with the prefix and postfix in the deck options and send it to LaTeX, so if you're having layout problems you'll need to ask on a LaTeX forum.

The only related settings I could find are the LaTex header and footer:




share|improve this question

closed as off topic by diabonas, Seamus, Loop Space, Paulo Cereda, Marco Daniel Dec 15 '11 at 22:39

Questions on TeX - LaTeX Stack Exchange are expected to relate to TeX, LaTeX or related typesetting systems within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

According to the Anki documentation - Advanced: LaTeX, Anki converts (La)TeX to PNG using dvipng, and even the documentation example shows the alignment you present. As such, I don't think this has anything to do with (La)TeX. It is perhaps the browsers default to insert images at the baseline the surrounding browser text. – Werner Dec 14 '11 at 0:13
The only solution I can think of is to place the text you want aligned in the LaTeX environment as well. i.e. [latex]$\sum_{n=0}^\infty a_n\cdot x^n$ \sf mit dem...[/latex] – qubyte Dec 15 '11 at 4:01
This looks 'off topic' to me, as Werner says. – Joseph Wright Dec 15 '11 at 8:33
I agree that this is off-topic. It is to do with the baseline adjustment for placing the image. You would need to find out the baseline for the text in the image relative to the bounding box (I guess, in principle, this would be information provided by TeX so that might be on-topic if you asked just that) and then pass those parameters to whatever-it-is that generates the HTML to adjust the placement of the image. – Loop Space Dec 15 '11 at 11:40
@user8823741 I had exactly the same problem, and found the answer! Go to Browse -> Mark a card -> Click "...Cards" button. Now in the styling box add this css img{vertical-align:middle;} Works like a charm :D:D – user1506145 May 13 at 14:56

Browse other questions tagged or ask your own question.