Questions tagged [math]
29 questions
6
votes
3 answers
sin of pi radians
I'm computing sin of pi radians in emacs using this function:
#+begin_src emacs-lisp :eval never-export :exports both
(sin pi)
#+end_src
#+RESULTS:
: 1.2246467991473532e-16
The manual docs mentions that the argument is passed in radians. Just to…

Sibi
- 3,603
- 2
- 22
- 35
3
votes
1 answer
How can I convert a Lisp expression to a LaTeX math expression?
How can I convert a lisp
expression to LaTeX math expression.
From simple things like (- 3 2 1) which should be converted to 3 - 2 - 1, to relatively complex things like: (* 1 2 (/ 2 3)) ⇒ 1 \times 2 \times \frac{2}{3}, or (somefunc 1 2) ⇒…

Atreyagaurav
- 133
- 5
3
votes
2 answers
How to insert mathematical symbols in emacs
I'm writing an Asciidoctor file to take notes for statistics and would like to insert mathematical symbols like β.
Is there any way to do this without copy and pasting?

young_souvlaki
- 526
- 2
- 13
2
votes
1 answer
Cube root in elisp
How do I take cube roots in emacs lisp? I thought of using fractional exponents like $8^{1/3} = 2$ but I didn't know how to write y as a fraction in (expt x y)

zeynel
- 129
- 8
1
vote
0 answers
Check math as you compose it
I have no end of frustration trying to do math with pen and paper. I can not seem to complete a page of working without making multiple mistakes.
I'm looking for something that will allow me to work on college-level math problems, checking my…

Zaz
- 123
- 6
1
vote
3 answers
How can I avoid switching into font-latex-math-face in tikzpicture environment?
When I have text inside \begin{equation} ... \end{equation}, font-latex-math-face face is applied.
If I have atikzpicture block inside equation, font-latex-math-face face is applied to it as well:
\begin{equation}
\begin{tikzpicture}
…

alper
- 1,238
- 11
- 30
1
vote
2 answers
LaTeX fragments look different to exported PDF (witharrows)
I have problems getting correct latex fragments rendered. For some reason, they look different than the exported PDF, which looks fine.
What is not working is the package witharrows, to place vertical arrows in equations.
Org LaTeX…

Bad Randolph
- 33
- 5
1
vote
1 answer
Convert percent to decimal: (/ PERCENT 100)
To convert from percent to decimal: divide by 100, and remove the "%" sign.
The snippet (/ PERCENT 100) yields a seemingly unexpected result. E.g., Converting 50% to a decimal should yield 0.5; however, (/ 50 100) returns 0.
Tentative workaround…

lawlist
- 18,826
- 5
- 37
- 118
1
vote
1 answer
Key sequence to automatically make math-mode fragments in org-mode?
My hands are getting lazier every day. Is there a key sequence to automatically type \(_\), where _ just denotes the position of my cursor, when I'm in org-mode? (Or \[_\], of course: same question.)

Sophie Weigle
- 55
- 5
1
vote
3 answers
How can you automatically translate fractions into their short unicode versions? e.g. ⅔
Ideally one can just type fractions as normally e.g. 2/3, and either the view simply displays it as ⅔, without changing the text itself OR the text itself is changed. I need this for org mode in case that's relevant.

avv
- 1,563
- 10
- 24
1
vote
1 answer
Customize org babel execution command in C
I have the following C code:
#include
#include
int main(){
printf("Square = %d", pow(4,2));
return 0;
}
Now if I run this in the shell. I would first compile with: gcc -lm file.c -o a.out and then run with ./a.out.
If I…

mle0312
- 295
- 1
- 8
1
vote
2 answers
Evaluate algebraic formula in the buffer in place
Is there some package or builtin emacs feature which evaluates an algebraic formula in place?
E.g. I type in the scratch buffer:
(3 + 4) * 5
and when I invoke some command on this line then I get in the buffer:
(3 + 4) * 5 = 35
It's not hard…

Tom
- 1,190
- 7
- 16
1
vote
0 answers
How can I split LaTeX inline math from preceeding or following sticked words?
I have this LaTeX code:
Lorem $math$ ipsum $math$dolor sit consecteruer adipscing elit,
sed do eiusmod tempor incidunt ut labore et dolore magna aliqua.
$math$Ut $math$ enim ad minim veniam$math$, quis nostrum exercitationem
ullamco laboriosam,…

Onner Irotsab
- 431
- 2
- 9
1
vote
1 answer
Replace text with latex
I wondered if it is possible to make emacs replace occurences of a/b with $ {a \over b} $ , where a and b are integers or letters in the text.

Olav
- 11
- 1
1
vote
1 answer
Labelling LaTeX sub-equations in org-mode
How to achieve subequation numbering a,b,etc like https://en.wikibooks.org/wiki/LaTeX/Advanced_Mathematics#Subordinate_equation_numbering in org-mode. I tried using the LaTeX snippet as it is and surrounding it with
#+BEGIN_SRC latex
#+END_SRC
No…

AbstractSage
- 13
- 3