Notes inherit surrounding font

2019-08-23 Thread Daniel
Currently, IMO, notes behave in an unfortunate way in that they inherit 
the surrounding font.


Consider the attached document which has the following structure:

*Section*
Text

The first line is formatted as a section heading and the second as 
standard text.


In Lyx, select all text in the document and insert a note.

The actual result is that all the text looks as if it where formatted as 
section. This is misleading. It is also in many cases annoying. For 
example, when adding a longer note to a section heading it becomes huge.


The basic problem is that everything that is formatted as Standard/Plain 
Layout inherits the font the paragraph the note is placed in.


Arguably, there are also positive aspects of the current behavior. For 
example, a one paragraph note with plain text will give the user a 
preview of what the text will look like if the note is dissolved. 
However, I don't think this aspect is outweighs the costs, in 
particular, it is inconsistent as the example from the attached document 
shows above shows.


In another thread 
(https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg209605.html) 
Riki suggest the following two cures:


1. Explicitly set a font on the note:

InsetLayout Note:Note
Font
Size normal
Shape up
Series medium
EndFont
End

This works fine for me.

2. Let the font automatically reset in the note:

InsetLayout Note:Note
ResetsFont true
End

The documentation sounds like this should work as well:

ResetsFont [0, 1] Whether this inset should use the font of its 
surrounding environment or uses its own. Default is false: use the font 
of the surrounding environment.


However, as Riki notes, it does not work. And the documentation seems a 
bit ambiguous to me.


I'd be happy to hear what people think about changing the notes behavior 
and what might be the best way to do it.


Daniel
#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 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
\use_dash_ligatures true
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\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
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 1
\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 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header

\begin_body

\begin_layout Section*
Section
\end_layout

\begin_layout Standard
Text
\end_layout

\end_body
\end_document


Re: Some exports are currently failing on master

2019-08-23 Thread Jürgen Spitzmüller
Am Freitag, den 23.08.2019, 20:09 -0400 schrieb Scott Kostyshak:
> Do you have preview turned on? 

Yes.

> If you can't reproduce with preview
> turned on, what is your Python version? Mine is the following:
> 
>   $ python3 --version
>   Python 3.7.3

Same.

It might also depend on the conversion chain (installed converters).

In any case, it looks like another python3 problem in
lyxpreview_tools.py

Maybe Günter has time to look at it?

Jürgen


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


Re: Some exports are currently failing on master

2019-08-23 Thread Scott Kostyshak
On Fri, Aug 23, 2019 at 10:38:17PM +0200, Jürgen Spitzmüller wrote:
> Am Freitag, den 23.08.2019, 15:57 -0400 schrieb Scott Kostyshak:
> > Now when I open the document in master I get the following:
> > 
> >   $ lyx Linguistics.lyx 
> >   Warning: Malformed LyX document: Can't find end of local layout!
> 
> Fixed.

Thanks, now all tests pass except for the two that are bitten by the
Polyglossia bug.

> >   Traceback (most recent call last):
> > File
> > "/home/scott/lyxbuilds/master/repo/lib/scripts/lyxpreview2bitmap.py",
> > line 594, in 
> >   sys.exit(main(sys.argv)[0])
> > File
> > "/home/scott/lyxbuilds/master/repo/lib/scripts/lyxpreview2bitmap.py",
> > line 536, in main
> >   filter_pages(latex_file, legacy_latex_file, ps_pages)
> > File
> > "/home/scott/lyxbuilds/master/repo/lib/scripts/lyxpreview_tools.py",
> > line 229, in filter_pages
> >   for line in source_file:
> > File "/usr/lib/python3.7/codecs.py", line 322, in decode
> >   (result, consumed) = self._buffer_decode(data, self.errors,
> > final)
> >   UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf3 in
> > position 3240: invalid continuation byte
> >   ForkedProcess::kill(0)
> >   $
> 
> Don't see this.

Do you have preview turned on? If you can't reproduce with preview
turned on, what is your Python version? Mine is the following:

  $ python3 --version
  Python 3.7.3

Scott


signature.asc
Description: PGP signature


Re: Note formatting bug?

2019-08-23 Thread Richard Kimberly Heck
On 8/23/19 12:56 AM, Daniel wrote:
> On 2019-08-23 02:37, Daniel wrote:
>> On 23/8/19 0:13, Richard Kimberly Heck wrote:
>>> On 8/22/19 2:47 PM, Daniel wrote:
 On 2019-08-22 19:42, Paul A. Rubin wrote:
> On 8/22/19 1:26 PM, Daniel wrote:
>> Could someone please test the following with the attached document:
>> 1. Open it
>> 2. Select all text
>> 3. Insert LyX note
>>
>> For me all text becomes formatted like a section heading. But bot
>> so if I first create the note and then paste the content into it
>> which seems strange.
>>
>> Daniel
> Same here (LyX 2.3.3).
>
> Paul
>
>
 Thanks for checking. The problem seems to be that the LyX note uses
 the "Plain Layout" (rather than "Standard" layout) which inherits
 the layout of the paragraph the inset is placed in. I am not sure
 there is currently a way to fix this.
