On Tue, May 05, 2009 at 10:30:05PM +0200, Enrico Forestieri wrote:
> On Tue, May 05, 2009 at 09:50:04PM +0200, Pavel Sanda wrote:
> > Enrico Forestieri wrote:
> > > I think that ulem is better for underlining but switching to it
> > > needs some clever thought... maybe reverting is the easiest thing
> > > to do...
> > 
> > no preference here. i will revert it for the time being; whosoever want to 
> > make
> > it work even with citations, feel free to take the patch over. i dont want 
> > to
> > spent my time on this.
> 
> Please, wait a bit. I am thinking about a solution.
> 
> > still - i can produce patch for new ulem's underline, while letting the
> > old underbar style exists, if there is some request.
> 
> Note that the same problem exists for \uuline and \uwave.

I think I (almost) solved the problem with citations. I was not able
to cope with the optional argument of \cite, though, because ulem
does weird things with its argument. In case the optional argument
of \cite is used, the \cite command must be enclosed in braces for
underlining to work. See the attached example.

However, this is far better than before and maybe we could already
output \cite commands enclosed in braces. Ugliness apart, I don't
see any adverse effect in doing so. Any opinion?

-- 
Enrico
#LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
\lyxformat 356
\begin_document
\begin_header
\textclass article
\use_default_options true
\language english
\inputencoding auto
\font_roman default
\font_sans default
\font_typewriter default
\font_default_family default
\use_xetex false
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100

\graphics default
\default_output_format default
\paperfontsize default
\spacing single
\use_hyperref false
\papersize default
\use_geometry false
\use_amsmath 1
\use_esint 1
\cite_engine basic
\use_bibtopic false
\use_indices false
\paperorientation portrait
\backgroundcolor #ffffff
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\author "" 
\author "" 
\end_header

\begin_body

\begin_layout Standard
In order to visually show what changed from previous version, underlining
 is required by some journals when submitting a revised version of a paper.
 
\bar under
Some citations 
\begin_inset CommandInset citation
LatexCommand cite
key 
"IEEEexample:article_typical,IEEEexample:articledualmonths,IEEEexample:articleetal,IEEEexample:articlelargepages"

\end_inset

 were added here.

\bar default
 
\end_layout

\begin_layout Standard
The ulem package does something weird with its argument, such that if the
 optional argument of 
\backslash
cite is used, the 
\backslash
cite command needs to be enclosed in braces when underlining citations,
 
\bar under
as done here 
\begin_inset ERT
status collapsed

\begin_layout Plain Layout

{
\end_layout

\end_inset


\begin_inset CommandInset citation
LatexCommand cite
after "pp. 12--18"
key 
"IEEEexample:article_typical,IEEEexample:articledualmonths,IEEEexample:articleetal,IEEEexample:articlelargepages"

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Plain Layout

}
\end_layout

\end_inset

.
\end_layout

\begin_layout Standard
\begin_inset CommandInset bibtex
LatexCommand bibtex
bibfiles "IEEEexample"
options "IEEEtran"

\end_inset


\end_layout

\end_body
\end_document

Reply via email to