Bug 811719

Summary: Omitted backslash in code for floatingfootnote, after export to latex, and re-import
Product: [Fedora] Fedora Reporter: Amazed <fedora>
Component: lyxAssignee: Rex Dieter <rdieter>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 16CC: jamatos, rdieter
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-19 08:51:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
.lyx file with backslash
none
.tex file with backslah none

Description Amazed 2012-04-11 19:41:15 UTC
Description of problem: The code for floatingfootnote omits a backslash before the first occurrence of "endcsname", resulting in multiple error messages (and presumably sometimes bad output).

Version-Release number of selected component (if applicable): lyx-2.0.3-1.fc16.i686

How reproducible:
Apparently always.

Steps to Reproduce:
1. Create document with footnote.
2. Export output to latext (plain).
  
Actual results:

Preamble has a section that (note first occurrence of "endcsname") reads

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
%% Special footnote code from the package 'stblftnt.sty'
%% Author: Robin Fairbairns -- Last revised Dec 13 1996
\let\SF@@footnote\footnote
\def\footnote{\ifx\protect\@typeset@protect

    \expandafter\SF@@footnote

    \else

        \expandafter\SF@gobble@opt

    \fi

}
\expandafter\def\csname SF@gobble@opt endcsname{\@ifnextchar[%]

    \SF@gobble@twobracket
    \@gobble

}
\edef\SF@gobble@opt{\noexpand\protect

    \expandafter\noexpand\csname SF@gobble@opt \endcsname}

\def\SF@gobble@twobracket#1#2{}


Expected results:

Section should read

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
%% Special footnote code from the package 'stblftnt.sty'
%% Author: Robin Fairbairns -- Last revised Dec 13 1996
\let\SF@@footnote\footnote
\def\footnote{\ifx\protect\@typeset@protect

    \expandafter\SF@@footnote

    \else

        \expandafter\SF@gobble@opt

    \fi

}
\expandafter\def\csname SF@gobble@opt \endcsname{\@ifnextchar[%]

    \SF@gobble@twobracket
    \@gobble

}
\edef\SF@gobble@opt{\noexpand\protect

    \expandafter\noexpand\csname SF@gobble@opt \endcsname}

\def\SF@gobble@twobracket#1#2{}


Additional info: See bug report at <URL:http://www.lyx.org/trac/ticket/8116>

Source code is apparently LaTeXFeatures.cpp.

Comment 1 Amazed 2012-05-11 17:11:13 UTC
I'm afraid that I misidentified the etiology.

The bug appears when the code is exported to a .tex file and then reimported.  I attach a file to be imported.  See <URL:http://www.lyx.org/trac/ticket/8116>.

Comment 2 Amazed 2012-05-11 17:19:22 UTC
Created attachment 583885 [details]
.lyx file with backslash

Export this file to LaTeX, then re-import it, and note that a backslash has vanished.

Comment 3 Amazed 2012-05-11 17:20:46 UTC
Created attachment 583886 [details]
.tex file with backslah

If you want to go straight to the importation, here is a .tex file with a backslash, which will be lost in the reimportation.

Comment 4 Amazed 2012-05-23 05:26:06 UTC
The LyX developers have patched this bug in the latest version.

Comment 5 Rex Dieter 2012-05-23 15:45:26 UTC
Patch here:
http://www.lyx.org/trac/changeset/30219ffc37300933/lyxgit

not sure if it's worth backporting to our packaging, or just waiting for 2.0.4 to get released.

If I (or other maintainer) finds some spare time, we can backport.

Comment 6 Amazed 2012-06-30 19:10:48 UTC
FWIW, milestone 2.0.4 was reached on 28 June. <URL:http://www.lyx.org/trac/milestone/2.0.4>

Official source code may be found here: <URL:ftp://ftp.lyx.org/pub/lyx/stable/2.0.x/>

(The LyX main page does not yet reflect the up-date.)

Comment 7 José Matos 2012-06-30 19:52:40 UTC
(In reply to comment #6)
> FWIW, milestone 2.0.4 was reached on 28 June.
> <URL:http://www.lyx.org/trac/milestone/2.0.4>
> 
> Official source code may be found here:
> <URL:ftp://ftp.lyx.org/pub/lyx/stable/2.0.x/>
> 
> (The LyX main page does not yet reflect the up-date.)

Richard (a Fedora user) is waiting for a validation from other developers and users before announcing this release to the world.  The purpose is to avoid those cases like 1.2.2 where under some circumstances the installer removed /dev/null from the system... (oops). :-)

Comment 8 Fedora Update System 2012-07-06 12:47:58 UTC
lyx-2.0.4-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/lyx-2.0.4-1.fc17

Comment 9 Fedora Update System 2012-07-06 12:48:50 UTC
lyx-2.0.4-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/lyx-2.0.4-1.fc16

Comment 10 Fedora Update System 2012-07-06 21:26:47 UTC
Package lyx-2.0.4-1.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing lyx-2.0.4-1.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-10333/lyx-2.0.4-1.fc17
then log in and leave karma (feedback).

Comment 11 Fedora Update System 2012-07-19 08:51:21 UTC
lyx-2.0.4-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2012-07-19 09:09:50 UTC
lyx-2.0.4-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.