texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[6869] test for math mode in @math


From: Gavin D. Smith
Subject: [6869] test for math mode in @math
Date: Wed, 16 Dec 2015 13:40:16 +0000

Revision: 6869
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6869
Author:   gavin
Date:     2015-12-16 13:39:56 +0000 (Wed, 16 Dec 2015)
Log Message:
-----------
test for math mode in @math

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/doc/texinfo.tex

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2015-12-16 11:58:14 UTC (rev 6868)
+++ trunk/ChangeLog     2015-12-16 13:39:56 UTC (rev 6869)
@@ -1,5 +1,10 @@
-2015-12-15  Gavin Smith  <address@hidden>
+2015-12-16  Gavin Smith  <address@hidden>
 
+       * doc/texinfo.tex (\math): If in math mode, do nothing, so
+       nested @math work.
+
+2015-12-16  Gavin Smith  <address@hidden>
+
        * install-info/tests/ii-0058-test: Remove test, because empty 
        dir file is already covered by ii-0018-test and ii-0019-test.
        * install-info/tests/ii-0018-test,

Modified: trunk/doc/texinfo.tex
===================================================================
--- trunk/doc/texinfo.tex       2015-12-16 11:58:14 UTC (rev 6868)
+++ trunk/doc/texinfo.tex       2015-12-16 13:39:56 UTC (rev 6869)
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2015-11-27.11}
+\def\texinfoversion{2015-12-16.13}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -2840,23 +2840,24 @@
 \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
 %
 \def\math{%
-  \tex
-  \mathunderscore
-  \let\\ = \mathbackslash
-  \mathactive
-  % make the texinfo accent commands work in math mode
-  \let\"=\ddot
-  \let\'=\acute
-  \let\==\bar
-  \let\^=\hat
-  \let\`=\grave
-  \let\u=\breve
-  \let\v=\check
-  \let\~=\tilde
-  \let\dotaccent=\dot
-  % have to provide another name for sup operator
-  \let\mathopsup=\sup
-  $\finishmath
+  \ifmmode\else % only go into math if not in math mode already
+    \tex
+    \mathunderscore
+    \let\\ = \mathbackslash
+    \mathactive
+    % make the texinfo accent commands work in math mode
+    \let\"=\ddot
+    \let\'=\acute
+    \let\==\bar
+    \let\^=\hat
+    \let\`=\grave
+    \let\u=\breve
+    \let\v=\check
+    \let\~=\tilde
+    \let\dotaccent=\dot
+    % have to provide another name for sup operator
+    \let\mathopsup=\sup
+  $\expandafter\finishmath\fi
 }
 \def\finishmath#1{#1$\endgroup}  % Close the group opened by \tex.
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]