Hello,
суббота, 22 сентября 2012 г., 4:28:01 UTC+9 пользователь Dan Luecking написал:
> On Fri, 21 Sep 2012 08:34:19 -0700 (PDT), "lomov.vl"
>
[omitted]
>
>>> Remove \url:
>
>>>
>
>>>
>
>>>
>
>>> \
email{lomo...@gmail.com}
>
>>>
>
>>>
>
>>>
>
>>> Ciao
>
>>>
>
>>> Enrico
>
> >
>
>>Thank you Enrico, I didn't suspect the `url' macro but without it the
>
>>`email' will be typeset in roman, and this is another, my problem.
>
>
>
> Here's a work-around. I redefined \email. This is the same
>
> as revtex's definition, but the address (#2) is wrapped
>
> in \nolinkurl. One wonders why revtex doen't include this
>
> already.
>
>
>
> \documentclass[preprint]{revtex4-1}
>
> \makeatletter
>
> \renewcommand*\email[1][]{\begingroup\sanitize@url\@email{#1}}%
>
> \def\@email#1#2{%
>
> \endgroup
>
> % typeset email address with \nolinkurl:
>
> \@AF@join{#1\href{mailto:#2}{\nolinkurl{#2}}}%
>
> }%
>
> \makeatother
>
Sorry, but this doesn't work for me, I found that "error" and message can give also `\texttt'.
I prepared several test files, may be they can help to find workaround.
ex1-*: simple documents with `\url' macro in `\email';
-1 without `hyperref' package;
-2 package `hyperref' added to document preamble;
-3 code suggested by Dan (Luecking) added into preamble before `hyperref' package inclusion;
-4 the same as `-3' but the order is changed, now `hyperref' included before the code.
ex2-* the same as `ex1-*' set but uses `\texttt' macro instead of `\url'.
ex3-*: uses revtex4-1 feature, that macros and part of preamble can be placed to `rty' file accompany the document, `\url' macro is used;
-1 `hyperref' package is included in rty file;
-2 the code is included into preamble;
-3 the same as `-3' above but code in rty file;
-4 the same as `-4' above.
ex4-*: as `ex3-*' but uses `\texttt' macro instead of `\url'.
Results:
TD \ TS | 1 | 2 | 3 | 4 |
--------+---+---+---+---+
ex1 | + | - | - | - |
ex2 | + | - | - | - |
ex3 | - | - | - | - |
ex4 | - | - | - | - |
--------+---+---+---+---+
From log files:
`\url':
! TeX capacity exceeded, sorry [input stack size=5000].
\@makeother #1->\catcode `#1
12\relax
l.18 \maketitle
`\texttt':
! TeX capacity exceeded, sorry [input stack size=5000].
\Hy@href {->\hyper@normalise
\href@ {
l.18 \maketitle
I put tests here:
https://github.com/vp1981/revtex4-1-hyperref
---
WBR, Vladimir Lomov