]> git.eshelyaron.com Git - emacs.git/commitdiff
calc.texi (TeX and LaTeX Language Modes, Predefined Units):
authorJay Belanger <jay.p.belanger@gmail.com>
Fri, 19 Nov 2010 01:14:36 +0000 (19:14 -0600)
committerJay Belanger <jay.p.belanger@gmail.com>
Fri, 19 Nov 2010 01:14:36 +0000 (19:14 -0600)
calc-units.el (math-build-units-table-buffer):
README: Mention that the TeX specific units won't use the `tex' prefix
in TeX mode.

calc-lang.el (math-variable-table): Don't use the `tex' prefix for
units in TeX mode.

doc/misc/ChangeLog
doc/misc/calc.texi
lisp/ChangeLog
lisp/calc/README
lisp/calc/calc-lang.el
lisp/calc/calc-units.el

index f9e55ffb5ee669ade049cd999061121d071f7a69..d57df81befc200fff304885502717abf828924d1 100644 (file)
@@ -1,3 +1,9 @@
+2010-11-19  Jay Belanger  <jay.p.belanger@gmail.com>
+
+       * calc.texi (TeX and LaTeX Language Modes, Predefined Units):
+       Mention that the TeX specific units won't use the `tex' prefix
+       in TeX mode.
+
 2010-11-18  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus.texi (Misc Article): Document gnus-inhibit-images.
index 9c30556ab784d09663b9b1676ef355a8ce3ac688..58de84b819449ed5b33a45c8e4118a88fed276c9 100644 (file)
@@ -14122,6 +14122,10 @@ but
 @texline @math{\sin(2 + x)}.
 @infoline @expr{sin(2 + x)}.
 
+The @TeX{} specific unit names (@pxref{Predefined Units}) will not use
+the @samp{tex} prefix;  the unit name for a @TeX{} point will be
+@samp{pt} instead of @samp{texpt}, for example.
+
 Function and variable names not treated specially by @TeX{} and La@TeX{}
 are simply written out as-is, which will cause them to come out in
 italic letters in the printed document.  If you invoke @kbd{d T} or
@@ -27990,6 +27994,14 @@ than the point used by @TeX{}), @code{texdd} (a Didot point),
 @code{texcc} (a Cicero) and @code{texsp} (a scaled @TeX{} point, 
 all dimensions representable in @TeX{} are multiples of this value).
 
+When Calc is using the @TeX{} or La@TeX{} language mode (@pxref{TeX
+and LaTeX Language Modes}), the @TeX{} specific unit names will not
+use the @samp{tex} prefix; the unit name for a @TeX{} point will be
+@samp{pt} instead of @samp{texpt}, for example.  To avoid conflicts,
+the unit names for pint and parsec will simply be @samp{pint} and
+@samp{parsec} instead of @samp{pt} and @samp{pc}.
+
+
 The unit @code{e} stands for the elementary (electron) unit of charge;
 because algebra command could mistake this for the special constant
 @expr{e}, Calc provides the alternate unit name @code{ech} which is
index 9fa66ca8022125509ac73ab4f2f862c0c97f7e2d..166f30c05742ea8fc9dddf8f35432df2f18de1aa 100644 (file)
@@ -1,3 +1,11 @@
+2010-11-19  Jay Belanger  <jay.p.belanger@gmail.com>
+
+       * calc/calc-units.el (math-build-units-table-buffer):
+       calc/README: Mention that the TeX specific units won't use the
+       `tex' prefix in TeX mode.
+       calc/calc-lang.el (math-variable-table): Don't use the `tex'
+       prefix for units in TeX mode.
+
 2010-11-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * simple.el (kill-new, kill-append, kill-region):
index cf3a697c5d7339e752f2411ae69b47af419518d9..b23666018e5ef40612486aba7a421f74395ef639 100644 (file)
@@ -74,6 +74,9 @@ Summary of changes to "Calc"
 
 Emacs 24.1
 
