Hello. An internet-fiend of mine had problems with LaTeX due to misuse of \ensuremath. He provided an argument which itself switched the typesetting-mode, which imho is mis-use of \ensuremath. Did someone write down exact and precise guidelines about what may/may not occur in the argument of \ensuremath so I can provide reference? I ask here as currently I am not in the condition to write it down myself. Thanks.
My personal opinion is not to use it but to keep track of the typesetting-mode by adding appropriate characters/commands for changing the typesetting-mode. This way one sees what happens.
@UlrichDiez general advice is not to use it tex style is commands should be math-only or text-only eg \^ and \hat not some combined version, but if you do use it, the argument can be anything allowed in math mode.
@DavidCarlisle Thank you. So if using, never use with things that cause leaving math-mode, like \ensuremath{$x+1$}, a construct which I see quite often. I also saw \ensuremath{x$\par$y} . Another thing I see quite often is people using \ensuremath when defining several macros and then writing formulae in terms of these macros without entering math-mode, which makes weird spacing. How about outsourcing \ensuremath from the kernel to a package whose documentation new users might read? :-)
@UlrichDiez \ensuremath{$x+1$} is just wrong it is same as using $ in math mode, no not same as that, it is that:-) I also saw \ensuremath{x$\par$y} eek there really is no helping some people, so in math that ends the math ends the paragraph and restarts it, out of math that makes an inline math that just has \par so generates an error. It's hard to document "don't do any random thing that we would never have guessed we would do"
@UlrichDiez I'm sure if you are careful enough you can construct some \section{foo\egroup\egroup zz \bgroup\bgroup abc} that manages to avoid errors and make some random nonsensical output, but would you expect the documentation of \section to actually document that you shouldn't do that?
@mickep one of @egreg's finest creations I would guess.
@mickep I saw similar things as attempts of typesetting a matrix. Something like $$\left(\lower-.5\baselineskip\hbox{\vtop{\hsize=1.5cm \ensuremath{a b$\par$c d}}}\right)$$ if I recall correctly.
@UlrikeFischer oh atually I misread I guess the \par is always out of math node, OK
@UlrichDiez it never makes sense to use \ensuremath in a macro definition where you are controling the context, it only makes sense if used as the outer most definition for a document level command. in the case above the \ensuremath will never be in math mode so the \ifmmode test is pointless and it's just a slow way of writing $a b$\par$c d$
@yo' -- There are other planes even more huge. But I like 747s. Sometime I'll tell you a couple of stories about 747 trips that were really enjoyable. About NYC, I forgot! Thanksgiving is the big parade! If you can stand the crowds, the best show should be where it passes in front of Macy's.
@barbarabeeton Back in the days before covid, I had a flight back from Johannesburg in an A380 - this was really nice, one barely felt any movement at all.
@samcarter -- I don't mind some movement, but I do like a window, especially when flying over something interesting. I am very uncomfortable in the middle seat of the middle 5-seat row.
@barbarabeeton Oh, I usually prefer the aisle seats - there one has at least the chance to stretch out ones legs for a moment when nobody is walking by. I totally agree with the middle seats :)
@samcarter -- One of my best flights ever was with my sister, from DC to LA. My sister was a geology nut, and she explained the origins of all the interesting terrain we were flying over. That's how I learned that there are cinder cones in Arizona. Pilots sometimes announce the Mississippi River or the Grand Canyon, but that's about it.
@samcarter -- Looks promising, will definitely listen. My favorite books on geology are by John McPhee, his series "Annals of the Former World", a series of four books that crosses the US at the 40th parallel, in the company of geologists intimately familiar with the area covered. There's a fifth book covering California. (But anything by John McPhee is worth reading. If I could write like he does, I'd be over the moon!)
@samcarter -- I was once looking for McPhee on the natural history shelves of a bookstore. Instead, I found a sign "John McPhee is shelved under literature". Powell's Books in Portland, Oregon. I already found the bookstore attractive, but that clinched it!
@samcarter -- Cool! Thanks. If you visit Portland, be sure to go to Powell's. (The last time I was there, they had a room for special items that contained, among other things, some really nice sci-fi first editions.)
@PauloCereda Is there a way to move a file from the Overleaf log folder to the main project directory? If you install a .dtx package the output ends up there, but if you want to edit the file, it needs to be in your main project directory.
@AlanMunn I think I have an example somewhere with some copying in the latexmkrc file, but do you mean edit the dtx, and re-generate or do you mean edit the generated files?
@JosephWright Hi, now that you are cleaning house for l3build, could you remove the line #!/usr/bin/env texlua from build.lua at (github.com/latex3/l3build/tree/main/examples)?
@samcarter -- Should we change the focus to underwater? I've just read that the Great Barrier Reef may be showing some recovery from coral bleaching. And some days ago, there was a report that living organisms have been found below one of the thickest glaciers in Antarctica, on a rock, far from open ocean and sources of obvious sustenance.
@samcarter @barbarabeeton Powell's will gladly ship your purchases to you and depending on your itenary, may arrive back home before you do! (I've done this several times at conferences.)
@LaTeXereXeTaL -- Yes, that's true, but shipping costs back to Germany would be astronomical, you should excuse the expression. (Having just shipped some packages to the UK, I'm not just guessing.) Of course, that is probably still less costly than the fee for overweight baggage.