Re: [LyX/master] Strike out (in the output) deleted display math with track-changes

2016-10-17 Thread Scott Kostyshak
On Tue, Oct 18, 2016 at 04:41:17AM +0200, Enrico Forestieri wrote:

> I think I fixed this glitch at 129459a7. Your example with a huge
> size also revealed that a spurious space was being introduced by
> \lyxmathsout. Also fixed at 6ae61988.
> 
> Thanks for testing.

Tested the new fixes and everything looks good.

Thanks,

Scott


signature.asc
Description: PGP signature


Re: [LyX/master] Strike out (in the output) deleted display math with track-changes

2016-10-17 Thread Enrico Forestieri
On Mon, Oct 17, 2016 at 02:57:02PM -0400, Scott Kostyshak wrote:
> 
> One more detail I noticed is that the size of the equation is not
> accurate when showing the changes in output. Again, I don't think this
> is that important since the information that the equation was deleted is
> the only critical thing, but I report it nonetheless. To see this,
> compile the attached example file with "show changes in output". The
> equations should be the same size.

I think I fixed this glitch at 129459a7. Your example with a huge
size also revealed that a spurious space was being introduced by
\lyxmathsout. Also fixed at 6ae61988.

Thanks for testing.

-- 
Enrico


Re: [LyX/master] Strike out (in the output) deleted display math with track-changes

2016-10-17 Thread Kornel Benko
Am Montag, 17. Oktober 2016 um 15:31:04, schrieb Scott Kostyshak 

> On Mon, Oct 17, 2016 at 09:20:55PM +0200, Kornel Benko wrote:
> > Am Montag, 17. Oktober 2016 um 14:57:02, schrieb Scott Kostyshak 
> > 
> 
> > > One more detail I noticed is that the size of the equation is not
> > > accurate when showing the changes in output. Again, I don't think this
> > > is that important since the information that the equation was deleted is
> > > the only critical thing, but I report it nonetheless. To see this,
> > > compile the attached example file with "show changes in output". The
> > > equations should be the same size.
> > 
> > For me, they look same size.
> 
> Sorry for not being clear. I meant when "show changes in output" is
> checked and the PDF is viewed. When you view the PDF are the two
> equations the same size? Attached is what I get.
> 
> Scott

Now I understand. Same here.

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: [LyX/master] Strike out (in the output) deleted display math with track-changes

2016-10-17 Thread Scott Kostyshak
On Mon, Oct 17, 2016 at 09:20:55PM +0200, Kornel Benko wrote:
> Am Montag, 17. Oktober 2016 um 14:57:02, schrieb Scott Kostyshak 
> 

> > One more detail I noticed is that the size of the equation is not
> > accurate when showing the changes in output. Again, I don't think this
> > is that important since the information that the equation was deleted is
> > the only critical thing, but I report it nonetheless. To see this,
> > compile the attached example file with "show changes in output". The
> > equations should be the same size.
> 
> For me, they look same size.

Sorry for not being clear. I meant when "show changes in output" is
checked and the PDF is viewed. When you view the PDF are the two
equations the same size? Attached is what I get.

Scott


size_of_equations.pdf
Description: Adobe PDF document


signature.asc
Description: PGP signature


Re: [LyX/master] Strike out (in the output) deleted display math with track-changes

2016-10-17 Thread Kornel Benko
Am Montag, 17. Oktober 2016 um 14:57:02, schrieb Scott Kostyshak 

> On Mon, Oct 17, 2016 at 08:10:04PM +0200, Enrico Forestieri wrote:
> > On Sun, Oct 16, 2016 at 11:27:02PM -0400, Scott Kostyshak wrote:
> 
> > > I tested it out and have a couple of questions. Attached is a file. If I
> > > compile I get an error ("there's no line to end here"). If I put the
> > > cursor at the end of "hello" and press (forward) delete to remove the
> > > newline (nothing changes on the screen) and then compile, there is no
> > > error.
> > 
> > Fixed at c1bfaa5c.
> 
> Tested and confirmed.
> 
> > > A second question is: Is the diagonal line supposed to be so large?
> > > Screenshot attached.
> > 
> > Yes, unfortunately. There is no way (that I know of) for determing the
> > width occupied by displayed math,
> 
> Neither can I. The only thing I can think of is to preview the display
> equation but that seems like a bad hack for something like this.
> 
> > However, one can redefine \lyxmathsout
> > and customize the width of the line case by case. See the attached first
> > example. Maybe that hook should be provided by default?
> 
> Could be. I think leaving it how you had it is fine though. This is only
> about aesthetics. The important thing is that thanks to your fix, the
> information that the display equation was deleted can now be accurately
> conveyed it the output.
> 
> > I also explored other different ways for striking out displayed math.
> > I like very much method 1 in the second attached example. However, it is
> > more complicated to automate in LyX. Maybe I could do that when I find
> > the necessary time and introduce some preference for choosing the way
> > display math is striked out. But don't hold your breath while waiting ;-)
> 
> OK.
> 
> One more detail I noticed is that the size of the equation is not
> accurate when showing the changes in output. Again, I don't think this
> is that important since the information that the equation was deleted is
> the only critical thing, but I report it nonetheless. To see this,
> compile the attached example file with "show changes in output". The
> equations should be the same size.

