Re: Graphic file formats

2021-12-08 Thread Steve Litt via lyx-users
Rich Shepard said on Wed, 8 Dec 2021 09:53:55 -0800 (PST)

>On Wed, 8 Dec 2021, Steve Litt wrote:
>
>> There are ways to shrink PDF size:
>> Web search: linux shrink pdf size  
>
>SteveT,
>
>First hit uses ghostscript; I never dove deep into gs and didn't know
>that it can effectively compress a PDF file. It compressed the
>original 3,704,503 byte file to 897,417 bytes; a reduction of 76%.
>That's impressive.

Hi Rich,

Did the shrunken PDF have a material effect on timing?

SteveT

Steve Litt 
Spring 2021 featured book: Troubleshooting Techniques of the Successful
Technologist http://www.troubleshooters.com/techniques
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: How to find LyX' compile strategy?

2021-12-08 Thread Steve Litt via lyx-users
Stephan Witt said on Wed, 8 Dec 2021 18:49:07 +0100

>Am 08.12.2021 um 18:16 schrieb Steve Litt :
>> 
>> Dr Eberhard Lisse said on Wed, 8 Dec 2021 17:22:34 +0200
>>   
>>> What's wrong with
>>> 
>>> lyx -f -e pdf5 lawnmower.lyx
>>> 
>>> or if you must, with
>>> 
>>> lyx -f -e luatex lawnmower.lyx && latexmk lawnmower.tex

Thanks Stephan!

The .ilg file revealed 125 lines of indexing errors, so that's probably
something like 40-50 errors. I'll fix those and see what happens.

It's been about 8 years since I indexed a book, and I'd forgotten about
the .ilg file.

Thanks,

SteveT

Steve Litt 
Spring 2021 featured book: Troubleshooting Techniques of the Successful
Technologist http://www.troubleshooters.com/techniques
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Graphic file formats

2021-12-08 Thread Murat Yildizoglu via lyx-users
I am not a pdf expert but this rather surprising given my experience with R 
plots. Rich, have you checked that the figures have not been converted to 
bitmaps with a default (and probably insufficient ) quality during this 
compression?
You can check it by zooming in on the figures to see if they quickly pixellise 
and become ugly. 

--

Prof. Murat Yildizoglu
Advisor to the Minister of Education, Youth and Sports of Cambodia
Expertise France


On leave from:
UNIVERSITE DE BORDEAUX
GREThA (UMR CNRS 5113)

web: www.yildizoglu.fr

> Le 9 déc. 2021 à 00:54, Rich Shepard  a écrit :
> 
> On Wed, 8 Dec 2021, Steve Litt wrote:
> 
>> There are ways to shrink PDF size:
>> Web search: linux shrink pdf size
> 
> SteveT,
> 
> First hit uses ghostscript; I never dove deep into gs and didn't know that
> it can effectively compress a PDF file. It compressed the original 3,704,503
> byte file to 897,417 bytes; a reduction of 76%. That's impressive.
> 
> Thanks for the valuable lesson!
> 
> Stay well,
> 
> Rich
> 
> -- 
> lyx-users mailing list
> lyx-users@lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-users
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Graphic file formatsx

2021-12-08 Thread Murat Yildizoglu via lyx-users
This is not a problem of the text content.

 When you create a points plot in R, it puts the information about all the 
points in the exported PDF figure, even if many of them correspond to the same 
coordinates. It does not « flatten » the pdf figure. When you plot millions of 
points, that results in a lot of information and may necessitate considerable 
amount of memory from the computer for displaying on the screen or from the 
printer, to transfer on paper. 
When we export to a bitmap format like PNG, the information is « flattened » 
and all points that fall on the same pixels are coded just the value of these 
pixels. That makes the figure easier to handle. 

When you do a curve plot (like a density plot, for example) this problem does 
not exist. This is another strategy that I  use when possible: can I show the 
same informed with a curve instead of with dots? If yes, I go for it. It is 
much more parsimonious. 

Using a bitmap format with correct proportions and sufficient density, the 
first solution gives very satisfactory results even if the figures are bitmaps. 

--

Prof. Murat Yildizoglu


> Le 9 déc. 2021 à 00:37, Steve Litt  a écrit :
> 
> Rich Shepard said on Wed, 8 Dec 2021 07:51:56 -0800 (PST)
> 
>> On Wed, 8 Dec 2021, Dr Eberhard Lisse wrote:
> 
>>> For my big handbook (which takes 110 seconds to compile (70 on the
>>> M1)) I have split this into child documents which compile
>>> individually within 10 to 15 seconds.  
>> 
>> How about loading a PDF image that's 3,704,503 bytes in size while
>> reading your big handbook?
> 
> OK, 3,704,503 bytes got my attention. No wonder it's slow.
> 
> There are ways to shrink PDF size:
> 
> Web search: linux shrink pdf size
> 
> SteveT
> 
> Steve Litt 
> Spring 2021 featured book: Troubleshooting Techniques of the Successful
> Technologist http://www.troubleshooters.com/techniques
> -- 
> lyx-users mailing list
> lyx-users@lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-users
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: LyX document corrupted [RESOLVED]

2021-12-08 Thread Jean-Marc Lasgouttes

Le 08/12/2021 à 20:05, Rich Shepard a écrit :

On Wed, 8 Dec 2021, Rich Shepard wrote:


I'll be back to report if the reboot fixed the problem.


JMarc,

I'm back and lyx is once again working as it has for a couple of decades.


Very good news.

JMarc

--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: LyX document corrupted [RESOLVED]

2021-12-08 Thread Rich Shepard

On Wed, 8 Dec 2021, Rich Shepard wrote:


I'll be back to report if the reboot fixed the problem.


JMarc,

I'm back and lyx is once again working as it has for a couple of decades.

Something invisible to me must have clogged the system because trying to
navigate to a directory in a web browser (firefox and chromium) produced the
same lack of response.

Every few years something constipates the computer and it requires a reboot
to clear the clog.

Thanks for your comments,

Rich


--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: LyX document corrupted

2021-12-08 Thread Rich Shepard

On Wed, 8 Dec 2021, Jean-Marc Lasgouttes wrote:


Can you compile LyX yourself? Actually, I do not remember on what OS you
use LyX.


JMarc,

That's how I install upgrades. I run Slackware64-14.2. Just re-installed lyx
and it's the same behavior.

The application loads immediately, but as soon as I use C-x C-f to open a
document all of one CPU core is used and nothing happens.

While this host has been up almost 130 days there must be something stuck
that's not displayed where I can see it. I'll reboot (which I normally do
only with a kernel upgrade.)

I'll be back to report if the reboot fixed the problem.

Rich
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: LyX document corrupted

2021-12-08 Thread Jean-Marc Lasgouttes

Le 08/12/2021 à 19:49, Jean-Marc Lasgouttes a écrit :

This last attempt to load the current document shows lyx using between
99.7-100.0% of core 14 and 3% of all available cores.

What might cause this?


Can you compile LyX yourself? Actually, I do not remember on what OS you 
use LyX.


Can you do a diff of the file versus the version of yesterday? Or would 
the changes be too big?


Anyway, even if you give up and use a backup, keep a copy of the file, 
LyX should never do this kind of thing.


JMarc
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: LyX document corrupted

2021-12-08 Thread Jean-Marc Lasgouttes

Le 08/12/2021 à 19:43, Rich Shepard a écrit :

On Wed, 8 Dec 2021, Rich Shepard wrote:


I assume it's using all 8 cores because top reports lyx using 100% of the
CPU. The processor is a Ryzen7 2700 with 8 cores and 16 threads.


Okay. Pressing 1 when top's running allows me to see the pid and cpu usage
of each core.

This last attempt to load the current document shows lyx using between
99.7-100.0% of core 14 and 3% of all available cores.

What might cause this?


Can you compile LyX yourself? Actually, I do not remember on what OS you 
use LyX.


JMarc

--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: LyX document corrupted

2021-12-08 Thread Rich Shepard

On Wed, 8 Dec 2021, Rich Shepard wrote:


I assume it's using all 8 cores because top reports lyx using 100% of the
CPU. The processor is a Ryzen7 2700 with 8 cores and 16 threads.


Okay. Pressing 1 when top's running allows me to see the pid and cpu usage
of each core.

This last attempt to load the current document shows lyx using between
99.7-100.0% of core 14 and 3% of all available cores.

What might cause this?

Regards,

Rich
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: LyX document corrupted

2021-12-08 Thread Rich Shepard

On Wed, 8 Dec 2021, Jean-Marc Lasgouttes wrote:


This is very weird, because I did not know that LyX could use 8 core...
What are the active processes?


JMarc,

I assume it's using all 8 cores because top reports lyx using 100% of the
CPU. The processor is a Ryzen7 2700 with 8 cores and 16 threads.

Even if lyx uses only 1 core it's no longer opening documents instantly.

Rich
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: LyX document corrupted

2021-12-08 Thread Jean-Marc Lasgouttes

Le 08/12/2021 à 19:18, Rich Shepard a écrit :
Since replacing the large figure with the smaller one (in the .lyx file) 
lyx

now hogs 100% of all 8 CPU cores and is taking many minutes to load the
file.


This is very weird, because I did not know that LyX could use 8 core... 
What are the active processes?


JMarc
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


LyX document corrupted

2021-12-08 Thread Rich Shepard

Since replacing the large figure with the smaller one (in the .lyx file) lyx
now hogs 100% of all 8 CPU cores and is taking many minutes to load the
file.

Is there a way for me to find why it's doing this without loosing all of
today's work by restoring yesterday's version from the backup?

Rich
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Graphic file formats

2021-12-08 Thread Rich Shepard

On Wed, 8 Dec 2021, Steve Litt wrote:


There are ways to shrink PDF size:
Web search: linux shrink pdf size


SteveT,

First hit uses ghostscript; I never dove deep into gs and didn't know that
it can effectively compress a PDF file. It compressed the original 3,704,503
byte file to 897,417 bytes; a reduction of 76%. That's impressive.

Thanks for the valuable lesson!

Stay well,

Rich

--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: How to find LyX' compile strategy?

2021-12-08 Thread Stephan Witt
Am 08.12.2021 um 18:16 schrieb Steve Litt :
> 
> Dr Eberhard Lisse said on Wed, 8 Dec 2021 17:22:34 +0200
> 
>> What's wrong with
>> 
>>  lyx -f -e pdf5 lawnmower.lyx
>> 
>> or if you must, with
>> 
>>  lyx -f -e luatex lawnmower.lyx && latexmk lawnmower.tex
>> 
>> el
> 
> Thanks el!
> 
> Aside from the fact that latexmk needed a -lualatex arg, nothing was
> wrong with them. And they gave me additional evidence that the root
> cause might not be about the difference in compile method between
> internal LyX and external shellscripts or commands.

Hi Steve,

I’m not sure - but IMO the production of the index files should mention
in the logs the fact of inconsistent page numbers. As long as this happens
one has to redo the latex compilation process including the index creation.

AFAIK LyX scans the logs and is doing exactly that.

Please read the log files of your tools after the first run. 
Probably you’ll find some recommendation about this there.

Sorry, if you are knowing this please ignore this message.

Stephan

> 
> It turns out that, whether with eyeballs, my shellscript, or either of
> your commands, one index item is spectacularly out of bounds,
> supposedly covering pages 21-132, which is patently false. I'm now
> going to use this one reproducible index error to create an MWE, either
> for myself, or for review on the list after suitable Latin has been
> substituted for the proprietary verbiage.
> 
> So thanks very much, because you helped get me over a serious stumbling
> block.
> 
> SteveT
> 
> Steve Litt 
> Spring 2021 featured book: Troubleshooting Techniques of the Successful
> Technologist http://www.troubleshooters.com/techniques
> -- 
> lyx-users mailing list
> lyx-users@lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-users

-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Graphic file formatsx

2021-12-08 Thread Steve Litt
Rich Shepard said on Wed, 8 Dec 2021 07:51:56 -0800 (PST)

>On Wed, 8 Dec 2021, Dr Eberhard Lisse wrote:

>> For my big handbook (which takes 110 seconds to compile (70 on the
>> M1)) I have split this into child documents which compile
>> individually within 10 to 15 seconds.  
>
>How about loading a PDF image that's 3,704,503 bytes in size while
>reading your big handbook?

OK, 3,704,503 bytes got my attention. No wonder it's slow.

There are ways to shrink PDF size:

Web search: linux shrink pdf size

SteveT

Steve Litt 
Spring 2021 featured book: Troubleshooting Techniques of the Successful
Technologist http://www.troubleshooters.com/techniques
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: How to find LyX' compile strategy?

2021-12-08 Thread Steve Litt
Dr Eberhard Lisse said on Wed, 8 Dec 2021 17:22:34 +0200

>What's wrong with
>
>   lyx -f -e pdf5 lawnmower.lyx
>
>or if you must, with
>
>   lyx -f -e luatex lawnmower.lyx && latexmk lawnmower.tex
>
>el

Thanks el!

Aside from the fact that latexmk needed a -lualatex arg, nothing was
wrong with them. And they gave me additional evidence that the root
cause might not be about the difference in compile method between
internal LyX and external shellscripts or commands.

It turns out that, whether with eyeballs, my shellscript, or either of
your commands, one index item is spectacularly out of bounds,
supposedly covering pages 21-132, which is patently false. I'm now
going to use this one reproducible index error to create an MWE, either
for myself, or for review on the list after suitable Latin has been
substituted for the proprietary verbiage.

So thanks very much, because you helped get me over a serious stumbling
block.

SteveT

Steve Litt 
Spring 2021 featured book: Troubleshooting Techniques of the Successful
Technologist http://www.troubleshooters.com/techniques
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Graphic file formatsx

2021-12-08 Thread Steve Litt
Dr Eberhard Lisse said on Wed, 8 Dec 2021 17:14:33 +0200

>What does "slowly" mean?
>
>One could try the "draft" option (of graphicx) which should speed
>things up until the production runs.
>
>For my big handbook (which takes 110 seconds to compile (70 on the M1))
>I have split this into child documents which compile individually
>within 10 to 15 seconds.

That's a lot of time. How many words is this book?

SteveT

Steve Litt 
Spring 2021 featured book: Troubleshooting Techniques of the Successful
Technologist http://www.troubleshooters.com/techniques
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Graphic file formatsx

2021-12-08 Thread Rich Shepard

On Wed, 8 Dec 2021, Dr Eberhard Lisse wrote:


What does "slowly" mean?


It means that when the compiled PDF document reaches a page with the large
data image it sits there while the image appears. I've not timed it but it's
much longer than displaying a new page with text or smaller images.


One could try the "draft" option (of graphicx) which should speed
things up until the production runs.


Regardless of a 'draft' image loading more quickly that's not what readers
use.


For my big handbook (which takes 110 seconds to compile (70 on the M1))
I have split this into child documents which compile individually
within 10 to 15 seconds.


How about loading a PDF image that's 3,704,503 bytes in size while reading
your big handbook?

Rich
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: How to find LyX' compile strategy?

2021-12-08 Thread Dr Eberhard Lisse

What's wrong with

lyx -f -e pdf5 lawnmower.lyx

or if you must, with

lyx -f -e luatex lawnmower.lyx && latexmk lawnmower.tex

el

On 08/12/2021 03:20, Steve Litt wrote:
[...]

The following is my shellscript:

==
#!/bin/sh

namee="lawnmower"

zap_files(){
dot="."
for f in aux idx ilg ind log out pdf tex toc; do
   fname=$namee$dot$f
   rm $fname && echo "Deleted $fname."
done
}

while /bin/true; do
   cd /d/at/books/mm_create
   zap_files
   /bin/texhash
   /usr/local/share/lyx/configure.py
   lyx --export luatex $namee.lyx
   lualatex  $namee.tex
   makeindex $namee.idx
   #texindy $namee.idx
   lualatex $namee.tex
   mupdf $namee.pdf &  #no box
   echo -n "Press Enter to do it again: "
   read junk
done
==

[...]

--
To email me replace 'nospam' with 'el'

--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Graphic file formatsx

2021-12-08 Thread Dr Eberhard Lisse

What does "slowly" mean?

One could try the "draft" option (of graphicx) which should speed
things up until the production runs.

For my big handbook (which takes 110 seconds to compile (70 on the M1))
I have split this into child documents which compile individually
within 10 to 15 seconds.

greetings, el

On 07/12/2021 19:33, Rich Shepard wrote:

Most of the graphics I import into a LyX document are PDFs.  When the
data sets are large they load slowly.

When I create a figure float I see that it's converted to a preferred
format.

Would these figures load more quickly if they were pre-converted?
What is the preferred format?

TIA,

Rich


--
To email me replace 'nospam' with 'el'

--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Graphic file formats

2021-12-08 Thread Rich Shepard

On Wed, 8 Dec 2021, Murat Yildizoglu wrote:


If the plot has many points, the PDF may not be the best choice. I have
even seen cases where the printer cannot process the page with such a plot
I generally choose to export such graphics as a bitmap (PNG) with a high
definition for ensuring a sufficient quality for inclusion in the final
pdf document or to be sent to the editor.


Murat,

That's a thought. I'll give it a test and see how it works.

Thanks,

Rich
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


SOLVED polyglossia loaded after biblatex

2021-12-08 Thread Wolfgang Engelmann



Am 08.12.21 um 10:19 schrieb Jürgen Spitzmüller:

Am Mittwoch, dem 08.12.2021 um 10:07 +0100 schrieb Wolfgang Engelmann:

You mean, I should take this away from the USER preamblel?
\usepackage[english]{babel}


Yes. LyX loads babel automatically (unless you selected Language
package "none" in Language settings, which you shouldn't without good
reasons).


and this should also be taken off?
  >> \usepackage[style=biblatex-spbasic]{biblatex}


Yes. Load biblatex in Document > Settings > Bibliography. You can also
set the spbasic style there.

Jürgen



Thanks, Jürgen,

taking out #

\usepackage[english]{babel}
\usepackage[style=biblatex-spbasic]{biblatex}
from the User preamble

solved the issue

Wolfgang
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: polyglossia loaded after biblatex

2021-12-08 Thread Jürgen Spitzmüller
Am Mittwoch, dem 08.12.2021 um 10:07 +0100 schrieb Wolfgang Engelmann:
> You mean, I should take this away from the USER preamblel?
> \usepackage[english]{babel}

Yes. LyX loads babel automatically (unless you selected Language
package "none" in Language settings, which you shouldn't without good
reasons).

> and this should also be taken off?
>  >> \usepackage[style=biblatex-spbasic]{biblatex}

Yes. Load biblatex in Document > Settings > Bibliography. You can also
set the spbasic style there.

Jürgen



signature.asc
Description: This is a digitally signed message part
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: polyglossia loaded after biblatex

2021-12-08 Thread Wolfgang Engelmann



Am 08.12.21 um 09:57 schrieb Jürgen Spitzmüller:

Am Mittwoch, dem 08.12.2021 um 08:58 +0100 schrieb Wolfgang Engelmann:

My preamble:

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
%%\setmainlanguage{english}
%\usepackage{biblatex}
%biblatex-spbasic Herbert Voss
\usepackage{xurl}
\usepackage[style=biblatex-spbasic]{biblatex}
\usepackage{libertinus-otf}}
 more without relevance to the question


This is your USER preamble (Document > Settings > LaTeX preamble)? Why
do you load babel and biblatex manually? And why does LaTeX warn about
polyglossia if you load babel?


You mean, I should take this away from the USER preamblel?
\usepackage[english]{babel}

and this should also be taken off?
>> \usepackage[style=biblatex-spbasic]{biblatex}

Wolfgang


This might be relevant?
from
https://wiki.lyx.org/BibTeX/Biblatex).#toc8
Using Biblatex with polyglossia (XeTeX or LuaTeX with non-TeX fonts)


No, this is old stuff that does not apply to LyX 2.3.

Jürgen



--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: polyglossia loaded after biblatex

2021-12-08 Thread Jürgen Spitzmüller
Am Mittwoch, dem 08.12.2021 um 08:58 +0100 schrieb Wolfgang Engelmann:
> My preamble:
> 
> \usepackage[utf8]{inputenc}
> \usepackage[english]{babel}
> %%\setmainlanguage{english}
> %\usepackage{biblatex}
> %biblatex-spbasic Herbert Voss
> \usepackage{xurl}
> \usepackage[style=biblatex-spbasic]{biblatex}
> \usepackage{libertinus-otf}}
>  more without relevance to the question

This is your USER preamble (Document > Settings > LaTeX preamble)? Why
do you load babel and biblatex manually? And why does LaTeX warn about
polyglossia if you load babel?

> This might be relevant?
> from
> https://wiki.lyx.org/BibTeX/Biblatex).#toc8
> Using Biblatex with polyglossia (XeTeX or LuaTeX with non-TeX fonts)

No, this is old stuff that does not apply to LyX 2.3.

Jürgen



signature.asc
Description: This is a digitally signed message part
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users