I really hate to say it but matlab is finally getting better. They adopted many Python properties. Still I won't touch it but brutal honesty requires acknowledgement :)
Rebranded every Python property as something else though, for example, "Broadcasting" --> "Implicit Expansion" and so on.
They are not strictly Python stuff of course but super popular with Python. Data science people floored matlab usage in that domain via scikit-learn and pandas. I think that is why.
Hello, I am trying to write some Japanese text, but my TeXnikCenter is crashing all the time. Can anyone compile this MWE with TeXnikCenter (and, I suppose, with XeTeX -> PDF option)?
So I have been looking around. It seems to me that the bus factor for both LuaLaTeX and XeLaTeX seems to be a pretty low number. And LaTeX core as well.
@wilx LuaTeX has three people (Hans, Taco, Luigi), XeTeX doesn't really have a team in that sense (Arthur is down as doing some work, but without a WEB expert it's hard, though Jonathan does still pop up), LaTeX has more of us (Frank, Chris, David, Johannes, Javier, Will, Bruno, me)
@PauloCereda We had one other student use TeX after seeing her boyfriend struggle with Word, but as her boss was not keen I actually advised her against it (after initially suggesting it might work: I decided support from supervisor was key)
@PauloCereda I made it clear it was his call: I know a lot about Word too
@PauloCereda Speaking of which, I'll watch that Excel video later today, looks good
Suppose a package has stupidly done something like this:
\documentclass{article}
\newcounter{mycount}
\newcommand*{\lftbr}{(}
\newcommand*{\rtbr}{)}
\renewcommand{\themycount}{\lftbr\arabic{mycount}\rtbr}
\newcommand{\mycmd}[1]{\refstepcounter{mycount}\themycount\quad#1\par}
\begin{document}
\mycmd{This is a sentence}\label{foo}
\mycmd{Another sentence}\label{bar}
This is a reference \ref{bar}.
\end{document}
Is there a way to strip the parentheses off of the \ref{bar} so that the number can be used to reset a counter?
@AlanMunn you can't generally use \ref as a number anyway as \the... is supposed to be the print form. there you can probably get away with using \numexpr...\relax as () are allowed there, but you'd have to special case the first run when the ref wasn't defined, or see Heiko's zref package(s)
:32528525 yes or if \themycounter is defined as \thesection.\roman{mycounter} or ... Using \ref output as a numeric value is just wrong really:-)
@AlanMunn other way would be to define \ltbr as robust commands so they stay in teh \ref then you could define them to be empty locally while using the \ref
\documentclass{article}
\newcounter{mycount}
\DeclareRobustCommand{\lftbr}{(}
\DeclareRobustCommand{\rtbr}{)}
\renewcommand{\themycount}{\lftbr\arabic{mycount}\rtbr}
\newcommand{\mycmd}[1]{\refstepcounter{mycount}\themycount\quad#1\par}
\begin{document}
\mycmd{This is a sentence}\label{foo}
\mycmd{Another sentence}\label{bar}
This is a reference \ref{bar}.
{\def\lftbr{}\def\rtbr{}%
\global\count1=\ref{bar}
}
\end{document}
@AlanMunn as above except you need to do something about the first run
\documentclass{article}
\newcounter{mycount}
\DeclareRobustCommand{\lftbr}{(}
\DeclareRobustCommand{\rtbr}{)}
\renewcommand{\themycount}{\lftbr\arabic{mycount}\rtbr}
\newcommand{\mycmd}[1]{\refstepcounter{mycount}\themycount\quad#1\par}
\begin{document}
\mycmd{This is a sentence}\label{foo}
\mycmd{Another sentence}\label{bar}
This is a reference \ref{bar}.
{\makeatletter\def\lftbr{}\def\rtbr{}%
\@ifundefined{r@bar}{\@namedef{r@bar}{{0}{0}}}
\global\count1=\ref{bar}
}
\typeout{count is \the\count1}
@egreg Thanks. Yes, that's what I initially tried to do. But looking at the package code a bit more I realized I could do it without having to extract the counter from \ref after all.
@AlanMunn It's based on the fact that if the cross reference has not yet been written in the .aux file, \getrefnumber returns 0, so we need to check whether the tokens returned by \getrefnumber start with (. One might avoid \edef with a bunch of \expandafter; \edef should be safe enough if you know that the tokens returned are (<number>).
@PauloCereda Watching the Excel vid: not much actually new, but well-presented. My concern, though, is Excel is the wrong tool for this if there is any scale. It's one thing to do the UK-TUG membership list in CSV, it's another to manage a business that way. Has he not heard of SQL, Access, Python, ...?
@PauloCereda A hare crossed the road in front of me while I was climbing “passo Giau”. I was still rather far, but a group of three motorbikes was coming from the opposite direction and I was afraid for it, but with a jump it was safe; after the next corner it crossed the road again in front of me and disappeared.
@cfr The answer to your question about how to questions is the a bit complicated, and involves a mixture of syntax, semantics, and pragmatics: First, syntactically, main clauses have to be tensed, so it's true that a main clause of any sort (including questions) can be in the infinitive form. However, that's not what makes it a question.
If I embed an infinitive inside a verb like ask it's absolutely interpreted as a question: in John asked how to get to Paddington Station, how to get to Paddington Station is semantically a question.
Now, in the context of the site, pragmatics comes in. We know that the syntactic form of a sentence doesn't always match the pragmatics of its use. The classic cases of this are requests, which take the form of Yes/No questions, but aren't pragmatically questions at all: Can you pass the salt. Answering that with "Yes" would just piss people off. So even though it looks like a question, it's not, pragmatically.
The very same idea holds for the infinitival form of the question that is common here on the site (I'm certainly not the only person who uses it). Since the whole raison d'être of the site is to ask questions, essentially every title on the site is pragmatically a question. So you can think of the infinitive form as implicitly "I'm asking how to stop macros from gobbling spaces"
\end{linguistics-lecture}
(sorry, typo in the first paragraph: main clauses can't be in the infinitive form)
(Oh, and none of this deals with the question of whether infinitives have subjects, but there's plenty of evidence to think that they do.)
@AlanMunn Except if you're dining with philosophers. You may still get pissed off, but the philosophers will figure that's your problem. (But this only applies straightforwardly in specifically philosophical social spaces, I admit.) Which is not to say, of course, that philosophers don't agree with you. They just have a twisted sense of humour.
@AlanMunn My comments were intended in the context of the question which asked about editing things which are perfectly clearly questions pragmatically to turn them into things that would count as questions grammatically. (Except they wouldn't without the pragmatics.) So since they are perfectly clearly questions pragmatically to start with, there can't be a case for editing them to turn them into questions pragmatically. If they needed to be questions grammatically, there would be a case for...
@cfr Sure, and I wasn't ever proposing that. As I said, most of the questions the OP posted were pretty crappy to begin with but I think the reason isn't really to do with whether they were in the form of questions or not.
... editing them. But since they don't, there isn't.
@AlanMunn Indeed. As I said, most philosophers will agree with you. (Bound to be some who don't.) Whether they think it is pragmatics or something else, they'll agree with you on the meaning. But they'll still think its your problem if you get pissed off when they take you literally at dinner.
@AlanMunn They'll also have tried to pass you the salt by now.
@cfr :) btw, do you know how to selectively reduce the length of the branches for a single node in forest? The problem arises from nice empty nodes which seems to make other parts of the tree quite ugly.
@AlanMunn Like I said, philosophers just have a twisted sense of humour. They won't (mostly) claim you failed to convey the request in a satisfactory way. This is Anglo-American philosophers, of course. I don't know what the existentialists would do about the salt.
@cfr Not quite the same, thing, but I once had an Ohio State Turnpike tollbooth operator "correct" my grammar: I said "Can I have a receipt, please?", and she replied "Yes, you may" :D
@AlanMunn More a claim that you had failed to satisfactorily communicate the nature of your request, taking into account the literal meaning, conversational implicatures, pragmatics etc.