On Tue, May 05, 2009 at 05:39:01PM +0200, Pavel Sanda wrote:
> Enrico Forestieri wrote:
> > You just broke a number of old documents of mine, but I guess that is
> > unavoidable. The problem is that ulem is incompatible with the cite
> > package and misterious errors occur when you underline a citation.
> 
> should be this reported to the ulem (or cite) package maintainers?

I think that this is a ulem limitation that is even mentioned in the
docs (at least I remember reading it in some docs, but "texdoc ulem"
is returning nothing to me).

> also do we encounter this in our normal documents with citations?

I think so, because I just checked and you don't really need using
the cite package for having problems with underlined citations.
Specifically, \uline{\cite{you}} works, but \uline{\cite{you,me}}
doesn't work.

> if it cause too much problem, we can revert it back...

This is causing major grief to me, as old documents don't work
anymore with 2.0, and, after you make them work again, they
won't work when you export to an old format.

I am attaching here two documents, namely "test-16x.lyx" and
"test-20x.lyx". The first one works with 1.6 and the second one
with 2.0. However, "test-16x.lyx" doesn't work when using 2.0,
and when you export "test-20x.lyx" to 1.6.x format, it won't
work in 1.6.

I think that ulem is better for underlining but switching to it
needs some clever thought... maybe reverting is the easiest thing
to do...

-- 
Enrico
#LyX 1.6.2 created this file. For more info see http://www.lyx.org/
\lyxformat 345
\begin_document
\begin_header
\textclass article
\begin_preamble
\usepackage{cite}
\renewcommand{\citedash}{\citeright\hbox{--}\penal...@m\citeleft}
\renewcommand{\citepunct}{\citeright,\penal...@m\hskip.13emplus.1emminus.1em\citeleft}

\usepackage[normalem]{ulem}
\setlength{\ULdepth}{0.3\baselineskip}
%\renewcommand{\ULthickness}{0pt}
\newsavebox{\cbox}
\let\oldcite\cite
\def\newcite#1{\sbox\cbox{\oldcite{#1}}\box\cbox}
\def\underbar#1{\let\cite\newcite\uline{#1}\let\cite\oldcite}
\let\underline\underbar
\end_preamble
\use_default_options true
\language english
\inputencoding auto
\font_roman default
\font_sans default
\font_typewriter default
\font_default_family default
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100

\graphics 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
\paperorientation portrait
\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
\begin_inset CommandInset bibtex
LatexCommand bibtex
bibfiles "IEEEexample"
options "IEEEtran"

\end_inset


\end_layout

\end_body
\end_document
#LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
\lyxformat 356
\begin_document
\begin_header
\textclass article
\begin_preamble
\usepackage{cite}
\renewcommand{\citedash}{\citeright\hbox{--}\penal...@m\citeleft}
\renewcommand{\citepunct}{\citeright,\penal...@m\hskip.13emplus.1emminus.1em\citeleft}

\setlength{\ULdepth}{0.3\baselineskip}
%\renewcommand{\ULthickness}{0pt}
\let\olduline\uline
\newsavebox{\cbox}
\let\oldcite\cite
\def\newcite#1{\sbox\cbox{\oldcite{#1}}\box\cbox}
\def\uline#1{\let\cite\newcite\olduline{#1}\let\cite\oldcite}
\end_preamble
\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
\begin_inset CommandInset bibtex
LatexCommand bibtex
bibfiles "IEEEexample"
options "IEEEtran"

\end_inset


\end_layout

\end_body
\end_document

Reply via email to