Infer and theorems

284 views
Skip to first unread message

asmanur

unread,
Jun 9, 2011, 12:53:03 PM6/9/11
to MathJax Users
Hello,

I'm trying to hack an extension to have the \infer (from proof.sty)
command working. Basically it's just a reversed \frac, but you may
have several & that confuses the parser. For instance

\infer{x : \tau}{x : \tau & \tau well-formed & whatever}

should display the three hypothesis x : \tau, \tau well-formed and
whatever with a little space between them. But the MathJax parser is
confused by those & although I don't use "parseArgument" directly on
the string containing those symbols.

Besides, is the \newtheorem from AMSMath planned to be supported ?

Anyway, great job !

Simon.

Davide P. Cervone

unread,
Jun 10, 2011, 10:44:08 AM6/10/11
to mathja...@googlegroups.com
> I'm trying to hack an extension to have the \infer (from proof.sty)
> command working. Basically it's just a reversed \frac, but you may
> have several & that confuses the parser. For instance
>
> \infer{x : \tau}{x : \tau & \tau well-formed & whatever}
>
> should display the three hypothesis x : \tau, \tau well-formed and
> whatever with a little space between them. But the MathJax parser is
> confused by those & although I don't use "parseArgument" directly on
> the string containing those symbols.

If the string is eventually parsed (as it will have to be), the & will
produce the error at that point.

You might consider the equivalent of

\def\infer#1#2{\frac{\matrix{#2}}{#1}}

Here the \matrix{} will handle the ampersands for you.

> Besides, is the \newtheorem from AMSMath planned to be supported ?

MathJax only implements math-mode macros and environments, not text-
mode ones. Since the \newtheorem command defines text-mode
environments, MathJax does not support it, and is not likely to in the
future.

Davide

gisel...@gmail.com

unread,
Sep 3, 2013, 12:38:08 PM9/3/13
to mathja...@googlegroups.com, asm...@gmail.com
Hi!

Did you finish writing this extension? I really need \infer in MathJax and was about to start an extension myself when I saw your post. If you have this, can you make it available?

Thanks!!

Giselle.

Simon Castellan

unread,
Sep 4, 2013, 7:59:27 AM9/4/13
to gisel...@gmail.com, mathja...@googlegroups.com
On mar. 03/sept. 2013 (09:38), gisel...@gmail.com wrote:
> Hi!
>
> Did you finish writing this extension? I really need \infer in MathJax and
> was about to start an extension myself when I saw your post. If you have
> this, can you make it available?
>
> Thanks!!
>
> Giselle.
>

No sorry, actually I don't use MathJax anymore.

Simon.

Fernando Carpani

unread,
Mar 24, 2017, 7:17:43 PM3/24/17
to MathJax Users, simon.c...@iuwt.fr

Hello.
I know that this is an old question... :-)
But, today I did this and have workes

If helps someone its ok!
In configuration ...

.....
tex2jax: {
...
Macros: {
          infer: ["\\begin{array}\[b\]{c c c c}"+
          "\\style{border-bottom:1px solid;}{\\begin{array}\[b\]{c c c c}"+
          "#3 \\\\"+
          "\\end{array}} &  \\hspace{-1em}\\raise{-0.5em}{#1} \\\\"+
          "#2"+
          "\\end{array}",3,""
          ]
        }
}
....

And a test:

 \[ \infer[RAA_1]{\neg \alpha \lor \alpha}{
    \infer[E\neg]{\bot}{
      \infer[I\neg_2]{\neg\alpha}{
          \infer[E\neg]{\bot}{[\neg(\neg \alpha \lor \alpha)]_1 &
            \infer[I\lor]{\neg \alpha \lor \alpha}{[\alpha]_2}}
      }
      &
      \infer[RAA_3]{\alpha}{
        \infer[E\neg]{\bot}{[\neg(\neg \alpha \lor \alpha)]_1 &
          \infer[I\lor]{\neg \alpha \lor \alpha}{[\neg\alpha]_3}}
        }
      } % aqui hay que seguir
    }

 \]

FDO.

Peter Krautzberger

unread,
Mar 29, 2017, 5:37:50 AM3/29/17
to mathja...@googlegroups.com
Hi Fernando,

Thanks for sharing this with the community!

A minor note: the `Macros` property needs to be in the TeX configuration block (not the tex2jax configuration block), cf. http://docs.mathjax.org/en/latest/tex.html#defining-tex-macros.

Best,
Peter.

--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Fernando Carpani

unread,
Mar 29, 2017, 7:34:07 AM3/29/17
to mathja...@googlegroups.com
Hello....
YES I'ts true. Thats was my mistake on publishing time

FDO.

--
You received this message because you are subscribed to a topic in the Google Groups "MathJax Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mathjax-users/Do5E5delM9w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mathjax-users+unsubscribe@googlegroups.com.

joseph.vi...@gmail.com

unread,
Mar 24, 2019, 9:55:44 AM3/24/19
to MathJax Users
Hello,

Has this MathJax extension work been still improved during these two years?  I would be very interested to get a MathJax macro to translate directly any output from proof.sty . This code was a good beginning but was imperfect about two points:

1. First, missed the horizontal lines at the top that are labelled with rules (Ax, L\bot..).
2. The proof.sty code \infer*{B}{A}  for deduction schemas with dots is not translated.

Last, the only improvement of the code that I succeeded to  make is this part:

 infer: [
        "\\begin{array}[b]{c c c c}" +
          "\\style{border-bottom:1px solid;}{\\begin{array}[b]{c c c c}" +
          "#3 \\\\" +
          "\\end{array}} &  \\hspace{-1em}\\raise{-0.7em}{#1} \\\\" +
          "\\raise{0.5em}{#2}" +
            "\\end{array}",
        3,
    ""
      ]

Please, let me know if you have better now,

Best wishes,

Jo.

Umut Acar

unread,
Aug 10, 2019, 3:37:39 PM8/10/19
to MathJax Users
Hi, has anyone heard any feedback about the possibility of using the proof.sty or a similar package for writing inference rules in mathjax?

Joseph Vidal-Rosset

unread,
Aug 11, 2019, 2:10:47 AM8/11/19
to mathja...@googlegroups.com
Unfortunately, it seems that iti is not easy to get a full texlive
translation in mathjax... :(

Le sam. 10 août 2019 à 21:37, Umut Acar <umut...@gmail.com> a écrit :
>
> Hi, has anyone heard any feedback about the possibility of using the proof.sty or a similar package for writing inference rules in mathjax?
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "MathJax Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/mathjax-users/Do5E5delM9w/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to mathjax-user...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/mathjax-users/f5dc0091-dbd2-422e-b01e-26e534b9beaa%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages