Re: KOMA-Script Report: titlehead and title on two pages [FIXED]

2019-08-20 Thread Paul A. Rubin

On 8/20/19 2:29 PM, Rich Shepard wrote:

On Tue, 20 Aug 2019, Paul A. Rubin wrote:


The "Default margins" setting means use /class/ defaults, not paper size
defaults. The user guide claims that KOMA Script formats will calculate
margins based on paper size, but if that is happening (iffy) it is not
proving helpful. I manually put 1" margins all around and compiled, 
and it

looks correct (or at least better) to my somewhat noncritical eye.


Paul,

Son-of-a-gun. I missed seeing in the KOMA Script doc that page margins 
are

set by class, not paper size. And, while I _thought_ I had changed all
margins to 1", I had apparently not done so.

Made the margin size changes and that did fix the problem.

Many thanks,

Rich

It's actually not in the KOMA Script docs ... nor in the LyX docs that I 
can find. If you hover over the check box for using default margins, the 
tool tip gives it away.


You're welcome,
Paul



Re: configure.py crashing with Python 3 [was: LyX v 2.3.x - severe Problems]

2019-08-20 Thread Richard Kimberly Heck
On 8/20/19 1:56 PM, Matthias Görlach wrote:
> Hi Riki,
>
> thank you for this analysis/hint - this was perfect for a "work around":
>
> 0) install python v 2.7.16 (well, will have to deal with things which
> require python 3.X)
> 1) deleted the LyX-2.3 directory (folder) from ~/Library/Application
> Support
> 2) mkdir of an empty Lyx-2.3 dir
> 3) cd into it
> 4) run python -tt
> /Applications/LyX.app/Contents/Resources/configure.py
> --with-version-suffix=-2.3
> --binary-dir=/Applications/LyX.app/Contents/MacOS/
> ==> 5) last lines of terminal output:
> ...
> +checking for package natbib [natbib]... yes
> +Inspection done.
> +Read the file doc/LaTeXConfig.lyx for more information.
>
>
> 6) low & behold: starting LyX 2.3 works fine - no error messages
> anymore (and my templates work again)
>
> Of course it will be better to eventually have LyX 2.3 working with
> the more recent python.

Thanks for confirming that this solves the problem. But yes, LyX is
supposed to work with Python 3, and obviously it does not at the moment.

We'll certainly want to test whatever changes we eventually make to
configure.py. I have created a bug report for this here:

https://www.lyx.org/trac/ticket/11642

If you add yourself (you may have to create an account) in the cc list,
you'll be notified as there are updates. It will be possible to test
this, simply by downloading the new configure.py script and running it
the same way.

Riki




Re: KOMA-Script Report: titlehead and title on two pages [FIXED]

2019-08-20 Thread Rich Shepard

On Tue, 20 Aug 2019, Paul A. Rubin wrote:


The "Default margins" setting means use /class/ defaults, not paper size
defaults. The user guide claims that KOMA Script formats will calculate
margins based on paper size, but if that is happening (iffy) it is not
proving helpful. I manually put 1" margins all around and compiled, and it
looks correct (or at least better) to my somewhat noncritical eye.


Paul,

Son-of-a-gun. I missed seeing in the KOMA Script doc that page margins are
set by class, not paper size. And, while I _thought_ I had changed all
margins to 1", I had apparently not done so.

Made the margin size changes and that did fix the problem.

Many thanks,

Rich



Re: Startup failure: cannot run script or convert UI file format

2019-08-20 Thread Rich Shepard

On Tue, 20 Aug 2019, Richard Kimberly Heck wrote:


There's no such system-wide file. It's your file that's being used. LyX
only stores the filename, and searches both the user- and
system-directories for it.


Riki,

I've it all figured out now. The UI file used on the 32-bit host (the
soon-to-be-replaced desktop) is /usr/share/lyx/ui/default; that's what I
meant by a system-wide file.

On both the old and new (64-bit) desktops ~/.lyx/ui/ has a file named
classic.ui. I thought that's what I had selected on the old desktop, but as
the above paragraph shows, that's not the case.

When I change preferences on the new desktop to use ~/.lyx/ui/classic.ui
that's when LyX became thoroughly upset and refused to start. I've diff'd
classic.ui and default.ui; there are many differences. A copy of classic.ui
is attached.


Note how it is reading the local file.


Yes it is on the new desktop.


I have recently seen a problem with 3.7.4 on my system, as well, so it
could be related to that.


Apparently not; it's the ui file.


3) Where can I set the default lyx window size (running Xfce4)?


Use the -geometry argument. See lyx -help for info.


Duh! Of course. Thank you,


4) What is done to have lyx use python3 rather than python2?


I am not sure what happens in LyX now, but this is auto-detected. I'm
not sure if it is user configurable what python gets used.


Okay. As I've written all the problems (except for the preview and compiled
PDF files not filling out the 8.5" x 11" pages.)

Thanks for pointing me in the proper direction.

Now to fix the text area issue.

Best regards,

Rich# -*- text -*-

# file classic.ui
# This file is part of LyX, the document processor.
# Licence details can be found in the file COPYING.

# author Lars Gullik Bj�nnes
# author Jean-Marc Lasgouttes
# author Rob Lahaye
# author Angus Leeming
# author Edwin Leuven
# author John Levon
# author Andr� P�nitz
# author Allan Rae
# author J�rgen Spitzm�ller
# author Kayvan Sylvan
# author Dekel Tsur
# author J�rgen Vigna
# author Herbert Voss

# Full author contact details are available in file CREDITS.

# This is the default LyX user interface definition file.
# The syntax should be straightforward enough.

# The interface is designed (partially) following the KDE Human Interface
# Guidelines (http://usability.kde.org/hig/)

Menuset

Menubar
Submenu "File|F" "file"
Submenu "Edit|E" "edit"
Submenu "Insert|I" "insert"
Submenu "Layout|L" "layout"
Submenu "View|V" "view"
Submenu "Navigate|N" "navigate"
Submenu "Documents|D" "documents"
Submenu "Help|H" "help"
End

#
# FILE MENU
#

Menu "file"
Item "New|N" "buffer-new"
Item "New from Template...|T" "buffer-new-template"
Item "Open...|O" "file-open"
Separator
Item "Close|C" "buffer-close"
Item "Save|S" "buffer-write"
Item "Save As...|A" "buffer-write-as"
Item "Revert|R" "buffer-reload"
Submenu "Version Control|V" "file_vc"
Separator
Submenu "Import|I" "file_import"
Submenu "Export|E" "file_export"
Item "Print...|P" "dialog-show print"
OptItem "Fax...|F" "buffer-export fax"
Separator
Item "Exit|x" "lyx-quit"
Separator
Lastfiles
End

Menu "file_vc"
OptItem "Register...|R" "vc-register"
OptItem "Check In Changes...|I" "vc-check-in"
OptItem "Check Out for Edit|O" "vc-check-out"
OptItem "Revert to Last Version|L" "vc-revert"
OptItem "Undo Last Check In|U" "vc-undo-last"
OptItem "Show History|H" "dialog-show vclog"
End

Menu "file_import"
ImportFormats
End

Menu "file_export"
ExportFormats
Item "Custom...|C" "buffer-export custom"
End

#
# EDIT MENU
#

Menu "edit"
Item "Undo|U" "undo"
Item "Redo|d" "redo"
Separator
Item "Cut|C" "cut"
Item "Copy|o" "copy"
Item "Paste|a" "paste"
Submenu "Paste External Selection|x" "edit_paste"
Separator
Item "Find & Replace...|F" "dialog-show findreplace"
Separator
Submenu "Tabular|T" "edit_tabular"
Submenu "Math|M" "edit_math"
Separator
#Item "Read Only" "buffer-toggle-read-only"
Item "Spellchecker...|S" "dialog-show spellchecker"
Item "Thesaurus..." "thesaurus-entry"
Item "Count Words|W" "words-count"
Item "Check TeX|h" "buffer-chktex"
   

Re: KOMA-Script Report: titlehead and title on two pages

2019-08-20 Thread Paul A. Rubin

On 8/19/19 6:01 PM, Rich Shepard wrote:

On Mon, 19 Aug 2019, Paul A. Rubin wrote:


I'm not sure how you got even more whitespace above the logo, but in any
case 145 for top y strikes me as too big.

Here's my version (edited LyX file and exported PDF). Notable changes 
I made:


* I changed the graphic path to a relative path to the enclosed PDF
  image. (Your MWE included the image but the graphic path was an
  absolute path on your system.)
* I changed the top right y value. You can go a bit smaller than what
  I put in, but not much. Note that this screws up the preview in the
  LyX window, but as you can see the image looks okay in the PDF output.
* There was still more whitespace above the logo than seemed
  reasonable to me, which is likely some KOMA setting. I don't use
  KOMA, so I cheated and stuck in some negative vertical space above
  the image. Feel free to adjust or omit.
* This gets the image, title and date on the same page, but the
  content still starts on page 2. Again, that's probably a KOMA thing.


Paul,

It's an issue with lyx-2.3.3 on the Ryzen7 desktop. See the PDF in the
attached tarball. (I recompiled and reinstalled the application but it 
made

no difference.)

Looking at the .lyx file I saw the page size in the preamble still at 
6.5"
width x 9.5" height despite the setting having the US Letter box 
checked and

the other values greyed out. I removed those values and the lyx file
preamble now shows paperletter for the size.

I also removed the custom margins (despite the 'use default' checkbox 
being

checked) and now I don't see specific margins in the .lyx file

The compiled PDF has the letterhead, title, author, date, and 
introduction

all on page 1. But, the text width and height are those of a 6" x 9" book
layout, not letter size layout.

I'm not seeing the reason why.

Regards,

Rich

Rich,

The "Default margins" setting means use /class/ defaults, not paper size 
defaults. The user guide claims that KOMA Script formats will calculate 
margins based on paper size, but if that is happening (iffy) it is not 
proving helpful. I manually put 1" margins all around and compiled, and 
it looks correct (or at least better) to my somewhat noncritical eye.


Paul



Re: configure.py crashing with Python 3 [was: LyX v 2.3.x - severe Problems]

2019-08-20 Thread Matthias Görlach

Hi Riki,

thank you for this analysis/hint - this was perfect for a "work around":

0) install python v 2.7.16 (well, will have to deal with things which 
require python 3.X)

1) deleted the LyX-2.3 directory (folder) from ~/Library/Application Support
2) mkdir of an empty Lyx-2.3 dir
3) cd into it
4) run python -tt /Applications/LyX.app/Contents/Resources/configure.py 
--with-version-suffix=-2.3 
--binary-dir=/Applications/LyX.app/Contents/MacOS/

==> 5) last lines of terminal output:
...
+checking for package natbib [natbib]... yes
+Inspection done.
+Read the file doc/LaTeXConfig.lyx for more information.


6) low & behold: starting LyX 2.3 works fine - no error messages anymore 
(and my templates work again)


Of course it will be better to eventually have LyX 2.3 working with the 
more recent python.


Let me know if I should test this at some point.

Best

Matthias

On 19.08.19 22:42, Richard Kimberly Heck wrote:

On 8/19/19 4:16 PM, Matthias Görlach wrote:

Hi,

see below

On 19.08.19 22:02, Richard Kimberly Heck wrote:

On 8/19/19 2:41 PM, Matthias Görlach wrote:

To check another thing: there is an automatic upgrade in configure run.
Perhaps it copies some problematic contents from your 2.2 installation.
To circumvent this you may try these commands (no sudo please):
$ mkdir /tmp/LyX
$ cd /tmp/LyX
$ python -tt /Applications/LyX.app/Contents/Resources/configure.py 
--binary-dir=/Applications/LyX.app/Contents/MacOS/

