Is it possible to \cite with UPPERCASED author?
Is it possible to \cite with author in UPPERCASE without touch in my bib file? I couldn't find a tip about this, I already read Bib mod manual. I'm using MkIV. -- Wagner Macedo
On 02/10/12 11:59, Wagner Macedo wrote:
Is it possible to \cite with author in UPPERCASE without touch in my bib file?
I couldn't find a tip about this, I already read Bib mod manual.
I'm using MkIV.
Short answer: yes, that's possible. Longer answer: bib mod manual, section 2.3, \setupcite. You can hook something like \bgroup\WORD and \egroup into the left= and right= keys. (Untested and no real explanation since you didn't provide an example.) Thomas
On 10 February 2012 08:23, Thomas A. Schmitz
Longer answer: bib mod manual, section 2.3, \setupcite. You can hook something like \bgroup\WORD and \egroup into the left= and right= keys.
It didn't solve, because when I have an "author et al", results in "AUTHOR ET AL", that is not the expected.
(Untested and no real explanation since you didn't provide an example.)
Sorry, I really didn't think it was necessary. But with sample code in http://wiki.contextgarden.net/Bibliography_mkiv I can explain. % ------ % ------ % ------ % ------ % ------ % \setupbibtex[database={sample},sort=author] \setuppublications[alternative=apa] \starttext \cite[author][hh2010a] and \cite[authoryear][hh2010a] and \cite[authoryears][hh2010a] \stoptext % ------ % ------ % ------ % ------ % ------ % I expected that is typeset HAGEN and HAGEN (2010a) and (HAGEN, 2010a)
On 02/10/2012 12:58 PM, Wagner Macedo wrote:
Longer answer: bib mod manual, section 2.3, \setupcite. You can hook something like \bgroup\WORD and \egroup into the left= and right= keys.
It didn't solve, because when I have an "author et al", results in "AUTHOR ET AL", that is not the expected.
You're very welcome! Yes, I can see that "et al." would be capitalized as well.
Sorry, I really didn't think it was necessary. But with sample code in http://wiki.contextgarden.net/Bibliography_mkiv I can explain.
% ------ % ------ % ------ % ------ % ------ % \setupbibtex[database={sample},sort=author] \setuppublications[alternative=apa]
\starttext \cite[author][hh2010a] and \cite[authoryear][hh2010a] and \cite[authoryears][hh2010a] \stoptext % ------ % ------ % ------ % ------ % ------ %
I expected that is typeset HAGEN and HAGEN (2010a) and (HAGEN, 2010a)
I'm not sure I understand. Why did you expect that? This is not APA style, AFAIK. You're trying to set up your own style, so you need to customize, but there is no code for customization in your example. There's also "andtext" and "otherstext." Have you tried if you can use those? Thomas
Ah, yes. I'm setuping my own style. As I'm not so good with TeX (if this
could be in Lua, will be perfect), I'm using apa, that is the closest to my
style.
So, all right, I'll try to customize my style, that is the only good
solution to this. Thanks by attention, Thomas.
--
Wagner Macedo
On 10 February 2012 09:40, Thomas A. Schmitz
You're trying to set up your own style, so you need to customize, but there is no code for customization in your example.
On 02/10/2012 03:10 PM, Wagner Macedo wrote:
Ah, yes. I'm setuping my own style. As I'm not so good with TeX (if this could be in Lua, will be perfect), I'm using apa, that is the closest to my style.
So, all right, I'll try to customize my style, that is the only good solution to this. Thanks by attention, Thomas.
OK, I had a second look. What you want may not be that easy to accomplish with simple setup commands (at least, I didn't manage to make it work). So I see two possibilities, one clean and difficult, the other easier, but somewhat hackish: 1. Edit a local copy of cont-au.bst and insert a function that will make the author name uppercase. bst is infamous for its incomprehensible syntax, but it appears to be possible. this would be the proper way. google is your friend here. 2. ConTeXt produces a .bbl file from which it retrieves the bibliographical information. The authorname used in the \cite command is captured in a key=value of the form a={{Hagen}}, Write a simple lua script which will make the captured name uppercase and write everything out to a new file. Then, in your preamble, replace the \setupbibtex[database=...] line with \usepublications[<name>.bbl] So this is something you would do at the very end of the editing process, when you're sure that all the references are in the bbl file. It may also be possible to hook a lua function into the process when ConTeXt typesets the value from the bbl, but that's beyond my knowledge, Hans is the only one who knows the internals of the mkiv bib mechanism well enough to say if/how this may work. HTH Thomas
On 10 February 2012 12:33, Thomas A. Schmitz
1. Edit a local copy of cont-au.bst and insert a function that will make the author name uppercase. bst is infamous for its incomprehensible syntax, but it appears to be possible. this would be the proper way. google is your friend here.
Yes, very incomprehensible. And another thing, I couldn't find any "authoryear" word inside bst files. I think it usefulness is only for publications list.
2. ConTeXt produces a .bbl file from which it retrieves the bibliographical information. The authorname used in the \cite command is captured in a key=value of the form a={{Hagen}}, Write a simple lua script which will make the captured name uppercase and write everything out to a new file. Then, in your preamble, replace the \setupbibtex[database=...] line with \usepublications[<name>.bbl] So this is something you would do at the very end of the editing process, when you're sure that all the references are in the bbl file.
Thank you. It's the best solution to my problem. But I'll do a Python or Bash script to do this, as I'm more used to those languages, and I'll add as a target on my Makefile.
It may also be possible to hook a lua function into the process when ConTeXt typesets the value from the bbl, but that's beyond my knowledge, Hans is the only one who knows the internals of the mkiv bib mechanism well enough to say if/how this may work.
I found something into bibl-bib.lua, and I tried to change but didn't result in anything. So, it's a black box.
participants (2)
-
Thomas A. Schmitz
-
Wagner Macedo