0

The problem I would like to solve: A formula like \phi(x+y)^T looks slightly ambiguous. Without context, it could mean:

  • This is a function \phi taking (x+y) as arguments and then the result is transposed
  • This is a scalar \phi multiplied to the transpose of x+y

So I thought in addition to making it clear in the context, I could use different parentheses for functions than for grouping/precedence. Is there something commonly used for this purpose? Ideally it would be easy to do without packages, so that it also works in mathjax.


Inspired from this comment

Let $x \in I!!R$. [I have seen this in actual documents. Disclaimer: don't do this. Seriously.]
CompuChip Oct 16 '18 at 20:44

I came up with

\newcommand\of[1]{(\!\!(#1)\!\!)}
\phi(x+y)^T\\
\phi\of{x+y}^T

picture that shows that this looks different enough to be noticeable

This looks different enough to be noticeable and similar enough to not be confusing. However, the comment I quoted says "don't do this. Seriously." so I wonder whether there is a problem with doing this - or if not, at least a more established way.

lucidbrot
  • 305
  • 4
    the problem is that it's visualy distinguishable (by most people) but unless you have a section explaining the syntax no one will know the intended different meanings. mathematical notation has lots of ambiguities it's usually just best to ensure via the surrounding words that the intent is clear. – David Carlisle Jan 14 '22 at 11:56
  • Definitely. The idea is that the text would make the intent clear, but if you only skim through the document looking at the formula it should also help understanding the intent. Or at least not hurt if you don't know my notation, but help if you do know it. – lucidbrot Jan 14 '22 at 11:58
  • 2
    also if you want a bold ( use bold ( not (( eg ise \bm{(} otherwise any attempt to copy the text will show the double ( and be very confusing, as will any attempt to convert the latex for use on the web in mathjax or mathml etc – David Carlisle Jan 14 '22 at 11:58
  • 1
    I do not see how it would help understanding the intent at all unless you devote a section of the document to explain the notation. – David Carlisle Jan 14 '22 at 11:59
  • Yes. That's what I mean. If you read the paragraph about the notation it is supposed to help understanding, and if you did not it should be subtle enough to not hurt understanding. Good point about the bold, thanks! \bm doesn't seem to exist in my mathjax, but \bold does. – lucidbrot Jan 14 '22 at 12:02
  • 2
    but unless you have a lot of space to spare (eg a book with no page count) I would not use the space to describe this. Certainly not in a journal article for example. – David Carlisle Jan 14 '22 at 12:03
  • so I take it there is no established notation for this? That would reduce my question to just the "is there anything wrong with my idea?", which would make your comment about copying the double-bracket and using bold instead an answer. (fun fact: I noticed that \bold only worked on opening parentheses in typora mathjax but \boldsymbol works for both opening and closing parentheses) – lucidbrot Jan 14 '22 at 12:18
  • 3
    the established notation is to have no visual distinction, there is a lot of work on generating suitably annotated mathml (or html/css from mathjax) so that different audio or braille renderings are produced, so you read \phi ( as phi of .. or phi times ... depending. – David Carlisle Jan 14 '22 at 12:29
  • Oh! I was completely oblivious that accessibility could be a concern (which is a classic, i guess :/ ), wrt. latex formulas. Thank you for this input, I will read up on that! – lucidbrot Jan 14 '22 at 13:08
  • 1
    You could use a multiplication sign like \cdot if it is supposed to be multiplication. – gernot Jan 14 '22 at 17:34

0 Answers0