Is it possible to define a command in MathJax config

24 views
Skip to first unread message

Elim Qiu

unread,
Jul 20, 2016, 2:12:49 PM7/20/16
to MathJax Users
\documentclass{article}

For example, add a math symbol parallelogram.....

\usepackage[pdf]{pstricks}


\newcommand\parallelogram[1][2]{%
\psset{unit=#1pt}
\begin{pspicture}(4,3)
\pspolygon(0,0)(3,0)(4,3)(1,3)
\end{pspicture}}

\begin{document}
This is a parallelogram \parallelogram. Is it cool? Yes! How about the bigger one \parallelogram[10]? Is it cooler? Yes!
\end{document}

================
Thanks for your help!

Davide Cervone

unread,
Jul 20, 2016, 2:27:10 PM7/20/16
to mathja...@googlegroups.com
MathJax does not have a pstricks extension (and is unlikely to in the future), so there is no configuration to provide what your LaTeX document does.

On the other hand, there is a parallelogram unicode symbol (U+25B1 or U+25B0 for a solid one), so you could use

\newcommand\parallelogram{\unicode{x25B1}}

to get your parallelogram, and \large\parallelogram up to \Huge\parallelogram to get it in different sizes.  Perhaps that will be sufficient?

Davide


--
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-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Elim Qiu

unread,
Jul 20, 2016, 3:43:05 PM7/20/16
to MathJax Users
Thanks a lot Davide. Your suggestion works for me very well!
Reply all
Reply to author
Forward
0 new messages