Re: lyx-2.3.0alpha1-1 crash

2017-06-01 Thread PhilipPirrip

On 05/28/2017 08:20 AM, Guillaume MM wrote:

Here is a patch, reviews are welcome.


Can't say much about the patch, but want to confirm that LyX is not 
crashing any more.


Also pinging others to review the code, I think this is a pretty nasty 
bug that definitely needs more testing.




Re: lyx-2.3.0alpha1-1 crash

2017-05-26 Thread PhilipPirrip

On 05/26/2017 05:04 PM, PhilipPirrip wrote:


I think I caught this one too. I was working on a document with a few 
float figures exported from inkscape as pdf, LyX 2.3.0alpha1 crashed 
after updating (saving as pdf) one of the figures.
I was running J. Matos' version from 
https://copr.fedorainfracloud.org/coprs/jamatos/lyx-next/

Will try to reproduce.





This is how I crashed LyX now:
I had my 3000 word document open, four figure floats in it: Fig1.pdf to 
Fig4.pdf.

"/bin/cp Fig4.pdf Fig3.pdf" was enough to crash it.





lyx: SIGSEGV signal caught!
Sorry, you have found a bug in LyX, hope you have not lost any data.
Please read the bug-reporting instructions in 'Help->Introduction' and 
send us a bug report, if necessary. Thanks!

Bye.
Error: LyX crashed!

SIGSEGV signal caught!
Sorry, you have found a bug in LyX, hope you have not lost any data.
Please read the bug-reporting instructions in 'Help->Introduction' and 
send us a bug report, if necessary. Thanks!

Bye.
(  1) lyx-devel: lyx-devel(+0x5d5298) [0x55a4cb8fa298]
(  2) lyx-devel: lyx-devel(+0x639f9e) [0x55a4cb95ef9e]
(  3) lyx-devel: lyx-devel(+0x5d4560) [0x55a4cb8f9560]
(  4) lyx-devel: lyx-devel(+0x28b02b) [0x55a4cb5b002b]
(  5) /lib64/libc.so.6: /lib64/libc.so.6(+0x35990) [0x7f12b5379990]
(  6) /lib64/libQt5Core.so.5: QFileInfo::absoluteFilePath() const
(  7) lyx-devel: lyx-devel(+0x81760e) [0x55a4cbb3c60e]
(  8) lyx-devel: lyx-devel(+0x7f0848) [0x55a4cbb15848]
(  9) lyx-devel: lyx-devel(+0x82c5aa) [0x55a4cbb515aa]
( 10) lyx-devel: lyx-devel(+0x8288fa) [0x55a4cbb4d8fa]
( 11) /lib64/libQt5Core.so.5: QMetaObject::activate(QObject*, int, int, 
void**)

( 12) /lib64/libQt5Core.so.5: QTimer::timerEvent(QTimerEvent*)
( 13) /lib64/libQt5Core.so.5: QObject::event(QEvent*)
( 14) /lib64/libQt5Widgets.so.5: 
QApplicationPrivate::notify_helper(QObject*, QEvent*)

( 15) /lib64/libQt5Widgets.so.5: QApplication::notify(QObject*, QEvent*)
( 16) lyx-devel: lyx-devel(+0x5e647c) [0x55a4cb90b47c]
( 17) /lib64/libQt5Core.so.5: 
QCoreApplication::notifyInternal2(QObject*, QEvent*)

( 18) /lib64/libQt5Core.so.5: QTimerInfoList::activateTimers()
( 19) /lib64/libQt5Core.so.5: /lib64/libQt5Core.so.5(+0x294279) 
[0x7f12b668c279]
( 20) /lib64/libglib-2.0.so.0: 
/lib64/libglib-2.0.so.0(g_main_context_dispatch+0x162) [0x7f12b7a8be52]
( 21) /lib64/libglib-2.0.so.0: /lib64/libglib-2.0.so.0(+0x4a1d0) 
[0x7f12b7a8c1d0]
( 22) /lib64/libglib-2.0.so.0: 
/lib64/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x7f12b7a8c27c]
( 23) /lib64/libQt5Core.so.5: 
QEventDispatcherGlib::processEvents(QFlags)
( 24) /lib64/libQt5Core.so.5: 
QEventLoop::exec(QFlags)

( 25) /lib64/libQt5Core.so.5: QCoreApplication::exec()
( 26) lyx-devel: lyx-devel(+0x293fbd) [0x55a4cb5b8fbd]
( 27) lyx-devel: lyx-devel(+0x124dd6) [0x55a4cb449dd6]
( 28) /lib64/libc.so.6: /lib64/libc.so.6(__libc_start_main+0xf1) 
[0x7f12b5364401]

( 29) lyx-devel: lyx-devel(+0x12ddca) [0x55a4cb452dca]
Aborted (core dumped)



\noun, \emph or any other text style change of a \href inset

2017-05-25 Thread PhilipPirrip

This used to work fine until LyX 2.3:

insert a hyperlink
select, toggle noun

