From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jay Belanger Newsgroups: gmane.emacs.bugs Subject: bug#10763: 23.4; calc-embedded fails to simplify units in \frac Date: Wed, 08 Feb 2012 14:41:00 -0600 Message-ID: <87k43xgisj.fsf@gmail.com> References: Reply-To: jay.p.belanger@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1328733733 2663 80.91.229.3 (8 Feb 2012 20:42:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Feb 2012 20:42:13 +0000 (UTC) Cc: 10763-done@debbugs.gnu.org To: Jeffrey Ratcliffe Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 08 21:42:12 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RvEL8-00056e-0o for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Feb 2012 21:42:06 +0100 Original-Received: from localhost ([::1]:56963 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvEL7-0000pP-Ae for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Feb 2012 15:42:05 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:55205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvEL1-0000ov-Rt for bug-gnu-emacs@gnu.org; Wed, 08 Feb 2012 15:42:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvEL0-0003Ae-St for bug-gnu-emacs@gnu.org; Wed, 08 Feb 2012 15:41:59 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57454) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvEL0-0003AY-Q1 for bug-gnu-emacs@gnu.org; Wed, 08 Feb 2012 15:41:58 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RvEM1-0003tt-T3 for bug-gnu-emacs@gnu.org; Wed, 08 Feb 2012 15:43:01 -0500 Resent-From: Jay Belanger Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Feb 2012 20:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 10763 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 10763@debbugs.gnu.org, jay.p.belanger@gmail.com Original-Received: via spool by 10763-done@debbugs.gnu.org id=D10763.132873372714926 (code D ref 10763); Wed, 08 Feb 2012 20:43:01 +0000 Original-Received: (at 10763-done) by debbugs.gnu.org; 8 Feb 2012 20:42:07 +0000 Original-Received: from localhost ([127.0.0.1]:32842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RvEL8-0003sg-JY for submit@debbugs.gnu.org; Wed, 08 Feb 2012 15:42:07 -0500 Original-Received: from mail.truman.edu ([150.243.162.204]:50277 helo=uranium.truman.edu) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RvEL6-0003sY-Kv for 10763-done@debbugs.gnu.org; Wed, 08 Feb 2012 15:42:05 -0500 Original-Received: from belanger-office (vh213601.truman.edu [150.243.162.59]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by uranium.truman.edu (Postfix) with ESMTPS id 21E881281E0; Wed, 8 Feb 2012 14:41:00 -0600 (CST) In-Reply-To: (Jeffrey Ratcliffe's message of "Wed, 8 Feb 2012 17:51:54 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:56700 Archived-At: > 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