[LyX/master] Centralize code to markup deleted complex objects (with tikz) in output

Enrico Forestieri forenr at lyx.org
Sat Dec 28 16:41:55 UTC 2019


On Sat, Dec 28, 2019 at 01:27:32PM +0100, Juergen Spitzmueller wrote:

> commit 89b5607e0ac8d616cbf0a27057e8f84a5e3ba650
> Author: Juergen Spitzmueller <spitz at lyx.org>
> Date:   Sat Dec 28 13:43:17 2019 +0100
> 
>     Centralize code to markup deleted complex objects (with tikz) in output
>     
>     This fixes #9293

After this commit the output of deleted displayed math is partially broken.
Compare the output of the attached with the result obtained from lyx 2.3.

> -	// signature needed by \lyxsout to correctly strike out display math
> -	if (change.type == Change::DELETED && runparams.inDisplayMath
> -	    && !dvipost) {
> -		if (os.blankLine())
> -			str += from_ascii("\\\\\\noindent\n");
> -		else
> -			str += from_ascii("\\\\\\\\\n");
> -	}

This is most probably the culprit. The old code took into account
whether the displayed math was preceded by a blank line or not.
The new code does not.

-- 
Enrico
-------------- next part --------------
#LyX 2.3 created this file. For more info see http://www.lyx.org/
\lyxformat 544
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass IEEEtran
\begin_preamble
% for subfigures/subtables
\usepackage[caption=false,font=footnotesize]{subfig}
\end_preamble
\options journal
\use_default_options false
\maintain_unincluded_children false
\language english
\language_package none
\inputencoding auto
\fontencoding global
\font_roman "default" "default"
\font_sans "default" "default"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\use_microtype false
\use_dash_ligatures false
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command bibtex
\index_command default
\float_placement tbh
\paperfontsize default
\spacing single
\use_hyperref true
\pdf_title "Your Title"
\pdf_author "Your Name"
\pdf_bookmarks true
\pdf_bookmarksnumbered true
\pdf_bookmarksopen true
\pdf_bookmarksopenlevel 1
\pdf_breaklinks false
\pdf_pdfborder true
\pdf_colorlinks false
\pdf_backref false
\pdf_pdfusetitle false
\pdf_quoted_options "pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false"
\papersize default
\use_geometry false
\use_package amsmath 1
\use_package amssymb 1
\use_package cancel 1
\use_package esint 1
\use_package mathdots 1
\use_package mathtools 1
\use_package mhchem 1
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 0
\use_minted 0
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\is_math_indent 0
\math_numbering_side default
\quotes_style english
\dynamic_quotes 0
\papercolumns 2
\papersides 1
\paperpagestyle default
\tracking_changes true
\output_changes true
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\author 5863344 "ef"
\end_header

\begin_body

\begin_layout Standard
\begin_inset Note Note
status open

\begin_layout Plain Layout
This is a template \SpecialChar LyX
 file for articles to be submitted to journals of the
 Institute of Electrical and Electronics Engineers (IEEE).
 For IEEE conference articles, see the template file 
\emph on
IEEEtran-Conference.lyx
\emph default
.
 For general info see 
\begin_inset Flex URL
status open

\begin_layout Plain Layout

https://wiki.lyx.org/Examples/IEEE
\end_layout

\end_inset

.
\end_layout

\end_inset


\end_layout

\begin_layout Standard
\begin_inset Note Note
status open

\begin_layout Plain Layout
It is important that you use the correct document class options for your
 document..
 These are explained in the IEEEtran documentation: 
\begin_inset Flex URL
status open

\begin_layout Plain Layout

http://mirror.ctan.org/macros/latex/contrib/IEEEtran/IEEEtran_HOWTO.pdf
\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Title
Your Title
\end_layout

\begin_layout Author
Your
\begin_inset space ~
\end_inset

Name,
\begin_inset space ~
\end_inset


\begin_inset Flex IEEE membership
status open

\begin_layout Plain Layout
Member,
\begin_inset space ~
\end_inset

IEEE,
\end_layout

\end_inset

 Second
\begin_inset space ~
\end_inset

