bug-texinfo
[Top][All Lists]
Advanced

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

Re: `\\' doesn't work in @math


From: Karl Berry
Subject: Re: `\\' doesn't work in @math
Date: Mon, 11 Mar 2002 12:11:19 -0500

    In previous versions (before 4.1), the following worked:
      Default: @address@hidden * 5 / 6}.
    Now this fails.  Sigh.  

Unfortunately I don't think there's any way to fix this without
completely reimplementing how arguments are parsed.  Since @math implies
@tex, \n turns into the control sequence \n very early, and there's no
practical way to tear it back apart into \ and n.

    Doing this:
      Default: @math{\code{\\n[LL]} * 5 / 6}.
    fails also:

I just updated texinfo.tex so that both @\ and \\ will produce a literal
\ inside @math.  @\ is better, though, since then you'll get only one \
in Info output; \\ will give you two.  (You'll want to use @code, too,
not \code.)

Here's the one-line patch for makeinfo/cmds.c to make it recognize @\:
*** cmds.c      2002/02/09 00:54:51     1.69
--- cmds.c      2002/03/11 16:51:37     1.70
***************
*** 95,100 ****
--- 95,101 ----
    { "=", cm_accent, MAYBE_BRACE_ARGS },
    { "?", insert_self, NO_BRACE_ARGS },
    { "@", insert_self, NO_BRACE_ARGS },
+   { "\\", insert_self, NO_BRACE_ARGS },
    { "^", cm_accent_hat, MAYBE_BRACE_ARGS },
    { "`", cm_accent_grave, MAYBE_BRACE_ARGS },
    { "{", insert_self, NO_BRACE_ARGS },

Best to get the whole new texinfo.tex since I fixed some other
@math/@code interactions too.

Let me know if problems.

Thanks,
karl



reply via email to

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