usage of \textregistered and \textsuperscript

566 views
Skip to first unread message

albert...@gmail.com

unread,
Sep 27, 2013, 1:24:46 PM9/27/13
to mathja...@googlegroups.com
Dear all,

I wanted to use \textregistered and \textsuperscript but this is in MathJax not possible, they are not rendered. In the list of supported command they are not listed either.
Is there a way around to use these commands?
Are there plans to support these commands?

Albert

Peter Krautzberger

unread,
Sep 27, 2013, 2:06:26 PM9/27/13
to mathja...@googlegroups.com
Hi Albert,

For \textregistered, you can define a macro, e.g., using our \unicode command, see http://docs.mathjax.org/en/latest/tex.html#defining-tex-macros and http://docs.mathjax.org/en/latest/tex.html#unicode-support. We're working on a third party repository, hosted on our CDN so that contributions like macro packages are easily available.

For \textsuperscript, MathJax only implements math mode, not textmode (since HTML can do that quite well). What are you trying to do? Perhaps there's a workaround.

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

albert...@gmail.com

unread,
Sep 27, 2013, 2:18:21 PM9/27/13
to mathja...@googlegroups.com
Hi Peter,

Thanks for the quick reply. We want to use MathJax in our documentation generation process. In this documentation there are some texts like: Product^{\textsuperscript{\textregistered}}
I'll have it checked if we can use the workarounds.

Albert

Peter Krautzberger

unread,
Sep 27, 2013, 5:21:21 PM9/27/13
to mathja...@googlegroups.com
Hi Albert,

Could you describe the documentation generation process? In particular input and output format and conversion tool. 

 Product^{\textsuperscript{\textregistered}} doesn't look like TeX. I'd guess that both ^ and textsuperscript are supposed to raise superscripts (which seems odd to double).

Peter.

albert...@gmail.com

unread,
Sep 29, 2013, 6:50:24 AM9/29/13
to mathja...@googlegroups.com
Hi Peter,

According to my knowledge  Product^{\textsuperscript{\textregistered}} is valid LaTeX, I tried it on different sites.

We are using Serna for generating HTML and pdf documentation. Until now we used to generate png files for the formulas, with the known not to best quality and we want to have a better quality. The loading of the html pages will be a bit slower though, but the quality is far better.

During the conversion process the problem with:
  Product^{\textsuperscript{\textregistered}}
was detected (there might be more but they have not been reported to me yet).

The idea behind
Product^{\textsuperscript{\textregistered}} is to have the registered trademark raised and in a bit a smaller size.

Albert

Davide P. Cervone

unread,
Sep 29, 2013, 7:32:53 AM9/29/13
to mathja...@googlegroups.com
Peter's point was that \textsuperscript ALREADY raises and shrinks the \textregistered, so there is no need for the ^, which makes the trademark symbol a DOUBLE superscript (too high).  I've included an image showing the result of 

\textregistered\ X\textsuperscript{\textregistered} $\textrm{X}^{\textsuperscript{\textregistered}}$


Note also that ^ is only defined in math mode, so unless your "Product^{\textsuperscript{\textregistered}}" is within math delimiters, then it would produce an error in TeX, and since MathJax only processes math-mode material, it would not be processed by MathJax at all.

You can get a similar effect by defining the following macros as part of your MathJax configuration

<script type="text/x-mathjax-config">
MathJax.Hub.Config({
  TeX: {
    Macros: {
      textregistered: "\\unicode{xAE}",
      textsuperscript: ["^{#1}",1]
    }
  }
});
</script>

See if that doesn't work for you.

Davide
Reply all
Reply to author
Forward
0 new messages