Name,
\begin_inset space ~
\end_inset


\begin_inset Flex IEEE membership
status open

\begin_layout Plain Layout
Fellow,OSA,
\end_layout

\end_inset

 and
\begin_inset space ~
\end_inset

Third
\begin_inset space ~
\end_inset

Name,
\begin_inset space ~
\end_inset


\begin_inset Flex IEEE membership
status open

\begin_layout Plain Layout
Life
\begin_inset space ~
\end_inset

Fellow,
\begin_inset space ~
\end_inset

IEEE
\end_layout

\end_inset


\begin_inset Foot
status collapsed

\begin_layout Plain Layout
Your
\begin_inset space ~
\end_inset

Name is with the Department of ..., ...
 Institute of ..., City, Country, e-mail: 
\begin_inset CommandInset href
LatexCommand href
target "xxx at xxx.xxx"
literal "false"

\end_inset

.
\end_layout

\end_inset


\begin_inset Foot
status collapsed

\begin_layout Plain Layout
Second
\begin_inset space ~
\end_inset

Name is with the Department of ..., ...
 Institute of ..., City, Country, e-mail: 
\begin_inset CommandInset href
LatexCommand href
target "xxx at xxx.xxx"
literal "false"

\end_inset

.
\end_layout

\end_inset


\begin_inset Foot
status collapsed

\begin_layout Plain Layout
Third
\begin_inset space ~
\end_inset

Name is with the Department of ..., ...
 Institute of ..., City, Country, e-mail: 
\begin_inset CommandInset href
LatexCommand href
target "xxx at xxx.xxx"
literal "false"

\end_inset

.
\end_layout

\end_inset


\end_layout

\begin_layout Special Paper Notice
Invited Paper
\begin_inset Note Note
status open

\begin_layout Plain Layout
of course optional
\end_layout

\end_inset


\end_layout

\begin_layout After Title Text
after title text like dedication
\begin_inset Note Note
status open

\begin_layout Plain Layout
optional
\end_layout

\end_inset


\end_layout

\begin_layout Page headings
\begin_inset Argument 1
status open

\begin_layout Plain Layout
Journal of XXX
\end_layout

\end_inset

Your Name 
\begin_inset Flex Lowercase
status open

\begin_layout Plain Layout

\emph on
et al.
\end_layout

\end_inset

: Your Title
\end_layout

\begin_layout Publication ID
0000?0000/00$00.00
\begin_inset space ~
\end_inset


\begin_inset ERT
status collapsed

\begin_layout Plain Layout


\backslash
copyright
\end_layout

\end_inset


\begin_inset space ~
\end_inset

2012 IEEE
\begin_inset Note Note
status open

\begin_layout Plain Layout
only if you have one
\end_layout

\end_inset


\end_layout

\begin_layout Abstract
This is the abstract text.
\end_layout

\begin_layout Keywords
simplicity, beauty, elegance
\end_layout

\begin_layout Peer Review Title
\begin_inset Note Note
status open

\begin_layout Plain Layout
Don't add text here!
\end_layout

\end_inset


\begin_inset Note Note
status open

\begin_layout Plain Layout
required if you use the document class option 
\family sans
peerreview
\family default
, must otherwise not be used
\end_layout

\end_inset


\end_layout

\begin_layout Section
Introduction
\end_layout

\begin_layout Standard
\begin_inset Flex Paragraph Start
status open

\begin_layout Plain Layout
\begin_inset Argument 1
status open

\begin_layout Plain Layout
H
\end_layout

\end_inset

ere
\end_layout

\end_inset


\begin_inset Note Note
status collapsed

\begin_layout Plain Layout
The 
\series bold

\backslash
IEEEPARstart
\series default
 command is needed in the first paragraph of the document.
\end_layout

\end_inset

 is the text text text text text text text text text text text text text
 text text text.
\end_layout

\begin_layout Section
Previous Work
\end_layout

\begin_layout Standard
text text text text text text text text text text text text text text text
\end_layout

\begin_layout Subsection
subsection
\end_layout

\begin_layout Subsection
another subsection
\end_layout

