Is there any way to create automatically fractions without writing every time \frac{a}{b}. Is there any easy method to write this?
Asked
Active
Viewed 1,940 times
2 Answers
0
If you are an Emacs user, you can use the quick calc mode in your latex document. calc must be configured (see the calc menu bar): Fraction mode, symbolic mode, no simplification mode, LaTeX language mode.
If it's set up correctly, you can just call Quick Calculation Mode, type your formula, and paste the output into your latex document. for example, you type C-x * q to invoke quick calc mode and type
(-b + sqrt (b ^ 2-4 ac)) / (2 a)
the output is
\ frac {-b + \ sqrt {b ^ 2-4 ac}} {2 a}
An alternative is the embedded calc mode: you type your formula directly into your latex document and call this mode which performs the conversion.
gigiair
- 1,812
{}you can omit if they are a single letter\frac12is a half, you could do\let\f\fracthen\f12would be a half and it's hard to get a lot fewer keystrokes than that. – David Carlisle May 18 '16 at 18:43\frac1{}?; About shorthand\frac– Werner May 18 '16 at 18:49