@Gigili No but to get from your fragment to a working document we were not likely to guess that, if you really haven't edited in between then something has changed subject to to to subject which must mean the bidi controls are completely messed up. I have no idea how it could get in that state
@Gigili likely to take too much debugging for chat best to ask a question on site but make a complete reproducible example that shows the problem, ie start from a copy of that and remove everything you can remove to make a small complete document to add to the question
@barbarabeeton There is a little misunderstanding here, I was not talking about the same question I asked in this chat today. The story is about a user on math SE who edited questions to make minor changes like that
@egreg -- because, in this case, the \left adds back the thin space after \min. (i haven't checked how \lVert is defined, and should probably do so. and also check how \min behaves next to \mathopen. oh, bother; i probably need to review most of appendix g all over again. whimper.)
@DavidCarlisle -- the space does look better to me in front of the verts, although i'm used to no space in front of a parenthesis. i guess the space isn't really needed, but i'm going to have to ask for advice on this one from someone who actually knows math better than i do. okay, @egreg, should this get space between \min and the verts, or not, and hang what it looks like?
@barbarabeeton \min is an operator (class 1), so there's no space between it and an open atom. On the other hand, \min\left\lVert x\right\rVert will also add a thin space after the closing atom.
@barbarabeeton This is a case where \min\|x\| is the right choice.
@egreg Why exactly? Just for the sake of beautifulness? I mean, \ln\lvert x+1\rvert always looked wrong to me, but since the spacing was “right” like \sin(x+1), well, I never thought of adding an explicit \, or using an ord atom there.
@egreg -- so here, it's the shape of the "n" next to the vert (both \ln and \min), whereas the shape of the "g" (\log) has a little more built-in clearance?
@Manuel There's a fundamental difference between \log x and \log\lvert x\rvert (not simply because they represent different functions). But I wouldn't object to \log|x| either, so long as it's used consistently.
@barbarabeeton Maybe. But I refuse to use “ln” for what has been denoted for centuries with “log”.
@barbarabeeton Just because some physicist or engineer decided that they are too stupid to know the meaning.
@Gigili -- the output may make sense, but the fact that the words are reversed in processing means that something else fishy is going on, and you really ought to get to the bottom of it before you have to deal with strings of more than two words.
@Gigili No, run the code I post above and that does not happen, if it happens in your Arabic document then the BIDI controls of xetex have been messed up and you need to make an example to show that, randomly permuting the input and hoping the broken formatter pouts them in the right order is not the solution.
@Gigili -- this is happening because the equation is embedded in a bidi/right-to-left document, and that reversal of direction really should be turned off for this situation. (though i'm not really sure how.)
@Gigili make an example in a question on site and it's probably easy to fix...
@Gigili the maintainers of latex, amsmath and xetex are all on this site, probably someone can fix something but only if you make an example that demonstrates a problem.
@barbarabeeton Thanks for the tip update. This comes from not having used plain TeX since 2002 (I started the course in 1996, and all work was at the command prompt) when we transitioned the math majors over to LaTeX (and still to this day all math majors at that university still take a 1 cr Technical Writing Using LaTeX
@Gigili something is still wrong if you set English in a RTL environment then it should set every letter rtl I can't see how it can get the words in the wrong order but the letters within each word correct. It also doesn't explain why you were not getting subscript 0