For me, they look same size.
 
> Scott

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: [LyX/master] Strike out (in the output) deleted display math with track-changes

2016-10-17 Thread Scott Kostyshak
On Mon, Oct 17, 2016 at 08:10:04PM +0200, Enrico Forestieri wrote:
> On Sun, Oct 16, 2016 at 11:27:02PM -0400, Scott Kostyshak wrote:

> > I tested it out and have a couple of questions. Attached is a file. If I
> > compile I get an error ("there's no line to end here"). If I put the
> > cursor at the end of "hello" and press (forward) delete to remove the
> > newline (nothing changes on the screen) and then compile, there is no
> > error.
> 
> Fixed at c1bfaa5c.

Tested and confirmed.

> > A second question is: Is the diagonal line supposed to be so large?
> > Screenshot attached.
> 
> Yes, unfortunately. There is no way (that I know of) for determing the
> width occupied by displayed math,

Neither can I. The only thing I can think of is to preview the display
equation but that seems like a bad hack for something like this.

> However, one can redefine \lyxmathsout
> and customize the width of the line case by case. See the attached first
> example. Maybe that hook should be provided by default?

Could be. I think leaving it how you had it is fine though. This is only
about aesthetics. The important thing is that thanks to your fix, the
information that the display equation was deleted can now be accurately
conveyed it the output.

> I also explored other different ways for striking out displayed math.
> I like very much method 1 in the second attached example. However, it is
> more complicated to automate in LyX. Maybe I could do that when I find
> the necessary time and introduce some preference for choosing the way
> display math is striked out. But don't hold your breath while waiting ;-)

OK.

One more detail I noticed is that the size of the equation is not
accurate when showing the changes in output. Again, I don't think this
is that important since the information that the equation was deleted is
the only critical thing, but I report it nonetheless. To see this,
compile the attached example file with "show changes in output". The
equations should be the same size.

Scott
#LyX 2.3 created this file. For more info see http://www.lyx.org/
\lyxformat 513
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass article
\use_default_options true
\maintain_unincluded_children false
\language english
\language_package default
\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
\graphics default
\default_output_format default
\output_sync 1
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref 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 1
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes true
\output_changes true
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\author 274215730 "scott"
\end_header

\begin_body

\begin_layout Standard
Both of these are the same size:
\size giant

\begin_inset Formula 
\[
x+y
\]

\end_inset


\end_layout

\begin_layout Standard
and
\end_layout

\begin_layout Standard

\change_deleted 274215730 1476730413

\size giant
\begin_inset Formula 
\[
x+y
\]

\end_inset


\change_unchanged

\end_layout

\end_body
\end_document


signature.asc
Description: PGP signature


Re: [LyX/master] Strike out (in the output) deleted display math with track-changes

2016-10-17 Thread Enrico Forestieri
On Sun, Oct 16, 2016 at 11:27:02PM -0400, Scott Kostyshak wrote:

> On Mon, Oct 17, 2016 at 04:00:25AM +0200, Enrico Forestieri wrote:
> > commit 261e7ae9ce7e6a1ffc4932ff9c33107588a9a4ac
> > Author: Enrico Forestieri 
> > Date:   Mon Oct 17 03:25:35 2016 +0200
> > 
> > Strike out (in the output) deleted display math with track-changes
> 
> Nice!
> 
> Did this commit fix #9678?

Yes, it does. I was missing that bug.

> I tested it out and have a couple of questions. Attached is a file. If I
> compile I get an error ("there's no line to end here"). If I put the
> cursor at the end of "hello" and press (forward) delete to remove the
> newline (nothing changes on the screen) and then compile, there is no
> error.

Fixed at c1bfaa5c.

> A second question is: Is the diagonal line supposed to be so large?
> Screenshot attached.

Yes, unfortunately. There is no way (that I know of) for determing the
width occupied by displayed math, However, one can redefine \lyxmathsout
and customize the width of the line case by case. See the attached first
example. Maybe that hook should be provided by default?

