« first day (1709 days earlier)      last day (1902 days later) » 
03:00 - 20:0020:00 - 00:00

8:00 PM
@Gigili ah well there you go then that's different, you didn't say the document was RTL :-)
You didn't ask
Yes, I am using XeLaTeX
@Gigili I asked for a minimal document :-)
@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
@JosephWright And I took a screenshot to show you what's happening here
@Gigili Not the same thing :-)
@DavidCarlisle LaTeX-L message re. LuaTeX in a minute
8:04 PM
@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
@Gigili -- when you posted the original question on math.se, did you say clearly that this was in a bidi/right-to-left document?
@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
When I was an active user there
@DavidCarlisle OK


P_0: \min_{x} ||x||_0 \text{subject to} Y=DX

P_0: \min_{x} \lVert x\rVert_0 \quad \text{subject to}\quad Y=DX

@Gigili note words in right order, and subscript is a 0 not a circle
@DavidCarlisle -- you could put the spaces inside the \text argument to make the coding more obvious.
@barbarabeeton would you put the thin space back after \min ?
@barbarabeeton yes although those spaces are then rigid (actually quad is rigid too so not so different)
8:10 PM
@DavidCarlisle -- well, i would more likely use \left\lVert and \right\rVert.
@barbarabeeton don't tell @egreg
@barbarabeeton Why? :(
@barbarabeeton I did warn you not to let @egreg see that comment:-)
@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.)
@JosephWright email looks fine lualatexsupport example still failing should I fix or do you have it in hand?
8:18 PM
@DavidCarlisle Like I said, for me all is working so if you can spot an error please fix it :-)
@DavidCarlisle Ah, found the one you mean
@JosephWright I added \usepackage{ltluatex} but probably should guard with ifx\directlua or something so you can use pdflatex? so backed off commit
@DavidCarlisle Looks like I forgot to checkin one fix
@DavidCarlisle Give me two mins
@JosephWright OK:-)
@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 I guess I'd use \,\lVert here. (@egreg?)
8:23 PM
@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 -- so if one were defining \norm it would be as \|#1\| (and forget about the possibility that the argument might be "tall"?).
@barbarabeeton Let me check with \DeclarePairedDelimiters
@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 -- thanks. i think i'd better add this example to my collection of "suggested best practices". (better call that "niceties".)
@barbarabeeton No, it uses \mathopen. :(
8:33 PM
@egreg ah I nearly did that (\|x\|)(but had used \lVert and posted the image above before really looking at the output:-)
@Manuel I've got no objection to \log\lvert x+1\rvert as the bars take the place of parentheses.
@egreg Ahm, true, and here we are dropping the virtual \{ and \}.
@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.
@DavidCarlisle Great, thanks
8:39 PM
@egreg What's the fundamental difference? Just out of curiosity?
@egreg -- sadly, i guess that applies to applied mathematicians too. because that's where i learned that there was a difference.
I changed \text{subject to} to \text{to subject}
Quite tricky :D
@DavidCarlisle May be instead of P_0: use P_0 \colon?
@Gigili between the input and the output that you showed?
@Manuel I suspect that is a label and should be \tag{..}
@barbarabeeton The same comment applies. ;-)
8:43 PM
@DavidCarlisle No, in the "better" code you wrote above ^
To get the expected output
@egreg Huh?
@Gigili but to subject is wrong I can't parse that as English, it should be subject to.
@DavidCarlisle Yes, that's why I edited it to "to subject". Then the output makes sense
@JosephWright I always thought ln was a weird invention introduced for pocket calculators
@Gigili sorry I can not guess what you mean by that.
What's [ intended to do here? Better word spacing?
8:47 PM
@Gigili please look at least some latex tutorials:( \[ is even more basic than \begin{equation} and starts display math.
When I have "subject to" in the input code, it turns to "to subject" in the output document.
@DavidCarlisle OK I will :D. Do not cry
@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.)
@barbarabeeton I know, but I have wasted too much time on this tonight. I have loads of work to do
8:49 PM
@Gigili I won't cry, but I may stop helping as there are limits, and you are pushing against them, to be honest.
@DavidCarlisle It did happen
@DavidCarlisle I understand.
@JosephWright “ln” is quite a recent invention.
I googled the RTL issue and seems there is no actual solution
Some people suggested to use &&
Or \begin{eqnarray}
But the problem is still there
9:06 PM
@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.
OK, I'm on it. Thank you for your help
9:19 PM
@DavidCarlisle wait a minute...
@SeanAllred ?
@DavidCarlisle you yourself are a high-rep user. we have a paradox on our hands
@SeanAllred not as high as Jon Skeet
@DavidCarlisle true, though I think he in particular is a hopeless target
9:52 PM
I'm not sure even @egreg would ever catch up to him
@SeanAllred I'm just shy of half his rep.
@egreg Some sort of comparative growth analysis surely has to be done now
@SeanAllred We have about the same rep for the year.
@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
@Johannes_B done. Hope your day got better…
1 hour later…
11:19 PM
Problem solved. @DavidCarlisle
P_{0, \epsilon}: \min_{x} \lVert x\rVert_0 \quad \text{\lr{subject to}} \quad \lVert y-Dx\rVert_p \leq \epsilon
@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
03:00 - 20:0020:00 - 00:00

« first day (1709 days earlier)      last day (1902 days later) »