Hi,
your "trivial patch" seems to work.
Each "optional text" is changed into an "opt-ERT" by tex2lyx (in original
it should replace the "LabelString" on the screen), but it works in
generated LaTeX as expected.
This is possible a stupid question but, how can I add such an "opt-ERT"
into an existing LyX file? (I couldn't find any place in menu where I
could "Insert an OptArg".)
Please find attached a modified patch for revtex4.layout, in which I
added also the \altaffiliation (tested with LyX 1.4.3).
On this occasion, I would like to report one bug - if I put any comment
line in my revtex4-tex-file (a line looking like "% some comment", for
example) AFTER the \title but BEFORE \begin{abstract}, I get three errors
from LyX, when it tries to create the ps file:
Class revtex4 Error: \begin{abstract} must be used before \maketitle.
Class revtex4 Error: \pacs must be used before \maketitle.
Class revtex4 Error: \keywords must be used before \maketitle.
If I put the comment line AFTER \pacs but BEFORE \keywords, I get only the
last error. If I put the comment line AFTER \keywords, I get no errors.
(In any case, tex2lyx does not report any problems, also LyX is able to
display the created file in it's own window without problems - the comment
line is visible as an ERT, of course.)
> in. I do not know what bibinfo does, but I doubt that we support it.
This might possibly be a problem, then.
--------------------- from the apscomp.tex
Authors are strongly encouraged to use BibTeX when preparing their
bibliographies. The new style files add additional markup via the
\bibinfo macro. At this time it is not a requirement to use these
BibTeX styles, but it may become one in the future.
--------------------- from the differ.tex
In addition, these BibTeX styles automatically apply a special macro
\bibinfo to each element of the bibliography to make it easier to extract
information for use in the editorial and production processes. Authors are
strongly urged to use BibTeX to manage their bibliographies so that the
\bibinfo directives will be automatically included.
--------------------- from the summary.tex
\bibinfo[<tag>]{<text>} A pure markup macro that adds tagging
information to the components of a reference. Revtex4 BibTeX style
files automatically add them appropriately. Doesn't affect the typesetting.
--------------------- from the auguide.tex
The BibTeX-produced \bibitem's created using the \file{apsrev} and
\file{apsrmp} appear considerably more complex than the example given
above. This is because the style files add in \bibinfo, \bibnamefont,
\eprint, and \url macros for specifying additional formatting and tagging.
The \bibinfo macro is mostly a do-nothing macro that serves merely to
tag the information with the field information from the original entry in
the BibTeX database.
--------------------- from the apssamp.tex
Running BibTeX (typically "bibtex apssamp") after the first pass of LaTeX
produces the file apssamp.bbl which contains the automatically formatted
\bibitem commands (including extra markup information via \bibinfo
commands).
(Note: I'm not an advanced user of revtex4/LaTeX, I still use the
old-fashioned "thebibiliography" environment.)
Best regards,
Jacek.
P.S. I think I've sent you a modified version of european.kmap some days
ago. Have you got it? Jacek.--- revtex4.layout.orig Mon Dec 4 11:26:12 2006
+++ revtex4.layout Mon Dec 18 16:32:19 2006
@@ -150,6 +150,15 @@
End
+Style AltAffiliation
+ CopyStyle Affiliation
+ PassThru 1
+ LatexName altaffiliation
+ OptionalArgs 1
+ LabelString "AltAffiliation"
+End
+
+
# Address is exactly the same as Affiliation. We just put this in so
# that tex2lyX will know what to do with it.
Style Address
@@ -170,6 +179,7 @@
CopyStyle Affiliation
PassThru 1
LatexName email
+ OptionalArgs 1
LabelString "Electronic Address:"
TextFont
Family Typewriter
@@ -184,6 +194,7 @@
CopyStyle Author_Email
PassThru 1
LatexName homepage
+ OptionalArgs 1
LabelString "URL:"
End