\begin_layout Section
Methodology
\end_layout

\begin_layout Theorem
\begin_inset Argument 1
status open

\begin_layout Plain Layout
Theorem name
\end_layout

\end_inset

For a named theorem or theorem-like environment you need to insert
\change_deleted 5863344 1577550789

\begin_inset Formula 
\begin{equation}
y=f(x)
\end{equation}

\end_inset


\change_unchanged
the name through 
\family sans
Insert\SpecialChar menuseparator
Short Title
\family default
, as done here.
\end_layout

\begin_layout Lemma
If you don't want a theorem or lemma name don't add one.
\end_layout

\begin_layout Proof
And here's the proof!
\end_layout

\begin_layout Section
Results
\end_layout

\begin_layout Standard
\begin_inset Float figure
placement htbp
wide false
sideways false
status open

\begin_layout Plain Layout
\align center

\family sans
A single column figure goes here
\end_layout

\begin_layout Plain Layout
\begin_inset Caption Standard

\begin_layout Plain Layout
Captions go 
\emph on
under
\emph default
 the figure
\end_layout

\end_inset


\end_layout

\end_inset


\begin_inset Float table
placement htbp
wide false
sideways false
status open

\begin_layout Plain Layout
\begin_inset Caption Standard

\begin_layout Plain Layout
Table captions go 
\emph on
above
\emph default
 the table
\end_layout

\end_inset


\end_layout

\begin_layout Plain Layout
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="2" columns="2">
<features tabularvalignment="middle">
<column alignment="center" valignment="top" width="0pt">
<column alignment="center" valignment="top" width="0pt">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
delete
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
this
\end_layout

\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
example
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Plain Layout
table
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Section
Conclusions
\end_layout

\begin_layout Standard
bla bla
\end_layout

\begin_layout Appendices
\begin_inset Note Note
status open

\begin_layout Plain Layout
Don't add text here!
\end_layout

\end_inset


\end_layout

\begin_layout Section
First appendix
\end_layout

\begin_layout Standard
Citation: 
\begin_inset CommandInset citation
LatexCommand citet
key "IEEEexample:beebe_archive"
literal "true"

\end_inset


\end_layout

\begin_layout Section
Second appendix
\end_layout

\begin_layout Section*
Acknowlegment
\end_layout

\begin_layout Standard
bla bla
\end_layout

\begin_layout Standard
\begin_inset Note Note
status open

\begin_layout Plain Layout
Remember though that your final submission is supposed to have all the bibliogra
phy entries embedded in the \SpecialChar LaTeX
-file.
 This means you eventually have to copy the .bbl file into the latex file
 and remove the bibtex lines.
\end_layout

\end_inset


\begin_inset CommandInset bibtex
LatexCommand bibtex
bibfiles "IEEEabrv,IEEEexample"
options "IEEEtran"

\end_inset


\end_layout

\begin_layout Biography
\begin_inset Argument 1
status open

\begin_layout Plain Layout
\begin_inset Box Boxed
position "t"
hor_pos "c"
has_inner_box 1
inner_pos "t"
use_parbox 0
use_makebox 0
width "1in"
special "none"
height "1.25in"
height_special "none"
thickness "0.4pt"
separation "3pt"
shadowsize "4pt"
framecolor "black"
backgroundcolor "none"
status open

\begin_layout Plain Layout
Replace this box by an image with a width of 1
\begin_inset space \thinspace{}
\end_inset

in and a height of 1.25
\begin_inset space \thinspace{}
\end_inset

in!
\end_layout

\end_inset


\end_layout

\end_inset


\begin_inset Argument 2
status open

\begin_layout Plain Layout
Your Name
\end_layout

\end_inset

 All about you and the what your interests are.
\end_layout

\begin_layout Standard
\begin_inset Separator plain
\end_inset


\end_layout

\begin_layout Biography without photo
\begin_inset Argument 1
status open

\begin_layout Plain Layout
Coauthor
\end_layout

\end_inset

Same again for the co-author, but without photo
\end_layout

\end_body
\end_document


More information about the lyx-devel mailing list