When Queen Elizabeth visited the set of 'Game of Thrones,' she refused to sit on the Iron Throne.
It turns out there's a law that prohibits her from sitting on a foreign throne.
I need a little help adding two plus two? I for got the answer to two plus two. please understand! I LOST MY CALCULATOR! You don't understand! Just what is 2 plus 2?
@JosephWright oh I didn't notice you'd pushed. I'll add something to the doc for next time, we should probably document the file use. Not sure if we need an option to rename the .curlopt file? otherwise need to document that you might want to add it to .gitignore etc
@UlrikeFischer I was thinking if doing it at run time ie define the bookmark uppercase to be \ifx\whatever\expandafter\@firstofone\else\expandafter\l3_uppercase\fi{#1}
@JosephWright @UlrikeFischer did you see Bruno objected to my latex3 command names?
You could change \zz to \prg_break: and \zzz to \prg_break_point:, as these are already provided by expl3. — Bruno Le Floch3 hours ago
@marmot ↓↓ Smuggles as far as possible within the confines of a TikZ environment ↓↓
\documentclass{article}
\usepackage{tikz}
\makeatletter
\newcount\smugglecnt
\newcommand*\smugglewithintikz[1]{% %% <- smuggles as far as possible without leaving TikZ
\advance\smugglecnt 1 %% <- only incremented locally to reduce macro usage (jfbu's idea)
\expandafter\global\expandafter\let\csname smuggle@\the\smugglecnt\endcsname#1% %% <- store dfn
\aftergroup\ifx\aftergroup\scope\aftergroup\tikz@scope@env %% <- test if we're in a TikZ env.
\aftergroup\let\aftergroup#1\expandafter\aftergroup\csname smuggle@\the\smugglecnt\endcsname %% <- smuggle
@marmot: ↓↓ Smuggles up to (optionally including) the depth of a target marker ↓↓
\documentclass{article}
\makeatletter
\newcount\smugglecnt
\newcommand\smuggleone[1]{%
\advance\smugglecnt 1 %% <- only incremented locally to reduce macro usage (jfbu's idea)
\expandafter\global\expandafter\let\csname smuggle@\the\smugglecnt\endcsname#1%
\aftergroup\let\aftergroup#1\expandafter\aftergroup\csname smuggle@\the\smugglecnt\endcsname
}
\newcommand*\smuggletarget[1][]{% %% <- creates a target for smuggling operations
\expandafter\edef\csname smuggle@target@#1\endcsname{\the\currentgrouplevel}%
@Circumscribe Oh WOW! (Now I feel guilty, pinging you in the chat was just to gauge whether or not this is possible, not to ask you to work that out.) That's great!! (May I ask an official question such that these things get shared with the community?)
@Circumscribe Why would that be better? I thought if one confines the stuff to the local group this might be better. There is already enough harm coming from the fact that some users do \foreach \x in .... while \x and \y have its own meaning in the calc syntax.
@Circumscribe Yes, but this does not interfere with other commands. Your counter makes sure that these things are unique. On the other hand, if I stored the number of items in a global macro, and the user would have two of them, they would get overwritten. I understand that in this case it is fine but I still do not feel comfortable doing this.
@marmot: I agree that it would be better to not define (non-unique) anything outside the current scope. Doing it this way just feels a bit like overkill.
@Circumscribe Yes, it would be nice if TeX had a builtin feature like "broadcast in current environment" that would not require to define any global macros. Still I think your smuggling is a great thing to have, at least all the stupid macros like \myangle can be made local in tikz pictures.
@Circumscribe Yes, something like this. TikZ does a lot of trickery with lengths like \pgf@xa which are recycled all over to keep the damage minimal.
@Circumscribe Maybe one should install one global dummy macro \MyGlobalDummyMacro and use it like \foreach \X [count=\Y starting from 0] in {#2} {\xdef\MyGlobalDummyMacro{\Y}} \edef\NumOfColors{\MyGlobalDummyMacro} and recycle the \MyGlobalDummyMacro wherever you want to smuggle.
@Circumscribe Yes, I agree. I feel that there could be tons of helpers like that which might define the content of a tikz library or something like this. But then others will object "why don't you use xparse or something, why do you reinvent the wheel?" You have a username that allows you to deflect such arguments easily, but I don't. ;-)
@Circumscribe That's a good point. ;-) (No, I really mean that for lists there is xparse, listofitems and you know not, so these things exist in principle. But if you load them, this may cause issues, and the answer may not be as appreciated as an answer that does not rely on these things.)
@marmot: Yeah, I see your point. I also don't really like telling someone to load a package if it's only needed once for one simple thing that you could do differently.
@marmot: My original remark wasn't meant as criticism by the way. The O_O was more about how TeX sometimes makes seemingly simple things complicated.
Hi I use biber and biblatex and want the bibliography with a comma or colon between author and title like: A. Einstein: "About Bosons and Bisons" or A. Einstein, "About Bosons and Bisons" where can I configure the , or :
Now I have a "." there. I searched in the biblatex doc, but I have no clue what to search for.
I'm actually somewhat surprised that this works, because the documentation (p976) does not describe this behaviour. (Also, "(initially 0)" was redundant.)
The scope of \numthings is precisely what you would like it to be though.
@JonasStein Unfortunately the accepted answer is out of date, but moewe's answer shows the current way to do this. And actually it seems you don't really need to change the style to ext-numeric to change this particular delimiter.
@JonasStein Yes, true, but since new answers can be added, and comments added to old answers (or in some cases old answers edited) it's less of a problem than, e.g. mailing list archives.
@JonasStein Yes, the acceptance issue is trickier. Since despite the official rhetoric, we do tend to think of the accepted answer as the "best/most correct" even though it's really just the one that helped the OP at the time.
@JonasStein In more obscure questions like this one, the problem is worse, since the new answer is unlikely to surpass the vote count of the older answer.
@JonasStein Although I think for regular users of the site, it doesn't take long to realize that reading all the answers to a question is the best strategy.
@MarcelKrüger would it be possible (without to much fuss ...) to have an option "don't stretch spaces"? I do find the new behaviour much better, but as it changes existing documents ...
@AlanMunn This seems to suggest that one has to rethink the definition of a duplicate. If an answer got the tick at that time because it solved the problem then, I feel it would be a bit unfortunate if the tick was removed because a new answer appeared which uses a package that was written later. So this is a bit tricky, and it might be worthwhile to allow for a new question being asked without immediately closing it as a duplicate. Or maybe not.
@marmot I don't see why it's a big problem. Questioners are always free to change their accepted answer when another one comes along. The problem is more that old accepted answers hang around. A comment + a new answer should be sufficient to direct users to the new answer. And if the new answer gets accepted later, even better, IMO. The tiny loss of reputation to the original accepted answerer is neither here nor there.
@AlanMunn It is not the reputation loss but the fact that a new question is very visible. Let's say a question has been asked, and answer written and accepted. Later there is a new package allowing for a better solution. Now you would just post an answer to the old question. I am afraid that it won't be very visible. And then precisely what you describe above will happen: users will see the highly voted answer, which has a good chance to remain the accepted answer.
@marmot The visibility of the question in a search is much more related to total number of views, and other factors such as how well it describes the problem. I do agree that there are cases where new questions are entirely appropriate, but as a general principle, i.e., make a new question instead of adding a new answer to an old question, I don't think it's necessary.
@AlanMunn I agree that it depends on the case. It is just that not many go through old questions and check if by now a better answer could be written. But we are very efficient at closing questions as duplicates (which is in principle a good thing) but maybe not all of us check whether the answer to the original question is still state of the art. In fact, if I am not mistaken, the only criterion for being able to close something as a duplicate is that the original Q has an upvoted A.
@marmot Yes, that's sometimes a problem. And the oldest questions on the site have generally worse answers (even from good people) than later questions, simply because people were learning how to write them. But a duplicate can be pointed in either direction (i.e., you can add a new answer and then close the old question as a duplicate.)
@Circumscribe I've done it a couple of times. Every so often we also get a really frequent question and then it's helpful to write a canonical answer. This happened e.g., here: tex.stackexchange.com/q/140814/2693. It probably should happen more often.
@marmot The main duplicate should be the one with the best question/answer combination. Age of the question is irrelevant, IMO.
@AlanMunn Well, often "being a duplicate" is associated with "you have not searched carefully enough to realize that this has already been asked before".
@marmot I agree with @DavidCarlisle. And anyway, in the case of closing an older question pointing to a newer question, it has no effect on the older OP, since (i) they're probably long gone (most users are transient) and (ii) it happens usually a long time after they ask the question.
@DavidCarlisle But this is a bit odd, isn't it? Assume I have a question. Shouldn't I try to find out first whether or not it has been asked before? If yes, I upvote it and the answer. Are you suggesting: no, just write a new question, and if you happen to get an answer that is superior to the answer the earlier question got, the earlier question will be closed as a duplicate?
@AlanMunn @DavidCarlisle I am really confused. Should users just ask new questions, not look at earlier posts, and hope that things have changed in such a way that a simpler answer might emerge?
@marmot No, that's not what I mean. If the old question answers things well, then yes, upvote it and move on. But this conversation started by talking about outdated answers and whether new questions would be appropriate. But sometimes, someone asks the question in a better way than the older one, and receives a better answer, and later we realize there's a duplicate. In the case, the best question/answer pair should be the one that is the target of the duplicate link, not the older one.
@AlanMunn I remember seeing tons of questions that had (imo) duplicates with better answers (though I can't think of any examples right now). What should I do if I see one?
@marmot in some cases people should look but often its hard, when I am searching for duplicates to close questions I usually search for the answer but that's not an option the questioner presumably has. Especially if i know I have posted an answer before, it's a lot easier to find. so in almost all cases the newer question gets closed straight away, but if retrospectively we find two posts that could be duplicate I would not consider the age of the post top be relevant
@Circumscribe Do you mean questions with a duplicate link already, or simply two questions which are duplicates of each other and unlinked in either direction?
@AlanMunn @DavidCarlisle IMHO users should try to first find related posts, and if they are not happy with the solutions presented there they should post a new question, saying they have read X but do not like Y and want Z instead.
@Circumscribe note if they are really duplicate (that is the answer to one question answers the other) you can flag them and ask they be merged, but usually we use "duplicate" in a weaker sense that it's the same underlying issue and anyone reading one ought to be able to figure out th eother
@AlanMunn @DavidCarlisle So if I understand you correctly, A being duplicate of B means that A is inferior to B (and both have a common answer). Is that how you view this?
@marmot Sure, in an ideal world. But as @DavidCarlisle said, it's not always easy to find them. I'm just repeating David here, but most times I find duplicates by searching for what I know will be in the answer. This is clearly not a strategy that questioners can use.
@marmot Yes, if both questions have answers. Obviously no, if one question has no answer. And crucially it's the question that must be the same, not the answer.
@marmot partially although it's actually a mess because often a much clearer question gets added later which we close as duplicate just because reversing the links to make the new question have the answers is just too much work for not much gain. I think the model is that there is no implied superiority of the question chosen as the non closed post, it's just one of the set and having lots of duplicates of it increases its search profile and makes it easier to find
@AlanMunn Yes, that's what I meant. (It is not clear what it means to be the same question, let's say A wants a line to become red and B it to become blue, then I would say they have a common answer but these are technically different questions.)
@marmot Sure. The extreme case of this is How to look up a symbol. But sometimes people ask entirely different questions that so happen to have the same solution, and people try to close as a duplicate. This is bad.
@DavidCarlisle Yes, this is how it is used. In the best of all worlds things would all merge to one "original" question with a set of answers, and the other questions, which have the same content but different wording, will be linked as duplicates.
@AlanMunn I actually do not see the problem. Let's say we have two questions which sound very different but have a common answer. Why would it be bad to link them in that way?
@marmot I vary my opinion on this, for many questions of the form "why have I got spurious space" get closed by the canonical "what is the use of percent at end of lines" question. That is sort of OK as anyone finding the question is directed to a usable answer, but the question is not at all duplicate one is questioning the symptom, the other is questioning the technique used in the answer there is no way someone struggling with a space from {{<newline> is going to find the % question
@marmot Pointing out that the other question exists is probably good. Closing as a duplicate is bad, since questioners search for the problem not the answer. Of course we could find individual cases (like your blue/red example) but I think in most cases are not like that.
@DavidCarlisle @AlanMunn Very good. Now I have you where I wanted you to be. ;-) My starting statement was that we may have to rethink our practice of closing questions as duplicates. What you are saying now seems to be consistent with that. And yes, I agree with your last statements.
@AlanMunn @DavidCarlisle Of course the statement was not 100% serious but I agree. ;-) In particular with the assertion that the current situation is a mess (but wouldn't know how to improve it...)
@marmot Really? This is a different issue. You started out saying that that old questions might benefit from new questions with updated answers rather than the new questions being closed as duplicates. But nothing @DavidCarlisle and I have said here really agrees with that. We may agree that there are some issues with duplicates on the site, but that's cherry-picked version of your original statement. :)