My result (and config.log attached here)
ls -ltr
total 1088
drwxr-xr-x  2 mago  staff  68 Aug 19 20:30 ui
drwxr-xr-x  2 mago  staff  68 Aug 19 20:30 templates
drwxr-xr-x  2 mago  staff  68 Aug 19 20:30 scripts
drwxr-xr-x  2 mago  staff  68 Aug 19 20:30 layouts
drwxr-xr-x  2 mago  staff  68 Aug 19 20:30 kbd
drwxr-xr-x  2 mago  staff  68 Aug 19 20:30 images
drwxr-xr-x  2 mago  staff  68 Aug 19 20:30 examples
drwxr-xr-x  2 mago  staff  68 Aug 19 20:30 doc
drwxr-xr-x  2 mago  staff  68 Aug 19 20:30 clipart
-rw-r--r--  1 mago  staff  99 Aug 19 20:30 chklatex.ltx
-rw-r--r--  1 mago  staff 664 Aug 19 20:30 chklatex.log
drwxr-xr-x  2 mago  staff  68 Aug 19 20:30 bind
-rw-r--r--  1 mago  staff   19973 Aug 19 20:30 lyxrc.defaults
-rw-r--r--  1 mago  staff   36766 Aug 19 20:30 clsFiles.lst
-rw-r--r--  1 mago  staff  365181 Aug 19 20:30 styFiles.lst
-rw-r--r--  1 mago  staff   26300 Aug 19 20:30 bstFiles.lst
-rw-r--r--  1 mago  staff    4449 Aug 19 20:30 bibFiles.lst
-rw-r--r--  1 mago  staff 293 Aug 19 20:30 lyxmodules.lst
-rw-r--r--  1 mago  staff   37133 Aug 19 20:30 configure.log
-rw-r--r--  1 mago  staff  26 Aug 19 20:30 chkmodules.tex
-rw-r--r--  1 mago  staff   15685 Aug 19 20:30 cbxFiles.lst
-rw-r--r--  1 mago  staff   17136 Aug 19 20:30 bbxFiles.lst


The configure script looks to be crashing when it tries to process 
the first module file. The fact that chklatex.ltx and chkmodules.txt 
have not been removed indicate that, as does the suspiciously small 
size of your chkmodules.tex.


Can you run the command Stephan gave you from the terminal again, 
but this time copy and paste the end of the output? I'm wondering 
whether Python itself is issuing some kind of error message.



+checking list of modules...
/Applications/LyX.app/Contents/Resources/layouts/algorithm2e.module
Traceback (most recent call last):
  File "/Applications/LyX.app/Contents/Resources/configure.py", line 
1892, in 

    checkModulesConfig()
  File "/Applications/LyX.app/Contents/Resources/configure.py", line 
1511, in checkModulesConfig
    retval = processModuleFile(file, filename.encode('ascii'), 
bool_docbook)
  File "/Applications/LyX.app/Contents/Resources/configure.py", line 
1607, in processModuleFile

    % (modname, filename, desc, pkgs, req, excl, catgy))
TypeError: unsupported operand type(s) for %: 'bytes' and 'tuple'


Yes, well, there's the crash.

This particular line is from 576b94138. Jürgen?


Can you also check the python version you are using? Run python 
--version.



Python 3.3.7


Mostly, the point is that it's Python 3, though maybe the problem is 
specific to this version. As I said, though, I'm seeing a crash here 
with 3.7.4 that looks similar:


Traceback (most recent call last):
  File "/usr/local/share/lyx/configure.py", line 1896, in 
    ret = checkLatexConfig(lyx_check_config and LATEX != '', bool_docbook)
  File "/usr/local/share/lyx/configure.py", line 1379, in checkLatexConfig
    retval = processLayoutFile(file, bool_docbook)
  File "/usr/local/share/lyx/configure.py", line 1327, in 
processLayoutFile

    % (classname, opt, desc, avai, prereq))
TypeError: %b requires a bytes-like object, or an object that 
implements __bytes__, not 'str'


Mine comes from the same commit.

Riki




--
Matthias Görlach
Ebertstr. 4
07743 Jena

*49-0171 1988809



Re: Startup failure: cannot run script or convert UI file format

2019-08-20 Thread Richard Kimberly Heck
On 8/20/19 11:57 AM, Rich Shepard wrote:
> I'm migrating to a new server/workstation and now I FUBAR'd lyx so it
> does
> not load.
>
> While looking in preferences to see if I could set the default window
> size
> there (for a 1250x1024 dpi monitor) I did not find an appropriate
> setting.
> But I did see that the UI file was a system-wide one rather than
> ~/.lyx/ui/classic.ui.

There's no such system-wide file. It's your file that's being used. LyX
only stores the filename, and searches both the user- and
system-directories for it.


> In preferences I changed to that UI file and killed the lyx process.
> When I
> tried to reload the application it failed:
>
> LyXComm: Pipe /home/rshepard/.lyx/lyxpipe.in already exists.
> If no other LyX program is active, please delete the pipe by hand and
> try again.
> Traceback (most recent call last):
>   File "/usr/share/lyx/scripts/prefs2prefs.py", line 202, in 
>     main(sys.argv)
>   File "/usr/share/lyx/scripts/prefs2prefs.py", line 167, in main
>     lines = read(source)
>   File "/usr/share/lyx/scripts/prefs2prefs.py", line 52, in read
>     lines = source.read().splitlines() or ['']
>   File "/usr/lib64/python2.7/codecs.py", line 314, in decode
>     (result, consumed) = self._buffer_decode(data, self.errors, final)
> LookupError: unknown error handler name 'surrogateescape'
> filetools.cpp (1221): Could not run file conversion script
> prefs2prefs.py.
> GuiApplication.cpp (3092): Unable to convert
> /home/rshepard/.lyx/ui/classic.ui to format 4.
> GuiApplication.cpp (3099): Unable to read UI file:
> /home/rshepard/.lyx/ui/classic.ui

Note how it is reading the local file.


> FWIW, I have python3-3.7.4 installed and no longer use python2, but
> keep it
> on the system until the distribution drops it.

I have recently seen a problem with 3.7.4 on my system, as well, so it
could be related to that.


> 1) How do I fix the inability of lyx to read prefs2prefs.py so I can
> start the application?

I think we are going to have to fix that. But, for now, I'd try using a
new user directory and see if that works. If so, then copy over a few
things from the old one, and see if it keeps working.


> 2) How do I fix the inability of lyx to convert classic.ui to format 4?

Same. Probably, you can just change classic.ui to format 4 manually and
see if you get errors.


> 3) Where can I set the default lyx window size (running Xfce4)?

Use the -geometry argument. See lyx -help for info.


> 4) What is done to have lyx use python3 rather than python2?

I am not sure what happens in LyX now, but this is auto-detected. I'm
not sure if it is user configurable what python gets used.

Riki




Startup failure: cannot run script or convert UI file format

2019-08-20 Thread Rich Shepard

I'm migrating to a new server/workstation and now I FUBAR'd lyx so it does
not load.

While looking in preferences to see if I could set the default window size
there (for a 1250x1024 dpi monitor) I did not find an appropriate setting.
But I did see that the UI file was a system-wide one rather than
~/.lyx/ui/classic.ui.

In preferences I changed to that UI file and killed the lyx process. When I
tried to reload the application it failed:

LyXComm: Pipe /home/rshepard/.lyx/lyxpipe.in already exists.
If no other LyX program is active, please delete the pipe by hand and try again.
Traceback (most recent call last):
  File "/usr/share/lyx/scripts/prefs2prefs.py", line 202, in 
main(sys.argv)
  File "/usr/share/lyx/scripts/prefs2prefs.py", line 167, in main
lines = read(source)
  File "/usr/share/lyx/scripts/prefs2prefs.py", line 52, in read
lines = source.read().splitlines() or ['']
  File "/usr/lib64/python2.7/codecs.py", line 314, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
LookupError: unknown error handler name 'surrogateescape'
filetools.cpp (1221): Could not run file conversion script prefs2prefs.py.
GuiApplication.cpp (3092): Unable to convert /home/rshepard/.lyx/ui/classic.ui 
to format 4.
GuiApplication.cpp (3099): Unable to read UI file: 
/home/rshepard/.lyx/ui/classic.ui

I deleted the lyxpipe.in and that had no effect on trying to start.

FWIW, I have python3-3.7.4 installed and no longer use python2, but keep it
on the system until the distribution drops it.

Four questions:

1) How do I fix the inability of lyx to read prefs2prefs.py so I can start
the application?

2) How do I fix the inability of lyx to convert classic.ui to format 4?

3) Where can I set the default lyx window size (running Xfce4)?

4) What is done to have lyx use python3 rather than python2?

(And, I still need to get the current document compiled to use US letter
size pages, not 6.5 x 9.5 custom pages.)

TIA,

Rich