ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Is it possible to \cite with UPPERCASED author?
@ 2012-02-10 10:59 Wagner Macedo
  2012-02-10 11:23 ` Thomas A. Schmitz
  0 siblings, 1 reply; 7+ messages in thread
From: Wagner Macedo @ 2012-02-10 10:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 180 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Is it possible to \cite with UPPERCASED author?
  2012-02-10 10:59 Is it possible to \cite with UPPERCASED author? Wagner Macedo
@ 2012-02-10 11:23 ` Thomas A. Schmitz
  2012-02-10 11:58   ` Wagner Macedo
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas A. Schmitz @ 2012-02-10 11:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Is it possible to \cite with UPPERCASED author?
  2012-02-10 11:23 ` Thomas A. Schmitz
@ 2012-02-10 11:58   ` Wagner Macedo
  2012-02-10 12:40     ` Thomas A. Schmitz
  0 siblings, 1 reply; 7+ messages in thread
From: Wagner Macedo @ 2012-02-10 11:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 943 bytes --]

On 10 February 2012 08:23, Thomas A. Schmitz <thomas.schmitz@uni-bonn.de>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.


> (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)

[-- Attachment #1.2: Type: text/html, Size: 1516 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Is it possible to \cite with UPPERCASED author?
  2012-02-10 11:58   ` Wagner Macedo
@ 2012-02-10 12:40     ` Thomas A. Schmitz
  2012-02-10 14:10       ` Wagner Macedo
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas A. Schmitz @ 2012-02-10 12:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Is it possible to \cite with UPPERCASED author?
  2012-02-10 12:40     ` Thomas A. Schmitz
@ 2012-02-10 14:10       ` Wagner Macedo
  2012-02-10 15:33         ` Thomas A. Schmitz
  0 siblings, 1 reply; 7+ messages in thread
From: Wagner Macedo @ 2012-02-10 14:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 500 bytes --]

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 <thomas.schmitz@uni-bonn.de>wrote:

> You're trying to set up your own style, so you need to customize, but
> there is no code for customization in your example.

[-- Attachment #1.2: Type: text/html, Size: 794 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Is it possible to \cite with UPPERCASED author?
  2012-02-10 14:10       ` Wagner Macedo
@ 2012-02-10 15:33         ` Thomas A. Schmitz
  2012-02-10 19:27           ` Wagner Macedo
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas A. Schmitz @ 2012-02-10 15:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Is it possible to \cite with UPPERCASED author?
  2012-02-10 15:33         ` Thomas A. Schmitz
@ 2012-02-10 19:27           ` Wagner Macedo
  0 siblings, 0 replies; 7+ messages in thread
From: Wagner Macedo @ 2012-02-10 19:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1596 bytes --]

On 10 February 2012 12:33, Thomas A. Schmitz <thomas.schmitz@uni-bonn.de>wrote:

> 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.

[-- Attachment #1.2: Type: text/html, Size: 2247 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-02-10 19:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-10 10:59 Is it possible to \cite with UPPERCASED author? Wagner Macedo
2012-02-10 11:23 ` Thomas A. Schmitz
2012-02-10 11:58   ` Wagner Macedo
2012-02-10 12:40     ` Thomas A. Schmitz
2012-02-10 14:10       ` Wagner Macedo
2012-02-10 15:33         ` Thomas A. Schmitz
2012-02-10 19:27           ` Wagner Macedo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).