you'll get
\noun{}\href{http://www.lyx.org}{lyx}

instead of
\noun{\href{http://www.lyx.org}{lyx}}


Is this intended behavior?


With \marginpar one gets
\noun{}\marginpar{\noun{bbb}}
which kind of makes more sense, but wouldn't work with \href.





Re: recent master: Missing '\end_inset' of Float inset

2017-05-15 Thread PhilipPirrip
Just noticed the same. It seems enough to have "\lyxformat 543" changed 
to, say, "\lyxformat 534" in an otherwise regular, simplest, empty LyX 
2.3 file.


Thus:
save an empty file newfile1.lyx
change lyxformat number in it
the warning will show when reopening



Re: "early preamble"

2017-04-17 Thread PhilipPirrip

On 04/15/2017 05:58 AM, Guenter Milde wrote:

I would suggest 2 tabs in Document>Settings>User preamble, where the
"normal" preamble is the default and the "early" preamble gets a
documentation line telling about the specifics.

We should think about the right place, though: placing it before any
LaTeX command or after the \documentclass line?



I've had issues with (the order of) LyX loaded packages for a while and 
been thinking that a good way to go would be having a 'z value' for each 
and every of those that could be changed by user through layout files. 
Value 0 could be 'do not load at all' (yes, i know, there's 'provides 
package 1' trick). The packages should receive z values in, say, 
multiples of 10(0), so that there's enough space for shuffling and 
inserting of user desired ones.
This should provide much more flexibility than having two preambles, and 
shouldn't be too hard to implement.

Your thoughts?



Re: [patch] support for fontspec options

2017-04-11 Thread PhilipPirrip

On 04/11/2017 11:23 AM, Stephan Witt wrote:
> In fact you agree with Jürgen, IMO. He said it’s not enough to add a 
line edit to add the options.


What I understood Juergen said is: one should have clickable buttons for 
every possible option, and no other way of passing options to the packages.
What I'm saying, agreeing with Uwe, is that having a line edit where 
adding an infinite set of "optionA, optionB=true, optionC=whatever" 
should be possible. LyX has this in many places, starting with the 
additional options to \documentclass.

Huge packages like biblatex, hyperref, listings, etc. definitely need this.

My proposal of having "a general sheet where one could send options to 
(the calls of) this and that package would be a good way to go - that 
means, not by just using \SendOptionsToPackage" will be a freestyle 
sheet, where one would have a text input field for the package name, and 
a text input field for all the options that need to be passed to it.


packageA: optionA1, optionA2=false, optionA3
packageB: optionB1
packageC: optionC1=whatever
etc




Re: [patch] support for fontspec options

2017-04-11 Thread PhilipPirrip

On 04/11/2017 02:30 AM, Jürgen Spitzmüller wrote:

And I tried to argue that I think these line edits are not a suitable
UI.
It is much more different, since the line edit are supposed complex
key-value pairs.


Let me disagree with you on this, Juergen. As a long-time user, I too 
often missed being able to add options to packages that are called by 
LyX, that I believe every such package should have a line edit for its 
options. Because, let's face it, LyX will never be able to add support 
for all the options of latex packages, and it so often happens that even 
the simplest enhancement request take a decade to get fulfilled.
Some of fontspec options are really essential to the proper functioning 
of the package, it'd be a pity not to have this implemented. In a nicer 
way when it comes to UI, I agree.


Maybe a general sheet where one could send options to (the calls of) 
this and that package would be a good way to go - that means, not by 
just using \SendOptionsToPackage.




Re: Reproducible crash with attached template

2017-01-26 Thread PhilipPirrip

On 01/26/2017 04:11 AM, Kornel Benko wrote:

Master branch

Steps to reproduce
1.) File->New from template...
2.) Insert some text in the row above 'D-PLZ Stadt'
3.) File->Save as ...
crash

Kornel



Can't reproduce. I'm at 8491962c6bc, compiling after cmake 
-DLYX_USE_QT=QT5, Qt is v. 5.7.1.





Re: biblatex (features/biblatex2) branch and master/child

2017-01-16 Thread PhilipPirrip

On 01/15/2017 09:14 AM, Jürgen Spitzmüller wrote:

This is an old feature. If you enter "default" in the bibliography
style widget (in the BibTeX dialog), then this is replaced with this
"Default bibtex style".

I did not change this behavior, although I think the UI is sub-optimal.



Oh, I see.  This should be in Tools>Preferences I guess since it's not 
document-specific (is it being saved with the document?)

LyX could even remember the last value chosen for the bibtex inset.




less important bugs with biblatex2 (now in master)

2017-01-15 Thread PhilipPirrip
I'll be reporting less important bugs here, if they don't make it into 
the release, I'll report again on lyx.org bug tracker for future fixes.




--- sectioned bibliography bug ---

New document, code view on.

Insert a bib database

in Document Settings, Bibliography, select "sectioned bibliography"; 
this adds \usepackage[dot]{bibtopic}


switch from bibtex to biblatex, same dialog

\usepackage[dot]{bibtopic} remains, even though "sectioned bibliography" 
option is disabled


(biblatex has its own sectioning options, so i guess this package is not 
needed/desirable)




Re: biblatex (features/biblatex2) branch and master/child

2017-01-15 Thread PhilipPirrip

On 01/15/2017 08:16 AM, Kornel Benko wrote:
> Which dialog? I don't see problems in Document->Settings->bibliography

The dialog where you (normally/only) set the bibliography style: press 
the "Biblatex generated bibliography" button. The field "Style" is 
missing even though the document uses bibtex/natbib.
The button itself switches (should switch, that is) from biblatex to 
bibtex (generated bibliography) as you change the setting in Document 
Settings. But not in this document. Probably because it was saved as a 
child of master.


Also note that 	changing bibliography style in Document Settings, 
Bibliography from plain to anything else does not change latex code.


So this is yet another thing: what does "Default bibtex style" in 
Document Settings, Bibliography do? I don't see any change in latex code.






Re: biblatex (features/biblatex2) branch and master/child

2017-01-15 Thread PhilipPirrip

Next:
open my childTwo.lyx alone. It's been set to use Natbib (BibTeX), and 
LaTeX code reflects that. But the "xxx generated bibliography" has 
xxx=Biblatex, and it's impossible to change it to what it's supposed to 
be, xxx=Bibtex.
That also prevents one from changing \bibliographystyle from {plain} 
(no option for bibliography style in the dialog).









Re: biblatex (features/biblatex2) branch and master/child

2017-01-14 Thread PhilipPirrip

On 01/14/2017 05:39 AM, Jürgen Spitzmüller wrote:

I prefer to get them without jumping through such hoops.


I'm sorry, I was switching from t'bird to some other news readdder.
Attaching the files again.


childOne.lyx
Description: application/lyx


childTwo.lyx
Description: application/lyx


master.lyx
Description: application/lyx


Re: biblatex (features/biblatex2) branch and master/child

2017-01-13 Thread PhilipPirrip
On Fri, 13 Jan 2017 18:47:12 +0100, Jürgen Spitzmüller wrote:

> Right. As I wrote you: please update to the most recent version (which
> is in master meanwhile, not features/biblatex2!).
> 
> Please report back if this issue still persists.

This is what I understand you did: even if the child does not use biblatex 
and its code contains bibtex commands \bibliographystyle and 
\bibliography those won't be used when compiling the master document. All 
good.


I'm reporting that the master document won't compile with a child 
document containing some commands specific to natbib.
In the attached examples, it will be because of a citation command in 
childOne.lyx. 
Can this be translated on the fly? 

Thanks a lot for working on biblatex support, Juergen!



Re: biblatex (features/biblatex2) branch and master/child - "childOne.lyx" yEnc

2017-01-13 Thread PhilipPirrip
=ybegin line=128 size=1856 name=childOne.lyx
Mv��J\X]J���JJXJp��JJJ���JdYY���X���X���Y4��J_]Z4���4�4�
�J4���J���4��J���4J4���J��X���4�
J�4�J���4�J���4��J4�J��4���JL���LJL���L4
��JL���LJL���L4JL���LJL���L4��JLLJLL4J���4��
J�4J�4�J�4��J[ZZJ[ZZ4��J[ZZJ[ZZ4��J�4�J�
��4��J���4JZ4���J���4��J���4��J���4J
��4�J�4��J���4�J�4J���J[4J���J[4J���
���J[4J�J[4JJ[4J�J[4J��J[4JJ[4��
��JJ[4J��J[4J��4�J��4�J4
��J��4���J��4�J�4J�4�J4�
�J�4��J4�J[4��Js4�J���4��JMZZbZZZ4��4J]4�J]4
�J��4��J���4�J���4���JZ4�J[4���J[4��
�J���4�J�4���J�4�JZ4�JZ4���J
�4���44���44�J}���4J��J�Jy��J4Jm��sJ4vm��J�4���J
L�d��d�L44��444���44�4�4
=yend size=1856 crc32=515fab52




Re: biblatex (features/biblatex2) branch and master/child - "childTwo.lyx" yEnc

2017-01-13 Thread PhilipPirrip
=ybegin line=128 size=1919 name=childTwo.lyx
Mv��J\X]J���JJXJp��JJJ���JdYY���X���X���Y4��J_]Z4���4�4�
�J4���J���4��J���4J4���J��X���4�
J�4�J���4�J���4��J4�J��4���JL���LJL���L4
��JL���LJL���L4JL���LJL���L4��JLLJLL4J���4��
J�4J�4�J�4��J[ZZJ[ZZ4��J[ZZJ[ZZ4��J�4�J�
��4��J���4JZ4���J���4��J���4��J���4J
��4�J�4��J���4�J�4J���J[4J���J[4J���
���J[4J�J[4JJ[4J�J[4J��J[4JJ[4��
��JJ[4J��J[4J��4�J��4�J4
��J��4���J��4�J�4J�4�J4�
�J�4��J4�J[4��Js4�J���4��JMZZbZZZ4��4J]4�J]4
�J��4��J���4�J���4���JZ4�J[4���J[4��
�J���4�J�4���J�4�JZ4�JZ4���J
�4���44���44�J}���4J��J�J~��J4���44�J}���4Jm��s�
���J��4vm��J��4JLWL4���JL�L44��444���44�4�4
=yend size=1919 crc32=f5cb8f05




Re: biblatex (features/biblatex2) branch and master/child - "master.lyx" yEnc

2017-01-13 Thread PhilipPirrip
=ybegin line=128 size=2094 name=master.lyx
Mv��J\X]J���JJXJp��JJJ���JdYY���X���X���Y4��J_]Z4���4�4�
�J4���J���4��J���4J4�J�4�J��
�4�J���4��J4�J��4���JL���LJL���L4��JL���LJL�
��L4JL���LJL���L4��JLLJLL4J���4��J�4
J�4�J�4��J[ZZJ[ZZ4��J[ZZJ[ZZ4��J�4�J���4
��J���4JZ4���J���4��J���4��J���4J��4
�J�4��J���4�J�4J���J[4J���J[4J��J[4J
�J[4JJ[4J�J[4J��J[4JJ[4JJ[4�
���J��J[4J4�J��4�J�4���JJ4��
J��4���J��4�J�4J�4�J4��J
�4��J4�J[4��Js4�J���4��JMZZbZZZ4��4J]4�J]4��
���J��4��J���4�J���4���JZ4�J[4���J[4
���J���4�J�4���J�4�JZ4�JZ4���J�4
���44���44�J}���4J��J��J4Jm��sJ4vm��J�4���JL
VY�V���L44��444���44�J}���4Jm��sJ���4vm��J��
�4JL�y��X���L44��444Jm��sJ���4vm��J���4JL�~��X���L44
��444���44�4�4
=yend size=2094 crc32=395bf9a5




Re: biblatex (features/biblatex2) settings dialog

2017-01-13 Thread PhilipPirrip
On Fri, 13 Jan 2017 18:48:13 +0100, Jürgen Spitzmüller wrote:
> I think I have fixed this today.
> Please try again with recent master (not features/biblatex2).

OK, thanks. This works now. 

Hope you don't mind if I report other findings here. Reporting on lyx.org 
bug tracker takes too much time:

New document. Choose biblatex in Document Settings. Insert an option, 
Apply. Delete the option - it remains in the arguments to biblatex call, 
and it's back there when reopening the document.



biblatex (features/biblatex2) settings dialog

2017-01-13 Thread PhilipPirrip
The biblatex settings dialog enters some undefined state when one 
- chooses Style engine Biblatex
- changes, for example, Biblatex bibliography style field to some other 
value
- presses either of the two Reset buttons or Match

The other style (in this example Biblatex citation style) dropdown menu 
becomes inactive, i.e. it shows no items, and pressing the Reset button 
gives unpredictable results in exported latex code.

Can anyone confirm this? 



biblatex (features/biblatex2) branch and master/child

2017-01-13 Thread PhilipPirrip
This is probably more of a general issue: when *master* is set to use 
biblatex, and a child hasn't been changed to use biblatex as well but 
uses, for example, natbib, two inconsistencies can happen:
1) when child contains "Insert>...>Bibliography", it will have 
\bibliographystyle and \bibliography commands, but will add the correct  
\addbibresource to the master. The solution would be to automatically 
switch the child to biblatex or at least warn the users of this 
inconsistency on their side. 
2) child can have commands like \citeyearpar that will not be recognized 
by biblatex when the master document is compiled. 

I'm actually wondering if there's really need for child documents to have 
their own Document>Settings (their own preamble), independent of the 
master document's settings. 

What are your thoughts?






Re: using older Lyx documents after upgrading

2016-07-20 Thread PhilipPirrip

On 07/19/2016 06:50 AM, Michael Berger wrote:

but trying to compile any of my classicthesis-LyX-v4.1 documents I get
either an endless loop or heaps of errors - there are so many different
errors that I eventually gave up trying to fix them


I can't confirm this, even classicthesis for LyX v. 3 compiles well - as 
it should, there's nothing in LyX that has changed that should make it 
impossible.
An endless loop of errors sometimes means you only need to change one 
thing... some packages are known to have updates that are not backwards 
compatible and can break things horribly.





ancient history, v 0.10.7 beta

2016-06-29 Thread PhilipPirrip
For those interested in ancient history of LyX: I've just found my first 
Linux distribution CD, with LyX 0.10.7 from October 1996 on it.

Online sources I found go only about 18 years back.
JMarc still probably has it somewhere, this is for all others:
http://wiki.lyx.org/uploads/Devel/ancient/




Happy 21st birthday, LyX!



Re: provides "package" 1

2016-06-22 Thread PhilipPirrip

On 06/21/2016 10:51 AM, Richard Heck wrote:

On 06/21/2016 06:58 AM, PhilipPirrip wrote:

I was wondering if there's a special reason why
provides fontenc 1
provides inputenc 1
provides amsmath 1

prevent the corresponding packages from loading, but

provides fontspec 1
provides listings 1
provides polyglossia 1

-for example- don't?



Yes, that's a bug. This should work for all LyX-loaded packages.



Thanks Richard. I reported it at http://www.lyx.org/trac/ticket/10257.

A little of background: there are packages (.sty) that load some of 
these *with options* themselves. It's unclear which options will 
actually be used. In this situation, for example,


\usepackage{pkg}
\usepackage[opt1,opt2]{pkg}

opt1 and opt2 will not be used, and LaTeX might even stop compiling.



provides "package" 1

2016-06-21 Thread PhilipPirrip

I was wondering if there's a special reason why
provides fontenc 1
provides inputenc 1
provides amsmath 1

prevent the corresponding packages from loading, but

provides fontspec 1
provides listings 1
provides polyglossia 1

-for example- don't?

Should I report a bug?





Re: [PATCH] microtype

2016-06-01 Thread PhilipPirrip

On 06/01/2016 02:12 PM, Pavel Sanda wrote:

Anyway would you like to see it in text or page layout?



Between these two, I say: Text layout definitely!
Even Fonts section should be OK, as this makes use and/or changes 
features of individual glyphs and whole fonts.

Microtype isn't ONLY about how a line of text should be long.


Speaking of this: why is "Use justification in LyX work area" in Text 
Layout of Document Settings, and not in Preferences, like 
Look/Screen Fonts and Colors are?


CRASH 2.2.0dev with XeLaTeX and Utopia font

2016-04-15 Thread PhilipPirrip

Don't ask me how I find these...
I'm at 744f6e3cd802 now, compiled with Qt 5.6.0 on Linux Fedora 24. I 
get the same behavior with an older binary compiled with Qt 4.8.7.

Before filing a bug report, I need someone to confirm:

Start LyX 2.2
New Document
Type something in, say, abcd
Document Settings > Fonts >  Use non-TeX fonts
Roman: Utopia
View [PDF (XeTeX)]
LyX crashes


This only seems to happen when I choose Utopia, tried at least 20 others.



xdvipdfmx:fatal: Cannot proceed without the font: 
/usr/share/X11/fonts/Type1/UTRG.pfa


Output file removed.
support/lassert.cpp (51): ASSERTION status != ExportSuccess VIOLATED IN 
/home/ivo/AllWorkAndNoPlay/lyx/src/Buffer.cpp:4323

(  1) ./bin/lyx2.2: lyx::doAssertWithCallstack(bool)
(  2) ./bin/lyx2.2: lyx::doAssert(char const*, char const*, long)
.
.
.
( 13) ./bin/lyx2.2: 
QtConcurrent::RunFunctionTask::run()
( 14) /lib64/libQt5Core.so.5: /lib64/libQt5Core.so.5(+0xa97b2) 
[0x7f0b9681b7b2]
( 15) /lib64/libQt5Core.so.5: /lib64/libQt5Core.so.5(+0xad52f) 
[0x7f0b9681f52f]
( 16) /lib64/libpthread.so.0: /lib64/libpthread.so.0(+0x758a) 
[0x7f0b954cc58a]

( 17) /lib64/libc.so.6: /lib64/libc.so.6(clone+0x6d) [0x7f0b959f05cd]
Assertion triggered in void lyx::doAssertWithCallstack(bool) by failing 
check "false" in file lyx/src/support/lassert.cpp:44

newfile1.lyx.emergency
QSocketNotifier: Socket notifiers cannot be enabled or disabled from 
another thread

Aborted (core dumped)



Re: Today is Qt testing day for Fedora 24

2016-03-19 Thread PhilipPirrip

On 03/17/2016 01:21 AM, Scott Kostyshak wrote:

This might be of interest to our devs on Fedora:
https://fedoraproject.org/wiki/Test_Day:2016-03-17_Qt_Gtk_Integration



Thanks for the info, Scott.

Qt 5.6.0 and/or fixes to adwaita/Gnome theme seem to improve the 
appearance of LyX built with Qt5, at least there's no mess that buggy 
QGroupBox was making 
(http://wiki.lyx.org/uploads/Playground/LyX_screenshot_HiDPI_13inch_display_3200x1800_2015-09-13_Qt5.png)



I found only QSpinBox and some of QComboBox broken when LyX is built w/ 
Qt 5.6.0: http://wiki.lyx.org/uploads/Playground/LyX-Fedora24-Qt560.png


Do these look any better on your linux? Do you run LyX under KDE or Gnome?


Menu and dialog fonts are also too small on HiDPI screens, but I think 
they're already fixing that.






The output from LyX looks great! Or maybe not.

2016-03-02 Thread PhilipPirrip
Welcome to LyX! (splash.lyx) is the first document that opens with LyX, 
and I believe it should be the first document to witness that the output 
from LYX looks great!  That's also what it says in point 3.
Unfortunately, point 3 when compiled with pdflatex has the first line 
protruding into the margin by some 1/2 of an inch.  Can someone please 
fix that?


Re-arranging will help:
Press the toolbar button [] or use the menu 
Document->View [PDF(pdflatex)] to see it(?) for yourself.




Re: two ways to crash LyX 2.2 (Document Settings dialog open)

2016-02-21 Thread PhilipPirrip

On 02/21/2016 10:59 AM, Richard Heck wrote:

I'd say go ahead. I'm almost certain this is not the right way to fix
the bug.


Done: http://www.lyx.org/trac/ticket/9979

Do we need one for the first problem, as a reminder to commit?



Re: two ways to crash LyX 2.2 (Document Settings dialog open)

2016-02-21 Thread PhilipPirrip

On 02/20/2016 11:18 PM, Richard Heck wrote:

One solution would be to have Buffer::collectChildren make sure the
Buffers exist.


I can confirm that your patch fixes the problem. Thanks, Richard!

Scott, do you still want me to file the bug report?



Re: two ways to crash LyX 2.2 (Document Settings dialog open)

2016-02-20 Thread PhilipPirrip

On 02/20/2016 07:45 PM, Richard Heck wrote:

Something like this:
...

> ...

should fix it.


#1 fixed


Not sure about the other one.


#2 not



Re: two ways to crash LyX 2.2 (Document Settings dialog open)

2016-02-20 Thread PhilipPirrip

On 02/20/2016 07:40 PM, Richard Heck wrote:

There's a missing test somewhere on whether the dialog needs a view,
which this one does. The dialog should really be closed when the last
view disappears.



That's only the first case, I believe.
But in the second case you still have the first, new, document open (its 
data will be lost).  We're only closing the master and all its children.


P



two ways to crash LyX 2.2 (Document Settings dialog open)

2016-02-20 Thread PhilipPirrip
Hey guys, I need you to confirm this (my config is Fedora Linux, fresh 
master 89985beb, Qt 5.5.1):



- 1 -
start lyx2.2 from terminal
start a new document (ctrl-n)
open Document Settings dialog
close the new document (ctrl-w or file-close)

LyX aborts, with
Assertion triggered in void lyx::doAssertWithCallstack(bool) by failing 
check "false" in file /lyx/src/support/lassert.cpp:44

Aborted (core dumped)

No data loss in this case, but any recent settings/preferences in LyX 
are lost (open panels etc)



- 2 -
download and unpack 
https://bitbucket.org/amiede/classicthesis/downloads/classicthesis-LyX-v4.2.zip
(it might 'work' with simpler master/child documents, I don't have time 
to test it)



start lyx2.2 from terminal

start a new document (ctrl-n), type something in (this is to show there 
will be data loss)


open ClassicThesis.lyx from e.g. classicthesis-LyX-v4.1_bugfix

right-click on Include:Chapter02.lyx, choose "Edit Included File"

change something in Chapter02 (add a character)

go back to the master document (ClassicThesis.lyx)

open Document Settings dialog, keep it open

then File>Close (or ctrl-w)

Save changes? - choose Discard

LyX crashes, SIGSEGV







Just tested with Qt 4.8.7, same thing happens in both cases.



And ouch, Case 2 crashes LyX 2.1.4 that comes with Linux Fedora 23!!!







2.2dev was compiled with:

cmake lyx  \
 -G"Unix Makefiles"  \
 -DLYX_CPACK=OFF  \
 -DLYX_LOCALVERSIONING=OFF  \
 -DLYX_INSTALL=OFF  \
 -DLYX_NLS=ON  \
 -DLYX_REQUIRE_SPELLCHECK=OFF  \
 -DLYX_ASPELL=OFF  \
 -DLYX_ENCHANT=OFF  \
 -DLYX_HUNSPELL=OFF  \
 -DLYX_DEVEL_VERSION=OFF  \
 -DLYX_RELEASE=OFF  \
 -DLYX_DEBUG=ON  \
 -DLYX_NO_OPTIMIZE=OFF  \
 -DLYX_PACKAGE_SUFFIX=ON  \
 -DLYX_PCH=OFF  \
 -DLYX_MERGE_FILES=OFF  \
 -DLYX_MERGE_REBUILD=OFF  \
 -DLYX_QUIET=OFF  \
 -DLYX_INSTALL_PREFIX=OFF  \
 -DLYX_BUNDLE=OFF  \
 -DLYX_ENABLE_URLTESTS=OFF  \
 -DLYX_ENABLE_EXPORT_TESTS=OFF  \
 -DLYX_ASAN=OFF  \
 -DLYX_USE_QT=QT5  \  or QT4
 -DLYX_3RDPARTY_BUILD=OFF  \
 -DLYX_ENABLE_CXX11=ON  \
 -DLYX_PROFILE=OFF  \
 -DLYX_EXTERNAL_BOOST=OFF  \
 -DLYX_PROGRAM_SUFFIX=ON  \
 -DLYX_DEBUG_GLIBC=OFF  \
 -DLYX_DEBUG_GLIBC_PEDANTIC=OFF  \
 -DLYX_STDLIB_DEBUG=OFF  \
 -DLYX_PROFILE=OFF  \












Re: LyX 2.2 + Qt 5.5.1 segmentation fault on Fedora 23

2015-12-05 Thread PhilipPirrip

On 11/30/2015 04:45 PM, Rex Dieter wrote:
> In my experience, that backtrace often means a runtime conflict where 
both

> qt4 and qt5 are trying to load into the same process (usually crashes
> quickly)
>
> -- Rex

Yes, you're probably right. This is what I was doing:

I'd first call, in an empty build dir
cmake ../lyx

then modify a line in the newly created run_cmake.sh to
-DLYX_USE_QT=QT5

and call run_cmake.sh


I thought this would set up the build environment for QT5, overwriting 
any settings for QT4, but I guess this is not what's happening.




When I call
cmake ../lyx -DLYX_USE_QT=QT5 for the first time in an empty dir, LyX 
compiles and starts.





It's not quite clear to me why the build dir got dirty, i.e. why there 
were remains of QT4 in it when the second call to cmake included 
-DLYX_USE_QT=QT5.









Re: [RFC][PATCH] Get rid of some hardcoded pixel lengths

2015-11-20 Thread PhilipPirrip

On 11/20/2015 01:05 PM, Scott Kostyshak wrote:

Just a note that I have been testing this patch for a few days now and
everything seems to work well.


Hi Scott,
Your screenshot DOES show, though, that the note height has grown, and 
that messes up the line spacing (check my screenshot on HiDPI screen)






Re: [RFC][PATCH] Get rid of some hardcoded pixel lengths

2015-11-19 Thread PhilipPirrip

On 11/19/2015 02:58 AM, Jean-Marc Lasgouttes wrote:

Le 19/11/2015 03:17, PhilipPirrip a écrit :

I didn't find placing the cursor difficult, it only looked too tight.


Would you say that the extra horizontal spacing is nevertheless useful?


I'm still good at aiming, can't tell the difference. I'd actually make 
the separation 0, so that, for example, |Note| looks like it is a 
label/tag - which it is, right?. Increase the inner margin of the insets 
(ERT has it, but not the note or URL - btw, why isn't the ERT 
collapsable, why doesn't it have a label - I think that'd be pretty 
useful as they sometimes become big and distracting).







But now you have some insets grown vertically, they increase the line
spacing which looks a bit messy:
wiki.lyx.org/uploads/Playground/JML-get_rid_of_some_hardcoded_pixel_lengths.png



Yes, that's pretty bad. THis has to be addressed indeed.


Thnx. I'll be here to test it!




Re: LyX 2.2 + Qt 5.5.1 segmentation fault on Fedora 23

2015-11-19 Thread PhilipPirrip

On 11/19/2015 01:27 AM, Stephan Witt wrote:

I've redirected it to developers list.


Sorry, that was sent by mistake. The report I sent here has an updated 
gdb output - I installed all debug-infos. QPrinter is being mentioned 
several times.
Thought we should still investigate, if it's Qt, you won't be able to 
escape from it.




Re: [RFC][PATCH] Get rid of some hardcoded pixel lengths

2015-11-18 Thread PhilipPirrip

On 11/18/2015 05:57 AM, Jean-Marc Lasgouttes wrote:

Hi there,

The followong patch replaces the hardcoded TEXT_TO_INSET_OFFSET=4 and
the workarea margin of 10 by respectively 1mm and 2.5mm. These values
should be equivalent when dpi=100 and zoom=100%.

This idea was triggered by a message (a bug) saying that in HiDPI
situations, placing the cursor was very difficult.



I didn't find placing the cursor difficult, it only looked too tight. 
But now you have some insets grown vertically, they increase the line 
spacing which looks a bit messy: 
wiki.lyx.org/uploads/Playground/JML-get_rid_of_some_hardcoded_pixel_lengths.png


This is on Fedora Linux 23, HiDPI Dell XPS 3200x1800. Qt 4.8.7




LyX 2.2 + Qt 5.5.1 segmentation fault on Fedora 23

2015-11-18 Thread PhilipPirrip


I had a similar issue a month or so ago, what helped was a clean cloning 
of LyX source. Now even that doesn't work, and it's been like that for 2 
or 3 weeks. It might be due to newest Qt libraries that came with Fedora 
23, not sure. Can you read anything from this backtrace?



(...after installing 3GB of various debuginfos)



(gdb) run
Starting program: /xxx/xxx/xxx/build-lyx-Qt5/bin/lyx2.2
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
QList::QList (this=0x76e4b578 
) at 
../../src/corelib/tools/qlist.h:121

121 inline QList() : d(::shared_null) { d->ref.ref(); }
Missing separate debuginfos, use: dnf debuginfo-install 
bzip2-libs-1.0.6-17.fc23.x86_64 libgcc-5.1.1-4.fc23.x86_64 
libstdc++-5.1.1-4.fc23.x86_64

(gdb) bt
#0  QList::QList (this=0x76e4b578 
) at 
../../src/corelib/tools/qlist.h:121
#1  QPrinterInfoPrivate::QPrinterInfoPrivate (name=..., 
this=0x76e4b560 ) at 
painting/qprinterinfo_p.h:71
#2  __static_initialization_and_destruction_0 (__initialize_p=1, 
__priority=65535) at painting/qprinterinfo.cpp:35
#3  _GLOBAL__sub_I_qprinterinfo.cpp(void) () at 
painting/qprinterinfo.cpp:163
#4  0x77deb79a in call_init (l=, 
argc=argc@entry=1, argv=argv@entry=0x7fffdfd8, 
env=env@entry=0x7fffdfe8)

at dl-init.c:72
#5  0x77deb8ab in call_init (env=0x7fffdfe8, 
argv=0x7fffdfd8, argc=1, l=) at dl-init.c:30
#6  _dl_init (main_map=0x77ffe148, argc=1, argv=0x7fffdfd8, 
env=0x7fffdfe8) at dl-init.c:120

#7  0x77ddccba in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#8  0x0001 in ?? ()
#9  0x7fffe2d5 in ?? ()
#10 0x in ?? ()
















here's the run_cmake.sh I used
cmake /xxx/xxx/xxx/lyx  \
 -G"Unix Makefiles"  \
 -DLYX_CPACK=OFF  \
 -DLYX_LOCALVERSIONING=OFF  \
 -DLYX_INSTALL=OFF  \
 -DLYX_NLS=ON  \
 -DLYX_REQUIRE_SPELLCHECK=OFF  \
 -DLYX_ASPELL=OFF  \
 -DLYX_ENCHANT=OFF  \
 -DLYX_HUNSPELL=OFF  \
 -DLYX_DEVEL_VERSION=OFF  \
 -DLYX_RELEASE=OFF  \
 -DLYX_DEBUG=ON  \
 -DLYX_NO_OPTIMIZE=OFF  \
 -DLYX_PACKAGE_SUFFIX=ON  \
 -DLYX_PCH=OFF  \
 -DLYX_MERGE_FILES=OFF  \
 -DLYX_MERGE_REBUILD=OFF  \
 -DLYX_QUIET=OFF  \
 -DLYX_INSTALL_PREFIX=OFF  \
 -DLYX_BUNDLE=OFF  \
 -DLYX_ENABLE_URLTESTS=OFF  \
 -DLYX_ENABLE_EXPORT_TESTS=OFF  \
 -DLYX_ASAN=OFF  \
 -DLYX_USE_QT=QT5  \
 -DLYX_PROFILE=OFF  \
 -DLYX_EXTERNAL_BOOST=OFF  \
 -DLYX_PROGRAM_SUFFIX=ON  \
 -DLYX_DEBUG_GLIBC=OFF  \
 -DLYX_DEBUG_GLIBC_PEDANTIC=OFF  \
 -DLYX_STDLIB_DEBUG=OFF  \
 -DLYX_PROFILE=OFF  \
 -DLYX_ENABLE_CXX11=OFF  \





Same thing even if I go back in time, to some 9/2015 commits I know worked.
Doesn't matter if I set CXX11 to ON or OFF.




UserGuide.lyx on BibLaTeX (?)

2015-11-05 Thread PhilipPirrip

Hey guys,
Now that the use of biblatex and loading of its bibliography databases 
has been simplified by the introduction of BIBINPUTS, I was wondering if 
you'd be interested in including a few words about it in the User Guide. 
Something along these lines, perhaps:




6.5.3 Bibliography databases (BibLaTeX)
Bibliography ! Databases
Bibliography ! BibLaTeX

BibLaTeX is a modern and more powerful approach to managing 
bibliographies. It is, unlike BibTeX that uses its own language for 
formatting of the bibliography, entirely based on TeX macros, which 
makes it easily configurable for anyone with a good knowledge of LaTeX. 
It also employs a very capable bibliography processor, biber, that 
enables the use of many bibliography sorting schemes, multiple 
bibliographies within one document, their division by the document parts 
(chapters, sections) or topics (keywords). BibLaTeX, with biber, fully 
supports Unicode, and has been localized to many languages. The user 
guide begins with Chapter 3 in the Package Documentation at 
http://www.ctan.org/pkg/biblatex.


Even though it has no support for BibLaTeX built in, LyX can still be 
made to use it with a few simple tricks. Detailed instructions can be 
found at http://wiki.lyx.org/BibTeX/Biblatex.






I also notice that the title of the next subsection - "Bibliography 
layout" is a bit vague.  I think this should be


6.5.4 Citation format
Bibliography ! Citation format








To show you how easy it is to use biblatex now:

1) something like this goes into the preamble
\usepackage[style=authoryear,natbib=true,backend=biber,refsection=chapter]{biblatex}
\addbibresource{my_bibliography.bib}

2) Document>Settings>
Bibliography>Processor has to be changed to biber
Bibliography>Citation style to Natbib
Local Layout "Provides natbib 1"

3) Insert→List/TOC→BibTeX Bibliography... into a comment, to trick LyX 
into using its citation infrastructure


4) ERT for \bibbysection (or \printbibliography)


A few easy steps (that could probably be  automated with just a switch 
in document settings: bibtex/biblatex, huh?) for a fair amount of 
support of biblatex!






A template, similar (but simpler) to what I had already uploaded at 
http://wiki.lyx.org/BibTeX/Biblatex can/will be made to work as-is.





Re: UserGuide.lyx on BibLaTeX (?)

2015-11-05 Thread PhilipPirrip



On 11/05/2015 01:14 PM, Richard Heck wrote:


These are good suggestions. What I'd suggest is that you prepare a patch
with these changes made *and with change tracking activated*.




Thanks, Richard.
Attaching the patch.




On 11/05/2015 11:01 AM, PhilipPirrip wrote:

Hey guys,
Now that the use of biblatex and loading of its bibliography databases
has been simplified by the introduction of BIBINPUTS, I was wondering
if you'd be interested in including a few words about it in the User
Guide. Something along these lines, perhaps:



6.5.3 Bibliography databases (BibLaTeX)
Bibliography ! Databases
Bibliography ! BibLaTeX

BibLaTeX is a modern and more powerful approach to managing
bibliographies. It is, unlike BibTeX that uses its own language for
formatting of the bibliography, entirely based on TeX macros, which
makes it easily configurable for anyone with a good knowledge of
LaTeX. It also employs a very capable bibliography processor, biber,
that enables the use of many bibliography sorting schemes, multiple
bibliographies within one document, their division by the document
parts (chapters, sections) or topics (keywords). BibLaTeX, with biber,
fully supports Unicode, and has been localized to many languages. The
user guide begins with Chapter 3 in the Package Documentation at
http://www.ctan.org/pkg/biblatex.

Even though it has no support for BibLaTeX built in, LyX can still be
made to use it with a few simple tricks. Detailed instructions can be
found at http://wiki.lyx.org/BibTeX/Biblatex.





I also notice that the title of the next subsection - "Bibliography
layout" is a bit vague.  I think this should be

6.5.4 Citation format
Bibliography ! Citation format








To show you how easy it is to use biblatex now:

1) something like this goes into the preamble
\usepackage[style=authoryear,natbib=true,backend=biber,refsection=chapter]{biblatex}

\addbibresource{my_bibliography.bib}

2) Document>Settings>
Bibliography>Processor has to be changed to biber
Bibliography>Citation style to Natbib
Local Layout "Provides natbib 1"

3) Insert→List/TOC→BibTeX Bibliography... into a comment, to trick LyX
into using its citation infrastructure

4) ERT for \bibbysection (or \printbibliography)


A few easy steps (that could probably be  automated with just a switch
in document settings: bibtex/biblatex, huh?) for a fair amount of
support of biblatex!





A template, similar (but simpler) to what I had already uploaded at
http://wiki.lyx.org/BibTeX/Biblatex can/will be made to work as-is.







>From d0007bca7f64da66176981285c6d494fd499 Mon Sep 17 00:00:00 2001
From: Philip Pirrip <p...@net.hr>
Date: Thu, 5 Nov 2015 19:14:33 -0500
Subject: [PATCH] a new section on how to use BibLaTeX

---
 lib/doc/UserGuide.lyx | 139 +++---
 1 file changed, 133 insertions(+), 6 deletions(-)

diff --git a/lib/doc/UserGuide.lyx b/lib/doc/UserGuide.lyx
index c57558b..7f0b196 100644
--- a/lib/doc/UserGuide.lyx
+++ b/lib/doc/UserGuide.lyx
@@ -1,5 +1,5 @@
 #LyX 2.2 created this file. For more info see http://www.lyx.org/
-\lyxformat 497
+\lyxformat 500
 \begin_document
 \begin_header
 \origin /systemlyxdir/doc/
@@ -141,11 +141,12 @@ enumitem
 \papercolumns 1
 \papersides 2
 \paperpagestyle default
-\tracking_changes false
+\tracking_changes true
 \output_changes false
 \html_math_output 0
 \html_css_as_file 0
 \html_be_strict true
+\author -393791638 "Philip Pirrip" 
 \end_header
 
 \begin_body
@@ -8170,12 +8171,14 @@ Verbatim
 \end_layout
 
 \begin_layout Verbatim
+
 This is verbatim.
 \end_layout
 
 \begin_layout Verbatim
 \noindent
 \align block
+
 The following 2 lines are empty:
 \end_layout
 
@@ -8188,6 +8191,7 @@ The following 2 lines are empty:
 \end_layout
 
 \begin_layout Verbatim
+
 Almost everything is allowed in verbatim:"%&$§#~'`
 \backslash
 }][{|
@@ -27394,15 +27398,133 @@ We use two bibliographies in this document to show the difference between
 alphadin.bst
 \family default
  to get the complicated German reference key scheme in the bibliography.
+\change_inserted -393791638 1446768497
+
+\end_layout
+
+\begin_layout Subsection
+
+\change_inserted -393791638 1446768515
+Bibliography databases (Bib\SpecialChar LaTeX
+)
+\begin_inset Index idx
+status open
+
+\begin_layout Plain Layout
+
+\change_inserted -393791638 1446768515
+Bibliography ! Databases
+\end_layout
+
+\end_inset
+
+
+\begin_inset Index idx
+status open
+
+\begin_layout Plain Layout
+
+\change_inserted -393791638 1446768728
+Bibliography ! Bib\SpecialChar LaTeX
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset CommandInset label
+LatexCommand label
+name "subsec:Bibliography-databases-BibLaTeX"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\change_inserted -393791638 1446768515
+Bib\SpecialChar LaTeX
+ is a modern and more powerful approach to managing bibliographies.
+ It is, unlike Bib\SpecialChar TeX
+ that uses

Re: RFC: better submenu for tables

2015-11-04 Thread PhilipPirrip

I agree with you, Uve.
I'd rather see a few submenus for setting tables, than this 'More...' 
that we have now. What do you mean "more" when nothing about setting the 
table was offered in the first contextual menu. This 'More..." should 
rather be "Table...".
I'd group things that are now in the submenu (row, column, lines, 
settings, etc), put those groups separately into the contextual menu.
What are the "move paragraph up/down" supposed to do for the tables? 
Paragraph settings - always disabled?





On 11/02/2015 07:43 PM, Uwe Stöhr wrote:

If you open the submenu of tables you see many entries. In my opinion
too many, at least too many for laptops with small screens.

In general I think it should be less crowded. Thus a proposal:

- everything is removed for which we also have toolbar button. (If users
disabled the automatic show of the table toolbar they apparently don't
use tables that much and the table settings dialog is sufficient)

- As result everything can be removed, but these settings are added:
   - set/unset formal table
   - set/unset longtable

The result will be a small and clean submenu.

opinions?

thanks and regards
Uwe






Re: [patch] Finding the generated latex file

2015-11-04 Thread PhilipPirrip

On 11/03/2015 07:00 PM, Andrew Parsloe wrote:


I have found the message helpful, particularly when developing a module
or a latex package to work with LyX. In the latter case, the failure to
remove the temp directory may indicate that a latex process is still
running. (Failure of a preview snippet for instance.) From experience I
know that this can lead to multiple occurrences of the latex executable
running at once, and LyX becoming more and more sluggish.



I personally find this very annoying. As a user. It doesn't happen on 
Linux, so I'm still good, but on Windows:
I tested the patch on Windows, no messages were shown if LyX was closed, 
Windows Explorer window would just close upon the deletion of the temp 
folder. But, if I had Acrobat Reader open with the document still loaded 
in, two error messages would pop out giving me totally irrelevant 
information... I press ok, and than what? LyX is going to close anyway, 
should I look for the temp folder and delete it myself?


I don't think this is the right way of debugging things. There's 
View>Message pane, why not just print the error message there. Worse 
things happen than the temp folder not being deleted and no windows pop 
out like this.





Re: [patch] Finding the generated latex file

2015-11-03 Thread PhilipPirrip

On 11/02/2015 10:58 PM, Guillaume Munch wrote:

Pushed at f441590c. Windows/OSX users, please report if it does not work.


Hey Guillaume,
Bad news, it didn't work on Windows. Qt 4.8, VS2010, WinXP/VirtualBox
This was the error message:
lyx\src\frontends\qt4\GuiLog.cpp (207): Unable to open QUrl even though 
dir exists!



I then added another slash to your code
QUrl qdir(toqstr(from_utf8("file:///" + dir.absFileName())),
  QUrl::StrictMode);
(by the example here http://doc.qt.io/qt-4.8/qdesktopservices.html#details)
and it WORKED!




On Linux, it worked with two AND three slashes: both Qt 4.8 and Qt 5.5; 
Gnome 3.18, Fedora 23.





If I may:  to me, "Open Containing Directory"  doesn't mean much. What 
does the directory contain - the log shown above, the lyx document? How 
about "Open Compilation Directory" (or Temporary / or Folder)?


What I find would be handy to have, since you've already been messing 
around this code, is a button that would clear the temporary dir.  LyX 
sometimes gets stuck with some old log and aux files, especially after 
an error in compilation, and the only way to get rid of the error 
messages is to make a dummy change or reopen the document.








Re: [patch] use setProcessEnvironment, not shell escape (cmd / env)

2015-11-03 Thread PhilipPirrip
Just curious: what and when executes the code in os_win32.cpp 
(os_.cpp in general). Whatever I did to test the patch, these 
functions were not called.





Re: [patch] Finding the generated latex file

2015-11-03 Thread PhilipPirrip

On 11/03/2015 10:45 AM, Guillaume Munch wrote:

Bad news, it didn't work on Windows. Qt 4.8, VS2010, WinXP/VirtualBox
On Linux, it worked with two AND three slashes: both Qt 4.8 and Qt 5.5;
Gnome 3.18, Fedora 23.


Thanks for the report and the extra step in testing. Please try again
with latest master.


I report that everything works in both WindowsXP and Fedora Linux.
The file browser window showing the temporary folder disappears when LyX 
is closed on Windows, Nautilus in Linux moves to the parent directory.






It opens the directory containing the chosen log — there's really no
trap about it. So I think that "Open Containing Directory" is the
clearest about what is achieved.


OK. What I was saying is that it shows more than just a log file, but no 
problem, what's most important is that it now works.







Re: [patch] use setProcessEnvironment, not shell escape (cmd / env)

2015-11-02 Thread PhilipPirrip

On 11/02/2015 03:16 PM, Enrico Forestieri wrote:

This last observation suggests what is the minimal change to be performed,
i.e., let the latex run work as if the document dir was the current
directory. This means setting the relevant environment variables such
that the document dir is also scanned, without replicating the setting
for TEXINPUTS. I'll prepare a patch along these lines for review.



I thank you for that! I'd be glad to be the first one to test it in both
Windows and Linux.


Please, find attached the patch I come up with. It seems to work for me.



No surprises here, everything worked as intended:
Linux, WinXP, Qt 4.8, Qt 5.5, pdf, eps, pdf with eps figures, 
classicthesis template (including biblatex and biber/bibtex8), a few 
manuals...





> You mean like Yoda? I don't know whether to feel flattered or offended ;)

May the force be with you... while into 2.2.0 you're pushing this.
PLEASE ;)



Re: [patch] use setProcessEnvironment, not shell escape (cmd / env)

2015-11-02 Thread PhilipPirrip

On 11/02/2015 10:44 AM, Enrico Forestieri wrote:

On Sun, Nov 01, 2015 at 11:47:42PM -0500, PhilipPirrip wrote:


Hi Enrico, thank you  for your response. I hope the others will help us
resolve this too.


Given the overwhelming amount of replies, I doubt anyone is interested
in this matter.


Oh no, no, you're wrong. This is what I received from one of the well 
known developers: "Enrico is the Jedi Master of such things. I'd suggest 
you re-send this just to him."

I'd say they all trust your judgment.



You type some, but Windows has to spawn a shell, cmd.com, to execute it.
some.bat has no binary code in it, and it is not executable in that sense.


And linux has to do exactly the same in order to run a script.


With one difference: windows has one single shell, and linux - how 
many?, half a million?





Anway... some of the developers here assumed TEXINPUTS covers even bib
files. (see the posts on \input@path) I wouldn't mind if BIBINPUTS were not
even configurable, make them . and the current document directory.
I don't see why this is such a big deal. It's even standard latex behavior,
it always searches in the current dir. The trouble with LyX is that it
compiles in a temp dir, but does not copy any files it does not know of.


This last observation suggests what is the minimal change to be performed,
i.e., let the latex run work as if the document dir was the current
directory. This means setting the relevant environment variables such
that the document dir is also scanned, without replicating the setting
for TEXINPUTS. I'll prepare a patch along these lines for review.



I thank you for that! I'd be glad to be the first one to test it in both 
 Windows and Linux.







BTW; I once before suggested there should be a command similar to 
\input@path defined, that will contain the path to the current document 
folder with absolutely no latex formatting in it.
That could be used in modules for LaTeX packages that have no support in 
LyX. The fact that LyX compiles its documents in a temp folder makes the 
implementation of such (underground, but still) enhancements very hard. 
Georg, are you reading this?



Philip Pirrip wrote on 2015-09-02:
> Since the way \input@path is being used in the biblatex hack from
> http://wiki.lyx.org/BibTeX/Biblatex is barely legal, maybe LyX should
> define its own command, say \LyX@basepath that'd contain the absolute
> path to the master .lyx document (no qoutes, no curly braces - only for
> the brave).
> Would you be willing to do that? (being that biblatex support is nowhere
> on the horizon yet)

Georg: After all these discussions it is clear that something like this 
is needed.

However, I do not want to clutter all documents with that (since 95% of the
users don't need it). I would prefer a solution where we extend the layout
definition language so that you could use a placeholder that will be
replaced by LyX with the master document path. Then everybody who needs 
this

path could write a module that pulls in the path into a LaTeX macro in the
most simple case, or in more advanced cases it could directly be used in 
the

preamble code that needs it.




Re: [patch] use setProcessEnvironment, not shell escape (cmd / env)

2015-11-01 Thread PhilipPirrip
Hi Enrico, thank you  for your response. I hope the others will help us 
resolve this too.




I propose another simple test, it will show you that env variables do get
set by setProcessEnvironment(). Attaching the modified files.
Hope you'll trust me now ;)


There is nothing to trust but something to understand. A script without a
shebang line is executed by the current shell and QProcess doesn't take
that into account. Your example works because you add a shebang to your
script. This has a real impact and can cause hard to understand bugs.
Please, try reading the thread here:
http://www.mail-archive.com/lyx-devel%40lists.lyx.org/msg169545.html
to see that this causes real problems.




I'd rather call this a bug in the script than in setProcessEnvironment 
and QProcess. Why would they need to guess what shell they have to 
execute. Isn't it polite, at least, for each shell script to have a 
shebang line?

http://unix.stackexchange.com/questions/87560/does-the-shebang-determine-the-shell-which-runs-the-script



Does the same 'bug' happen on Windows, or is this only for the shell 
'bugs' on *nix?



Something tells me we're never gonna agree, so I'll rest my case. 
Nothing has to be changed in SystemcallPrivate::startProcess part of the 
code for the BIBINPUTS to work. It would be nice, I think, for many 
other reasons, but that's totally up to you.




Fail: "Exec format error"  in your test example only points to the fact 
that QProcess does not know it's supposed to spawn a shell and execute 
the script in it, nothing more.
If instead of myprog script you had a real binary executable (like 
proc->start("/usr/bin/ls") or proc->start("/usr/bin/env")) no "Exec 
format error" would appear in either case. Why?












It maybe does not execute cmd_ if cmd_="some.bat", but will execute
cmd_="cmd.exe /c some.bat". The shell will (hopefully) have the environment
variables set by setProcessEnvironment().
(bat files are not executables by themselves, are they? windows, when you
click on them, starts them by opening cmd.exe first)
This just means that some.bat is not a good cmd, and should be changed to
"cmd.exe /c some.bat"
(now... who and where uses .bat's?)


Now I hope you are joking. What would you think if you had to call a
converter of yours as "bash myscript" instead of simply "myscript"?
Do you expect to have to do that?



Well, isn't that what Windows does? Isn't that why you had to go back to 
using QProcess when calling a viewer on Windows instead of the script... 
You didn't want that black window to pop out, right? bat files are not 
executables, they can be executed... by an executable, which is in this 
case cmd.exe.  I'm not pretending I know everything about this, I'm 
telling all this from my limited experience.


How many faulty converters are there in LyX? Why do they have to be run 
the same way LaTeX are, by using latexEnvCmdPrefix? Does evince 
(pdf viewer) really need TEXINPUTS variable that gets set by using 
latexEnvCmdPrefix?






Batch files are executable and you don't have to type "cmd /c some.bat"
to execute them but simply "some". The "cmd /c" prefix is necessary to
overcome the silly limitations imposed by QProcess.



You type some, but Windows has to spawn a shell, cmd.com, to execute it. 
some.bat has no binary code in it, and it is not executable in that sense.




In a more conservative approach, BIBINPUTS support could be added by the
patch I proposed on http://www.lyx.org/trac/ticket/2645


This can be done, if now the limit for a command line on Windows is 8191
characters as documented at https://support.microsoft.com/en-us/kb/830473
but you are forgetting BSTINPUTS and TEXFONTS.


Did anyone complain about the lack of these two? I don't think many people
would need them.  The reason I need them are all these ugly hacks with
\input@path here http://wiki.lyx.org/BibTeX/Biblatex


The fact that these two are not useful for you doesn't mean that they
are not useful. And even if people doesn't ask for them means nothing.
It may simply be that they are not aware of them. As an example, see
http://www.lyx.org/trac/ticket/6634 where TEXFONTS was not explicitly
requested but would have solved that problem.



I know, but by the same argument nothing's worth fixing before we can 
fix EVERYTHING. biblatex support won't be possible until it's total, no 
one wants partial solutions - hope it's not that what you're saying.
Anway... some of the developers here assumed TEXINPUTS covers even bib 
files. (see the posts on \input@path) I wouldn't mind if BIBINPUTS were 
not even configurable, make them . and the current document directory.
I don't see why this is such a big deal. It's even standard latex 
behavior, it always searches in the current dir. The trouble with LyX is 
that it compiles in a temp dir, but does not copy any files it does not 
know of.





Points to be discussed are:

- Should those variables simply replicate the setting for TEXINPUTS?
   · Consider that 

Re: [patch] use setProcessEnvironment, not shell escape (cmd / env)

2015-11-01 Thread PhilipPirrip
Hi Enrico, thank you  for your response. I hope the others will help us 
resolve this too.




I propose another simple test, it will show you that env variables do get
set by setProcessEnvironment(). Attaching the modified files.
Hope you'll trust me now ;)


There is nothing to trust but something to understand. A script without a
shebang line is executed by the current shell and QProcess doesn't take
that into account. Your example works because you add a shebang to your
script. This has a real impact and can cause hard to understand bugs.
Please, try reading the thread here:
http://www.mail-archive.com/lyx-devel%40lists.lyx.org/msg169545.html
to see that this causes real problems.




I'd rather call this a bug in the script than in setProcessEnvironment 
and QProcess. Why would they need to guess what shell they have to 
execute. Isn't it polite, at least, for each shell script to have a 
shebang line?

http://unix.stackexchange.com/questions/87560/does-the-shebang-determine-the-shell-which-runs-the-script



Does the same 'bug' happen on Windows, or is this only for the shell 
'bugs' on *nix?



Something tells me we're never gonna agree, so I'll rest my case. 
Nothing has to be changed in SystemcallPrivate::startProcess part of the 
code for the BIBINPUTS to work. It would be nice, I think, for many 
other reasons, but that's totally up to you.




Fail: "Exec format error"  in your test example only points to the fact 
that QProcess does not know it's supposed to spawn a shell and execute 
the script in it, nothing more.
If instead of myprog script you had a real binary executable (like 
proc->start("/usr/bin/ls") or proc->start("/usr/bin/env")) no "Exec 
format error" would appear in either case. Why?












It maybe does not execute cmd_ if cmd_="some.bat", but will execute
cmd_="cmd.exe /c some.bat". The shell will (hopefully) have the environment
variables set by setProcessEnvironment().
(bat files are not executables by themselves, are they? windows, when you
click on them, starts them by opening cmd.exe first)
This just means that some.bat is not a good cmd, and should be changed to
"cmd.exe /c some.bat"
(now... who and where uses .bat's?)


Now I hope you are joking. What would you think if you had to call a
converter of yours as "bash myscript" instead of simply "myscript"?
Do you expect to have to do that?



Well, isn't that what Windows does? Isn't that why you had to go back to 
using QProcess when calling a viewer on Windows instead of the script... 
You didn't want that black window to pop out, right? bat files are not 
executables, they can be executed... by an executable, which is in this 
case cmd.exe.  I'm not pretending I know everything about this, I'm 
telling all this from my limited experience.


How many faulty converters are there in LyX? Why do they have to be run 
the same way LaTeX are, by using latexEnvCmdPrefix? Does evince 
(pdf viewer) really need TEXINPUTS variable that gets set by using 
latexEnvCmdPrefix?






Batch files are executable and you don't have to type "cmd /c some.bat"
to execute them but simply "some". The "cmd /c" prefix is necessary to
overcome the silly limitations imposed by QProcess.



You type some, but Windows has to spawn a shell, cmd.com, to execute it. 
some.bat has no binary code in it, and it is not executable in that sense.




In a more conservative approach, BIBINPUTS support could be added by the
patch I proposed on http://www.lyx.org/trac/ticket/2645


This can be done, if now the limit for a command line on Windows is 8191
characters as documented at https://support.microsoft.com/en-us/kb/830473
but you are forgetting BSTINPUTS and TEXFONTS.


Did anyone complain about the lack of these two? I don't think many people
would need them.  The reason I need them are all these ugly hacks with
\input@path here http://wiki.lyx.org/BibTeX/Biblatex


The fact that these two are not useful for you doesn't mean that they
are not useful. And even if people doesn't ask for them means nothing.
It may simply be that they are not aware of them. As an example, see
http://www.lyx.org/trac/ticket/6634 where TEXFONTS was not explicitly
requested but would have solved that problem.



I know, but by the same argument nothing's worth fixing before we can 
fix EVERYTHING. biblatex support won't be possible until it's total, no 
one wants partial solutions - hope it's not that what you're saying.
Anway... some of the developers here assumed TEXINPUTS covers even bib 
files. (see the posts on \input@path) I wouldn't mind if BIBINPUTS were 
not even configurable, make them . and the current document directory.
I don't see why this is such a big deal. It's even standard latex 
behavior, it always searches in the current dir. The trouble with LyX is 
that it compiles in a temp dir, but does not copy any files it does not 
know of.





Points to be discussed are:

- Should those variables simply replicate the setting for TEXINPUTS?
   · Consider that 

Re: Compiling LyX on Windows with more recent Visual Studio versions

2015-10-31 Thread PhilipPirrip

On 10/31/2015 09:27 AM, PhilipPirrip wrote:

Thanks, David. It did work with Qt 4.8.6
First thing I noticed, though, is that most icons are missing. Have to
investigate. I remember seeing a similar issue here on the list recently.


The errors reported in the message pane are of this kind
GuiApplication.cpp (635): Cannot load icon 
C:/LyX/lyx-install/Resources/images/thesaurus-entry.svgz please verify 
resource system!



Is there any special library, not mentioned in INSTALL.Win32 that needs 
to be copied somewhere? How can one force LyX to use png icons as a 
fallback?

Thnx




Re: Compiling LyX on Windows with more recent Visual Studio versions

2015-10-31 Thread PhilipPirrip

Thanks, David. It did work with Qt 4.8.6
First thing I noticed, though, is that most icons are missing. Have to 
investigate. I remember seeing a similar issue here on the list recently.







On 10/31/2015 03:53 AM, David Hyde wrote:

I experienced this error as well when setting up my LyX build environment (Windows 
10 + MSVC 2010 + Qt 4.8.6).  The only insight I can provide is that initially, my 
cmake config wasn't an exact match to what was described in INSTALL.Win32.  That 
file was written for Qt < 5, so as part of getting everything to match 
INSTALL.Win32 and compile, I switched to Qt 4.8.6 rather than Qt 5.4 or 5.5.  I 
don't exactly recall if that switch was the silver bullet for this error, but I 
know I haven't been able to compile LyX yet using Qt 5.x on Windows.  Perhaps try 
compiling LyX with Qt 4.8.6 (keeping all other config the same), and see if that 
removes this error?  In which case there is possibly some issue with compiling 
with Qt 5.x on Windows...

Best regards,

David





Re: Compiling LyX on Windows with more recent Visual Studio versions

2015-10-30 Thread PhilipPirrip

Hello!
I'm trying to compile LyX for Windows: WinXP VirtualBox, Visual Studio 
2010, Qt 5.5, all by the instructions in INSTALL.Win32


No matter what I do in CMake config, the compilation ends with the 
messages I give below, and I have no idea what's happening and how to 
fix it.




24> -- Installing: 
C:/LyX/lyx-install/Resources/doc/es/DocumentoTextoPostizo.txt
24> -- Installing: 
C:/LyX/lyx-install/Resources/doc/attic/Changelog-UserGuide-LyX_22x.txt
24> -- Installing: 
C:/LyX/lyx-install/Resources/doc/attic/Changelog-EmbeddedObjects-LyX_22x.txt
24> -- Installing: 
C:/LyX/lyx-install/Resources/doc/attic/Changelog-Math-LyX_22.txt
24> -- Installing: 
C:/LyX/lyx-install/Resources/doc/./SpecialParagraphShape.tex

24> -- Installing: C:/LyX/lyx-install/Resources/doc/LFUNs.lyx
24> CMake Error at src/cmake_install.cmake:32 (file):
24> file INSTALL cannot find "C:/LyX/lyx-build-windows/bin/Debug/LyX.exe".
24> Call Stack (most recent call first):
24> cmake_install.cmake:3975 (include)
24>
24>
24>
24>C:\Program 
Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5):

error MSB3073: The command "setlocal
"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=Debug -P 
cmake_install.cmake

if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd" exited with code 1.
24>
24>Build FAILED.
24>
24>Time Elapsed 00:00:47.16
== Build: 21 succeeded, 3 failed, 0 up-to-date, 0 skipped



Re: [patch] use setProcessEnvironment, not shell escape (cmd / env)

2015-10-29 Thread PhilipPirrip

Thanks for responding, Enrico. I appreciate it!



I am sorry, but it still doesn't work.
As you can see, now it doesn't work because setProcessEnvironment() is used.


I don't understand what that script (myprog) is exactly supposed to do, 
but I believe the problem is in it rather than setProcessEnvironment().
As I said, the patch (be it good or bad), did work for me on Linux, 
BIBINPUTS env. variable did have effect as my .bib files were found only 
when that variable was defined.
I propose another simple test, it will show you that env variables do 
get set by setProcessEnvironment(). Attaching the modified files.


Hope you'll trust me now ;)



However, even when https://bugreports.qt.io/browse/QTBUG-19885 is solved
(if ever), we would still be stuck with the current way of setting the
environment because QProcess does not execute batch files on Windows and
doing as you suggest would introduce a regression.


It maybe does not execute cmd_ if cmd_="some.bat", but will execute 
cmd_="cmd.exe /c some.bat". The shell will (hopefully) have the 
environment variables set by setProcessEnvironment().
(bat files are not executables by themselves, are they? windows, when 
you click on them, starts them by opening cmd.exe first)
This just means that some.bat is not a good cmd, and should be changed 
to "cmd.exe /c some.bat"

(now... who and where uses .bat's?)




In a more conservative approach, BIBINPUTS support could be added by the
patch I proposed on http://www.lyx.org/trac/ticket/2645


This can be done, if now the limit for a command line on Windows is 8191
characters as documented at https://support.microsoft.com/en-us/kb/830473
but you are forgetting BSTINPUTS and TEXFONTS.


Did anyone complain about the lack of these two? I don't think many 
people would need them.  The reason I need them are all these ugly hacks 
with \input@path here http://wiki.lyx.org/BibTeX/Biblatex




 Unfortunately, there was

no discussion about the way it should be implemented. I mean, while
always setting TEXINPUTS seems reasonable, I don't think it is the same
for all other variables, and I am actually not really sure that carrying
the settings of TEXINPUTS is a good idea. Maybe we can use the following
scheme:


TEXINPUTS is now by default set to ".:/home/user/current_folder/"
(. stands for the temporary LyX folder, I believe)
BIBINPUTS is now set to nothing; it would be nice to have it set, at 
least, to the same two paths as TEXINPUTS
.bib files will still be searched in 'standard bib database directories' 
(that in 2015, I bet, no one is using)


Both of these are for the people (majority, I dare to say) that keep 
their lyx and tex and bib and png and ... files in the same folder (for 
the sake of portability and easier backups)



I therefore do not see the need for this:


- set BIBINPUTS if the directory /bib exists
- set BSTINPUTS if the directory /bst exists
- set TEXFONTS if the directory /fonts exists
so that one can put the relevant files in an appropriate subdir in the
document dir.










Anyhow, please consider having BIBINPUTS defined in LyX 2.2. PLEASE



;)
I have not so much time ATM, but I will see what I can do.



That's why I'm helping you ;) PLEASE

(wasn't the whole LyX built by the people who didn't have much time AthatM)

#!/bin/bash
echo ""
echo "SOME_ENV_VARIABLE"
printenv SOME_ENV_VARIABLE
echo "SOME_OTHER_ENV_VARIABLE" #will not be defined
printenv SOME_OTHER_ENV_VARIABLE

#include 
#include 
#include 

int main()
{
QProcess* proc = new QProcess();;
#ifdef SETENV
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
env.insert("SOME_ENV_VARIABLE", "see, it works!");
proc->setProcessEnvironment(env);
#endif
proc->setProcessChannelMode(QProcess::MergedChannels);
proc->start("./myprog");
if (proc->waitForFinished())
	qDebug() << "Output:" << proc->readAll();
else
	qDebug() << "Fail:" << proc->errorString();
proc->close();
delete proc;
return 0;
}


Re: [patch] use setProcessEnvironment, not shell escape (cmd / env)

2015-10-29 Thread PhilipPirrip

Thanks for responding, Enrico. I appreciate it!



I am sorry, but it still doesn't work.
As you can see, now it doesn't work because setProcessEnvironment() is used.


I don't understand what that script (myprog) is exactly supposed to do, 
but I believe the problem is in it rather than setProcessEnvironment().
As I said, the patch (be it good or bad), did work for me on Linux, 
BIBINPUTS env. variable did have effect as my .bib files were found only 
when that variable was defined.
I propose another simple test, it will show you that env variables do 
get set by setProcessEnvironment(). Attaching the modified files.


Hope you'll trust me now ;)



However, even when https://bugreports.qt.io/browse/QTBUG-19885 is solved
(if ever), we would still be stuck with the current way of setting the
environment because QProcess does not execute batch files on Windows and
doing as you suggest would introduce a regression.


It maybe does not execute cmd_ if cmd_="some.bat", but will execute 
cmd_="cmd.exe /c some.bat". The shell will (hopefully) have the 
environment variables set by setProcessEnvironment().
(bat files are not executables by themselves, are they? windows, when 
you click on them, starts them by opening cmd.exe first)
This just means that some.bat is not a good cmd, and should be changed 
to "cmd.exe /c some.bat"

(now... who and where uses .bat's?)




In a more conservative approach, BIBINPUTS support could be added by the
patch I proposed on http://www.lyx.org/trac/ticket/2645


This can be done, if now the limit for a command line on Windows is 8191
characters as documented at https://support.microsoft.com/en-us/kb/830473
but you are forgetting BSTINPUTS and TEXFONTS.


Did anyone complain about the lack of these two? I don't think many 
people would need them.  The reason I need them are all these ugly hacks 
with \input@path here http://wiki.lyx.org/BibTeX/Biblatex




 Unfortunately, there was

no discussion about the way it should be implemented. I mean, while
always setting TEXINPUTS seems reasonable, I don't think it is the same
for all other variables, and I am actually not really sure that carrying
the settings of TEXINPUTS is a good idea. Maybe we can use the following
scheme:


TEXINPUTS is now by default set to ".:/home/user/current_folder/"
(. stands for the temporary LyX folder, I believe)
BIBINPUTS is now set to nothing; it would be nice to have it set, at 
least, to the same two paths as TEXINPUTS
.bib files will still be searched in 'standard bib database directories' 
(that in 2015, I bet, no one is using)


Both of these are for the people (majority, I dare to say) that keep 
their lyx and tex and bib and png and ... files in the same folder (for 
the sake of portability and easier backups)



I therefore do not see the need for this:


- set BIBINPUTS if the directory /bib exists
- set BSTINPUTS if the directory /bst exists
- set TEXFONTS if the directory /fonts exists
so that one can put the relevant files in an appropriate subdir in the
document dir.










Anyhow, please consider having BIBINPUTS defined in LyX 2.2. PLEASE



;)
I have not so much time ATM, but I will see what I can do.



That's why I'm helping you ;) PLEASE

(wasn't the whole LyX built by the people who didn't have much time AthatM)

#!/bin/bash
echo ""
echo "SOME_ENV_VARIABLE"
printenv SOME_ENV_VARIABLE
echo "SOME_OTHER_ENV_VARIABLE" #will not be defined
printenv SOME_OTHER_ENV_VARIABLE

#include 
#include 
#include 

int main()
{
QProcess* proc = new QProcess();;
#ifdef SETENV
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
env.insert("SOME_ENV_VARIABLE", "see, it works!");
proc->setProcessEnvironment(env);
#endif
proc->setProcessChannelMode(QProcess::MergedChannels);
proc->start("./myprog");
if (proc->waitForFinished())
	qDebug() << "Output:" << proc->readAll();
else
	qDebug() << "Fail:" << proc->errorString();
proc->close();
delete proc;
return 0;
}


Re: bug 9626: new handling of "LyX" is unintuitive

2015-10-28 Thread PhilipPirrip

On 10/25/2015 04:04 AM, Georg Baum wrote:

After thinking more about this I now think it makes sense. I did also
implement the documentation toolbar. I think the toolbar should definitely
go in. What do others think about the renaming?



Thanks Georg. And +1 for the toolbar.

(apologies, posting this just to see why the news server is not 
accepting my messages)




[patch] use setProcessEnvironment, not shell escape (cmd / env)

2015-10-28 Thread PhilipPirrip
I've been playing with SystemcallPrivate::startProcess (in 
Systemcall.cpp) and latexEnvCmdPrefix (in filetools.cpp), in an attempt 
to resolve the issue with missing BIBINPUTS, a 9 year old request at 
http://www.lyx.org/trac/ticket/2645


Enrico mentioned there that setEnvironment couldn't be used to set the 
environments due to a bug, and that BIBINPUTS and TEXINPUTS can only be 
defined in shell escape commands of latexEnvCmdPrefix.
Now that setEnvironment is deprecated, setProcessEnvironment can be 
used, and it turned out that it works... at least for me, on Linux.


I made a patch that
i) defines a new function
string latexEnv(string const & path, string const & lpath)
whose output is a sequence of directories that can be fed into BIB/TEX 
INPUTS


ii) modifies/simplifies the old function
string latexEnvCmdPrefix(string const & path, string const & lpath)
that is still being used at some other places (don't quite know why - 
that should be checked)


iii) adds to SystemcallPrivate::startProcess

 QProcessEnvironment envAdd;
 envAdd.insert("BIBINPUTS", toqstr(latexEnv(path, lpath)));
 envAdd.insert("TEXINPUTS", toqstr(latexEnv(path, lpath)));

 QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
 env.insert(envAdd);
 process_->setProcessEnvironment(env);
 and starts the _cmd without the burden of the shell escape commands 
for setting the environment

 process_->start(cmd_);


As I said, this now works for me. But would appreciate if someone could 
check it.
In a more conservative approach, BIBINPUTS support could be added by the 
patch I proposed on http://www.lyx.org/trac/ticket/2645


Anyhow, please consider having BIBINPUTS defined in LyX 2.2. PLEASE

Thanks
PP




>From bc2396365e7d373c6b963b73b6bf523f71346547 Mon Sep 17 00:00:00 2001
From: Philip Pirrip 
Date: Wed, 28 Oct 2015 19:38:09 -0400
Subject: [PATCH] use setProcessEnvironment instead of shell escape

---
 src/support/Systemcall.cpp | 15 +--
 src/support/filetools.cpp  | 31 ---
 src/support/filetools.h| 10 --
 3 files changed, 41 insertions(+), 15 deletions(-)

diff --git a/src/support/Systemcall.cpp b/src/support/Systemcall.cpp
index 0e4cec7..09b8b1e 100644
--- a/src/support/Systemcall.cpp
+++ b/src/support/Systemcall.cpp
@@ -367,9 +367,17 @@ void SystemcallPrivate::startProcess(QString const & cmd, string const & path,
  string const & lpath, bool detached)
 {
 	cmd_ = cmd;
+	QProcessEnvironment envAdd;
+	envAdd.insert("BIBINPUTS", toqstr(latexEnv(path, lpath)));
+	envAdd.insert("TEXINPUTS", toqstr(latexEnv(path, lpath)));
+
 	if (detached) {
 		state = SystemcallPrivate::Running;
-		if (!QProcess::startDetached(toqstr(latexEnvCmdPrefix(path, lpath)) + cmd_)) {
+		QProcess process;
+		QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
+		env.insert(envAdd);
+		process.setProcessEnvironment(env);
+		if (!process.startDetached(cmd_)) {
 			state = SystemcallPrivate::Error;
 			return;
 		}
@@ -377,7 +385,10 @@ void SystemcallPrivate::startProcess(QString const & cmd, string const & path,
 		delete released;
 	} else if (process_) {
 		state = SystemcallPrivate::Starting;
-		process_->start(toqstr(latexEnvCmdPrefix(path, lpath)) + cmd_);
+		QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
+		env.insert(envAdd);
+		process_->setProcessEnvironment(env);
+		process_->start(cmd_);
 	}
 }
 
diff --git a/src/support/filetools.cpp b/src/support/filetools.cpp
index 204c842..6991a1f 100644
--- a/src/support/filetools.cpp
+++ b/src/support/filetools.cpp
@@ -38,6 +38,7 @@
 
 #include 
 #include 
+#include 
 
 #include "support/lassert.h"
 #include "support/regex.h"
@@ -698,9 +699,8 @@ string const replaceEnvironmentPath(string const & path)
 	return result;
 }
 
-
-// Return a command prefix for setting the environment of the TeX engine.
-string latexEnvCmdPrefix(string const & path, string const & lpath)
+// Return a string containing the environment directories (TEX-/BIB-INPUTS) for the TeX engine
+string latexEnv(string const & path, string const & lpath)
 {
 	bool use_lpath = !(lpath.empty() || lpath == "." || lpath == "./");
 
@@ -712,7 +712,6 @@ string latexEnvCmdPrefix(string const & path, string const & lpath)
 			replaceCurdirPath(path, lyxrc.texinputs_prefix));
 	string const sep = string(1, os::path_separator(os::TEXENGINE));
 	string const texinputs = getEnv("TEXINPUTS");
-
 	if (use_lpath) {
 		string const abslpath = FileName::isAbsolute(lpath)
 			? os::latex_path(lpath)
@@ -725,15 +724,25 @@ string latexEnvCmdPrefix(string const & path, string const & lpath)
 			texinputs_prefix.append(sep + abslpath);
 	}
 
-	if (os::shell() == os::UNIX)
-		return "env TEXINPUTS=\"." + sep + texinputs_prefix
-	  + sep + texinputs + "\" ";
-	else
 		// NOTE: the dummy blank dir is necessary to force the
 		//   QProcess parser to quote the argument (see bug 9453)
-		return "cmd /d 

Re: bug 9626: new handling of "LyX" is unintuitive

2015-10-19 Thread PhilipPirrip

On 10/18/2015 02:01 PM, Georg Baum wrote:

- rename the top level menu "Special Characters" to "Special Characters &
Strings"



This is what a programmer would call it, but I think this is just too 
long for a menu entry (and who knows what it'd be in other languages). 
Why not simply Symbols, or if you want it, Special Symbols?


Another possibility is to have an option (local/Document; or global/LyX) 
 to whether these few strings will be translated as before.




Re: bug 9626: new handling of "LyX" is unintuitive

2015-10-19 Thread PhilipPirrip

On 10/19/2015 10:25 AM, PhilipPirrip wrote:

Why not simply Symbols, or if you want it, Special Symbols?


There's then Symbols... submenu within Special Character menu now, I 
think this should become

Special Character -> Symbols
Symbols... -> Characters




Re: bug 9626: new handling of "LyX" is unintuitive

2015-10-19 Thread PhilipPirrip

On 10/19/2015 04:48 PM, Georg Baum wrote:

- rename the top level menu "Special Characters" to "Special Characters &
>>Strings"

>
>
>This is what a programmer would call it, but I think this is just too
>long for a menu entry (and who knows what it'd be in other languages).
>Why not simply Symbols, or if you want it, Special Symbols?

I think the current Symbols menu is well named, since it is like this in
other applications as well. I agree however that "Special Characters &
Strings" is a bit technical, so I'll look how a documenters toolbar would
look like.




LibreOffice has it as "Special Characters". Fedora Linux has an 
application called "Character Map" that lists characters by, I believe, 
unicode blocks.
And all those are just single characters. Symbols, though, can be one or 
more: Greek alpha or \LaTeX

Just my 5 cents.



Re: When to court Qt 5.6?

2015-10-13 Thread PhilipPirrip

On 10/13/2015 01:37 AM, Stephan Witt wrote:

HiDPI is possible with 5.4 too. I've read the Qt folks plan to make 5.6.x a
stable release with long term support for older platforms[1].

Stephan


It is possible, indeed, but it looks like this
http://wiki.lyx.org/uploads/Playground/LyX_screenshot_HiDPI_13inch_display_3200x1800_2015-09-13_Qt5_GiantIcons.png


Stephan (I believe you worked on HiDPI support) do you think 
class="QGroupBox" widgets are broken in Qt, or is this a flaw in the 
design of the dialogs in LyX?






Re: segmentation fault, lyx2.2.0dev @ Fedora 23 with Qt 5.5.0

2015-10-08 Thread PhilipPirrip

Dear Guillaume,
I finished my search for the bug yesterday, by checking out a few 
suspicious commits in the last 30 days, and to my great surprise even 
the latest commit worked. I really don't know what happened. I had it 
all built in a separate directory (that I even cleaned several times), 
git status was OK etc.
I'm so sorry for the noise. But I'm sure the advice people gave me will 
help someone backtrace the problems.




On 10/08/2015 09:39 AM, Guillaume Munch wrote:

Dear Philip,

I cannot reproduce it with my own documents. Have you managed to get a
backtrace? Or maybe I could try again with yours if you send me the
documents that LyX loads automatically on your side? (if not too private)

Best regards,
Guillaume







Re: LyX on high resolution displays

2015-10-08 Thread PhilipPirrip

On 09/13/2015 09:39 PM, Scott Kostyshak wrote:

Here's a screenshot:
>http://wiki.lyx.org/uploads/Playground/LyX_screenshot_HiDPI_13inch_display_3200x1800_2015-09-13_Qt5.png



Ouch that indeed does not look good. I feel like this is a Qt bug.
Unless our .ui files are not well-defined, Qt is responsible for the
dialog elements not running into each other.



Dear Scott, now that you're the release manager: how likely is it that 
the layout of the widgets in Document>Settings and Tools>Preferences 
will be fixed for v2.2, some of the sheets look really bad... so crumpled.
This is mostly with the widgets that are grouped within 
class="QGroupBox",they go too high into the title.
The other widgets are also packed very tightly in these settings 
dialogs, regardles of the screen resolution (it just becomes more 
obvious on HiDPI). This should be a cosmetic change, I tried it in Qt 
designer and things looked better, but I feel it needs a retouch from 
someone who's more experienced.
I can help along the way, even change these things with some guidance. 
But can it happen for 2.2?




One other thing:
I think that "Huge-sized" icons should be 40, or even 42 px in size 
(instead of just 32, that feels like 16 or less on normal dpi displays). 
Is there a way of knowing that the screen is HiDPI? Could a factor of 2 
be introduced with the old icon sizes so that the user doesn't need to 
intervene. (also, we should consider what happens when one switches from 
a HiDPI to a normal screen using these huge icons)


This is in frontends/qt4/GuiView.cpp



Re: segmentation fault, lyx2.2.0dev @ Fedora 23 with Qt 5.5.0

2015-10-06 Thread PhilipPirrip
Thanks, Kornel. I'll check these later. I went back in time, September 
28 18:13 commit 39343d65af worked. Moving forward, will let you know 
when things went bad and send you the backtrace.




Re: segmentation fault, lyx2.2.0dev @ Fedora 23 with Qt 5.5.0

2015-10-06 Thread PhilipPirrip

On 10/06/2015 06:00 AM, Kornel Benko wrote:


Could you please send a backtrace of the crash?



Hi Kornel,
I could send it if  I knew how. Sorry, have no experience with that, but 
willing to learn!




Are the Qt5 libs at runtime the same as the ones with which they are compiled?


It's hard for me to tell, but I guess they are. Qt5 binary was working 
some two weeks ago (as you can see from my posts on "LyX on high 
resolution displays"), then I upgraded to Fedora 23beta and the newest 
code in the trunk.


These are all qt packages I have installed:
python-qt5-5.5-1.fc23.x86_64
qt-4.8.7-3.fc23.i686
qt-4.8.7-3.fc23.x86_64
qt5-qtbase-5.5.0-15.fc23.x86_64
qt5-qtbase-common-5.5.0-15.fc23.noarch
qt5-qtbase-devel-5.5.0-15.fc23.x86_64
qt5-qtbase-gui-5.5.0-15.fc23.x86_64
qt5-qtconfiguration-0.3.1-1.fc23.x86_64
qt5-qtconfiguration-devel-0.3.1-1.fc23.x86_64
qt5-qtconnectivity-5.5.0-4.fc22.x86_64
qt5-qtdeclarative-5.5.0-3.fc22.x86_64
qt5-qtdeclarative-devel-5.5.0-3.fc22.x86_64
qt5-qtdoc-5.5.0-2.fc22.noarch
qt5-qtlocation-5.5.0-3.fc22.x86_64
qt5-qtmultimedia-5.5.0-3.fc22.x86_64
qt5-qtquickcontrols-5.5.0-3.fc22.x86_64
qt5-qtscript-5.5.0-3.fc22.x86_64
qt5-qtsensors-5.5.0-3.fc22.x86_64
qt5-qtserialport-5.5.0-3.fc22.x86_64
qt5-qtsvg-5.5.0-3.fc22.x86_64
qt5-qtsvg-devel-5.5.0-3.fc22.x86_64
qt5-qttools-common-5.5.0-4.fc23.noarch
qt5-qttools-libs-clucene-5.5.0-4.fc23.x86_64
qt5-qttools-libs-designer-5.5.0-4.fc23.x86_64
qt5-qttools-libs-designercomponents-5.5.0-4.fc23.x86_64
qt5-qttools-libs-help-5.5.0-4.fc23.x86_64
qt5-qtwebchannel-5.5.0-3.fc22.x86_64
qt5-qtwebkit-5.5.0-4.fc22.x86_64
qt5-qtwebsockets-5.5.0-3.fc22.x86_64
qt5-qtx11extras-5.5.0-2.fc23.x86_64
qt5-qtxmlpatterns-5.5.0-3.fc22.x86_64
qt-common-4.8.7-3.fc23.noarch
qt-config-4.8.7-3.fc23.x86_64
qt-creator-3.5.0-1.fc23.x86_64
qt-creator-data-3.5.0-1.fc23.noarch
qt-devel-4.8.7-3.fc23.x86_64
qt-mobility-common-1.2.2-0.21.20140317git169da60c.fc23.i686
qt-mobility-common-1.2.2-0.21.20140317git169da60c.fc23.x86_64
qt-mobility-location-1.2.2-0.21.20140317git169da60c.fc23.i686
qt-mobility-location-1.2.2-0.21.20140317git169da60c.fc23.x86_64
qt-mobility-sensors-1.2.2-0.21.20140317git169da60c.fc23.i686
qt-mobility-sensors-1.2.2-0.21.20140317git169da60c.fc23.x86_64
qt-settings-23-5.fc23.noarch
qtwebkit-2.3.4-8.fc23.i686
qtwebkit-2.3.4-8.fc23.x86_64
qt-x11-4.8.7-3.fc23.i686
qt-x11-4.8.7-3.fc23.x86_64








segmentation fault, lyx2.2.0dev @ Fedora 23 with Qt 5.5.0

2015-10-05 Thread PhilipPirrip

Any experience compiling LyX 2.2.0dev with Qt 5.5.0 (on Fedora 23)?
Mine compiles well, but never starts: Segmentation fault (core dumped).

This is my run_cmake.sh

#!/bin/bash
cmake ./lyx  \
 -G"Unix Makefiles"  \
 -DLYX_CPACK=OFF  \
 -DLYX_LOCALVERSIONING=OFF  \
 -DLYX_INSTALL=OFF  \
 -DLYX_NLS=ON  \
 -DLYX_REQUIRE_SPELLCHECK=OFF  \
 -DLYX_ASPELL=OFF  \
 -DLYX_ENCHANT=OFF  \
 -DLYX_HUNSPELL=OFF  \
 -DLYX_DEVEL_VERSION=OFF  \
 -DLYX_RELEASE=OFF  \
 -DLYX_DEBUG=ON  \
 -DLYX_NO_OPTIMIZE=OFF  \
 -DLYX_PACKAGE_SUFFIX=ON  \
 -DLYX_PCH=OFF  \
 -DLYX_MERGE_FILES=OFF  \
 -DLYX_MERGE_REBUILD=OFF  \
 -DLYX_QUIET=OFF  \
 -DLYX_INSTALL_PREFIX=OFF  \
 -DLYX_BUNDLE=OFF  \
 -DLYX_ENABLE_URLTESTS=OFF  \
 -DLYX_ENABLE_EXPORT_TESTS=OFF  \
 -DLYX_ASAN=OFF  \
 -DLYX_PROFILE=OFF  \
 -DLYX_EXTERNAL_BOOST=OFF  \
 -DLYX_PROGRAM_SUFFIX=ON  \
 -DLYX_DEBUG_GLIBC=OFF  \
 -DLYX_DEBUG_GLIBC_PEDANTIC=OFF  \
 -DLYX_STDLIB_DEBUG=OFF  \
 -DLYX_PROFILE=OFF  \
 -DLYX_ENABLE_CXX11=ON  \
 -DLYX_USE_QT=QT5  \


I compiled with LYX_ENABLE_CXX11=OFF, LYX_RELEASE=ON, LYX_DEBUG=OFF as 
well - no change.


LYX_USE_QT=QT4 works well





Re: \cyrtext and \textcyr in the preabmle

2015-10-05 Thread PhilipPirrip

On 10/05/2015 03:10 AM, Guenter Milde wrote:

I cannot tell what went wrong so that even an empty file has the
definitions. It would help to get more info on the dependency of this
misbehaviour on document settings.



All default document settings, freshly compiled LyX version 2.2.0dev 
(October 1 2015), git commit 24ae2093 on Fedora linux 23







(although under normal circumstanceds the effect is limited to spurious
code in the preamble without further file loading etc.)


True, but still not good. Say  I'm exporting to LaTeX a paper for 
submission to a journal, I'd definitely not want to have this code in there.
The code is also added to old documents, I just tested it with 
classicthesis template.




Re: LyX on high resolution displays

2015-10-05 Thread PhilipPirrip



Hi,
It is pretty bad that 2.2 is slower than 2.1. Could you share your lorem
ipsum document?
JMarc


Hi JMarc,
It was a plain text lorem ipsum copied from the web to a text editor and 
then to LyX, nothing special about it. It had paragraphs of

some 6-7 lines, no special characters etc.
I've tried it again, now with
 -DLYX_RELEASE=ON  \
 -DLYX_DEBUG=OFF  \
 -DLYX_ENABLE_CXX11=ON  \
 -DLYX_USE_QT=QT4  \
in my run_cmake.sh
It scrolls super fast (but so does 2.1.4, can't see much difference - 
possibly because my laptop is fast).


One thing though - (two finger touchpad) scrolling in both versions 
feels a bit *shaky*, and you can actually see the scroll bar go down, 
then slightly up, then continuing down (and v.v.). Has probably to do 
with insets (I inserted a few figure floats) and the (gradual, 
screen-by-screen) way LyX calculates the page layout. Speaking of which 
- is that really necessary in 2015? Like, when you open a lengthy 
document and start scrolling you can notice the scroll bar size changes 
as you move down. I don't think that's how browsers or word processors 
do things, am I right?




Re: LyX on high resolution displays

2015-10-05 Thread PhilipPirrip



Hi,
It is pretty bad that 2.2 is slower than 2.1. Could you share your lorem
ipsum document?
JMarc


Hi JMarc,
It was a plain text lorem ipsum copied from the web to a text editor and 
then to LyX, nothing special about it. It had paragraphs of

some 6-7 lines, no special characters etc.
I've tried it again, now with
 -DLYX_RELEASE=ON  \
 -DLYX_DEBUG=OFF  \
 -DLYX_ENABLE_CXX11=ON  \
 -DLYX_USE_QT=QT4  \
in my run_cmake.sh
It scrolls super fast (but so does 2.1.4, can't see much difference - 
possibly because my laptop is fast).


One thing though - (two finger touchpad) scrolling in both versions 
feels a bit *shaky*, and you can actually see the scroll bar go down, 
then slightly up, then continuing down (and v.v.). Has probably to do 
with insets (I inserted a few figure floats) and the (gradual, 
screen-by-screen) way LyX calculates the page layout. Speaking of which 
- is that really necessary in 2015? Like, when you open a lengthy 
document and start scrolling you can notice the scroll bar size changes 
as you move down. I don't think that's how browsers or word processors 
do things, am I right?




Re: \cyrtext and \textcyr in the preabmle

2015-10-05 Thread PhilipPirrip



Could you file a bug report?
Thanks,
Günter



Just did, http://www.lyx.org/trac/ticket/9792
Thanks



\cyrtext and \textcyr in the preabmle

2015-10-04 Thread PhilipPirrip


Why is LyX now adding this to every document, regardless of the class 
and latex font encoding used and even in empty documents:


%% LyX specific LaTeX commands.
\DeclareRobustCommand{\cyrtext}{%
  \fontencoding{T2A}\selectfont\def\encodingdefault{T2A}}
\DeclareRobustCommand{\textcyr}[1]{\leavevmode{\cyrtext #1}}


I think such interventions should be kept minimal.



Re: Compilation Problem on Fedora

2015-09-30 Thread PhilipPirrip

On 09/28/2015 01:37 PM, Richard Heck wrote:

> Yes, just compiled with fresh build directory, and it was fine. Thanks.


I can confirm this, but! when I compile for qt5 the binary only gets 
core dumped. These are the settings in run_cmake.sh


cmake ../lyx \
-G"Unix Makefiles" \
-DLYX_CPACK=OFF \
-DLYX_LOCALVERSIONING=OFF \
-DLYX_INSTALL=OFF \
-DLYX_NLS=ON \
-DLYX_REQUIRE_SPELLCHECK=OFF \
-DLYX_ASPELL=OFF \
-DLYX_ENCHANT=OFF \
-DLYX_HUNSPELL=OFF \
-DLYX_DEVEL_VERSION=OFF \ >>>doesn't matter if it's on or off
-DLYX_RELEASE=ON \ >>>doesn't matter if it's on or off
-DLYX_DEBUG=OFF \ >>>doesn't matter if it's on or off
-DLYX_NO_OPTIMIZE=OFF \
-DLYX_PACKAGE_SUFFIX=ON \
-DLYX_PCH=OFF \
-DLYX_MERGE_FILES=OFF \
-DLYX_MERGE_REBUILD=OFF \
-DLYX_QUIET=OFF \
-DLYX_INSTALL_PREFIX=OFF \
-DLYX_BUNDLE=OFF \
-DLYX_ENABLE_URLTESTS=OFF \
-DLYX_ENABLE_EXPORT_TESTS=OFF \
-DLYX_ASAN=OFF \
-DLYX_PROFILE=OFF \
-DLYX_EXTERNAL_BOOST=OFF \
-DLYX_PROGRAM_SUFFIX=ON \
-DLYX_DEBUG_GLIBC=OFF \
-DLYX_DEBUG_GLIBC_PEDANTIC=OFF \
-DLYX_STDLIB_DEBUG=OFF \
-DLYX_PROFILE=OFF \
-DLYX_ENABLE_CXX11=OFF \ >>>doesn't matter if it's on or off
-DLYX_USE_QT=QT5 \



It works well with DLYX_USE_QT=QT4 though.



Re: LyX on high resolution displays

2015-09-30 Thread PhilipPirrip
Just an update: with Qt 4.8.7 and the most recent master it is now 
possible to have Huge and Giant sized icons and most things look well.


Widgets of the class="QGroupBox" are still broken, but this depends on 
the Qt4 GUI Style chosen.  Can't test with Qt5, the binary gets core dumped.
While this may be a bug in Qt, I also think many dialogs in 
Document>Settigs and Tools>Preferences should be redesigned, most 
widgets there are  packed too tight.




Re: Document settings

2015-09-17 Thread PhilipPirrip

On 09/17/2015 07:13 AM, Pål Næverlid Sævik wrote:

Of course, the page cannot support every existing LaTeX package, but
there are certainly some options I would like to see included, and
others that I personally would have restructured or removed. For instance:
- The sectsty package
- The fancyhdr package (sort of supported already, but a better
interface would be nice)
- The unicode-math package




My vote, if I may, goes for biblatex support, at least at the level of 
its natbib compatibility module. We have a working hack for it, 
shouldn't be too hard to implement: http://wiki.lyx.org/BibTeX/Biblatex



(there were several discussions on the list about this, please check 
them too)




Re: LyX on high resolution displays

2015-09-14 Thread PhilipPirrip

On 09/14/2015 04:04 AM, Jean-Marc Lasgouttes wrote:

What is the file layout in /usr/lib/x86_64-linux-gnu/qt5?


This is for Fedora Linux 22:

/usr/lib64/qt5/

bin/
imports/
libexec/
mkspecs/
plugins/
qml/




Re: LyX on high resolution displays

2015-09-14 Thread PhilipPirrip

On 09/14/2015 04:09 AM, Jean-Marc Lasgouttes wrote:

Performance is good.

Is it really better than 2.1? (it should)


I guess I first need to learn how to test this.

I just made a document with some 25k characters (a few copies of lorem 
ipsum from the web).

2.1 scrolls pretty fast, the scroll bar follows the mouse pointer.
2.2 is lagging, it takes time for the bar to reach the pointer, and 
scrolling does not feel smooth. Two finger (mouse wheel) scrolling is 
unusable, the scrollbar stands still for most of the time then jumps.







The workarea does feel a bit tight (inset boxes in
neighboring lines almost touch), the scrollbar is narrow and figures
render too small. Check this:


Note that you can make icons larger by right clicking on them. I am not
sure how to deal with too tight space between insets. I suspect that we
have some hardcoded values here and there that do not respect zoom



I did know about the icons (ten yrs ago), but did not remember to check 
that now. Thanks JMarc. Things look just fine with Giant-sized icons, if 
only that change could me made automatic for HiDPI (I'd first check in 
Tools>Preferences>Display if there's a HiDPI switch).
There are still places where the icons are too small. I have another 
screenshot:


http://wiki.lyx.org/uploads/Playground/LyX_screenshot_HiDPI_13inch_display_3200x1800_2015-09-13_Qt5_GiantIcons.png


Seems that these bold annotations (or what follows them) are misplaced 
in all dialogs.


Insert Table has some issues with the row/column numbers.

I like the new layout in Insert>Citation, I'd say many other dialogs 
need such a ('modern') retouch.



Some windows feel very small.


File browser windows always open too small.

Many things in LyX:Preferences look crumpled.


http://wiki.lyx.org/uploads/Playground/LyX_screenshot_HiDPI_13inch_display_3200x1800_2015-09-13_Qt5_moredialogs.png




If someone wants to work on this, I can provide you with more 
screenshots and feedback. I could take a look at UI things too, but I'd 
probably need to be taught how to do it in the first place.



Is 2.2 going to be a Qt5 app by default (or is it up to packagers)?









Re: LyX on high resolution displays

2015-09-13 Thread PhilipPirrip

On 09/12/2015 09:59 PM, Scott Kostyshak wrote:
rom what I understand.


I know you are using Windows, but if by chance you dual boot with
Ubuntu, let me know and I can give you installation files you can test.


Hi Scott,
I have a 3200x1800 laptop with Fedora 22 installed (Gnome), and would be 
glad to test this.
Things work pretty well with LyX 2.1.4, I only increased the screen font 
zoom to 133% (chose Cantarell for Roman), and changed to Cleanlooks GUI 
style in Qt Configuration tool (with the default setting, the menu bar 
was too narrow and the standard toolbar pop-up menu too big - works OK 
with GTK+ style too, but not adwaita).


I can also compile the source myself, if you have it in a branch i just 
need to know where to find it.


Best,
pp



Re: LyX on high resolution displays

2015-09-13 Thread PhilipPirrip

On 09/13/2015 11:22 AM, Scott Kostyshak wrote:


Yes this would be best. I only know how to make .deb files. The branch
is 'master' (which is the default branch I believe). Our master branch
is what will become 2.2.0. It would be great if you could test. From
what I understand, we (well not I but other developers) have committed
several fixes to improve LyX for high density display, but I don't think
any developers actually have a high density display to test it.
Actually, I think maybe we did get some testing on Mac, but it would be
great to have feedback from a Linux user.

Do note, however, that the master branch is the development branch, so
usual warnings apply. That said, I use it for all of my work (yes, I am
a daredevil) in order to test.

Scott


I don't see any change between 2.1.4 and today's 2.2.0dev, all the icons 
are still small and the toolbar layout is a bit broken (Gnome, adwaita 
theme set in Qtconfig-qt4).

Check it yourself:
http://wiki.lyx.org/uploads/Playground/LyX_screenshot_HiDPI_13inch_display_3200x1800_2015-09-13.png

Scale the image to a 13" diagonal to see how small the icons are / 
compare them to Libre Office icons in the same picture.


Can you please check if the changes regarding HiDPI screens have been 
committed.







Re: LyX on high resolution displays

2015-09-13 Thread PhilipPirrip

On 09/13/2015 06:02 PM, Scott Kostyshak wrote:


Ah it seemes that Qt 5 is needed in order to take advantage of the commits. see
http://www.lyx.org/trac/ticket/9130#comment:15
I would warn that you should use Qt 5.5 as using previous versions caused 
regressions.



Oh, OK. Thanks Scott.
I might need some help here:
I did
./configure --enable-qt5

and the error was
checking for Qt library name... failed
configure: error: cannot compile a simple Qt executable. Check you have 
the right $QTDIR.


Then
export QTDIR=/usr/lib64/qt5



and also tried
./configure --enable-qt5 --with-qt-dir=/usr/lib64/qt5

Same error.




I have no idea what to do next.


(I'm also using Qt Creator, is there anything I can do from there?)





-

Name: qt5-qtbase-devel
Arch: x86_64
Epoch   : 0
Version : 5.5.0
Release : 15.fc22
Summary : Development files for qt5-qtbase
Description : Development files for qt5-qtbase.





Re: LyX on high resolution displays

2015-09-13 Thread PhilipPirrip

On 09/13/2015 07:42 PM, Scott Kostyshak wrote:

Hopefully one of the Fedora users around here has an idea.

Just in case, give CMake a try.

# First clean the source directory (I assume you don't have any changes
# you care about):
git clean -xdf ./

# Make a directory somewhere (outside the source directory), and do:
cmake -DLYX_USE_QT=QT5 /path/to/lyx/source

# If the above goes through without error, then just do:
make

Any luck?

Scott





Yes, this worked. Thanks!

Unfortunately, even with Qt 5.5.0 not much has changed, I'd say things 
look even worse for there's no Qt Config tool in Qt5 to set the theme 
any more.
(there's a command line -style=gtk/Cleanlooks/adwaita option that 
doesn't seem to help much)

Here's a screenshot:

http://wiki.lyx.org/uploads/Playground/LyX_screenshot_HiDPI_13inch_display_3200x1800_2015-09-13_Qt5.png


Please let me know if I can be of any further help. (I'll keep testing 
other stuff)






Re: LyX on high resolution displays

2015-09-13 Thread PhilipPirrip

On 09/13/2015 09:39 PM, Scott Kostyshak wrote:

Ouch that indeed does not look good. I feel like this is a Qt bug.
Unless our .ui files are not well-defined, Qt is responsible for the
dialog elements not running into each other.



This even with Qt4 depends on the selected Qt GUI Style (Cleanlooks, 
Gtk, Plastique, adwaita...)

Scribus is having similar issues, for example, even qtconfig-qt4.



What about LyX's workarea (the yellow area where you type stuff)? Does
it have any bad performance?


Performance is good. The workarea does feel a bit tight (inset boxes in 
neighboring lines almost touch), the scrollbar is narrow and figures 
render too small. Check this:


http://wiki.lyx.org/uploads/Playground/LyX_screenshot_HiDPI_13inch_display_3200x1800_2015-09-13_Qt5_DejaVuSerif.png

http://wiki.lyx.org/uploads/Playground/LyX_screenshot_HiDPI_13inch_display_3200x1800_2015-09-13_Qt5_Cantarell.png




Thanks for testing!

Thank you, guys, for a wonderful piece of software!




Re: \input@path - two slashes, quotation marks

2015-08-27 Thread PhilipPirrip

Thanks Georg, I hope we'll eventually get somewhere.


On 08/26/2015 04:42 PM, Georg Baum wrote:

What do others think? Should we remove the second slash? I tend to say yes,
since I could not find any documentation about it.


I suspect the other slash was added as a bug fix for those OS's that do 
not have it at the end of the path, can't see any other reason.

So I suppose this should be tested on OSX and Windows as well.




Well, the code is programmed like that on purpose to be on the safe side.


I understand the intention, but I don't think that's the right solution 
for this case. It's just that you can't feed this

{\string /home/user/di rectory/\string /file name.bib}
to any, let's call it, file= option without fully expanding first, and 
then you're back to what you tried to avoid.


In addition, biblatex doesn't seem to recognize quoted paths and the 
quotes have to be stripped off.


P.S. From what you said below, I now see that \input@path list was not 
meant to be used in this way, however it's still the only method of 
obtaining the absolute paths we have.







But one can always add the quotes, I assume, before using the command.

Of course you can do that. However, if you look how \input@path is used
by LaTeX packages







Hm... I thought \input@path was just a command being added by LyX at the
compilation time for its own purposes. Isn't it? What LaTeX packages use
\input@path?


No, LyX did not invent \input@path. In my texlive installation, it occurs 87
times



Hm, yeah. I can see that. I don't know exactly when and what it's used 
for, though. LaTeX alone does not set it to any particular path.



This, for example,


\documentclass{article}
\begin{document}
\makeatletter
\texttt{\meaning\input@path}
\makeatother
\end{document}

doesn't seem to have it defined, \input@path is only there when you 
compile it from LyX.
A few random pages from the web made me think one has to define 
\input@path oneself, and this will be the last resort for LaTeX, but no 
other supporting processors, to look for the files.





The curly braces are not unnecessary. They are required by LaTeX (see the
explanation in $TEXMFDIST/tex/latex/base/texsys.cfg)


OK, I see... \input@path is a LIST of directories. But then, what 
additional protection the quotes (are supposed to) give if the whole 
thing within {}  will be parsed as an entity anyway?
There's unfortunately no mention of the quotes or paths with spaces in 
texsys.cfg.





This is not how \input@path is supposed to be used. I suggest to try this
instead:

\filename@parse{file name.bib}
\addbibresource{\filename@area\filename@base\filename@ext}



I wish this was true, but no... \filename@parse only *parses* (no search 
involved) its argument for the three parts, and it does it in a very 
primitive way.



\documentclass{article}
\begin{document}
\makeatletter
\filename@parse{/home/user/doesn.t exist/test v2.1 new.bib}
\texttt{\meaning\filename@area}

\texttt{\meaning\filename@base}

\texttt{\meaning\filename@ext}

\texttt{\meaning\input@path}
\makeatother
\end{document}


check: 
http://tex.stackexchange.com/questions/39634/how-to-trim-tex-for-each-filename-read-from-an-external-file



Since the way \input@path is being used in the biblatex hack from 
http://wiki.lyx.org/BibTeX/Biblatex is barely legal, maybe LyX should 
define its own command, say \LyX@basepath that'd contain the absolute 
path to the master .lyx document (no qoutes, no curly braces - only for 
the brave).
Would you be willing to do that? (being that biblatex support is nowhere 
on the horizon yet)




(when the documents are exported to LaTeX \LyX@basepath should still be 
defined, but can be simply ./)







\filename@parse searches the file, trying all directories in \input@path,
and then defines the three variables \filename@area (contains the
directory), \filename@base (contains the base name), \filename@ext (contains
the extension).







That's why, I think, \input@path should contain no quotes, and whoever
uses it should be aware that the qoutes are (or might be) missing. Of
course, we should all check if quotes in the file name mean anything to
LaTeX, i.e. is the string within the quotes treated as an entity.


These checks have been done already (although one could retest whether the
results are still valid after 10 years), see the wiki page.



My tests show, let's note it, that quotes don't work with biblatex and 
the quoted path is never found.







Re: \input@path - two slashes, quotation marks

2015-08-27 Thread PhilipPirrip

Thanks Georg, I hope we'll eventually get somewhere.


On 08/26/2015 04:42 PM, Georg Baum wrote:

What do others think? Should we remove the second slash? I tend to say yes,
since I could not find any documentation about it.


I suspect the other slash was added as a bug fix for those OS's that do 
not have it at the end of the path, can't see any other reason.

So I suppose this should be tested on OSX and Windows as well.




Well, the code is programmed like that on purpose to be on the safe side.


I understand the intention, but I don't think that's the right solution 
for this case. It's just that you can't feed this

{\string "/home/user/di rectory/\string "/file name.bib}
to any, let's call it, "file=" option without fully expanding first, and 
then you're back to what you tried to avoid.


In addition, biblatex doesn't seem to recognize quoted paths and the 
quotes have to be stripped off.


P.S. From what you said below, I now see that \input@path list was not 
meant to be used in this way, however it's still the only method of 
obtaining the absolute paths we have.







But one can always add the quotes, I assume, before using the command.

Of course you can do that. However, if you look how \input@path is used
by LaTeX packages







Hm... I thought \input@path was just a command being added by LyX at the
compilation time for its own purposes. Isn't it? What LaTeX packages use
\input@path?


No, LyX did not invent \input@path. In my texlive installation, it occurs 87
times



Hm, yeah. I can see that. I don't know exactly when and what it's used 
for, though. LaTeX alone does not set it to any particular path.



This, for example,


\documentclass{article}
\begin{document}
\makeatletter
\texttt{\meaning\input@path}
\makeatother
\end{document}

doesn't seem to have it defined, \input@path is only there when you 
compile it from LyX.
A few random pages from the web made me think one has to define 
\input@path oneself, and this will be the last resort for LaTeX, but no 
other supporting processors, to look for the files.





The curly braces are not unnecessary. They are required by LaTeX (see the
explanation in $TEXMFDIST/tex/latex/base/texsys.cfg)


OK, I see... \input@path is a LIST of directories. But then, what 
additional protection the quotes (are supposed to) give if the whole 
thing within {}  will be parsed as an entity anyway?
There's unfortunately no mention of the quotes or paths with spaces in 
texsys.cfg.





This is not how \input@path is supposed to be used. I suggest to try this
instead:

\filename@parse{file name.bib}
\addbibresource{\filename@area\filename@base\filename@ext}



I wish this was true, but no... \filename@parse only *parses* (no search 
involved) its argument for the three parts, and it does it in a very 
primitive way.



\documentclass{article}
\begin{document}
\makeatletter
\filename@parse{/home/user/doesn.t exist/test v2.1 new.bib}
\texttt{\meaning\filename@area}

\texttt{\meaning\filename@base}

\texttt{\meaning\filename@ext}

\texttt{\meaning\input@path}
\makeatother
\end{document}


check: 
http://tex.stackexchange.com/questions/39634/how-to-trim-tex-for-each-filename-read-from-an-external-file



Since the way \input@path is being used in the biblatex hack from 
http://wiki.lyx.org/BibTeX/Biblatex is barely legal, maybe LyX should 
define its own command, say \LyX@basepath that'd contain the absolute 
path to the master .lyx document (no qoutes, no curly braces - only for 
the brave).
Would you be willing to do that? (being that biblatex support is nowhere 
on the horizon yet)




(when the documents are exported to LaTeX \LyX@basepath should still be 
defined, but can be simply ./)







\filename@parse searches the file, trying all directories in \input@path,
and then defines the three variables \filename@area (contains the
directory), \filename@base (contains the base name), \filename@ext (contains
the extension).







That's why, I think, \input@path should contain no quotes, and whoever
uses it should be aware that the qoutes are (or might be) missing. Of
course, we should all check if quotes in the file name mean anything to
LaTeX, i.e. is the string within the quotes treated as an entity.


These checks have been done already (although one could retest whether the
results are still valid after 10 years), see the wiki page.



My tests show, let's note it, that quotes don't work with biblatex and 
the quoted path is never found.







Re: \input@path - two slashes, quotation marks

2015-08-24 Thread PhilipPirrip



Why does \input@path end with two slashes, as in
/home/user/directory//

IIRC this means that also sub directories are searched, but this should
be documented in some TeX or LaTeX docs.


Not sure how it all works for (La)TeX, I'm assuming this is all handled 
by the OS. Unixoids (OSX, Linux) don't care about any extra slashes, 
might be the same for Windows: 
http://unix.stackexchange.com/questions/1910/how-does-linux-handle-multiple-consecutive-path-separators-home-username





I did some reserach, and could not find any LaTeX docs about double slashes.
What I know is that one slash is definitely needed, and that these double
slashes at the end do exist at least since LyX 1.2.


I'm 96% sure this is wrong, and it's especially wrong in this case



and why is its output
/home/user/dir ectory//
when the folder name contains spaces?


since the WHOLE path should be enclosed in quotation marks - as far as 
the OS is concerned, but TeX might behave differently and even not 
recognize the quotes as grouping characters.






Wiothout quotes only the part before the space would be used.


In an OS, yes. But wouldn't be so sure about TeX.



I believe
that the second slash is not included in the quotes since it is only a
special marker (see above).


I bet it's just a bug. And it's amazing how the quotes disappear from 
the os stream when there are no spaces in the path name.






But one can always add the quotes, I assume, before using the command.

Of course you can do that. However, if you look how \input@path is used by
LaTeX packages


Hm... I thought \input@path was just a command being added by LyX at the 
compilation time for its own purposes. Isn't it? What LaTeX packages use 
\input@path?





You'll almost certainly have to add a file name at the end of the path,
and then you're in trouble.


Can you give an example?


My only experience with \input@path is from here 
http://wiki.lyx.org/BibTeX/Biblatex. I needed to \addbibresource{file 
name.bib} so that it's found at the compilation time. That meant that 
\addbibresource{} had to include the absolute path of the base document 
directory, and the only way of knowing it was by adding the \input@path 
to it: \addbibresource{\input@path/file name.bib}
Now, the problem was that \input@path contains, quite unnecessary, curly 
braces in it (why, if the file path is only being forwarded to the OS, 
unless the path is being written to an aux file), quotation marks 
encoded as \string , and even worse, placed even before the path ended. 
So one gets

\addbibresource{{\string /home/user/di rectory/\string /file name.bib}}
instead of, ideally (a slash or two more or less)
\addbibresource{/home/user/di rectory/file name.bib}
or
\addbibresource{/home/user/di rectory/file name.bib}



(this is possible with biber, but not with bibtex as a processor - the 
latter does not allow spaces in the file name - possibly even when the 
path is quoted:

http://tex.stackexchange.com/questions/102258/referencing-bib-files-with-spaces-in-the-filename)


I made some tests. I created a directory named dir

with space, then put all three attached files in there, and then tried to
view different formats. Result:


I unfortunately do not know how LyX handles all this internally and 
where \input@path is used in your example. But from the error code you 
can see what your path looks like:

...with space//./escher-lsd.eps
Quite a mess, huh?
That's why, I think, \input@path should contain no quotes, and whoever 
uses it should be aware that the qoutes are (or might be) missing. Of 
course, we should all check if quotes in the file name mean anything to 
LaTeX, i.e. is the string within the quotes treated as an entity.


There was a mention that tricks with \input@path haven't always worked, 
I'm beginning to think it was exactly for these reasons - the command 
can produce amazingly messy paths!







Look at the answers here for removing the quotes:
http://tex.stackexchange.com/questions/259015/one-liner-for-removing-characters-from-a-string


IMHO removing the quotes is a workaround if you don't want to (or can't)
change LyX. I am more interested in how LyX should behave ideally.


I cannot think of any case that uses only the directory path, i.e. 
that's not appengind a file name to it. Then
{/home/user/dir ectory//}./file name.something can't be the proper way 
of qouting the path in this universe.







At least for biblatex (and biber), the path doesn't have to include any
quotes.

Please give an example how to use biblatex and biber with paths including
spaces and \input@path.


There's an old example for Windows here 
http://wiki.lyx.org/BibTeX/Biblatex (I haven't touched that when I 
rewrote the page)
And there's also this 
http://tex.stackexchange.com/questions/102258/referencing-bib-files-with-spaces-in-the-filename





Correction: TEXINPUTS is still used, but \input@path is used in addition,
since relative paths starting with ./ or ../ do not work with TEXINPUTS.


Re: \input@path - two slashes, quotation marks

2015-08-24 Thread PhilipPirrip



Why does \input@path end with two slashes, as in
/home/user/directory//

IIRC this means that also sub directories are searched, but this should
be documented in some TeX or LaTeX docs.


Not sure how it all works for (La)TeX, I'm assuming this is all handled 
by the OS. Unixoids (OSX, Linux) don't care about any extra slashes, 
might be the same for Windows: 
http://unix.stackexchange.com/questions/1910/how-does-linux-handle-multiple-consecutive-path-separators-home-username





I did some reserach, and could not find any LaTeX docs about double slashes.
What I know is that one slash is definitely needed, and that these double
slashes at the end do exist at least since LyX 1.2.


I'm 96% sure this is wrong, and it's especially wrong in this case



and why is its output
"/home/user/dir ectory/"/
when the folder name contains spaces?


since the WHOLE path should be enclosed in quotation marks - as far as 
the OS is concerned, but TeX might behave differently and even not 
recognize the quotes as grouping characters.






Wiothout quotes only the part before the space would be used.


In an OS, yes. But wouldn't be so sure about TeX.



I believe
that the second slash is not included in the quotes since it is only a
special marker (see above).


I bet it's just a bug. And it's amazing how the quotes disappear from 
the os<< stream when there are no spaces in the path name.






But one can always add the quotes, I assume, before using the command.

Of course you can do that. However, if you look how \input@path is used by
LaTeX packages


Hm... I thought \input@path was just a command being added by LyX at the 
compilation time for its own purposes. Isn't it? What LaTeX packages use 
\input@path?





You'll almost certainly have to add a file name at the end of the path,
and then you're in trouble.


Can you give an example?


My only experience with \input@path is from here 
http://wiki.lyx.org/BibTeX/Biblatex. I needed to \addbibresource{file 
name.bib} so that it's found at the compilation time. That meant that 
\addbibresource{} had to include the absolute path of the base document 
directory, and the only way of knowing it was by adding the \input@path 
to it: \addbibresource{\input@path/file name.bib}
Now, the problem was that \input@path contains, quite unnecessary, curly 
braces in it (why, if the file path is only being forwarded to the OS, 
unless the path is being written to an aux file), quotation marks 
encoded as \string ", and even worse, placed even before the path ended. 
So one gets

\addbibresource{{\string "/home/user/di rectory/\string "/file name.bib}}
instead of, ideally (a slash or two more or less)
\addbibresource{/home/user/di rectory/file name.bib}
or
\addbibresource{"/home/user/di rectory/file name.bib"}



(this is possible with biber, but not with bibtex as a processor - the 
latter does not allow spaces in the file name - possibly even when the 
path is quoted:

http://tex.stackexchange.com/questions/102258/referencing-bib-files-with-spaces-in-the-filename)


I made some tests. I created a directory named "dir

with space", then put all three attached files in there, and then tried to
view different formats. Result:


I unfortunately do not know how LyX handles all this internally and 
where \input@path is used in your example. But from the error code you 
can see what your path looks like:

"...with space/"/./escher-lsd.eps
Quite a mess, huh?
That's why, I think, \input@path should contain no quotes, and whoever 
uses it should be aware that the qoutes are (or might be) missing. Of 
course, we should all check if quotes in the file name mean anything to 
LaTeX, i.e. is the string within the quotes treated as an entity.


There was a mention that tricks with \input@path haven't always worked, 
I'm beginning to think it was exactly for these reasons - the command 
can produce amazingly messy paths!







Look at the answers here for removing the quotes:
http://tex.stackexchange.com/questions/259015/one-liner-for-removing-characters-from-a-string


IMHO removing the quotes is a workaround if you don't want to (or can't)
change LyX. I am more interested in how LyX should behave ideally.


I cannot think of any case that uses only the directory path, i.e. 
that's not appengind a file name to it. Then
{"/home/user/dir ectory/"/}./file name.something can't be the proper way 
of qouting the path in this universe.







At least for biblatex (and biber), the path doesn't have to include any
quotes.

Please give an example how to use biblatex and biber with paths including
spaces and \input@path.


There's an old example for Windows here 
http://wiki.lyx.org/BibTeX/Biblatex (I haven't touched that when I 
rewrote the page)
And there's also this 
http://tex.stackexchange.com/questions/102258/referencing-bib-files-with-spaces-in-the-filename





Correction: TEXINPUTS is still used, but \input@path is used in addition,
since relative paths starting with ./ or ../ do not work 

Re: \input@path - two slashes, quotation marks

2015-08-21 Thread PhilipPirrip

On 08/19/2015 04:44 PM, Georg Baum wrote:

PhilipPirrip wrote:


Why does \input@path end with two slashes, as in
/home/user/directory//


IIRC this means that also sub directories are searched, but this should be
documented in some TeX or LaTeX docs.


and why is its output
/home/user/dir ectory//
(note quotation marks, and two separate ending slashes) when the folder
name contains spaces?


Wiothout quotes only the part before the space would be used. I believe that
the second slash is not included in the quotes since it is only a special
marker (see above).


But one can always add the quotes, I assume, before using the command. 
You'll almost certainly have to add a file name at the end of the path, 
and then you're in trouble.
Look at the answers here for removing the quotes: 
http://tex.stackexchange.com/questions/259015/one-liner-for-removing-characters-from-a-string
At least for biblatex (and biber), the path doesn't have to include any 
quotes.




As you already found out \input@path does not work in several cases,
therefore LyX changed to use TEXINPUTS. If biber does not work with either
mechanism then please report this to the biber people.


There are BIBINPUTS in that case, 
http://tex.stackexchange.com/questions/67205/use-bibinputs-to-specify-other-location-for-bib-file 
so I still have to report to the LyX people (who did a great job otherwise)












Re: \input@path - two slashes, quotation marks

2015-08-21 Thread PhilipPirrip

On 08/19/2015 04:44 PM, Georg Baum wrote:

PhilipPirrip wrote:


Why does \input@path end with two slashes, as in
/home/user/directory//


IIRC this means that also sub directories are searched, but this should be
documented in some TeX or LaTeX docs.


and why is its output
"/home/user/dir ectory/"/
(note quotation marks, and two separate ending slashes) when the folder
name contains spaces?


Wiothout quotes only the part before the space would be used. I believe that
the second slash is not included in the quotes since it is only a special
marker (see above).


But one can always add the quotes, I assume, before using the command. 
You'll almost certainly have to add a file name at the end of the path, 
and then you're in trouble.
Look at the answers here for removing the quotes: 
http://tex.stackexchange.com/questions/259015/one-liner-for-removing-characters-from-a-string
At least for biblatex (and biber), the path doesn't have to include any 
quotes.




As you already found out \input@path does not work in several cases,
therefore LyX changed to use TEXINPUTS. If biber does not work with either
mechanism then please report this to the biber people.


There are BIBINPUTS in that case, 
http://tex.stackexchange.com/questions/67205/use-bibinputs-to-specify-other-location-for-bib-file 
so I still have to report to the LyX people (who did a great job otherwise)












Re: \input@path - two slashes, quotation marks

2015-08-05 Thread PhilipPirrip
Did a little research. \input@path is in src/Buffer.cpp, but since 2.0.1 
another method has been introduced /see below/.

It, however, doesn't seem to work for biber, no .bib files are found.
So, any idea why \input@path exports, or should export
{/home/user/dir ecto ry/}
instead of simple
/home/user/dir ecto ry/




src/Buffer.cpp:
os  \\makeatletter\n
\\def\\input@path{{
docdir  /}}\n
\\makeatother\n;




What's new in version 2.0.1?

We would like to highlight the improved handling of external files 
referenced from ERT. This may cause issues for those who made use of the 
undocumented \input@path hack. See the ANNOUNCE file again for how to do 
things the new way. New methods for calling external scripts should also 
solve several issues on Windows.




What's new in LyX 2.0.1
===
The support for using external files in ERT has been improved by the
introduction of a prefix for the TEXINPUTS environment variable.
This prefix can be set in preferences and by default includes the
document directory (represented by a single '.'). The prefix can
be set to any list of paths separated by the default separator for
a given platform (':' on unix like systems and ';' on windows).
When a file should be included by LaTeX, the paths listed in TEXINPUTS
will be searched in turn for finding it. Note that any non-absolute
path listed in the TEXINPUTS prefix is considered to be relative to the
document directory, i.e., the directory where the LyX file lives.
Users are advised to always include '.' (the document dir) as one of
the path components, otherwise compilation may fail for some documents.
This is because the previous (undocumented) mechanism based on the use
of the \input@path macro has been dropped. The old mechanism did not
work in all cases and was kind of a hack. Old documents using that
undocumented hack for obtaining the path of the LyX file will have to
be revised. A clean way for obtaining the document path is using the
info inset through the info-insert buffer path LyX function.



On 08/04/2015 02:39 PM, PhilipPirrip wrote:

Why does \input@path end with two slashes, as in
/home/user/directory//
and why is its output
/home/user/dir ectory//
(note quotation marks, and two separate ending slashes) when the folder
name contains spaces?







Re: \input@path - two slashes, quotation marks

2015-08-05 Thread PhilipPirrip
Did a little research. \input@path is in src/Buffer.cpp, but since 2.0.1 
another method has been introduced /see below/.

It, however, doesn't seem to work for biber, no .bib files are found.
So, any idea why \input@path exports, or should export
{"/home/user/dir ecto ry"/}
instead of simple
/home/user/dir ecto ry/




src/Buffer.cpp:
os << "\\makeatletter\n"
   << "\\def\\input@path{{"
   << docdir << "/}}\n"
   << "\\makeatother\n";




What's new in version 2.0.1?

We would like to highlight the improved handling of external files 
referenced from ERT. This may cause issues for those who made use of the 
undocumented \input@path hack. See the ANNOUNCE file again for how to do 
things the new way. New methods for calling external scripts should also 
solve several issues on Windows.




What's new in LyX 2.0.1
===
The support for using external files in ERT has been improved by the
introduction of a prefix for the TEXINPUTS environment variable.
This prefix can be set in preferences and by default includes the
document directory (represented by a single '.'). The prefix can
be set to any list of paths separated by the default separator for
a given platform (':' on unix like systems and ';' on windows).
When a file should be included by LaTeX, the paths listed in TEXINPUTS
will be searched in turn for finding it. Note that any non-absolute
path listed in the TEXINPUTS prefix is considered to be relative to the
document directory, i.e., the directory where the LyX file lives.
Users are advised to always include '.' (the document dir) as one of
the path components, otherwise compilation may fail for some documents.
This is because the previous (undocumented) mechanism based on the use
of the \input@path macro has been dropped. The old mechanism did not
work in all cases and was kind of a hack. Old documents using that
undocumented hack for obtaining the path of the LyX file will have to
be revised. A clean way for obtaining the document path is using the
info inset through the "info-insert buffer path" LyX function.



On 08/04/2015 02:39 PM, PhilipPirrip wrote:

Why does \input@path end with two slashes, as in
/home/user/directory//
and why is its output
"/home/user/dir ectory/"/
(note quotation marks, and two separate ending slashes) when the folder
name contains spaces?







\input@path - two slashes, quotation marks

2015-08-04 Thread PhilipPirrip

Why does \input@path end with two slashes, as in
/home/user/directory//
and why is its output
/home/user/dir ectory//
(note quotation marks, and two separate ending slashes) when the folder 
name contains spaces?




\input@path - two slashes, quotation marks

2015-08-04 Thread PhilipPirrip

Why does \input@path end with two slashes, as in
/home/user/directory//
and why is its output
"/home/user/dir ectory/"/
(note quotation marks, and two separate ending slashes) when the folder 
name contains spaces?




flex inset with data from a LyX dialog

2015-07-06 Thread PhilipPirrip

Hi there,
I don't think there's currently a way to achieve this, but might be a 
very powerful feature:
Let's say I want to define an inset that needs input from a LyX dialog. 
It could be a new citation inset that'll be used with biblatex, and the 
LyX dialog in question would be the InsertCitation one.
In general, one would want such insets that use some of LyX's 
infrastructure - be it citation, cross reference, language selection...
I think flex insets have much more to offer and was wondering if there 
were any thoughts of expanding their use throughout LyX. Not all things 
(like the forementioned bib(la)tex citations) have to be hard-coded, 
much could be accomplished with user defined insets and modules... if 
only support for the use of LyX's infrastructure was there.

Any thoughts?



Re: flex inset with data from a LyX dialog

2015-07-06 Thread PhilipPirrip

On 07/06/2015 02:17 PM, Richard Heck wrote:


I've thought about this from time to time and may even have filed a bug
about it. The idea would be to have command insets, like citation,
whose fields can be determined dynamically through the layout machinery.
I'm sure this is possible, but I'm also sure it would need someone who
knew a lot more about Qt than I presently do.

Richard



This would be even better (dynamically created Qt dialogs), of course, 
but what I'm asking for is almost already there:


flex inset that will produce
\cite{
}

but will not be filled in manually but from the InsertCitation dialog 
(bib database frontend) to have

\cite{auth1,auth2...}

That means that the Qt dialog is (more or less) static.



flex inset with data from a LyX dialog

2015-07-06 Thread PhilipPirrip

Hi there,
I don't think there's currently a way to achieve this, but might be a 
very powerful feature:
Let's say I want to define an inset that needs input from a LyX dialog. 
It could be a new citation inset that'll be used with biblatex, and the 
LyX dialog in question would be the Insert>Citation one.
In general, one would want such insets that use some of LyX's 
infrastructure - be it citation, cross reference, language selection...
I think flex insets have much more to offer and was wondering if there 
were any thoughts of expanding their use throughout LyX. Not all things 
(like the forementioned bib(la)tex citations) have to be hard-coded, 
much could be accomplished with user defined insets and modules... if 
only support for the use of LyX's infrastructure was there.

Any thoughts?



Re: flex inset with data from a LyX dialog

2015-07-06 Thread PhilipPirrip

On 07/06/2015 02:17 PM, Richard Heck wrote:


I've thought about this from time to time and may even have filed a bug
about it. The idea would be to have "command" insets, like citation,
whose fields can be determined dynamically through the layout machinery.
I'm sure this is possible, but I'm also sure it would need someone who
knew a lot more about Qt than I presently do.

Richard



This would be even better (dynamically created Qt dialogs), of course, 
but what I'm asking for is almost already there:


flex inset that will produce
\cite{
}

but will not be filled in manually but from the Insert>Citation dialog 
(bib database frontend) to have

\cite{auth1,auth2...}

That means that the Qt dialog is (more or less) static.



Re: biblatex native support

2015-06-14 Thread PhilipPirrip

I'm bringing this up again with another idea:
Would you consider adding support, either through a layout file or the 
document settings menu, for the inclusion of auxiliary files that need 
to be copied to the temporary folder where and whenever LaTeX 
compilation takes place.
This is a possible scenario: I'm distributing a (thesis) template that I 
want people be able to compile as-is (no one would want to use it unless 
it works from the start). It has many chapters, it has a bibliography 
file attached to it, etc.
I'd like to switch from bibetex to biblatex, but can't use the hack 
that's been recommended as I can't tell the absolute path of the 
bibliography file (it depends on where the user will unpack the files).
There's currently no way (is there?) of letting LyX know that some files 
from the current folder need to be present for the compilation, and I 
thought it would be nice to have it.




On 11/04/2014 12:58 AM, Jürgen Spitzmüller wrote:

2014-11-03 18:52 GMT+01:00 PhilipPirrip:

I'm wondering what went wrong with GSoC 2014 promises for biblatex/LyX.


Lack of manpower.

Jürgen





Re: biblatex native support

2015-06-14 Thread PhilipPirrip

I'm bringing this up again with another idea:
Would you consider adding support, either through a layout file or the 
document settings menu, for the inclusion of auxiliary files that need 
to be copied to the temporary folder where and whenever LaTeX 
compilation takes place.
This is a possible scenario: I'm distributing a (thesis) template that I 
want people be able to compile as-is (no one would want to use it unless 
it works from the start). It has many chapters, it has a bibliography 
file attached to it, etc.
I'd like to switch from bibetex to biblatex, but can't use the hack 
that's been recommended as I can't tell the absolute path of the 
bibliography file (it depends on where the user will unpack the files).
There's currently no way (is there?) of letting LyX know that some files 
from the current folder need to be present for the compilation, and I 
thought it would be nice to have it.




On 11/04/2014 12:58 AM, Jürgen Spitzmüller wrote:

2014-11-03 18:52 GMT+01:00 PhilipPirrip:

I'm wondering what went wrong with GSoC 2014 promises for biblatex/LyX.


Lack of manpower.

Jürgen





Re: biblatex native support

2014-11-03 Thread PhilipPirrip

On 11/01/2014 03:17 AM, Jürgen Spitzmüller wrote:

PhilipPirrip wrote:

I apologize for asking the same question over and over again. I'm still
wondering if there was any progress with native biblatex support in LyX.
I'm maintaining a package that should switch to biblatex soon, the only
problem is that we can't offer it our users as a hack that needs
absolute paths to all the files.


Why do you need absolute paths?




Because Step 3 at http://wiki.lyx.org/BibTeX/Biblatex says so:

Note that the bib file must either be located in your texmf tree, or 
you must enter an absolute path in the command above (e.g. 
\addbibresource{/Users/me/Documents/bibdesk/Dissertation.bib} on the Mac,
\addbibresource{/home/myname/documents/dissertation/Dissertation.bib} on 
Linux,
\addbibresource{C:/Documents and Settings/My 
Name/Documents/Dissertation/Dissertation.bib} on Windows).




Re: biblatex native support

2014-11-03 Thread PhilipPirrip

On 11/03/2014 11:04 AM, Jürgen Spitzmüller wrote:

And I would strongly recommend the former, i.e., placing the file in the texmf
tree. Then you do not need absolute paths.



No, that won't work. This is a template that we ship as a package, and 
is supposed to work as-is. Having (mostly inexperienced) users change 
the preamble in all ~10 files or place the files in the texmf tree would 
not be a good idea.

Never mind, seems that biblatex is not coming to LyX that soon.
Thanks.



Re: biblatex native support

2014-11-03 Thread PhilipPirrip

On 11/03/2014 11:23 AM, Jürgen Spitzmüller wrote:


Actually, I think bib files should _always_ be placed in the texmf tree (except
for very rare cases, that is). Why don't you distribute your template in a way
that assures this (e.g., via CTAN)?

Jürgen



I wish it was that simple. How many users do you think even know what 
texmf tree is? My Linux distribution of texlive never created my local 
tree (~/texmf/...). And there also comes the question of backing up from 
many directories; I find it easier to have all the files of a project 
under one directory.
But we're slightly off topic now, right. I'm wondering what went wrong 
with GSoC 2014 promises for biblatex/LyX.





  1   2   >