Opened 16 years ago

Closed 15 years ago

Last modified 9 years ago

#5091 closed defect (fixed)

show changes in PDF fails for deleted straight quotes in some encodings other than T1

Reported by: Uwe Stöhr Owned by: lasgouttes
Priority: high Milestone: 1.6.2
Component: changes Version: 1.5.6
Severity: normal Keywords:
Cc: j.spitzmueller@…, michael.gerz@…

Description

  • open the attached LyX file
  • try to export it as PDF

Result: You only get this LaTeX error:

! Argument of \T1\" has an extra }.

dvi or print} the \LyX{} document.

This only occurs when you use the option "Show changes in output".

The reason is the following: LyX creates this code:

\lyxdeleted{usti}{Sun Jul 27 15:13:54 2008}{\char`\"{}view
dvi or print} the \LyX{} document.

But for some reason the code must look this:

\lyxdeleted{usti}{Sun Jul 27 15:13:54 2008}{{}view
dvi or print} the \LyX{} document.

So neither the command
\char
nor
\"
are allowed in \lyxdeleted.

I don't know if we could fix this.

Attachments (2)

5091.diff (1.2 KB ) - added by Juergen Spitzmueller 16 years ago.
patch
man_tex2lyx.lyx (40.1 KB ) - added by Uwe Stöhr 16 years ago.
LyX testcase

Download all attachments as: .zip

Change History (19)

comment:1 by Uwe Stöhr, 16 years ago

Cc: michael.gerz@… added
Severity: normalmajor

not compilable document -> major

Michael, do you have an idea?

comment:2 by Uwe Stöhr, 16 years ago

Milestone: 1.6.x
Severity: majornormal

comment:3 by michael.gerz@…, 16 years ago

Hi Uwe,

I have worked on change tracking about a year ago... since then, a lot of things
have changed (probably)

\lyxdeleted is a macro. What happens if you expand it by hand? (i.e. export the
TeX file, resolve the macro and compile the TeX sources). Maybe the problem is
not \lyxdeleted but the commands used within \lyxdeleted...

I am not a LaTeX guru but maybe \protected is missing somewhere...

comment:4 by Juergen Spitzmueller, 16 years ago

Cc: j.spitzmueller@… added

could you upload the text document?

comment:5 by Juergen Spitzmueller, 16 years ago

Summary: show changes in output makes document in certain cases uncompilableshow changes in PDF output fails for deleted straight quotes

OK, I see. The problem is that soul.sty breaks with \char.

by Juergen Spitzmueller, 16 years ago

Attachment: 5091.diff added

patch

by Uwe Stöhr, 16 years ago

Attachment: man_tex2lyx.lyx added

LyX testcase

comment:6 by Uwe Stöhr, 16 years ago

Subject: Re: show changes in PDF output fails for deleted straight

quotes

Please test.

Works fine with the testcase I just attached.

Remaining problem: the document still won't compile with OT1 fontenc, because
OT1 doesn't know \textquotedbl (I guess this is why we use \char`")

I have no idea for a workaround here.

comment:7 by Uwe Stöhr, 16 years ago

Keywords: patch added
Milestone: 1.6.x1.5.7

comment:8 by lasgouttes, 16 years ago

The horrible \char notation is of course a consequence of the `feature' of
babel/german that uses this as shortcut. I think I used \string at some time in
the past, but it got replaced with the \char construct because latex2html
did not know how to handle it.

Now that I look at it I see in ot1enc.def:
\DeclareTextSymbol{\textquotedblright}{OT1}{`\"}

Are you sure it does not work?

comment:9 by Juergen Spitzmueller, 16 years ago

Now that I look at it I see in ot1enc.def:
\DeclareTextSymbol{\textquotedblright}{OT1}{`\"}
Are you sure it does not work?

Yes. Probably the reason is that \textquotedblright != \textquotedbl ;-)

comment:10 by lasgouttes, 16 years ago

Yes. Probably the reason is that \textquotedblright != \textquotedbl ;-)

Maybe :)

Then I would propose to put your patch in, but test the encoding instead
of testing whether change tracking is on. Also, what happens in tt font?
Can we use a plain ", or is babel stil plaing tricks on us?

comment:11 by Juergen Spitzmueller, 16 years ago

Then I would propose to put your patch in, but test the encoding instead
of testing whether change tracking is on.

OK.

Also, what happens in tt font?
Can we use a plain ", or is babel stil playing tricks on us?

still playing tricks.

comment:12 by Juergen Spitzmueller, 16 years ago

Keywords: patch removed
Milestone: 1.5.7
Summary: show changes in PDF output fails for deleted straight quotesshow changes in PDF fails for deleted straight quotes in encodings other than T1

fixed for the T1 encoding in 1.6 and 1.5.7:
http://www.lyx.org/trac/changeset/26212
http://www.lyx.org/trac/changeset/26213

Other encodings (OT1, TS1 etc.) still have the problem. Note, however, that at
least OT1 does not output a proper "-glyph anyway.

comment:13 by Juergen Spitzmueller, 15 years ago

Another remaining problem:

Paragraph::Private::latexSpecialT1 is called after checking (lyxrc.fontenc ==
"T1"), but some languages such as hebrew reset the font encoding internally
(e.g. to LHE), which is not noticed by LyX.

We probably need to add an additional language check.

comment:15 by Juergen Spitzmueller, 15 years ago

Keywords: fixedinbranch fixedintrunk added
Milestone: 1.6.2

comment:16 by Juergen Spitzmueller, 15 years ago

Keywords: fixedinbranch fixedintrunk removed
Resolution: fixed
Status: newclosed

LyX 1.6.2 is released (announcement follows as soon as the binaries are built).

comment:17 by Guenter Milde, 9 years ago

Summary: show changes in PDF fails for deleted straight quotes in encodings other than T1show changes in PDF fails for deleted straight quotes in some encodings other than T1

The "InternalEncoding" flag, that triggers the use of the "terrible" »\char`"« hack is
not required for a number of other font encodings that are compatible to T1 (other standard tex encodings, L7x, QX). See ticket #9652.

Note: See TracTickets for help on using tickets.