+* Calc no longer uses the tex prefix for TeX specific unit 
+names when using TeX or LaTeX mode.
+
 * Added option to highlight selections using faces.
 
 * Gave `calc-histogram' the option of using a vector to determine the bins.
index f461c47aafd4981486ba55fd1976ca71ba84d340..6c0a65f5567e8a3c41f8dc9e074ab23ae86b0b70 100644 (file)
     ( \\Psi        . var-Psi )
     ( \\omega      . var-omega )
     ( \\Omega      . var-Omega )
+    ;; Units
+    ( pt           . var-texpt )
+    ( pc           . var-texpc )
+    ( bp           . var-texbp )
+    ( dd           . var-texdd )
+    ( cc           . var-texcc )
+    ( sp           . var-texsp )
+    ( pint         . var-pt )
+    ( parsec       . var-pc)
+
     ;; Others
     ( \\ell        . var-ell )
     ( \\infty     . var-inf )
index a88e87dffbc32fa5226ecedc188389b8a0f24d0c..8fd1983ac6dd6bf57a303d912c26c2b364597ed5 100644 (file)
               "149597870691 m (*)")
               ;; (approx) NASA JPL (http://neo.jpl.nasa.gov/glossary/au.html)
     ( lyr     "c yr"                 "Light Year" )
-    ( pc      "3.0856775854*10^16 m" "Parsec" nil
+    ( pc      "3.0856775854*10^16 m" "Parsec  (**)" nil
               "3.0856775854 10^16 m (*)") ;; (approx) ESUWM
     ( nmi     "1852 m"               "Nautical Mile" )
     ( fath    "6 ft"                 "Fathom" )
     ( fur     "660 ft"               "Furlong")
     ( mu      "1 um"                 "Micron" )
     ( mil     "(1/1000) in"          "Mil" )
-    ( point   "(1/72) in"            "Point (1/72 inch)" )
+    ( point   "(1/72) in"            "Point  (PostScript convention)" )
     ( Ang     "10^(-10) m"           "Angstrom" )
     ( mfi     "mi+ft+in"             "Miles + feet + inches" )
     ;; TeX lengths
-    ( texpt   "(100/7227) in"        "Point (TeX conventions)" )
-    ( texpc   "12 texpt"             "Pica" )
-    ( texbp   "point"                "Big point (TeX conventions)" )
-    ( texdd   "(1238/1157) texpt"    "Didot point" )
-    ( texcc   "12 texdd"             "Cicero" )
-    ( texsp   "(1/65536) texpt"      "Scaled TeX point" )
+    ( texpt   "(100/7227) in"        "Point  (TeX convention) (**)" )
+    ( texpc   "12 texpt"             "Pica  (TeX convention) (**)" )
+    ( texbp   "point"                "Big point  (TeX convention) (**)" )
+    ( texdd   "(1238/1157) texpt"    "Didot point  (TeX convention) (**)" )
+    ( texcc   "12 texdd"             "Cicero  (TeX convention) (**)" )
+    ( texsp   "(1/65536) texpt"      "Scaled TeX point (TeX convention) (**)" )
 
     ;; Area
     ( hect    "10000 m^2"            "*Hectare" )
@@ -86,7 +86,7 @@
     ( l       "L"                    "Liter" )
     ( gal     "4 qt"                 "US Gallon" )
     ( qt      "2 pt"                 "Quart" )
-    ( pt      "2 cup"                "Pint" )
+    ( pt      "2 cup"                "Pint (**)" )
     ( cup     "8 ozfl"               "Cup" )
     ( ozfl    "2 tbsp"               "Fluid Ounce" )
     ( floz    "2 tbsp"               "Fluid Ounce" )
@@ -1531,7 +1531,12 @@ If EXPR is nil, return nil."
               (indent-to 15)
               (insert "   " (nth 2 u) "\n")
               (while (eq (car (car (setq uptr (cdr uptr)))) 0)))
-            (insert "\n"))
+            (insert "\n\n")
+            (insert "(**) When in TeX or LaTeX display mode, the TeX specific unit\n"
+                     "names will not use the `tex' prefix; the unit name for a\n"
+                     "TeX point will be `pt' instead of `texpt', for example.\n"
+                     "To avoid conflicts, the unit names for pint and parsec will\n"
+                     "be `pint' and `parsec' instead of `pt' and `pc'."))
          (view-mode)
          (message "Formatting units table...done"))
        (setq math-units-table-buffer-valid t)