-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spurious comma with authortitle style and \textcite #373
Comments
This is because in 8bf55f2 following #363 the |
@moewew I'm not sure if a new command is the solution. It can get confusing if one has a \nametitledelimbib and \nametitledelimtextcite and more variants. "nametitledelim" is a clear name and if would a pity if one couldn't use it in all places where is makes sense. Imho one should ponder over a more generic solution. Perhaps one could define a test which allows to check if one is in a bib, or a textcite or a parencite so that one could do something like this:
Another idea would be a hook in the precode of a cite command so that one can add specific redefinitions. Or one could write something like this
and then use |
Of course it has downsides having that many names. But is a situation with "Name_ Title" really the same as "Name_ (Title)", does the "_" really separate the name and the title in both cases, or is there something more to it in the second case? I'm not very fond of overloading simple punctuation commands with checks. Those constructions become unappealingly long and then confusing quite quickly. Your second idea (though very similar, I admit) looks more appealing to me. Implementing it is a different story then ... |
I'm open to this if someone wants to fork and try it? For 3.4, do we need to fix something though? |
I think the current situation is definitely undesirable and should be fixed, a comma before the brackets looks just wrong. Whether that is by reverting the I would say that introducing a new command (or re-using I'm sorry, I pressed the wrong button and inadvertently "closed" the issue. |
How about auto-generating some variants of all these delim macros like:
and they all default to the corresponding untyped |
I fully agree. |
Ok, looking at it, tracking in #363 |
(tracking on here so @u-fischer can see it). Here is a suggestion. In the table, by default, any macro with no explicit value uses the value from the "upstream" more general macro. Any suggestions for defaults welcome. @moewew ,@u-fischer - would like your opinion here too.
|
I'm thinking of doing something like this:
where this falls back on progressively generic delim macros: |
You should be much more interested in @u-fischer's opinion and expertise than my opinion here. But for what it's worth, I am quite fond of the old I fail to understand what As a long-term solution your idea sounds very interesting, I believe. It will take the name thing to the next level, though ( |
Not all of these delim names are "real" - it's just easier to make a loop to auto-create a hierarchical tree of delims which inherit downwards. The strange ones you mention wouldn't be advertised to users or used at all. |
I like the idea of a \printdelim command. But I'm not sure about longer predefined chains. I'm not sure that all cases can really be represented by tree hierarchies and I fear that it gets to complicated. If I had to define say three different nameyeardelims (space, dot, comma) I would probably set \nameyeardelim to the most used and define for all the other a special case, and not try to use some intermediate command. So I think I would prefer \printdelim[textcite]{nameyeardelim} which would use either \nameyeardelim or \textcitenameyeardelim. |
Yes, the tree thing is a bit much I think. Ok I see your solution basically defines the fallbacks dynamically from the optional argument. I think that's nicer overall and doesn't rely on hard-coded naming conventions. I'll do a test implementation of such a solution in DEV soon. |
One could perhaps have also a command \DeclareDelimFormat[textcite]{nameyeardelim}{code}, then \printdelim could use some internal commands (e.g. \delim@nameyeardelim) and would be independant of the existing commands. (But I haven't really tried to think this through, I'm a bit in a hurry, so it could be nonsense). |
I was also thinking of something like |
If you allow only \printdelim{foo} then how will you make possible that \printdelim{foo} gives in a \cite something different then in a \textcite (without going back to some hardcoded chains)? Imho the variants \printdelim{foo} (try only the delim "foo@delim" associated with foo) and \printdelim[bar]{foo} (try first "barfoo@delim", then "foo@delim") is clearer. |
Ok, this is a different issue - do we want to have context-sensitive detection of delims? That is, detect we are in |
Here is something concrete to think about which I have working at the moment:
prints This way, there can be arbitrary fallbacks defined for any delim. You don't have to use |
Hm. I think I'm loosing you. What do you gain by the "fallback" delim2? Where is the difference to
where both delim2 are at the same level?
I don't think that it is hard: A cite command would only need to save its own command name somehow, so that is can (inside the cite) be accessed e.g. as "\citetype". Or one could declare the citetype in the precode. It is another question if we want it and should do it. It has some attraction. |
The difference was that
|
Here is a quick test implementation output:
Output is
The thought here is that definitions/use with no context option should define the plain macros people are used to so that the usual ways of defining/using delimiters interacts with this setup when there is no context option, because that's a new concept. How does this look? |
3.4 dev version has a relatively complete implementation with documentation (section 3.9.2) and a test file (04-delimiters). I have just corrected the one |
I just played around with this new feature and I am really impressed. Especially because from what I gathered it retains backwards compatibility with the "old" way of doing things, which is quite important as those redefinitions are quite common. Would it make sense to have a starred I think
could be an option. Finally and unimportantly, in the doc section in this new feature it says "nomatter", could there a space missing? |
Great. While I was playing around with that, I noticed that context nesting works only with two levels, if the commands are nested deeper only the second-to-last level is restored. Could that ever be a problem? |
Hmm, I think it will depend on how the nesting is done and where the |
Check out
after |
Ah, of course, well spotted. The context saving needs to use a stack now that we have delim context switching in |
Maybe we can get around that entirely by keeping the |
In general I agree but keeping track of groups is usually just asking for bugs in a project this size ... I'll have a look though. |
Yes, it would probably work fine up to the citation commands where I lost track, but that is the important bit, so ... |
That may not be so hard because the pre/post code expansions are all in |
Try it now - test docs are identical and your problematic case works now. |
Looks good. Thank you. I'm just wondering, do we we need |
Yes, that's next on the list ... however, it might still be useful for users in some circumstances at the document level, with custom contexts. |
Actually, you're right, this would just be confusing unless it were global in which case it would be even more confusing. I have removed it completely and tests are fine. 3.4 is updated. |
I wanted to use the latest dev verison of biblatex so as to have a fix for this issue so I cloned the repo and did a build.sh install. However, now I get the following warning when running biber:
After a bit of googling, I discovered that I have to update biber but I'm already running the latest version (2.4). Any ideas? |
Usually, the DEV version of biblatex requires the DEV version of biber and in this case that is version 2.5 which is also on Sourceforge. |
Makes perfect sense. Now it does work. Apologies for asking stupid questions. |
No problem. |
Would it make sense to add the default
to the What about |
Well, they are covered already by the defaults without contexts:
|
Yes they are in a way. It is just that changing to |
Ok, perhaps that's better but it might be confusing for people who set |
You are right there. Either solution has its drawbacks, I'd prefer to keep backwards compatibility by setting the |
Hi, sorry to comment on the closed issue. I still have the "comma-problem" with the citestyle |
@smanull I have a hunch that your problem is essentially #432. Please check the solution in the linked TeX.SX question (or test the dev version where the problem should have been resolved). If that does not resolve your problem, please consider posting a proper minimal working example that we can investigate. |
@moewew Thank you so much for your fast answer, that really solved the problem. For everyone else searching for the solution and ends up here: include |
@smanull The issue should be fixed in the upcoming version 3.5 (not yet released to CTAN, but available here and on sourceforge) with not exactly the same line but a new mechanism to that effect. So with versions >= 3.5 that line should not be needed any more. |
Since
biblatex
3.4,authortitle
style and\textcite
leads a spurious comma between the author(s) name(s) and the title. For instance, the following MWE:leads to:
whereas, as shown here, it used to lead to:
(until to
biblatex
3.3).The text was updated successfully, but these errors were encountered: