Show different bibtex field when writing in different languages
up vote
0
down vote
favorite
I write in English as well as Chinese. When I cite Chinese work in English paper, I want to include both the English transcription/translation and original Chinese characters. But when I cite Chinese work in Chinese paper, I don't need to include the transcription. Is there a possible and convenient way to switch from these two circumstances, provided I make only one bibtex record for each reference, instead of two (Chinese version .bib and English version)?
I use Biblatex + TeXlive2018 + Win10
Example
When I write in English, I want output be like this:
When I write in Chinese, I want the same two references be like this:
(Biblatex-Chicago
style is used)
That is to say:
English reference in English/Chinese writing --> remains English
Chinese reference in English writing --> shows both English and Chinese fields
Chinese reference in Chinese writing --> shows Chinese fields only
biblatex bibtex chinese
add a comment |
up vote
0
down vote
favorite
I write in English as well as Chinese. When I cite Chinese work in English paper, I want to include both the English transcription/translation and original Chinese characters. But when I cite Chinese work in Chinese paper, I don't need to include the transcription. Is there a possible and convenient way to switch from these two circumstances, provided I make only one bibtex record for each reference, instead of two (Chinese version .bib and English version)?
I use Biblatex + TeXlive2018 + Win10
Example
When I write in English, I want output be like this:
When I write in Chinese, I want the same two references be like this:
(Biblatex-Chicago
style is used)
That is to say:
English reference in English/Chinese writing --> remains English
Chinese reference in English writing --> shows both English and Chinese fields
Chinese reference in Chinese writing --> shows Chinese fields only
biblatex bibtex chinese
At the moment that is not really possible without serious manual modifications to the style. A few years ago, there was an idea to implement amultiscript
version ofbiblatex
that would make these things easier (github.com/plk/biblatex/tree/ms, github.com/plk/biblatex/issues/416), but unfortunately development for that feature has stalled in recent years.
– moewe
Dec 3 at 21:39
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I write in English as well as Chinese. When I cite Chinese work in English paper, I want to include both the English transcription/translation and original Chinese characters. But when I cite Chinese work in Chinese paper, I don't need to include the transcription. Is there a possible and convenient way to switch from these two circumstances, provided I make only one bibtex record for each reference, instead of two (Chinese version .bib and English version)?
I use Biblatex + TeXlive2018 + Win10
Example
When I write in English, I want output be like this:
When I write in Chinese, I want the same two references be like this:
(Biblatex-Chicago
style is used)
That is to say:
English reference in English/Chinese writing --> remains English
Chinese reference in English writing --> shows both English and Chinese fields
Chinese reference in Chinese writing --> shows Chinese fields only
biblatex bibtex chinese
I write in English as well as Chinese. When I cite Chinese work in English paper, I want to include both the English transcription/translation and original Chinese characters. But when I cite Chinese work in Chinese paper, I don't need to include the transcription. Is there a possible and convenient way to switch from these two circumstances, provided I make only one bibtex record for each reference, instead of two (Chinese version .bib and English version)?
I use Biblatex + TeXlive2018 + Win10
Example
When I write in English, I want output be like this:
When I write in Chinese, I want the same two references be like this:
(Biblatex-Chicago
style is used)
That is to say:
English reference in English/Chinese writing --> remains English
Chinese reference in English writing --> shows both English and Chinese fields
Chinese reference in Chinese writing --> shows Chinese fields only
biblatex bibtex chinese
biblatex bibtex chinese
asked Dec 3 at 21:30
Lucius Zhao
183
183
At the moment that is not really possible without serious manual modifications to the style. A few years ago, there was an idea to implement amultiscript
version ofbiblatex
that would make these things easier (github.com/plk/biblatex/tree/ms, github.com/plk/biblatex/issues/416), but unfortunately development for that feature has stalled in recent years.
– moewe
Dec 3 at 21:39
add a comment |
At the moment that is not really possible without serious manual modifications to the style. A few years ago, there was an idea to implement amultiscript
version ofbiblatex
that would make these things easier (github.com/plk/biblatex/tree/ms, github.com/plk/biblatex/issues/416), but unfortunately development for that feature has stalled in recent years.
– moewe
Dec 3 at 21:39
At the moment that is not really possible without serious manual modifications to the style. A few years ago, there was an idea to implement a
multiscript
version of biblatex
that would make these things easier (github.com/plk/biblatex/tree/ms, github.com/plk/biblatex/issues/416), but unfortunately development for that feature has stalled in recent years.– moewe
Dec 3 at 21:39
At the moment that is not really possible without serious manual modifications to the style. A few years ago, there was an idea to implement a
multiscript
version of biblatex
that would make these things easier (github.com/plk/biblatex/tree/ms, github.com/plk/biblatex/issues/416), but unfortunately development for that feature has stalled in recent years.– moewe
Dec 3 at 21:39
add a comment |
1 Answer
1
active
oldest
votes
up vote
3
down vote
This is a proof of concept of a limited alternative which, I'm sure, it won't take long before someone finds an unfixable flaw. But I submit it as an idea. As it stands, it only works for literal fields (I'm using title
here as example) and I'm not sure if this could be extended for names and lists. It will very likely generate some problems with biblatex
's formatting directives. It is also a fragile setting, as we need to place some macros directly in the bibentry field of interest.
documentclass{article}
usepackage{filecontents}
begin{filecontents}{jobname.bib}
@book{book1,
author = {Author},
title = {caseenglish{Title}casebrazilian{Título}},
date = {2000},
location = {Location},
publisher = {Publisher},
addendum = {An entry in Brazilian Portuguese, for which we want both titles
when the language is English and Portuguese title when the langage is
brazilian},
}
@book{book2,
author = {Author},
title = {English title},
date = {2004},
location = {Location},
publisher = {Publisher},
addendum = {An entry in English, which should always be in English},
}
end{filecontents}
usepackage{iflang}
usepackage[brazilian,english]{babel}
usepackage{csquotes}
usepackage[style=authoryear]{biblatex}
addbibresource{jobname.bib}
newcommand*{caseenglish}[1]{#1}
newcommand*{casebrazilian}[1]{#1}
AtBeginBibliography{%
IfLanguageName{english}{%
renewcommand*{casebrazilian}[1]{ #1}%
}{}%
IfLanguageName{brazilian}{%
renewcommand*{caseenglish}[1]{}%
}{}%
}
begin{document}
nocite{*}
printbibliography
selectlanguage{brazilian}
printbibliography
end{document}
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
This is a proof of concept of a limited alternative which, I'm sure, it won't take long before someone finds an unfixable flaw. But I submit it as an idea. As it stands, it only works for literal fields (I'm using title
here as example) and I'm not sure if this could be extended for names and lists. It will very likely generate some problems with biblatex
's formatting directives. It is also a fragile setting, as we need to place some macros directly in the bibentry field of interest.
documentclass{article}
usepackage{filecontents}
begin{filecontents}{jobname.bib}
@book{book1,
author = {Author},
title = {caseenglish{Title}casebrazilian{Título}},
date = {2000},
location = {Location},
publisher = {Publisher},
addendum = {An entry in Brazilian Portuguese, for which we want both titles
when the language is English and Portuguese title when the langage is
brazilian},
}
@book{book2,
author = {Author},
title = {English title},
date = {2004},
location = {Location},
publisher = {Publisher},
addendum = {An entry in English, which should always be in English},
}
end{filecontents}
usepackage{iflang}
usepackage[brazilian,english]{babel}
usepackage{csquotes}
usepackage[style=authoryear]{biblatex}
addbibresource{jobname.bib}
newcommand*{caseenglish}[1]{#1}
newcommand*{casebrazilian}[1]{#1}
AtBeginBibliography{%
IfLanguageName{english}{%
renewcommand*{casebrazilian}[1]{ #1}%
}{}%
IfLanguageName{brazilian}{%
renewcommand*{caseenglish}[1]{}%
}{}%
}
begin{document}
nocite{*}
printbibliography
selectlanguage{brazilian}
printbibliography
end{document}
add a comment |
up vote
3
down vote
This is a proof of concept of a limited alternative which, I'm sure, it won't take long before someone finds an unfixable flaw. But I submit it as an idea. As it stands, it only works for literal fields (I'm using title
here as example) and I'm not sure if this could be extended for names and lists. It will very likely generate some problems with biblatex
's formatting directives. It is also a fragile setting, as we need to place some macros directly in the bibentry field of interest.
documentclass{article}
usepackage{filecontents}
begin{filecontents}{jobname.bib}
@book{book1,
author = {Author},
title = {caseenglish{Title}casebrazilian{Título}},
date = {2000},
location = {Location},
publisher = {Publisher},
addendum = {An entry in Brazilian Portuguese, for which we want both titles
when the language is English and Portuguese title when the langage is
brazilian},
}
@book{book2,
author = {Author},
title = {English title},
date = {2004},
location = {Location},
publisher = {Publisher},
addendum = {An entry in English, which should always be in English},
}
end{filecontents}
usepackage{iflang}
usepackage[brazilian,english]{babel}
usepackage{csquotes}
usepackage[style=authoryear]{biblatex}
addbibresource{jobname.bib}
newcommand*{caseenglish}[1]{#1}
newcommand*{casebrazilian}[1]{#1}
AtBeginBibliography{%
IfLanguageName{english}{%
renewcommand*{casebrazilian}[1]{ #1}%
}{}%
IfLanguageName{brazilian}{%
renewcommand*{caseenglish}[1]{}%
}{}%
}
begin{document}
nocite{*}
printbibliography
selectlanguage{brazilian}
printbibliography
end{document}
add a comment |
up vote
3
down vote
up vote
3
down vote
This is a proof of concept of a limited alternative which, I'm sure, it won't take long before someone finds an unfixable flaw. But I submit it as an idea. As it stands, it only works for literal fields (I'm using title
here as example) and I'm not sure if this could be extended for names and lists. It will very likely generate some problems with biblatex
's formatting directives. It is also a fragile setting, as we need to place some macros directly in the bibentry field of interest.
documentclass{article}
usepackage{filecontents}
begin{filecontents}{jobname.bib}
@book{book1,
author = {Author},
title = {caseenglish{Title}casebrazilian{Título}},
date = {2000},
location = {Location},
publisher = {Publisher},
addendum = {An entry in Brazilian Portuguese, for which we want both titles
when the language is English and Portuguese title when the langage is
brazilian},
}
@book{book2,
author = {Author},
title = {English title},
date = {2004},
location = {Location},
publisher = {Publisher},
addendum = {An entry in English, which should always be in English},
}
end{filecontents}
usepackage{iflang}
usepackage[brazilian,english]{babel}
usepackage{csquotes}
usepackage[style=authoryear]{biblatex}
addbibresource{jobname.bib}
newcommand*{caseenglish}[1]{#1}
newcommand*{casebrazilian}[1]{#1}
AtBeginBibliography{%
IfLanguageName{english}{%
renewcommand*{casebrazilian}[1]{ #1}%
}{}%
IfLanguageName{brazilian}{%
renewcommand*{caseenglish}[1]{}%
}{}%
}
begin{document}
nocite{*}
printbibliography
selectlanguage{brazilian}
printbibliography
end{document}
This is a proof of concept of a limited alternative which, I'm sure, it won't take long before someone finds an unfixable flaw. But I submit it as an idea. As it stands, it only works for literal fields (I'm using title
here as example) and I'm not sure if this could be extended for names and lists. It will very likely generate some problems with biblatex
's formatting directives. It is also a fragile setting, as we need to place some macros directly in the bibentry field of interest.
documentclass{article}
usepackage{filecontents}
begin{filecontents}{jobname.bib}
@book{book1,
author = {Author},
title = {caseenglish{Title}casebrazilian{Título}},
date = {2000},
location = {Location},
publisher = {Publisher},
addendum = {An entry in Brazilian Portuguese, for which we want both titles
when the language is English and Portuguese title when the langage is
brazilian},
}
@book{book2,
author = {Author},
title = {English title},
date = {2004},
location = {Location},
publisher = {Publisher},
addendum = {An entry in English, which should always be in English},
}
end{filecontents}
usepackage{iflang}
usepackage[brazilian,english]{babel}
usepackage{csquotes}
usepackage[style=authoryear]{biblatex}
addbibresource{jobname.bib}
newcommand*{caseenglish}[1]{#1}
newcommand*{casebrazilian}[1]{#1}
AtBeginBibliography{%
IfLanguageName{english}{%
renewcommand*{casebrazilian}[1]{ #1}%
}{}%
IfLanguageName{brazilian}{%
renewcommand*{caseenglish}[1]{}%
}{}%
}
begin{document}
nocite{*}
printbibliography
selectlanguage{brazilian}
printbibliography
end{document}
answered Dec 3 at 23:53
gusbrs
6,4942838
6,4942838
add a comment |
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f463050%2fshow-different-bibtex-field-when-writing-in-different-languages%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
At the moment that is not really possible without serious manual modifications to the style. A few years ago, there was an idea to implement a
multiscript
version ofbiblatex
that would make these things easier (github.com/plk/biblatex/tree/ms, github.com/plk/biblatex/issues/416), but unfortunately development for that feature has stalled in recent years.– moewe
Dec 3 at 21:39