all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#10763: 23.4; calc-embedded fails to simplify units in \frac
       [not found] <DA5A8E2C697BF44AA3CFBCED78068A7C654B866B@AUGXCH001.DE.PA.CORP>
@ 2012-02-08 16:51 ` Jeffrey Ratcliffe
  2012-02-08 20:41   ` Jay Belanger
  0 siblings, 1 reply; 2+ messages in thread
From: Jeffrey Ratcliffe @ 2012-02-08 16:51 UTC (permalink / raw)
  To: 10763

Using calc-embedded in LaTeX:

\documentclass[pdftex,a4paper]{report}
$ a \gets 3 m $
$ b \gets 4 m $
$ \evalto \alpha \gets \arcsin\left( \frac{a}{b} \right) \to
\arcsin\left( \frac{0.75 m}{m} \right) $
\end{document}

calc doesn't finish evaluating the expression, presumably because it
has failed to
simplify the units in the fraction.

Please keep me in CC, as I am not subscribed.

In GNU Emacs 23.4.2 (x86_64-pc-linux-gnu, GTK+ Version 2.22.1)
Windowing system distributor `The X.Org Foundation', version 11.0.70101000





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#10763: 23.4; calc-embedded fails to simplify units in \frac
  2012-02-08 16:51 ` bug#10763: 23.4; calc-embedded fails to simplify units in \frac Jeffrey Ratcliffe
@ 2012-02-08 20:41   ` Jay Belanger
  0 siblings, 0 replies; 2+ messages in thread
From: Jay Belanger @ 2012-02-08 20:41 UTC (permalink / raw)
  To: Jeffrey Ratcliffe; +Cc: 10763-done


> Using calc-embedded in LaTeX:
>
> \documentclass[pdftex,a4paper]{report}
> $ a \gets 3 m $
> $ b \gets 4 m $
> $ \evalto \alpha \gets \arcsin\left( \frac{a}{b} \right) \to
> \arcsin\left( \frac{0.75 m}{m} \right) $
> \end{document}
>
> calc doesn't finish evaluating the expression, presumably because it
> has failed to simplify the units in the fraction.

By default, Calc doesn't cancel the common factors of the top and bottom
of a fraction unless they are the leading factors.  If you want Calc
to cancel any common factors, you can use algebraic simplification mode.
You can turn that on with "m A".  

So for the above file, you can open it and type "C-x * a" (to activate
all of the formulas), go to the evalto line and type "C-x * e" (to work
on the embedded formula), and then "m A" to put Calc in algebraic
simplification mode.  You will then get 
  $\evalto \alpha \gets \arcsin\left( \frac{a}{b} \right) \to 48.5903778907$
(if you are in degree mode and not in symbolic mode).
You can type "m A" to get out of algebraic simplification mode or "m m"
to save algebraic simplification mode (and any other modes you are
using) for future sessions.

Jay





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-02-08 20:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <DA5A8E2C697BF44AA3CFBCED78068A7C654B866B@AUGXCH001.DE.PA.CORP>
2012-02-08 16:51 ` bug#10763: 23.4; calc-embedded fails to simplify units in \frac Jeffrey Ratcliffe
2012-02-08 20:41   ` Jay Belanger

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.