Re: Estrazione elementi Bibtex in una macro

#59897
Up
0
Down
::


Aggiungere, prima di \makeatother, la seguente definizione:
`\makeatletter
\newcommand{\usebibdataurl}[2][|]{%
\toks@=\expandafter\expandafter\expandafter{\usebibdata{#2}{url}}%
\toks@=\expandafter\expandafter\expandafter{\the\toks@}%
\toks@=\expandafter\expandafter\expandafter{\the\toks@}%
\scantokens\expandafter{\expandafter\url\expandafter#1\the\toks@#1\endinput}}
\makeatother
`
Così \usebibdataurl{eco2005nome} stamperà l’URL in modo corretto (e non c’è bisogno di scrivere \_). Nel caso il carattere | sia usato nell’URL, si può scrivere
`\usebibdataurl[!]{eco2005nome}`
Il carattere dato come argomento opzionale è quello per delimitare l’URL come nella sintassi
`\url!!`
che assomiglia a quella di \verb.

Ciao
Enrico

Go to top