I also explored other different ways for striking out displayed math.
I like very much method 1 in the second attached example. However, it is
more complicated to automate in LyX. Maybe I could do that when I find
the necessary time and introduce some preference for choosing the way
display math is striked out. But don't hold your breath while waiting ;-)

-- 
Enrico
#LyX 2.3 created this file. For more info see http://www.lyx.org/
\lyxformat 513
\begin_document
\begin_header
\save_transient_properties true
\origin /c/work/
\textclass article
\begin_preamble
\newcommand{\stoff}{2em}
\renewcommand{\lyxmathsout}[1]{
  \tikz[baseline=(math.base)]{
\node[inner sep=0pt,outer sep=0pt](math){#1};
\draw($(math.south west)+(\stoff,.5em)$)--($(math.north 
east)-(\stoff,.5em)$);
  }
}
\end_preamble
\use_default_options true
\maintain_unincluded_children false
\language english
\language_package default
\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
\graphics default
\default_output_format default
\output_sync 1
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref 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 1
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes true
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\author 5863344 "ef"
\author 274215730 "scott"
\end_header

\begin_body

\begin_layout Standard
hello
\end_layout

\begin_layout Standard

\change_deleted 274215730 1476673996
\begin_inset Formula 
\[
x+y
\]

\end_inset


\change_unchanged
testing now
\begin_inset ERT
status open

\begin_layout Plain Layout


\backslash
renewcommand
\backslash
stoff{16em}
\end_layout

\end_inset


\change_deleted 5863344 1476722748

\begin_inset Formula 
\[
x+y
\]

\end_inset


\change_unchanged

\end_layout

\end_body
\end_document
#LyX 2.2 created this file. For more info see http://www.lyx.org/
\lyxformat 508
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass article
\begin_preamble
\usepackage{ifpdf}
\ifpdf\else\usepackage[normalem]{ulem}\fi

%% For not showing deletions and underlining insertions, activate
%% "Show Changes in Output" and uncomment the following lines:
%\usepackage[normalem]{ulem}
%\setlength{\ULdepth}{0.25\baselineskip}
%\let\oldcite\cite
%\def\newcite#1{\mbox{\oldcite{#1}}}
%\def\lyxadded#1#2#3{\let\cite\newcite\uline{#3}\let\cite\oldcite}
%\def\lyxdeleted#1#2#3{}

% In order to distinguish underline and strike out
\ifcsname oldcite\endcsname\else\def\normalct{}\fi

%%%
% Method 1:
% To strike out pieces of a formula in display mode
\def\msout#1{\mbox{\sout{$\displaystyle #1$}}}
%%%
% Method 2:
% To strike out a whole formula in display mode
\usepackage{tikz}
\usetikzlibrary{calc}
\newcommand{\dcancel}[1]{
  \tikz[baseline=(math.base)]{
\node[inner sep=0pt,outer 

Re: [LyX/master] Strike out (in the output) deleted display math with track-changes

2016-10-16 Thread Scott Kostyshak
On Sun, Oct 16, 2016 at 11:27:02PM -0400, Scott Kostyshak wrote:

> A second question is: Is the diagonal line supposed to be so large?
> Screenshot attached.

Oops, now screenshot attached.

Scott


signature.asc
Description: PGP signature


Re: [LyX/master] Strike out (in the output) deleted display math with track-changes

2016-10-16 Thread Scott Kostyshak
On Mon, Oct 17, 2016 at 04:00:25AM +0200, Enrico Forestieri wrote:
> commit 261e7ae9ce7e6a1ffc4932ff9c33107588a9a4ac
> Author: Enrico Forestieri 
> Date:   Mon Oct 17 03:25:35 2016 +0200
> 
> Strike out (in the output) deleted display math with track-changes

Nice!

Did this commit fix #9678?

I tested it out and have a couple of questions. Attached is a file. If I
compile I get an error ("there's no line to end here"). If I put the
cursor at the end of "hello" and press (forward) delete to remove the
newline (nothing changes on the screen) and then compile, there is no
error.

A second question is: Is the diagonal line supposed to be so large?
Screenshot attached.

Scott
#LyX 2.3 created this file. For more info see http://www.lyx.org/
\lyxformat 513
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass article
\use_default_options true
\maintain_unincluded_children false
\language english
\language_package default
\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
\graphics default
\default_output_format default
\output_sync 1
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref 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 1
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes true
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\author 274215730 "scott"
\end_header

\begin_body

\begin_layout Standard
hello
\end_layout

\begin_layout Standard

\change_deleted 274215730 1476673996
\begin_inset Formula 
\[
x+y
\]

\end_inset


\change_unchanged
testing now
\end_layout

\end_body
\end_document


signature.asc
Description: PGP signature