all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jay Belanger <jay.p.belanger@gmail.com>
To: Jeffrey Ratcliffe <jeffrey.ratcliffe@gmail.com>
Cc: 10763-done@debbugs.gnu.org
Subject: bug#10763: 23.4; calc-embedded fails to simplify units in \frac
Date: Wed, 08 Feb 2012 14:41:00 -0600	[thread overview]
Message-ID: <87k43xgisj.fsf@gmail.com> (raw)
In-Reply-To: <CACg2wbw80A6HEPBDqNzBr4i7KLTOrg+0XPOF=J4OVsZtVEKafw@mail.gmail.com> (Jeffrey Ratcliffe's message of "Wed, 8 Feb 2012 17:51:54 +0100")


> 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





      reply	other threads:[~2012-02-08 20:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k43xgisj.fsf@gmail.com \
    --to=jay.p.belanger@gmail.com \
    --cc=10763-done@debbugs.gnu.org \
    --cc=jeffrey.ratcliffe@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.