>>>
>>> Note that the first line is section* and the second line is plain.
>>> As they were, except for the switch from standard.
>>>
>>> By default, insets do inherit the font from their parents. But you
>>> can change this:
>>>
>>> InsetLayout Note:Note
>>>
>>> Font
>>>
>>> Size normal
>>>
>>> Shape up
>>>
>>> Series medium
>>>
>>> EndFont
>>>
>>> End
>>>
>>> I would have expected
>>>
>>> InsetLayout Note:Note
>>>
>>> ResetsFont true
>>>
>>> End
>>>
>>> to work, but it does not seem to.
>>>
>>> Riki
>>>
>>
>> Thanks. Same here. Adding the first approach to my user dir. That
>> actually solves an annoying behavior.
>>
>> Daniel
>
> Patching the note inset makes working with them so much nicer! Should
> I file a report?

I think maybe I'd just start another thread explicitly about that topic.
I'm still puzzled about ResetsFont, too.

Riki




Re: Some exports are currently failing on master

2019-08-23 Thread Jürgen Spitzmüller
Am Freitag, den 23.08.2019, 15:57 -0400 schrieb Scott Kostyshak:
> Now when I open the document in master I get the following:
> 
>   $ lyx Linguistics.lyx 
>   Warning: Malformed LyX document: Can't find end of local layout!

Fixed.

>   Traceback (most recent call last):
> File
> "/home/scott/lyxbuilds/master/repo/lib/scripts/lyxpreview2bitmap.py",
> line 594, in 
>   sys.exit(main(sys.argv)[0])
> File
> "/home/scott/lyxbuilds/master/repo/lib/scripts/lyxpreview2bitmap.py",
> line 536, in main
>   filter_pages(latex_file, legacy_latex_file, ps_pages)
> File
> "/home/scott/lyxbuilds/master/repo/lib/scripts/lyxpreview_tools.py",
> line 229, in filter_pages
>   for line in source_file:
> File "/usr/lib/python3.7/codecs.py", line 322, in decode
>   (result, consumed) = self._buffer_decode(data, self.errors,
> final)
>   UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf3 in
> position 3240: invalid continuation byte
>   ForkedProcess::kill(0)
>   $

Don't see this.

Jürgen


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


Re: Some exports are currently failing on master

2019-08-23 Thread Scott Kostyshak
On Fri, Aug 23, 2019 at 06:40:22PM +0200, Jürgen Spitzmüller wrote:
> Am Donnerstag, den 22.08.2019, 15:22 -0400 schrieb Scott Kostyshak:
> > For example,
> > if in master you export the Spanish Linguistics.lyx file to 1.6.x
> > format
> > and then open that exported file in master, it appears to be an
> > incorrect .lyx file. I get a lot of warnings. The first one is the
> > following:
> > 
> >   The module \begin_local_layout has been requested by this document
> > but
> >   has not been found...
> 
> This one should be fixed.

Now when I open the document in master I get the following:

  $ lyx Linguistics.lyx 
  Warning: Malformed LyX document: Can't find end of local layout!
  Traceback (most recent call last):
File "/home/scott/lyxbuilds/master/repo/lib/scripts/lyxpreview2bitmap.py", 
line 594, in 
  sys.exit(main(sys.argv)[0])
File "/home/scott/lyxbuilds/master/repo/lib/scripts/lyxpreview2bitmap.py", 
line 536, in main
  filter_pages(latex_file, legacy_latex_file, ps_pages)
File "/home/scott/lyxbuilds/master/repo/lib/scripts/lyxpreview_tools.py", 
line 229, in filter_pages
  for line in source_file:
File "/usr/lib/python3.7/codecs.py", line 322, in decode
  (result, consumed) = self._buffer_decode(data, self.errors, final)
  UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf3 in position 3240: 
invalid continuation byte
  ForkedProcess::kill(0)
  $

Scott


signature.asc
Description: PGP signature


Re: Some exports are currently failing on master

2019-08-23 Thread Jürgen Spitzmüller
Am Donnerstag, den 22.08.2019, 15:22 -0400 schrieb Scott Kostyshak:
> For example,
> if in master you export the Spanish Linguistics.lyx file to 1.6.x
> format
> and then open that exported file in master, it appears to be an
> incorrect .lyx file. I get a lot of warnings. The first one is the
> following:
> 
>   The module \begin_local_layout has been requested by this document
> but
>   has not been found...

This one should be fixed.

Jürgen


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


Re: Missing lyxeditor.cmd?

2019-08-23 Thread Dr Eberhard Lisse
I can not confirm this.

I am a long time LyX user in production (I seem to have switched from
OpenOffice to LyX in 2005 according to what I can find in my operating
reports directory), regularly updating LyX and MacOs, and on an number
of different boxes (from iMini via the trashcan MacPro to a 5k iMac) and
laptops (12 and 13 inch airs).

The only issue I am having sometimes is LuaLaTeX being 3 times slower
than pdfLaTeX but of course it is the future :-)-O and there are many
ways around some of it.

Is there a way of measuring the startup time of a Mac application?

greetings, el

On 22/08/2019 19:08, Chris Menzel wrote:
[...]
> I'm not really a Windows user either, but I got so irked with recent
> Mac laptops that I bought the (quite lovely) Dell in a fit of pique.
> I have to say that, once you get it set up right, LyX under Windows
> (and Linux) works rather better than it does under macOS. It loads
> *much *faster and just seems snappier all around; forward/inverse
> searching in particular is faster and more accurate.  (Both startup
> and forward search on macOS have been glacial under the last few
> iterations, though they're improved in 2.3.3.)
[...]

-- 
Dr. Eberhard W. Lisse  / Obstetrician & Gynaecologist (Saar)
e...@lisse.na/ * |   Telephone: +264 81 124 6733 (cell)
PO Box 8421  /
Bachbrecht, Namibia ;/