Case protection with emphasis in biblatexWhat is the proper casing to use when storing titles in the...
Is it really OK to use "because of"?
Why do single electrical receptacles exist?
What would be some possible ways of escaping higher gravity planets?
How much light is too much?
Other than edits for international editions, did Harry Potter and the Philosopher's Stone receive errata?
Critique vs nitpicking
What is a good reason for every spaceship to carry gun on board?
What does an unprocessed RAW file look like?
What is an efficient way to digitize a family photo collection?
How bad is a Computer Science course that doesn't teach Design Patterns?
What is the draw frequency for 3 consecutive games (same players; amateur level)?
Is it legal to point a domain to someone else's ip (website)?
How can I deduce the power of a capacitor from its datasheet?
How do I narratively explain how in-game circumstances do not mechanically allow a PC to instantly kill an NPC?
How can I give a Ranger advantage on a check due to Favored Enemy without spoiling the story for the player?
Is it possible to detect 100% of SQLi with a simple regex?
How to deal with an underperforming subordinate?
Is the fingering of thirds flexible or do I have to follow the rules?
XOR-free sets: Maximum density?
Is there a way to pause a running process on Linux systems and resume later?
When using Volatility with a memory image, what is the Kernel version?
What can I do to encourage my players to use their consumables?
Why did Ylvis use "go" instead of "say" in phrases like "Dog goes 'woof'"?
How do I avoid the "chosen hero" feeling?
Case protection with emphasis in biblatex
What is the proper casing to use when storing titles in the bibliography database?German APA reference: origyear field is incomplete (needs reprinttitle)Adapting an existing biblatex style in order to imitate Springer's author-year reference list rules for authorsHow to get BibLaTeX-chicago use title case capitalization?Some fields don't show up or are missing formatting in the bibliography even though I have entries for themCiting (author, journalabbr., year) neededBiblatex-apa : Replace author name by dash in case of multiple works by same authorFormatting issue with DeclareBibliographyDriver in my Custom Biblatex Style basedWhat is the proper casing to use when storing titles in the bibliography database?In bibliographies, how to present each work by an author after the first as a subindented paragraph with hanging indentation?custom citation format based on custom tag in .bib-file
Following the question
What is the proper casing to use when storing titles in the bibliography database? I am storing titles in Title Case in the .bib file and {Protecting} proper nouns etc. I had been using biblatex-chicago
so far where I didn't run into any problems, as Chicago mandates Title Case anyways.
But now I am running into trouble with biblatex-apa
– APA prefers sentence casing – with quotation marks and emphasis. Since mkbibquote{}
and mkbibemph{}
already case-protect what's inside, enclosing them in an extra set of braces {mkbibquote{}}
un-case-protects them. But then, I'm having a number of problems.
Consider this MWE:
% !TEX TS-program = xelatexmk
documentclass{article}
usepackage{polyglossia}
setdefaultlanguage[variant=american]{english}
usepackage{csquotes}
usepackage[style=apa]{biblatex}
usepackage{filecontents}
begin{filecontents}{bib.bib}
@book{Author2000,
Title = {This is a Title with Something in {mkbibquote{Quotes that Should Be Downcased}}},
Author = {Author, Anton},
Date = {1990},
}
@book{Author2000a,
Title = {{mkbibquote{But if the Title starts in Quotes}} It Turns into All Caps},
Author = {Author, Anton},
Date = {2000},
}
@book{Author2000b,
Title = {A Discussion of the Book {mkbibemph{{My} New Book}}: It Should Keep the First Word Capitalized},
Author = {Author, Anton},
Date = {2010},
}
@book{Author2000c,
Title = {{mkbibemph{And if the Title starts with Emphasis}} It also Turns into All Caps and Doesn't Apply the Emphasis},
Author = {Author, Anton},
Date = {2001},
}
@book{Author2000d,
Title = {And If {mkbibquote{an Acronym {{{AAEE}}} is Included}}, How to Preserve it?},
Author = {Author, Anton},
Date = {2011},
}
end{filecontents}
addbibresource{bib.bib}
begin{document}
autocites{Author2000,Author2000a,Author2000b,Author2000c,Author2000d}
printbibliography % print the bibliography
end{document}
It gives this output:
There are numerous problems. If mkbibquote
or mkbibemph
are issued at the beginning of the string, then it turns the entire string into ALL CAPS. Also I have no idea how to protect specific words within a string that is already enclosed by mkbibquote
or mkbibemph
.
biblatex apa-style
add a comment |
Following the question
What is the proper casing to use when storing titles in the bibliography database? I am storing titles in Title Case in the .bib file and {Protecting} proper nouns etc. I had been using biblatex-chicago
so far where I didn't run into any problems, as Chicago mandates Title Case anyways.
But now I am running into trouble with biblatex-apa
– APA prefers sentence casing – with quotation marks and emphasis. Since mkbibquote{}
and mkbibemph{}
already case-protect what's inside, enclosing them in an extra set of braces {mkbibquote{}}
un-case-protects them. But then, I'm having a number of problems.
Consider this MWE:
% !TEX TS-program = xelatexmk
documentclass{article}
usepackage{polyglossia}
setdefaultlanguage[variant=american]{english}
usepackage{csquotes}
usepackage[style=apa]{biblatex}
usepackage{filecontents}
begin{filecontents}{bib.bib}
@book{Author2000,
Title = {This is a Title with Something in {mkbibquote{Quotes that Should Be Downcased}}},
Author = {Author, Anton},
Date = {1990},
}
@book{Author2000a,
Title = {{mkbibquote{But if the Title starts in Quotes}} It Turns into All Caps},
Author = {Author, Anton},
Date = {2000},
}
@book{Author2000b,
Title = {A Discussion of the Book {mkbibemph{{My} New Book}}: It Should Keep the First Word Capitalized},
Author = {Author, Anton},
Date = {2010},
}
@book{Author2000c,
Title = {{mkbibemph{And if the Title starts with Emphasis}} It also Turns into All Caps and Doesn't Apply the Emphasis},
Author = {Author, Anton},
Date = {2001},
}
@book{Author2000d,
Title = {And If {mkbibquote{an Acronym {{{AAEE}}} is Included}}, How to Preserve it?},
Author = {Author, Anton},
Date = {2011},
}
end{filecontents}
addbibresource{bib.bib}
begin{document}
autocites{Author2000,Author2000a,Author2000b,Author2000c,Author2000d}
printbibliography % print the bibliography
end{document}
It gives this output:
There are numerous problems. If mkbibquote
or mkbibemph
are issued at the beginning of the string, then it turns the entire string into ALL CAPS. Also I have no idea how to protect specific words within a string that is already enclosed by mkbibquote
or mkbibemph
.
biblatex apa-style
add a comment |
Following the question
What is the proper casing to use when storing titles in the bibliography database? I am storing titles in Title Case in the .bib file and {Protecting} proper nouns etc. I had been using biblatex-chicago
so far where I didn't run into any problems, as Chicago mandates Title Case anyways.
But now I am running into trouble with biblatex-apa
– APA prefers sentence casing – with quotation marks and emphasis. Since mkbibquote{}
and mkbibemph{}
already case-protect what's inside, enclosing them in an extra set of braces {mkbibquote{}}
un-case-protects them. But then, I'm having a number of problems.
Consider this MWE:
% !TEX TS-program = xelatexmk
documentclass{article}
usepackage{polyglossia}
setdefaultlanguage[variant=american]{english}
usepackage{csquotes}
usepackage[style=apa]{biblatex}
usepackage{filecontents}
begin{filecontents}{bib.bib}
@book{Author2000,
Title = {This is a Title with Something in {mkbibquote{Quotes that Should Be Downcased}}},
Author = {Author, Anton},
Date = {1990},
}
@book{Author2000a,
Title = {{mkbibquote{But if the Title starts in Quotes}} It Turns into All Caps},
Author = {Author, Anton},
Date = {2000},
}
@book{Author2000b,
Title = {A Discussion of the Book {mkbibemph{{My} New Book}}: It Should Keep the First Word Capitalized},
Author = {Author, Anton},
Date = {2010},
}
@book{Author2000c,
Title = {{mkbibemph{And if the Title starts with Emphasis}} It also Turns into All Caps and Doesn't Apply the Emphasis},
Author = {Author, Anton},
Date = {2001},
}
@book{Author2000d,
Title = {And If {mkbibquote{an Acronym {{{AAEE}}} is Included}}, How to Preserve it?},
Author = {Author, Anton},
Date = {2011},
}
end{filecontents}
addbibresource{bib.bib}
begin{document}
autocites{Author2000,Author2000a,Author2000b,Author2000c,Author2000d}
printbibliography % print the bibliography
end{document}
It gives this output:
There are numerous problems. If mkbibquote
or mkbibemph
are issued at the beginning of the string, then it turns the entire string into ALL CAPS. Also I have no idea how to protect specific words within a string that is already enclosed by mkbibquote
or mkbibemph
.
biblatex apa-style
Following the question
What is the proper casing to use when storing titles in the bibliography database? I am storing titles in Title Case in the .bib file and {Protecting} proper nouns etc. I had been using biblatex-chicago
so far where I didn't run into any problems, as Chicago mandates Title Case anyways.
But now I am running into trouble with biblatex-apa
– APA prefers sentence casing – with quotation marks and emphasis. Since mkbibquote{}
and mkbibemph{}
already case-protect what's inside, enclosing them in an extra set of braces {mkbibquote{}}
un-case-protects them. But then, I'm having a number of problems.
Consider this MWE:
% !TEX TS-program = xelatexmk
documentclass{article}
usepackage{polyglossia}
setdefaultlanguage[variant=american]{english}
usepackage{csquotes}
usepackage[style=apa]{biblatex}
usepackage{filecontents}
begin{filecontents}{bib.bib}
@book{Author2000,
Title = {This is a Title with Something in {mkbibquote{Quotes that Should Be Downcased}}},
Author = {Author, Anton},
Date = {1990},
}
@book{Author2000a,
Title = {{mkbibquote{But if the Title starts in Quotes}} It Turns into All Caps},
Author = {Author, Anton},
Date = {2000},
}
@book{Author2000b,
Title = {A Discussion of the Book {mkbibemph{{My} New Book}}: It Should Keep the First Word Capitalized},
Author = {Author, Anton},
Date = {2010},
}
@book{Author2000c,
Title = {{mkbibemph{And if the Title starts with Emphasis}} It also Turns into All Caps and Doesn't Apply the Emphasis},
Author = {Author, Anton},
Date = {2001},
}
@book{Author2000d,
Title = {And If {mkbibquote{an Acronym {{{AAEE}}} is Included}}, How to Preserve it?},
Author = {Author, Anton},
Date = {2011},
}
end{filecontents}
addbibresource{bib.bib}
begin{document}
autocites{Author2000,Author2000a,Author2000b,Author2000c,Author2000d}
printbibliography % print the bibliography
end{document}
It gives this output:
There are numerous problems. If mkbibquote
or mkbibemph
are issued at the beginning of the string, then it turns the entire string into ALL CAPS. Also I have no idea how to protect specific words within a string that is already enclosed by mkbibquote
or mkbibemph
.
biblatex apa-style
biblatex apa-style
asked 1 hour ago
janjan
9631418
9631418
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
The sentence casing function for biblatex
is implemented in LaTeX. BibTeX's sentence casing, on the other hand, is implemented in BibTeX directly. That means that there are some subtle and not so subtle differences between the two. In particular biblatex
's sentence case function will try to expand macros if possible.
The major issue here is that curly braces are overloaded with meaning: For LaTeX they serve as argument delimiters or apply grouping; for BibTeX they protect strings from case change. The different meanings clash from time to time, in those cases workaround are needed to resolve the issue.
See also the recent https://github.com/plk/biblatex/issues/871 and linked issues as well as the doc additions https://github.com/plk/biblatex/commit/863fea969a9f1d37d7f944265cb276cf18293334 and https://github.com/plk/biblatex/commit/a291e72a6c8ba2b896eb3f53ada6cc938c2cfa86.
For the use cases you show in the MWE I can offer the following workaround. The idea is to get around using braces by using delimited arguments (a sort of foo <argument>endfoo
syntax). Delimited arguments come with their own issues when they are nested, but they work well enough in the MWE.
documentclass{article}
usepackage[american]{babel}
usepackage{csquotes}
usepackage[style=apa]{biblatex}
protecteddefhorriblemkbibquote#1endhorriblemkbibquote{mkbibquote{#1}}
letendhorriblemkbibquoterelax
protecteddefhorriblemkbibemph#1endhorriblemkbibemph{mkbibemph{#1}}
letendhorriblemkbibemphrelax
usepackage{filecontents}
begin{filecontents}{jobname.bib}
@book{Author2000,
title = {This is a Title with Something in {mkbibquote{Quotes that Should Be Downcased}}},
author = {Author, Anton},
date = {1990},
}
@book{Author2000a,
title = {horriblemkbibquote {But} if the Title starts in Quotesendhorriblemkbibquote{} It Turns into All Caps},
author = {Author, Anton},
date = {2000},
}
@book{Author2000b,
title = {A Discussion of the Book horriblemkbibemph{My} New Bookendhorriblemkbibemph{}: It Should Keep the First Word Capitalized},
author = {Author, Anton},
date = {2010},
}
@book{Author2000c,
title = {horriblemkbibemph {And} if the Title starts with Emphasisendhorriblemkbibemph{} It also Turns into All Caps and Doesn't Apply the Emphasis},
author = {Author, Anton},
date = {2001},
}
@book{Author2000d,
title = {And If horriblemkbibquote an Acronym {AAEE} is Includedendhorriblemkbibquote{}, How to Preserve it?},
author = {Author, Anton},
date = {2011},
}
end{filecontents}
addbibresource{jobname.bib}
begin{document}
autocites{Author2000,Author2000a,Author2000b,Author2000c,Author2000d}
printbibliography % print the bibliography
end{document}
In the long run the desirable solution seems to me to implement a new case changing function that uses a different markup to specify the protected strings, so that curly braces don't clash with it any more.
FWIW BibTeX's case change function has similar issues. It doesn't capitalise words at the beginning of the string, so it does not suffer from the ALL-CAPS issue, but the other two protect-within-unprotect issues are also present.
+1:horriblemkbibquote
:)
– Dr. Manuel Kuehner
21 mins ago
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f476546%2fcase-protection-with-emphasis-in-biblatex%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The sentence casing function for biblatex
is implemented in LaTeX. BibTeX's sentence casing, on the other hand, is implemented in BibTeX directly. That means that there are some subtle and not so subtle differences between the two. In particular biblatex
's sentence case function will try to expand macros if possible.
The major issue here is that curly braces are overloaded with meaning: For LaTeX they serve as argument delimiters or apply grouping; for BibTeX they protect strings from case change. The different meanings clash from time to time, in those cases workaround are needed to resolve the issue.
See also the recent https://github.com/plk/biblatex/issues/871 and linked issues as well as the doc additions https://github.com/plk/biblatex/commit/863fea969a9f1d37d7f944265cb276cf18293334 and https://github.com/plk/biblatex/commit/a291e72a6c8ba2b896eb3f53ada6cc938c2cfa86.
For the use cases you show in the MWE I can offer the following workaround. The idea is to get around using braces by using delimited arguments (a sort of foo <argument>endfoo
syntax). Delimited arguments come with their own issues when they are nested, but they work well enough in the MWE.
documentclass{article}
usepackage[american]{babel}
usepackage{csquotes}
usepackage[style=apa]{biblatex}
protecteddefhorriblemkbibquote#1endhorriblemkbibquote{mkbibquote{#1}}
letendhorriblemkbibquoterelax
protecteddefhorriblemkbibemph#1endhorriblemkbibemph{mkbibemph{#1}}
letendhorriblemkbibemphrelax
usepackage{filecontents}
begin{filecontents}{jobname.bib}
@book{Author2000,
title = {This is a Title with Something in {mkbibquote{Quotes that Should Be Downcased}}},
author = {Author, Anton},
date = {1990},
}
@book{Author2000a,
title = {horriblemkbibquote {But} if the Title starts in Quotesendhorriblemkbibquote{} It Turns into All Caps},
author = {Author, Anton},
date = {2000},
}
@book{Author2000b,
title = {A Discussion of the Book horriblemkbibemph{My} New Bookendhorriblemkbibemph{}: It Should Keep the First Word Capitalized},
author = {Author, Anton},
date = {2010},
}
@book{Author2000c,
title = {horriblemkbibemph {And} if the Title starts with Emphasisendhorriblemkbibemph{} It also Turns into All Caps and Doesn't Apply the Emphasis},
author = {Author, Anton},
date = {2001},
}
@book{Author2000d,
title = {And If horriblemkbibquote an Acronym {AAEE} is Includedendhorriblemkbibquote{}, How to Preserve it?},
author = {Author, Anton},
date = {2011},
}
end{filecontents}
addbibresource{jobname.bib}
begin{document}
autocites{Author2000,Author2000a,Author2000b,Author2000c,Author2000d}
printbibliography % print the bibliography
end{document}
In the long run the desirable solution seems to me to implement a new case changing function that uses a different markup to specify the protected strings, so that curly braces don't clash with it any more.
FWIW BibTeX's case change function has similar issues. It doesn't capitalise words at the beginning of the string, so it does not suffer from the ALL-CAPS issue, but the other two protect-within-unprotect issues are also present.
+1:horriblemkbibquote
:)
– Dr. Manuel Kuehner
21 mins ago
add a comment |
The sentence casing function for biblatex
is implemented in LaTeX. BibTeX's sentence casing, on the other hand, is implemented in BibTeX directly. That means that there are some subtle and not so subtle differences between the two. In particular biblatex
's sentence case function will try to expand macros if possible.
The major issue here is that curly braces are overloaded with meaning: For LaTeX they serve as argument delimiters or apply grouping; for BibTeX they protect strings from case change. The different meanings clash from time to time, in those cases workaround are needed to resolve the issue.
See also the recent https://github.com/plk/biblatex/issues/871 and linked issues as well as the doc additions https://github.com/plk/biblatex/commit/863fea969a9f1d37d7f944265cb276cf18293334 and https://github.com/plk/biblatex/commit/a291e72a6c8ba2b896eb3f53ada6cc938c2cfa86.
For the use cases you show in the MWE I can offer the following workaround. The idea is to get around using braces by using delimited arguments (a sort of foo <argument>endfoo
syntax). Delimited arguments come with their own issues when they are nested, but they work well enough in the MWE.
documentclass{article}
usepackage[american]{babel}
usepackage{csquotes}
usepackage[style=apa]{biblatex}
protecteddefhorriblemkbibquote#1endhorriblemkbibquote{mkbibquote{#1}}
letendhorriblemkbibquoterelax
protecteddefhorriblemkbibemph#1endhorriblemkbibemph{mkbibemph{#1}}
letendhorriblemkbibemphrelax
usepackage{filecontents}
begin{filecontents}{jobname.bib}
@book{Author2000,
title = {This is a Title with Something in {mkbibquote{Quotes that Should Be Downcased}}},
author = {Author, Anton},
date = {1990},
}
@book{Author2000a,
title = {horriblemkbibquote {But} if the Title starts in Quotesendhorriblemkbibquote{} It Turns into All Caps},
author = {Author, Anton},
date = {2000},
}
@book{Author2000b,
title = {A Discussion of the Book horriblemkbibemph{My} New Bookendhorriblemkbibemph{}: It Should Keep the First Word Capitalized},
author = {Author, Anton},
date = {2010},
}
@book{Author2000c,
title = {horriblemkbibemph {And} if the Title starts with Emphasisendhorriblemkbibemph{} It also Turns into All Caps and Doesn't Apply the Emphasis},
author = {Author, Anton},
date = {2001},
}
@book{Author2000d,
title = {And If horriblemkbibquote an Acronym {AAEE} is Includedendhorriblemkbibquote{}, How to Preserve it?},
author = {Author, Anton},
date = {2011},
}
end{filecontents}
addbibresource{jobname.bib}
begin{document}
autocites{Author2000,Author2000a,Author2000b,Author2000c,Author2000d}
printbibliography % print the bibliography
end{document}
In the long run the desirable solution seems to me to implement a new case changing function that uses a different markup to specify the protected strings, so that curly braces don't clash with it any more.
FWIW BibTeX's case change function has similar issues. It doesn't capitalise words at the beginning of the string, so it does not suffer from the ALL-CAPS issue, but the other two protect-within-unprotect issues are also present.
+1:horriblemkbibquote
:)
– Dr. Manuel Kuehner
21 mins ago
add a comment |
The sentence casing function for biblatex
is implemented in LaTeX. BibTeX's sentence casing, on the other hand, is implemented in BibTeX directly. That means that there are some subtle and not so subtle differences between the two. In particular biblatex
's sentence case function will try to expand macros if possible.
The major issue here is that curly braces are overloaded with meaning: For LaTeX they serve as argument delimiters or apply grouping; for BibTeX they protect strings from case change. The different meanings clash from time to time, in those cases workaround are needed to resolve the issue.
See also the recent https://github.com/plk/biblatex/issues/871 and linked issues as well as the doc additions https://github.com/plk/biblatex/commit/863fea969a9f1d37d7f944265cb276cf18293334 and https://github.com/plk/biblatex/commit/a291e72a6c8ba2b896eb3f53ada6cc938c2cfa86.
For the use cases you show in the MWE I can offer the following workaround. The idea is to get around using braces by using delimited arguments (a sort of foo <argument>endfoo
syntax). Delimited arguments come with their own issues when they are nested, but they work well enough in the MWE.
documentclass{article}
usepackage[american]{babel}
usepackage{csquotes}
usepackage[style=apa]{biblatex}
protecteddefhorriblemkbibquote#1endhorriblemkbibquote{mkbibquote{#1}}
letendhorriblemkbibquoterelax
protecteddefhorriblemkbibemph#1endhorriblemkbibemph{mkbibemph{#1}}
letendhorriblemkbibemphrelax
usepackage{filecontents}
begin{filecontents}{jobname.bib}
@book{Author2000,
title = {This is a Title with Something in {mkbibquote{Quotes that Should Be Downcased}}},
author = {Author, Anton},
date = {1990},
}
@book{Author2000a,
title = {horriblemkbibquote {But} if the Title starts in Quotesendhorriblemkbibquote{} It Turns into All Caps},
author = {Author, Anton},
date = {2000},
}
@book{Author2000b,
title = {A Discussion of the Book horriblemkbibemph{My} New Bookendhorriblemkbibemph{}: It Should Keep the First Word Capitalized},
author = {Author, Anton},
date = {2010},
}
@book{Author2000c,
title = {horriblemkbibemph {And} if the Title starts with Emphasisendhorriblemkbibemph{} It also Turns into All Caps and Doesn't Apply the Emphasis},
author = {Author, Anton},
date = {2001},
}
@book{Author2000d,
title = {And If horriblemkbibquote an Acronym {AAEE} is Includedendhorriblemkbibquote{}, How to Preserve it?},
author = {Author, Anton},
date = {2011},
}
end{filecontents}
addbibresource{jobname.bib}
begin{document}
autocites{Author2000,Author2000a,Author2000b,Author2000c,Author2000d}
printbibliography % print the bibliography
end{document}
In the long run the desirable solution seems to me to implement a new case changing function that uses a different markup to specify the protected strings, so that curly braces don't clash with it any more.
FWIW BibTeX's case change function has similar issues. It doesn't capitalise words at the beginning of the string, so it does not suffer from the ALL-CAPS issue, but the other two protect-within-unprotect issues are also present.
The sentence casing function for biblatex
is implemented in LaTeX. BibTeX's sentence casing, on the other hand, is implemented in BibTeX directly. That means that there are some subtle and not so subtle differences between the two. In particular biblatex
's sentence case function will try to expand macros if possible.
The major issue here is that curly braces are overloaded with meaning: For LaTeX they serve as argument delimiters or apply grouping; for BibTeX they protect strings from case change. The different meanings clash from time to time, in those cases workaround are needed to resolve the issue.
See also the recent https://github.com/plk/biblatex/issues/871 and linked issues as well as the doc additions https://github.com/plk/biblatex/commit/863fea969a9f1d37d7f944265cb276cf18293334 and https://github.com/plk/biblatex/commit/a291e72a6c8ba2b896eb3f53ada6cc938c2cfa86.
For the use cases you show in the MWE I can offer the following workaround. The idea is to get around using braces by using delimited arguments (a sort of foo <argument>endfoo
syntax). Delimited arguments come with their own issues when they are nested, but they work well enough in the MWE.
documentclass{article}
usepackage[american]{babel}
usepackage{csquotes}
usepackage[style=apa]{biblatex}
protecteddefhorriblemkbibquote#1endhorriblemkbibquote{mkbibquote{#1}}
letendhorriblemkbibquoterelax
protecteddefhorriblemkbibemph#1endhorriblemkbibemph{mkbibemph{#1}}
letendhorriblemkbibemphrelax
usepackage{filecontents}
begin{filecontents}{jobname.bib}
@book{Author2000,
title = {This is a Title with Something in {mkbibquote{Quotes that Should Be Downcased}}},
author = {Author, Anton},
date = {1990},
}
@book{Author2000a,
title = {horriblemkbibquote {But} if the Title starts in Quotesendhorriblemkbibquote{} It Turns into All Caps},
author = {Author, Anton},
date = {2000},
}
@book{Author2000b,
title = {A Discussion of the Book horriblemkbibemph{My} New Bookendhorriblemkbibemph{}: It Should Keep the First Word Capitalized},
author = {Author, Anton},
date = {2010},
}
@book{Author2000c,
title = {horriblemkbibemph {And} if the Title starts with Emphasisendhorriblemkbibemph{} It also Turns into All Caps and Doesn't Apply the Emphasis},
author = {Author, Anton},
date = {2001},
}
@book{Author2000d,
title = {And If horriblemkbibquote an Acronym {AAEE} is Includedendhorriblemkbibquote{}, How to Preserve it?},
author = {Author, Anton},
date = {2011},
}
end{filecontents}
addbibresource{jobname.bib}
begin{document}
autocites{Author2000,Author2000a,Author2000b,Author2000c,Author2000d}
printbibliography % print the bibliography
end{document}
In the long run the desirable solution seems to me to implement a new case changing function that uses a different markup to specify the protected strings, so that curly braces don't clash with it any more.
FWIW BibTeX's case change function has similar issues. It doesn't capitalise words at the beginning of the string, so it does not suffer from the ALL-CAPS issue, but the other two protect-within-unprotect issues are also present.
edited 25 mins ago
answered 30 mins ago
moewemoewe
91.9k10115347
91.9k10115347
+1:horriblemkbibquote
:)
– Dr. Manuel Kuehner
21 mins ago
add a comment |
+1:horriblemkbibquote
:)
– Dr. Manuel Kuehner
21 mins ago
+1:
horriblemkbibquote
:)– Dr. Manuel Kuehner
21 mins ago
+1:
horriblemkbibquote
:)– Dr. Manuel Kuehner
21 mins ago
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f476546%2fcase-protection-with-emphasis-in-biblatex%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown