Re: bibentry and LyX?

2020-03-18 Thread Bernd

Found it: for some unknown reason, urldate is split up into urlyear,
urlmonth and urlday.

\AtBeginDocument{\AtEveryCitekey{\clearfield{urlyear}}}

works.

Bernd :)

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


Re: bibentry and LyX?

2020-03-18 Thread Bernd

Hello again...

When I tried this method with urldate instead of url, it did not work
(i.e. field was not supressed). Strangely, there were no error messages.

   \AtBeginDocument{\AtEveryCitekey{\clearfield{urldate}}}

I also checked for lastvisited and lastchecked, though my .bib file
contains urldate.

Do you have an idea what went wrong?

Regards,

Bernd


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


Re: Graphics problems with LyX 2.3.4.2 on Linux Mint

2020-03-18 Thread Paul A. Rubin

On 3/18/20 3:19 PM, Graeme wrote:
I currently use Linux Mint 18.3. Recently I upgraded to LyX 2.3.4.2 
using the PPA available at

http://ppa.launchpad.net/lyx-devel/release/ubuntu xenial main

Since this upgrade there have been problems with the display of EPS 
and PDF graphics files in the main LyX editor window, and with the 
export of files containing PNG and JPEG bitmap images.


These problems are not evident with LyX 2.3.4.3 on Windows 10, nor 
were they present with LyX 2.3.3 on Linux Mint 18.3.


Specifically:

1. When including a graphic with either EPS or PDF format, the graphic 
is not displayed in the main LyX editor window, but instead there is 
an outline box with the EPS or PDF filename, and below it the error 
message: Error converting to loadable format.


The graphic does appear correctly in a PDF file exported using either 
ps2pdf or pdflatex.


2. When including a graphic with PNG or JPEG format, the graphic is 
displayed correctly in the main LyX editor window, but when attempting 
to export the LyX file to Postscript, PDF (using ps2pdf), or even just 
plain LaTeX, an error pop-up window appears with the title:

LyX: Cannot convert file
and the message:
No information for converting png format files to eps. Define a 
converter in the preferences or No information for converting jpg 
format files to eps. Define a converter in the preferences.


The PNG and JPEG graphics do appear correctly in a PDF file exported 
using pdflatex, but attempting to export with ps2pdf fails.


When exporting the Progress Log window shows the following messages 
for a graphic in PNG format:


python -tt "/usr/share/lyx/scripts/convertDefault.py" png 
"/tmp/lyx_tmpdir.fGfmcihv6288/lyx_tmpbuf0/2_home_graeme_Documents_GraphicsTestCircle.png" 
eps 
"/tmp/lyx_tmpdir.fGfmcihv6288/lyx_tmpbuf0/2_home_graeme_Documents_GraphicsTestCircle.eps" 

convert: not authorized 
`eps:/tmp/lyx_tmpdir.fGfmcihv6288/lyx_tmpbuf0/2_home_graeme_Documents_GraphicsTestCircle.eps' 
@ error/constitute.c/WriteImage/1028.

/usr/share/lyx/scripts/convertDefault.py ERROR
Execution of "convert" failed.support/Systemcall.cpp (276): 
Systemcall: 'python -tt "/usr/share/lyx/scripts/convertDefault.py" 
png 
"/tmp/lyx_tmpdir.fGfmcihv6288/lyx_tmpbuf0/2_home_graeme_Documents_GraphicsTestCircle.png" 
eps 
"/tmp/lyx_tmpdir.fGfmcihv6288/lyx_tmpbuf0/2_home_graeme_Documents_GraphicsTestCircle.eps"' 
finished with exit code 1

Error: Cannot convert file


I get similar messages for a graphic file in JPEG format.

My suspicion is that BOTH the problems above may be linked to the use 
of ImageMagick within convertDefault.py, but I am puzzled by the 
warning message

"convert: not authorized"
in the fragment above, suggesting it may be something to do with file 
or folder permissions.
However, this does not explain why everything seemed to work OK with 
LyX 2.3.3 on Mint 18.3


On Mint 18.3 the system-wide installation of ImageMagick is:
ImageMagick 6.8.9-9 Q16 x86_64 2019-11-12

On Windows 10, the LyX2.3.4.3 installer comes bundled with a later 
version:

ImageMagick 7.0.9-19 Q16 x86 2020-01-26
which explicitly lists built-in support for gslib and ps, but 
ImageMagick 6 does not list these among its "Delegates".


I would welcome advice on how to fix these problems.

Graeme


Confirmed here (same OS and LyX version). Turns out it's a security 
issue related to ImageMagick. See this post 
 for the 
gory details. If you're willing to take the risk (I am), you can follow 
the suggestions in the post, but there may be a quicker way. Wander over 
to /etc/Imagick-6 and list the directory. You should see policy.xml and 
policy.xml.dpkg-old. They former is the higher security/problematic 
policy file in force, and the .dpkg-old version is the looser, less 
secure (but more LyX friendly) version. As root, give the new one a new 
name or extension to keep it (or delete it if you will) and move or copy 
the .dpkg-old version to policy.xml. Worked for me.


Paul

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


Graphics problems with LyX 2.3.4.2 on Linux Mint

2020-03-18 Thread Graeme
I currently use Linux Mint 18.3. Recently I upgraded to LyX 2.3.4.2 
using the PPA available at

http://ppa.launchpad.net/lyx-devel/release/ubuntu xenial main

Since this upgrade there have been problems with the display of EPS and 
PDF graphics files in the main LyX editor window, and with the export of 
files containing PNG and JPEG bitmap images.


These problems are not evident with LyX 2.3.4.3 on Windows 10, nor were 
they present with LyX 2.3.3 on Linux Mint 18.3.


Specifically:

1. When including a graphic with either EPS or PDF format, the graphic 
is not displayed in the main LyX editor window, but instead there is an 
outline box with the EPS or PDF filename, and below it the error 
message: Error converting to loadable format.


The graphic does appear correctly in a PDF file exported using either 
ps2pdf or pdflatex.


2. When including a graphic with PNG or JPEG format, the graphic is 
displayed correctly in the main LyX editor window, but when attempting 
to export the LyX file to Postscript, PDF (using ps2pdf), or even just 
plain LaTeX, an error pop-up window appears with the title:

LyX: Cannot convert file
and the message:
No information for converting png format files to eps. Define a 
converter in the preferences or No information for converting jpg format 
files to eps. Define a converter in the preferences.


The PNG and JPEG graphics do appear correctly in a PDF file exported 
using pdflatex, but attempting to export with ps2pdf fails.


When exporting the Progress Log window shows the following messages for 
a graphic in PNG format:


python -tt "/usr/share/lyx/scripts/convertDefault.py" png "/tmp/lyx_tmpdir.fGfmcihv6288/lyx_tmpbuf0/2_home_graeme_Documents_GraphicsTestCircle.png" eps "/tmp/lyx_tmpdir.fGfmcihv6288/lyx_tmpbuf0/2_home_graeme_Documents_GraphicsTestCircle.eps" 

convert: not authorized `eps:/tmp/lyx_tmpdir.fGfmcihv6288/lyx_tmpbuf0/2_home_graeme_Documents_GraphicsTestCircle.eps' @ error/constitute.c/WriteImage/1028. 

/usr/share/lyx/scripts/convertDefault.py ERROR 

Execution of "convert" failed.support/Systemcall.cpp (276): Systemcall: 'python -tt "/usr/share/lyx/scripts/convertDefault.py" png "/tmp/lyx_tmpdir.fGfmcihv6288/lyx_tmpbuf0/2_home_graeme_Documents_GraphicsTestCircle.png" eps "/tmp/lyx_tmpdir.fGfmcihv6288/lyx_tmpbuf0/2_home_graeme_Documents_GraphicsTestCircle.eps"' finished with exit code 1 


Error: Cannot convert file


I get similar messages for a graphic file in JPEG format.

My suspicion is that BOTH the problems above may be linked to the use of 
ImageMagick within convertDefault.py, but I am puzzled by the warning 
message

"convert: not authorized"
in the fragment above, suggesting it may be something to do with file or 
folder permissions.
However, this does not explain why everything seemed to work OK with LyX 
2.3.3 on Mint 18.3


On Mint 18.3 the system-wide installation of ImageMagick is:
ImageMagick 6.8.9-9 Q16 x86_64 2019-11-12

On Windows 10, the LyX2.3.4.3 installer comes bundled with a later version:
ImageMagick 7.0.9-19 Q16 x86 2020-01-26
which explicitly lists built-in support for gslib and ps, but 
ImageMagick 6 does not list these among its "Delegates".


I would welcome advice on how to fix these problems.

Graeme


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


Re: bibentry and LyX?

2020-03-18 Thread Bernd

Am Mittwoch, den 18.03.2020, 18:44 +0100 schrieb Bernd:


in the preamble, it says "not defined" (which should not be the
case).


Either use it in the document body or in preamble within
\AtBeginDocument{
...
}

This is because biblatex needs to be loaded very late (after the user
preamble).

Jürgen


Document body does not work, that's what I tried out first.

But putting \AtEveryCitekey{\clearfield{url}} in a \AtBeginDocument{...} 
container works!

Thank you very much.

Kind regards,
Bernd

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


Re: bibentry and LyX?

2020-03-18 Thread Jürgen Spitzmüller
Am Mittwoch, den 18.03.2020, 18:44 +0100 schrieb Bernd:
> in the preamble, it says "not defined" (which should not be the
> case).

Either use it in the document body or in preamble within
\AtBeginDocument{
...
}

This is because biblatex needs to be loaded very late (after the user
preamble).

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: bibentry and LyX?

2020-03-18 Thread Bernd

Yes, I saw that, but if I put

   \AtEveryCitekey{\clearfield{url}}

in the preamble, it says "not defined" (which should not be the case).

I have to look closer into it.


Alternatively, if I use url=false in the biblatex options, can I somehow
toggle it to url=true for the bibliography?

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


Re: bibentry and LyX?

2020-03-18 Thread Jürgen Spitzmüller
Am Mittwoch, den 18.03.2020, 17:06 +0100 schrieb Bernd:
> But can it be automated?
> I want the URL only to show up in the dedicated bibliography at the
> end.
> Something like \AtEachCitekey or \AtEveryCitekey (or maybe
> \AddToCitekey if such a thing exists)...

\AtEveryCitekey exists. See biblatex manual.

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: bibentry and LyX?

2020-03-18 Thread Bernd

Am Dienstag, den 17.03.2020, 19:11 +0100 schrieb Bernd:

/Dear lyx-users, />//>/I want to use bibentry: />//>/> \usepackage{bibentry} />/> />/> 
\nobibliography />/> ... />/> \bibentry{xyz} />//>/But it says it misses biblatex (which is not true because 
it comes />/preloaded in LyX). /

bibentry is part of the natbib package. Its last release has been made
in 2006, before biblatex was even born.

These won't work together.


/However, I noticed that it is possible to do the same via 
/>/Insert/Literature/Complete. />/Can someone confirm that this is now the only 
possibility? /

It's at least how you do it with biblatex.


/While I have your attention, I want to suppress the URL part of the 
/>/reference. Is this possible at all? /

Just before the reference:
\AtNextCitekey{\clearfield{url}}

Jürgen


//>/Kind regards, />/Bernd /That works! :)


But can it be automated?
I want the URL only to show up in the dedicated bibliography at the end.
Something like \AtEachCitekey or \AtEveryCitekey (or maybe \AddToCitekey if 
such a thing exists)...

Kind regards,
Bernd

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


Hyperref support

2020-03-18 Thread Steve Hnizdur

Hi

When "Use Hyperref Support" is checked in PDF properties Lyx 
automatically inserts


\usepackage[unicode=true,
 bookmarks=false,
 breaklinks=false,pdfborder={0 0 1},backref=section,colorlinks=false]
 {hyperref}

in the preamble. Any ideas where all these options come from? are they 
hard coded?


Setting "unicode=false" in additional options doesn't seem to override 
the "unicode=true". So if unicode=true is causing a problem (in 
particular trying to redefine \C or \G) then this all has to added manually.


MWE attached. Using Lyx 2.3.4.2 on Ubuntu 18.04
--

Steve Hnizdur


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


Re: bibentry and LyX?

2020-03-18 Thread Jürgen Spitzmüller
Am Dienstag, den 17.03.2020, 19:11 +0100 schrieb Bernd:
> Dear lyx-users,
> 
> I want to use bibentry:
> 
> > \usepackage{bibentry}
> > 
> > \nobibliography
> > ...
> > \bibentry{xyz}
> 
> But it says it misses biblatex (which is not true because it comes
> preloaded in LyX).

bibentry is part of the natbib package. Its last release has been made
in 2006, before biblatex was even born.

These won't work together.

> However, I noticed that it is possible to do the same via
> Insert/Literature/Complete.
> Can someone confirm that this is now the only possibility?

It's at least how you do it with biblatex.

> While I have your attention, I want to suppress the URL part of the
> reference. Is this possible at all?

Just before the reference:
\AtNextCitekey{\clearfield{url}}

Jürgen

> 
> Kind regards,
> Bernd


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