On 02/08/11 13:36, Christiaan Hofman wrote:
>
> On Aug 2, 2011, at 13:13, Miguel Ortiz Lombardía wrote:
>
>> On 01/08/11 17:29, Miguel Ortiz Lombardía wrote:
>>> On 30/07/11 19:09, Christiaan Hofman wrote:
>>>>
>>>> On Jul 30, 2011, at 18:06, Miguel Ortiz Lombardía wrote:
>>>>
>>>>> On 30/07/11 16:59, Jonas Zimmermann wrote:
>>>>>> Without having thought through it, maybe there's something you could do
>>>>>> with global macro files (Preferences->Fields)?
>>>>>>
>>>>>> Jonas
>>>>>>
>>>>>> On 30 Jul 2011, at 21:18, Miguel Ortiz Lombardía wrote:
>>>>>>> I would like to know whether it is currently possible to make an rtf
>>>>>>> template where journal names in citations are shown abbreviated AND
>>>>>>> punctuated in a way similar to what can be done with authors initials.
>>>>>>> Example:
>>>>>>>
>>>>>>> J Biol Chem -> J. Biol. Chem.
>>>>>>>
>>>>>>> I understand the difficulty of deciding when a word in the journal name
>>>>>>> is complete (and needs not a dot) or not, but I would prefer too many
>>>>>>> rather than too litle periods :-) A better solution would be a way to
>>>>>>> provide a table with equivalences such as in the example before the
>>>>>>> template is invoked. But I have no idea how to do that (if possible).
>>>>>>>
>>>>>>> Any ideas would be appreciated.
>>>>>>
>>>>>
>>>>> Thank you!
>>>>> Your answer looks promising, but after a first look to the manual I
>>>>> can't see how I could apply those macros to a template rtf file
>>>>> (ultimately, this is to be used in conjunction with Colin Smith's
>>>>> BibFuse). My guess is that I can't...
>>>>>
>>>>> Best regards,
>>>>>
>>>>> --
>>>>> Miguel
>>>>
>>>> It is not possible to relate a set of macro definitions to a particular
>>>> template. However, as Jonas indicates, you can change the macros by
>>>> changing the global macro file. So you could have two (or more) macro
>>>> files somewhere with different definitions for the journal macros. And
>>>> then you can use either one or the other of these files in the prefs. As
>>>> long as one file is selected, the expansion would be according to that
>>>> file, and as long as another is selected, that one will determine the
>>>> expansions.
>>>>
>>>> Of course this assumes that you use macros in the Journal field.
>>>> Alternatively you can also change the macros for the .bib file using the
>>>> macros window (Database > Macros).
>>>>
>>>> You can easily change the macros by dropping a file containing macro
>>>> definitions on the macros window. But in that case these changes will also
>>>> affect the saved data.
>>>>
>>>> Christiaan
>>>>
>>>>
>>>
>>> Hi Christiaan,
>>>
>>> Thank you for your advice. It's clear I have to read more in the manual
>>> about the use of macros, then I will try to apply what you and Jonas
>>> were suggesting.
>>>
>>> Best regards,
>>>
>>>
>>
>> Hi again,
>>
>> I have now understood (or so I believe) how macros work. The problem is
>> that they're not very useful given my workflow: I add 99% of the entries
>> to my bib file from PubMed, which brings short (but unpunctuated) and
>> long journal names (in different fields, of course). The problem is:
>> macros do not appear to allow spaces in the macro variable so,
>>
>> @String{jfoo = "J.~Foo"}
>>
>> is correct, but
>>
>> @String{"J Foo" = "J.~Foo"}
>>
>> which would correspond better to what I get when importing refs from
>> PubMed, seems forbidden.
>
>
> I don't think you do understand macros yet. A macro is a different value from
> a string. You can't simply promote a string value to a macro. For raw values
> jfoo is a macro, and "jfoo" (or equivalently {jfoo}) is a string, those are
> different things (note the quotes). You cannot simply say that "jfoo" is a
> macro, it's not, it's a string. So talking about spaces is completely
> irrelevant.
>
> If pubmed gives you strings, you have strings, you will never have macros.
> You have to *replace* the string values by macros.
>
Thank you for the clarification!
>>
>> Perhaps a script-hook applied to imported refs could help? I will
>> explore that. If I get something useful I will post it here.
>>
>
> Yes, that could work.
>
I have written a "proof of concept" script that works for me. It is far
from being elegant since it involves two lists (the keys in Applescript
records have to follow the requirement of variable names, precluding
also the use of spaces) that must be populated and, importantly, must
have the equivalent values in the same list index. In case anyone is
interested and have improvement ideas I have posted it here:
http://www.ysbl.york.ac.uk/~mol/translatejnames.zip
Any ideas are welcome.
--
Miguel
Architecture et Fonction des Macromolécules Biologiques (UMR6098)
CNRS, Universités d'Aix-Marseille I & II
Case 932, 163 Avenue de Luminy, 13288 Marseille cedex 9, France
Tel: +33(0) 491 82 55 93
Fax: +33(0) 491 26 67 20
mailto:[email protected]
http://www.afmb.univ-mrs.fr/Miguel-Ortiz-Lombardia
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts.
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Bibdesk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users