On Thu, Oct 16, 2008 at 01:39:08PM -0400, rgheck wrote: > José Matos wrote: > > Hi, > > the file attached shows a problem when converting an index from 1.5 to > > 1.6. > > > > The problem is that the original index is: "\~\/ Operator" the problem > > is > > that the conversion to latex transforms the \~ as an accent into unicode > > character 0303 the tilde accent. Clearly this wrong in this context but I > > do > > not have a better suggestion other than to pass the whole string as ERT if > > the > > name has a slash (\). > > > > Any comments here? > > > > > Hmm. I've run into problems like this before. But this solution would > basically undo everything we've tried to do, involving conversions > between LaTeX and LyX-text in the indexes. If there's no better > solution, then of course we have to go your way. How does LaTeX know > what to do here? Is \~ the accent only if it is followed by a letter? If > so, we can check for that in latex2lyx. The "hardone" check was in > response to this kind of problem with other commands.
Note that \~ is always an accent. In order to get a ~ character, you should use \~{}, and indeed \textasciitilde is defined exactly so. Here José is using the italic correction \/ in place of {}, so the accent would be placed on this tiny space. I added an index list to the file from José (see attached) and the output is practically the same in 1.5 and 1.6. In 1.6 you get a complaint from the index sorting algorithm, which probably cannot face this case, but otherwise it works. So, it seems that there is a problem with the sorting algorithm and also a visualization problem in LyX, but otherwise it works. However, there's surely a problem in how the index is dealt with, as if you use \~{} in place of \~\/ the conversion fails badly. -- Enrico
#LyX 1.5.6 created this file. For more info see http://www.lyx.org/ \lyxformat 276 \begin_document \begin_header \textclass article \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 \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 a \begin_inset LatexCommand index name "\\~\\/ Operator" \end_inset \begin_inset LatexCommand printindex \end_inset \end_layout \end_body \end_document