Re: LyX wants to install X11…

2014-05-29 Thread jezZiFeR
Stephan, could you please tell me how to do that correctly? Thank you!
Jess



Am 27.05.2014 um 22:36 schrieb Stephan Witt st.w...@gmx.net:
 
 I don't have the problem with the example.
 
 I enabled the log messages for LaTeX/generation and Graphics conversion. 
 This leads to the following output when opening Jezz's example file:
 
 =
 22:28:01.190: Opening document ~/Documents/lyxtest/Minimal braucht X11.lyx…
 support/FileName.cpp (832): filetools(getFormatFromContents)
   File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
   File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
   File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
   File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
   File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
   File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
   File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
   File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
   File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): 

Will there be a version 2.0.x that can import 2.1.0 files?

2014-05-29 Thread David A Case
In the past, there have been final releases of a series that are able to
read files created by the next LyX format.  Are there plans (and a
estimated time) for a 2.0.8 release that can read 2.1 files?

...thanks...dave case



Re: LyX wants to install X11…

2014-05-29 Thread Stephan Witt
Am 29.05.2014 um 12:41 schrieb jezZiFeR jezzi...@gmail.com:

 Stephan, could you please tell me how to do that correctly? Thank you!
 Jess

Yes.

1. Start LyX without any document open.
2. View - View Messages
3. Go to Settings and choose Selected Debug Messages
4. Enable LaTeX generation/execution and Graphics conversion and loading
5. Open your example
6. Copy the text from Output and paste it to mail

Stephan

 Am 27.05.2014 um 22:36 schrieb Stephan Witt st.w...@gmx.net:
 
 I don't have the problem with the example.
 
 I enabled the log messages for LaTeX/generation and Graphics conversion. 
 This leads to the following output when opening Jezz's example file:
 
 =
 22:28:01.190: Opening document ~/Documents/lyxtest/Minimal braucht X11.lyx…
 support/FileName.cpp (832): filetools(getFormatFromContents)
  File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
  File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
  File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
  File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
  File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
  File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
  File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
  File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
  File type not recognised before EOF!
 support/FileName.cpp (950): 

Re: Spell check within ERT

2014-05-29 Thread Benedict Holland
So I so love how I specifically that tables are a problem and get people
wondering why I can't use lyx for tables. Imagine you have to get a table
of attributes all with starting with a letter and a period with a width of
.26in but no cellpadding on that particular column because it is left
justified and the extra .01in leaves just enough space for an m to look
good. This letter should appear as a block like

a. some text
some text

AND then there should also be another column with even more text. How about
if some rows contain multi column or multi row environments? How about if I
am importing from R and need to use long tables instead? That is a simple
copy and paste, chance tabular to longtable and continue on my way. Tables
are inherently difficult. Latex knows this which is why it says in many
many documents that tables are difficult. Lyx even admits that tables are
difficult but provides a UI to get some functionality. Regularly I hit that
wall and find it much easier to just use latex markup even with sometime
like using spaces between rows as oppose to lines (which is much better
design). I tried it once a long time ago. I couldn't make it do what I
wanted. Perhaps it is time to a revisit when things are not so hectic. I
use three part tables with booktabs because I need professional looking
tables to present scientific results. These tables need to be spell checked
because there is sometimes a lot of text embedded in them.


I am less worried about having too much spelling highlighted than too many.
I see two ways easily to get around the problem. The first is to have a set
of reserved or defined words. Other editors have figured out how to write
up latex code while having the display not underline every command. It is
also possible that they prescan for all defined words and don't highlight
them. I actually have not worked with document processors befores so I
don't know how language specific commands or other defined/reserved words
are not automatically recognized. A lot of other text editors do it though
so I can't imagine that to be difficult.

The second, and slightly more hacky way, would be to just add every
reserved word to my personal dictionary. It cannot be any more hacky then
writing the ERT, copying that into a new document, fixing spelling, and
copying it back. That is actually the exact situation I want to avoid. I
suppose a third option would be to use a non-ui like device to create
tables and then import the latex into lyx. I would prefer to not have to do
that though but it sounds like redefining ERT is sort of hacky.

Thank you for all the fine ideas. I will try to think about how to better
approach the problem. I suppose the huge feature request would be to make
ERT into an expansive latex or tex editor with defined functions like in an
editor such as MikTex. I don't have time right now to tackle the problem
but that seems like the not so hacky way to deal with it.

Thanks again,
~Ben


On Wed, May 28, 2014 at 10:18 AM, Richard Heck rgh...@lyx.org wrote:

 On 05/28/2014 04:38 AM, Scott Kostyshak wrote:

 On Tue, May 27, 2014 at 7:04 PM, Benedict Holland
 benedict.m.holl...@gmail.com wrote:

 Hi everyone. Yes, I did check the archived mail and no, I didn't find an
 answer. I am running lyx 2.1 and I need to spell check ERT. How can I
 make
 this happen?

 Before you ask, why he is still using ERT the answer is tables. I cannot
 make lyx do what I want with tables and I am not going to go through and
 remove each string from ert. That would make my document unreadable. So.
 How
 do I make lyx spell check within ERT?

 Hi Benedict,

 You might be able to redefine ERT in local layout (Document  Settings 
 Local layout). Please read about layouts and about the Spellcheck keyword
 in Help  Customization. If redefining ERT doesn't work, consider making
 your own inset that does the same thing as ERT except that it spell checks.


 This is hardcoded in the case of ERT: allowSpellCheck() returns false. But
 yes, in principle, you could define your own ERT-like inset (PassThru 1,
 etc), and allow spell check inside it. You do then have the problem that
 Stephan mentioned, though.

 Richard




Re: Will there be a version 2.0.x that can import 2.1.0 files?

2014-05-29 Thread Richard Heck

On 05/29/2014 07:58 AM, David A Case wrote:

In the past, there have been final releases of a series that are able to
read files created by the next LyX format.  Are there plans (and a
estimated time) for a 2.0.8 release that can read 2.1 files?


Yes, the release is in preparation, but we have run into several issues 
involving these conversions

since the release of 2.1.0. We think we are close

If you need this now, you can grab the entire lyx2lyx/ subdirectory from

http://git.lyx.org/?p=lyx.git;a=tree;f=lib/lyx2lyx;h=e8bfb1c3ad7829197f2b3862111d41525d367630;hb=HEAD

and just replace everything in the corresponding installed subdirectory 
with those files.


Richard



Re: Spell check within ERT

2014-05-29 Thread Richard Heck

On 05/29/2014 09:20 AM, Benedict Holland wrote:


Thank you for all the fine ideas. I will try to think about how to 
better approach the problem. I suppose the huge feature request would 
be to make ERT into an expansive latex or tex editor with defined 
functions like in an editor such as MikTex. I don't have time right 
now to tackle the problem but that seems like the not so hacky way to 
deal with it.




If you're going to use huge ERT, then it would likely be better to have 
the LaTeX code in a separate file and include it using Insert File 
Child Document. This works with TeX files as well as LyX files. You can 
then right click on the inset and choose Edit included file, which 
will open whatever program you configure under Tools Preferences.


Richard



Re: LyX wants to install X11…

2014-05-29 Thread jezZiFeR
Thank you, Stephan.
Could you maybe tell me the name of the settings in 3. in German?


Am 29.05.2014 um 15:09 schrieb Stephan Witt st.w...@gmx.net:

 Am 29.05.2014 um 12:41 schrieb jezZiFeR jezzi...@gmail.com:
 
 Stephan, could you please tell me how to do that correctly? Thank you!
 Jess
 
 Yes.
 
 1. Start LyX without any document open.
 2. View - View Messages
 3. Go to Settings and choose Selected Debug Messages

I do not find this in Germen (»Angewählt«) – where would I have to look?
Thank you!

 4. Enable LaTeX generation/execution and Graphics conversion and loading
 5. Open your example
 6. Copy the text from Output and paste it to mail
 
 Stephan



Re: Spell check within ERT

2014-05-29 Thread Benedict Holland
Oh perfect! That is exactly the perfect solution!

Thank you so much. I never even knew this feature existed, particularly the
ability to configure my tex editor!
~Ben


On Thu, May 29, 2014 at 10:53 AM, Richard Heck rgh...@lyx.org wrote:

 On 05/29/2014 09:20 AM, Benedict Holland wrote:


 Thank you for all the fine ideas. I will try to think about how to better
 approach the problem. I suppose the huge feature request would be to make
 ERT into an expansive latex or tex editor with defined functions like in an
 editor such as MikTex. I don't have time right now to tackle the problem
 but that seems like the not so hacky way to deal with it.


 If you're going to use huge ERT, then it would likely be better to have
 the LaTeX code in a separate file and include it using Insert File Child
 Document. This works with TeX files as well as LyX files. You can then
 right click on the inset and choose Edit included file, which will open
 whatever program you configure under Tools Preferences.

 Richard




Re: LyX wants to install X11…

2014-05-29 Thread Stephan Witt
Am 29.05.2014 um 16:57 schrieb jezZiFeR jezzi...@gmail.com:

 Thank you, Stephan.
 Could you maybe tell me the name of the settings in 3. in German?
 
 
 Am 29.05.2014 um 15:09 schrieb Stephan Witt st.w...@gmx.net:
 
 Am 29.05.2014 um 12:41 schrieb jezZiFeR jezzi...@gmail.com:
 
 Stephan, could you please tell me how to do that correctly? Thank you!
 Jess
 
 Yes.
 
 1. Start LyX without any document open.
 2. View - View Messages
 3. Go to Settings and choose Selected Debug Messages
 
 I do not find this in Germen (»Angewählt«) – where would I have to look?
 Thank you!

2. Ansicht - Meldungen anzeigen
3. Einstellungen, Ausgewählte Testmeldungen
4. LaTeX Erzeugung/Ausführung und Laden und Konvertierung einer Grafik

Stephan

 
 4. Enable LaTeX generation/execution and Graphics conversion and loading
 5. Open your example
 6. Copy the text from Output and paste it to mail



Re: LyX wants to install X11…

2014-05-29 Thread jezZiFeR
Stephan, thank you, I have added the output . My TeX engine is TeXLive2012. Is 
it too old? 



19:09:15.215: (dialog-show prefs: ⌘,)Error: New binding for 'Kontroll-T 1' is 
overriding old binding...
Error: New binding for 'Kontroll-T 2' is overriding old binding...
Error: New binding for 'Kontroll-T O' is overriding old binding...
Error: New binding for 'Kontroll-T T' is overriding old binding...
Error: New binding for 'Kontroll-T X' is overriding old binding...
19:11:04.589: Öffne Dokument ~/Desktop/Minimal braucht X11.lyx...
19:11:07.676: Dokument ~/Desktop/Minimal braucht X11.lyx ist geöffnet.
19:11:07.678: (file-open /Users/ZZZ/Desktop/Minimal braucht 
X11.lyx)support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
graphics/PreviewLoader.cpp (473): adding snippet:
$ $
graphics/PreviewLoader.cpp (535): PreviewLoader::startLoading()
Buffer.cpp (1468): Validating buffer...
LyX needs the following commands when LaTeXing:
* Packages:\usepackage{setspace}

* Macros:
* Textclass stuff:\usepackage{enumitem}  % customizable list 
environments
\newlength{\lyxlabelwidth} % auxiliary length

* done.
Buffer.cpp (1474): Buffer validation done.
graphics/PreviewLoader.cpp (669): PreviewLoader::finishedInProgress(0): 
processing succeeded for python -tt 
/Applications/LyX.app/Contents/Resources/scripts/lyxpreview2bitmap.py png 

[Feature Request] python binding

2014-05-29 Thread Alex Vergara Gil
Hello Lyxers

I wonder why LyX is not available to process little pieces of python code 
within its own framework, like ipython notebook for instance??
This feature allows us to have beautiful graphics such the one produced by 
matplotlib package. I know there already exists a similar binding for R through 
knitr module, so why not a binding for python too??

Is there a way, like modules or whatever, to achieve the same functionality or 
at least some basic functionality of ipython notebook within LyX??

Regards
Alex Vergara
MSc Nuclear Physics
SSDL, CPHR, Havana, Cuba

[Feature Request] quality ePub export: Was [Feature Request] python binding

2014-05-29 Thread Steve Litt
On Thu, 29 May 2014 14:36:29 -0500
Alex Vergara Gil a...@cphr.edu.cu wrote:

 Hello Lyxers
 
 I wonder why LyX is not available to process little pieces of python
 code within its own framework, like ipython notebook for instance??
 This feature allows us to have beautiful graphics such the one
 produced by matplotlib package. I know there already exists a similar
 binding for R through knitr module, so why not a binding for python
 too??
 
 Is there a way, like modules or whatever, to achieve the same
 functionality or at least some basic functionality of ipython
 notebook within LyX??

Oh, if we're going consider requests for difficult additions to handle a
small subset of needs like beautiful graphics, how about filling the
GAPING HOLE that there's no practical way to export to ePub, without
massive human intervention and end-user programming? None of LyX's HTML
and xHtml exports are remotely suitable for flowing-text eBook
production, especially because different people have different ideas of
how eBooks should be built.

Personally, I think the easiest way forward on this is to take the
current half XML half something else native format, and make it well
formed XML. No doing favors of renaming graphics files with arbitrary
numbers, no doing favors of making obvious hierarchy into div, just
make the native format XML and let anyone with Python and lxml.etree
have his way with the native LyX file.

I know that two years ago I railed against XML native format, but
parsers have gotten better, and right now we have the human
unreadability of XML, combined with the unparsability of a more TeX
like language. Well formed XML can only be an improvement.

If well formed XML native format is not practical in the near future,
perhaps somebody could make a program that exports the current native
format into well-formed XML, once again without renumbering, throwing
away structure, etc. Basically, just pass the environments through: No
need to map Part to h1, once it's XML, we can trivially do that
ourselves, the way we want to. Given that most eBooks don't do a lot of
bibliography stuff, you could even have an initial version that has
hooks for the bibliography stuff but doesn't actually do it. Put in the
bibliographies next time. If it's not perfect with math, that's fine: I
can't think of anything more frustrating than trying to read a math
book on a small device.

Because of LyX's inability to author flowing text eBooks in any
reasonable way, I haven't used LyX in 9 months: I'm authoring with
Bluefish now. Slow, difficult, crashy, but at least my source document
can produce both print, PDF and ePub.

Maybe it's just me, but if there's one feature LyX should really have
in 2014, I think that one feature is a reasonable export mechanism to
something that can be turned into ePub, without undoing all the BS the
current LyX (x)Html converters throw into the export.

Mark my words: Within two years, beautiful graphics won't matter one
bit if the document can't be read on a small device.

Thanks,

SteveT

Steve Litt*  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


[Feature Request] python binding

2014-05-29 Thread Alex Vergara Gil

From: Steve Litt sl...@troubleshooters.com
Sent: Thursday, May 29, 2014 2:35 PM

On Thu, 29 May 2014 14:36:29 -0500
Alex Vergara Gil a...@cphr.edu.cu wrote:


Hello Lyxers

I wonder why LyX is not available to process little pieces of python
code within its own framework, like ipython notebook for instance??
This feature allows us to have beautiful graphics such the one
produced by matplotlib package. I know there already exists a similar
binding for R through knitr module, so why not a binding for python
too??

Is there a way, like modules or whatever, to achieve the same
functionality or at least some basic functionality of ipython
notebook within LyX??


Oh, if we're going consider requests for difficult additions to handle a
small subset of needs like beautiful graphics, how about filling the
GAPING HOLE that there's no practical way to export to ePub, without
massive human intervention and end-user programming? None of LyX's HTML
and xHtml exports are remotely suitable for flowing-text eBook
production, especially because different people have different ideas of
how eBooks should be built.


I don´t think this is a dificult addition since there is already a module 
that does something similar for what I've asked, knitr module does this but 
accepting R commands instead of python ones, so maybe the knitr author can 
put some light to this discussion. Again there should be no need to touch 
the code, just build a module similar to knitr that can be named knitpy


This is my original motivation


(...)
SteveT


Regards
Alex 



Re: [Feature Request] python binding

2014-05-29 Thread Richard Heck

On 05/29/2014 03:36 PM, Alex Vergara Gil wrote:

Hello Lyxers
I wonder why LyX is not available to process little pieces of python 
code within its own framework, like ipython notebook for instance??


This feature allows us to have beautiful graphics such the one 
produced by matplotlib package. I know there already exists a similar 
binding for R through knitr module, so why not a binding for python too??
Is there a way, like modules or whatever, to achieve the same 
functionality or at least some basic functionality of ipython notebook 
within LyX??


Can you be more precise about what you want to do? I've never heard of 
ipython notebook.


Sweave works by our having an output format (sweave) for such 
documentsand then our declaring Rscript as a sweave -- LaTeX converter, 
so PDF export (say) goes via Rscript and pdflatex. There's a special 
script in lib/scripts/ that sets up some things for LyXfirst, or so it 
claims. It would be reasonably easy to do the same sort of thing for 
Python, if you wanted to do so. You'd just need to set up an appropriate 
format and then declare an appropriate script as a whatever - latex 
converter. Then LyX will run the script and do as you wish with the 
embedded python code.


Of course, as we've discussed on the list with respect to R, there are 
large security issues here, too.


Richard



Re: LyX wants to install X11…

2014-05-29 Thread Richard Heck

On 05/29/2014 01:15 PM, jezZiFeR wrote:

Stephan, thank you, I have added the output . My TeX engine is TeXLive2012. Is 
it too old?


Hi, Jezz,

Can you clear out the cache/ subdirectory of your user directory and try 
this again? You can find the location of the user directory from About 
LyX, which I think is on the Apple menu on OSX.


Richard


19:09:15.215: (dialog-show prefs: ⌘,)Error: New binding for 'Kontroll-T 1' is 
overriding old binding...
Error: New binding for 'Kontroll-T 2' is overriding old binding...
Error: New binding for 'Kontroll-T O' is overriding old binding...
Error: New binding for 'Kontroll-T T' is overriding old binding...
Error: New binding for 'Kontroll-T X' is overriding old binding...
19:11:04.589: Öffne Dokument ~/Desktop/Minimal braucht X11.lyx...
19:11:07.676: Dokument ~/Desktop/Minimal braucht X11.lyx ist geöffnet.
19:11:07.678: (file-open /Users/ZZZ/Desktop/Minimal braucht 
X11.lyx)support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
graphics/PreviewLoader.cpp (473): adding snippet:
$ $
graphics/PreviewLoader.cpp (535): PreviewLoader::startLoading()
Buffer.cpp (1468): Validating buffer...
LyX needs the following commands when LaTeXing:
* Packages:\usepackage{setspace}

* Macros:
* Textclass stuff:\usepackage{enumitem}  % customizable list 
environments
\newlength{\lyxlabelwidth} % auxiliary length

* done.
Buffer.cpp (1474): Buffer validation done.

Re: [Feature Request] python binding

2014-05-29 Thread Alex Vergara Gil

  From: Richard Heck 
  Sent: Thursday, May 29, 2014 3:26 PM


  On 05/29/2014 03:36 PM, Alex Vergara Gil wrote:

Hello Lyxers

I wonder why LyX is not available to process little pieces of python code 
within its own framework, like ipython notebook for instance??


This feature allows us to have beautiful graphics such the one produced by 
matplotlib package. I know there already exists a similar binding for R through 
knitr module, so why not a binding for python too??

Is there a way, like modules or whatever, to achieve the same functionality 
or at least some basic functionality of ipython notebook within LyX??
  Can you be more precise about what you want to do? I've never heard of 
ipython notebook.
sudo aptitude install ipython-notebook
ipython notebook

and there you can write even thesis in a web environment with python commands 
being executed inlined, exporting to pdf and latex too, it is a wonder of our 
times, so why not letting LyX do this miracle too??

  Sweave works by our having an output format (sweave) for such documents and 
then our declaring Rscript as a sweave -- LaTeX converter, so PDF export (say) 
goes via Rscript and pdflatex. There's a special script in lib/scripts/ that 
sets up some things for LyX first, or so it claims. It would be reasonably 
easy to do the same sort of thing for Python, if you wanted to do so. You'd 
just need to set up an appropriate format and then declare an appropriate 
script as a whatever - latex converter. Then LyX will run the script and do as 
you wish with the embedded python code.

  Of course, as we've discussed on the list with respect to R, there are large 
security issues here, too.

  Richard
you obviously miss the point here, or I was not very clear! it is not a 
different format, is a facility to have python scripts running within LyX 
framework, you have to see ipython notebook to understand what I mean, you will 
be surprised!!
Basically to build graphs, for instance (and only a piece of what can be done), 
you add the (let's call it) knitpy module and then place a knitpy insert, 
write some python code that produces a matplotlib graphic and then when lyx 
compiles the document, instead of the code it is shown the graph, it also can 
be done in the lyx editing window, but thats a more dificult request.

Regards
Alex

Re: [Feature Request] python binding

2014-05-29 Thread Rainer M Krug
Alex Vergara Gil a...@cphr.edu.cu writes:

   From: Richard Heck 
   Sent: Thursday, May 29, 2014 3:26 PM


   On 05/29/2014 03:36 PM, Alex Vergara Gil wrote:

 Hello Lyxers

 I wonder why LyX is not available to process little pieces of
 python code within its own framework, like ipython notebook for
 instance??


 This feature allows us to have beautiful graphics such the one
 produced by matplotlib package. I know there already exists a
 similar binding for R through knitr module, so why not a binding
 for python too??

 Is there a way, like modules or whatever, to achieve the same
 functionality or at least some basic functionality of ipython notebook
 within LyX??  Can you be more precise about what you want to do? I've
 never heard of ipython notebook.  sudo aptitude install
 ipython-notebook ipython notebook

 and there you can write even thesis in a web environment with python
 commands being executed inlined, exporting to pdf and latex too, it is
 a wonder of our times, so why not letting LyX do this miracle too??

   Sweave works by our having an output format (sweave) for such
   documents and then our declaring Rscript as a sweave -- LaTeX
   converter, so PDF export (say) goes via Rscript and
   pdflatex. There's a special script in lib/scripts/ that sets up
   some things for LyX first, or so it claims. It would be reasonably
   easy to do the same sort of thing for Python, if you wanted to do
   so. You'd just need to set up an appropriate format and then declare
   an appropriate script as a whatever - latex converter. Then LyX
   will run the script and do as you wish with the embedded python
   code.

   Of course, as we've discussed on the list with respect to R, there are 
 large security issues here, too.

   Richard you obviously miss the point here, or I was not very clear!
 it is not a different format, is a facility to have python scripts
 running within LyX framework, you have to see ipython notebook to
 understand what I mean, you will be surprised!!  Basically to build
 graphs, for instance (and only a piece of what can be done), you add
 the (let's call it) knitpy module and then place a knitpy insert,
 write some python code that produces a matplotlib graphic and then
 when lyx compiles the document, instead of the code it is shown the
 graph, it also can be done in the lyx editing window, but thats a more
 dificult request.

I might be *completely* off, but couldn't you achieve exactly this via
defining converters? I have for example a converter defined, which
converts plantuml source fields into uml graphs, i.e. it defines the
call to compile them and return the graphs which are then inserted in
the document?

I have never used python, but I guess a similar approach should be
possible here as well?

Cheers,

Rainer



 Regards
 Alex

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


pgpNzrUAU7G2A.pgp
Description: PGP signature


Re: LyX wants to install X11…

2014-05-29 Thread Stephan Witt
Am 29.05.2014 um 22:29 schrieb Richard Heck rgh...@lyx.org:

 On 05/29/2014 01:15 PM, jezZiFeR wrote:
 Stephan, thank you, I have added the output . My TeX engine is TeXLive2012. 
 Is it too old?

No, I don't think so. I'm using the same.

 
 Hi, Jezz,
 
 Can you clear out the cache/ subdirectory of your user directory and try this 
 again? You can find the location of the user directory from About LyX, which 
 I think is on the Apple menu on OSX.

This should be the folder ~/Library/Application Support/LyX-2.0 -
to open it in Finder do this:
1. Go to your users Home Folder
2. Use Gehe zu and choose Gehe zum Ordner…
3. Type the word Library and choose Öffnen
4. Now your able to navigate to the other folders

I've tracked down the flow of control now and it possibly calls gs here too, 
like that:

I've prepared the run_command utility to print some message and started the 
converter in a terminal:
python -tt 
/Users/stephan/git/lyx-build/LyX-2.0.7.1.app/Contents/Resources/scripts/lyxpreview2bitmap.py
 png 
/var/folders/1x/zm63s22x7s591xrlgm4rl9v4gn/T/lyx_tmpdir.L33208/lyx_tmpbuf2/0lyxpreview.tex
 216 00 faf0e6 xelatex
run_command xelatex 0lyxpreview.tex ... 
xelatex had problems compiling 0lyxpreview.tex
Using XeTeX
run_command dvips -i -o 0lyxpreview.ps 0lyxpreview.dvi ... 
This is dvips(k) 5.992 Copyright 2012 Radical Eye Software (www.radicaleye.com)
dvips: DVI file can't be opened: 0lyxpreview.dvi: No such file or directory
Failed: dvips 0lyxpreview.dvi ... looking for PDF
legacy_conversion_step2 dvips_failed ... 
run_command gs -dNOPAUSE -dBATCH -dSAFER -sDEVICE=png16m 
-sOutputFile=0lyxpreview%d.png -dGraphicsAlphaBit=2 -dTextAlphaBits=2 
-r197.260274 0lyxpreview.pdf 

Then I made the gs call explicitely:

(cd 
/var/folders/1x/zm63s22x7s591xrlgm4rl9v4gn/T/lyx_tmpdir.L33208/lyx_tmpbuf2;gs
 -dNOPAUSE -dBATCH -dSAFER -sDEVICE=png16m -sOutputFile=0lyxpreview%d.png 
-dGraphicsAlphaBit=2 -dTextAlphaBits=2 -r197.260274 0lyxpreview.pdf )
GPL Ghostscript 9.10 (2013-08-30)
Copyright (C) 2013 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 1.
Page 1

I'm not sure how to interpret this. Either I have a different gs or I have X11 
somehow available.
(I know I'm having it in /opt/X11, but I've locked it for regular users before. 
I cannot open a
xterm on my system anymore, but the conversion succeeded.) 

Stephan

 
 19:09:15.215: (dialog-show prefs: ⌘,)Error: New binding for 'Kontroll-T 1' 
 is overriding old binding...
 Error: New binding for 'Kontroll-T 2' is overriding old binding...
 Error: New binding for 'Kontroll-T O' is overriding old binding...
 Error: New binding for 'Kontroll-T T' is overriding old binding...
 Error: New binding for 'Kontroll-T X' is overriding old binding...
 19:11:04.589: Öffne Dokument ~/Desktop/Minimal braucht X11.lyx...
 19:11:07.676: Dokument ~/Desktop/Minimal braucht X11.lyx ist geöffnet.
 19:11:07.678: (file-open /Users/ZZZ/Desktop/Minimal braucht 
 X11.lyx)support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
 File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
 File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
 File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
 File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 

Re: [Feature Request] python binding

2014-05-29 Thread Richard Heck

On 05/29/2014 04:57 PM, Rainer M Krug wrote:

Alex Vergara Gil a...@cphr.edu.cu writes:

   Richard you obviously miss the point here, or I was not very clear!
it is not a different format, is a facility to have python scripts
running within LyX framework, you have to see ipython notebook to
understand what I mean, you will be surprised!!  Basically to build
graphs, for instance (and only a piece of what can be done), you add
the (let's call it) knitpy module and then place a knitpy insert,
write some python code that produces a matplotlib graphic and then
when lyx compiles the document, instead of the code it is shown the
graph, it also can be done in the lyx editing window, but thats a more
dificult request.
I might be *completely* off, but couldn't you achieve exactly this via
defining converters? I have for example a converter defined, which
converts plantuml source fields into uml graphs, i.e. it defines the
call to compile them and return the graphs which are then inserted in
the document?


Yes, that's more or less what I was suggesting.

rh



Re: [Feature Request] python binding

2014-05-29 Thread Richard Heck

On 05/29/2014 05:34 PM, Alex Vergara Gil wrote:


*From:* Richard Heck mailto:rgh...@lyx.org
*Sent:* Thursday, May 29, 2014 3:26 PM

On 05/29/2014 03:36 PM, Alex Vergara Gil wrote:

Hello Lyxers
I wonder why LyX is not available to process little pieces of
python code within its own framework, like ipython notebook for
instance??

This feature allows us to have beautiful graphics such the one
produced by matplotlib package. I know there already exists a
similar binding for R through knitr module, so why not a binding
for python too??
Is there a way, like modules or whatever, to achieve the same
functionality or at least some basic functionality of ipython
notebook within LyX??

Can you be more precise about what you want to do? I've never
heard of ipython notebook.

sudo aptitude install ipython-notebook
ipython notebook

and there you can write even thesis in a web environment with python 
commands being executed inlined, exporting to pdf and latex too, it is 
a wonder of our times, so why not letting LyX do this miracle too??


Sweave works by our having an output format (sweave) for such
documentsand then our declaring Rscript as a sweave -- LaTeX
converter, so PDF export (say) goes via Rscript and pdflatex.
There's a special script in lib/scripts/ that sets up some things
for LyXfirst, or so it claims. It would be reasonably easy to do
the same sort of thing for Python, if you wanted to do so. You'd
just need to set up an appropriate format and then declare an
appropriate script as a whatever - latex converter. Then LyX will
run the script and do as you wish with the embedded python code.

Of course, as we've discussed on the list with respect to R, there
are large security issues here, too.

Richard

you obviously miss the point here, or I was not very clear! it is not 
a different format, is a facility to have python scripts running 
within LyX framework, you have to see ipython notebook to understand 
what I mean, you will be surprised!!
Basically to build graphs, for instance (and only a piece of what can 
be done), you add the (let's call it) knitpy module and then place a 
knitpy insert, write some python code that produces a matplotlib 
graphic and then when lyx compiles the document, instead of the code 
it is shown the graph, it also can be done in the lyx editing window, 
but thats a more dificult request.


No, that's exactly what I had in mind: Python code inthe document that 
gets executed at compile timeto create graphsor tables---or delete all 
your files. ;-) Formats are a LyX-internal method for keeping track of 
such thingsas what stage of compilation a document is at. The file 
format wouldn't really be different.


Richard



Re: Image Format Conversion on OS X with Transmute

2014-05-29 Thread Jerry

On May 28, 2014, at 11:12 AM, James Dean Palmer ja...@tiger3k.com wrote:

 I recently wrote a little command line utility called transmute that converts 
 between various image formats using only the Quartz, CoreGraphics, and Cocoa 
 APIs.  Apple's sips utility can do the same sort of thing but, oddly, sips 
 doesn't support EPS or PS.
 
 transmute also has some other neat tricks like clipboard support, input and 
 output from stdin/stdout and setting the page number for conversion (PDF 
 only). It's available here:
 
 https://bitbucket.org/jdpalmer/transmute
 
 Once installed, you just need to add this to your preferences file:
 
 \converter ps png transmute $$i $$o 
 \converter eps png transmute $$i $$o 
 \converter pdf png transmute $$i $$o 
 
 And then there's no more dependency on ghostscript or XQuartz for EPS, PS, 
 and PDF image previews.
 
 Best,
 James
 
James, I haven't tried this but it looks awesomely awesome. Would you mind 
making a note on the LyX wiki about it? And maybe an indication, if not already 
present, how to install without brew, e.g., put in /some/path for those who 
don't know this.

And maybe you can help my confusion. PDF is listed as source-file only but the 
note about -n pageno sort of indicates that pageno can be applied to rendered 
PDFs. I'm probably misreading something.

Jerry



Re: [Feature Request] python binding

2014-05-29 Thread Scott Kostyshak
On Thu, May 29, 2014 at 3:36 PM, Alex Vergara Gil a...@cphr.edu.cu wrote:
 Hello Lyxers

 I wonder why LyX is not available to process little pieces of python code
 within its own framework, like ipython notebook for instance??
 This feature allows us to have beautiful graphics such the one produced by
 matplotlib package. I know there already exists a similar binding for R
 through knitr module, so why not a binding for python too??

 Is there a way, like modules or whatever, to achieve the same functionality
 or at least some basic functionality of ipython notebook within LyX??

Hi Alex,

Have you tried using knitr for python? Attached is a simple example
and the output created. For more info, see
http://yihui.name/knitr/demo/engines/ . graphics and everything else
should also work, although you might need to add custom hooks (not as
hard as it sounds).

This might not be ideal because you have to have R installed (knitr is
still itself written in R). But I would be curious in your thoughts.

Scott


python_knitr.21.lyx
Description: application/lyx


python_knitr.21.pdf
Description: Adobe PDF document


Re: LyX wants to install X11…

2014-05-29 Thread jezZiFeR
Stephan, could you please tell me how to do that correctly? Thank you!
Jess



Am 27.05.2014 um 22:36 schrieb Stephan Witt st.w...@gmx.net:
 
 I don't have the problem with the example.
 
 I enabled the log messages for LaTeX/generation and Graphics conversion. 
 This leads to the following output when opening Jezz's example file:
 
 =
 22:28:01.190: Opening document ~/Documents/lyxtest/Minimal braucht X11.lyx…
 support/FileName.cpp (832): filetools(getFormatFromContents)
   File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
   File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
   File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
   File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
   File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
   File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
   File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
   File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
   File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
   Couldn't find a known format!
 support/FileName.cpp (950): 

Will there be a version 2.0.x that can import 2.1.0 files?

2014-05-29 Thread David A Case
In the past, there have been final releases of a series that are able to
read files created by the next LyX format.  Are there plans (and a
estimated time) for a 2.0.8 release that can read 2.1 files?

...thanks...dave case



Re: LyX wants to install X11…

2014-05-29 Thread Stephan Witt
Am 29.05.2014 um 12:41 schrieb jezZiFeR jezzi...@gmail.com:

 Stephan, could you please tell me how to do that correctly? Thank you!
 Jess

Yes.

1. Start LyX without any document open.
2. View - View Messages
3. Go to Settings and choose Selected Debug Messages
4. Enable LaTeX generation/execution and Graphics conversion and loading
5. Open your example
6. Copy the text from Output and paste it to mail

Stephan

 Am 27.05.2014 um 22:36 schrieb Stephan Witt st.w...@gmx.net:
 
 I don't have the problem with the example.
 
 I enabled the log messages for LaTeX/generation and Graphics conversion. 
 This leads to the following output when opening Jezz's example file:
 
 =
 22:28:01.190: Opening document ~/Documents/lyxtest/Minimal braucht X11.lyx…
 support/FileName.cpp (832): filetools(getFormatFromContents)
  File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
  File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
  File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
  File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
  File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
  File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
  File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
  File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
  Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
  File type not recognised before EOF!
 support/FileName.cpp (950): 

Re: Spell check within ERT

2014-05-29 Thread Benedict Holland
So I so love how I specifically that tables are a problem and get people
wondering why I can't use lyx for tables. Imagine you have to get a table
of attributes all with starting with a letter and a period with a width of
.26in but no cellpadding on that particular column because it is left
justified and the extra .01in leaves just enough space for an m to look
good. This letter should appear as a block like

a. some text
some text

AND then there should also be another column with even more text. How about
if some rows contain multi column or multi row environments? How about if I
am importing from R and need to use long tables instead? That is a simple
copy and paste, chance tabular to longtable and continue on my way. Tables
are inherently difficult. Latex knows this which is why it says in many
many documents that tables are difficult. Lyx even admits that tables are
difficult but provides a UI to get some functionality. Regularly I hit that
wall and find it much easier to just use latex markup even with sometime
like using spaces between rows as oppose to lines (which is much better
design). I tried it once a long time ago. I couldn't make it do what I
wanted. Perhaps it is time to a revisit when things are not so hectic. I
use three part tables with booktabs because I need professional looking
tables to present scientific results. These tables need to be spell checked
because there is sometimes a lot of text embedded in them.


I am less worried about having too much spelling highlighted than too many.
I see two ways easily to get around the problem. The first is to have a set
of reserved or defined words. Other editors have figured out how to write
up latex code while having the display not underline every command. It is
also possible that they prescan for all defined words and don't highlight
them. I actually have not worked with document processors befores so I
don't know how language specific commands or other defined/reserved words
are not automatically recognized. A lot of other text editors do it though
so I can't imagine that to be difficult.

The second, and slightly more hacky way, would be to just add every
reserved word to my personal dictionary. It cannot be any more hacky then
writing the ERT, copying that into a new document, fixing spelling, and
copying it back. That is actually the exact situation I want to avoid. I
suppose a third option would be to use a non-ui like device to create
tables and then import the latex into lyx. I would prefer to not have to do
that though but it sounds like redefining ERT is sort of hacky.

Thank you for all the fine ideas. I will try to think about how to better
approach the problem. I suppose the huge feature request would be to make
ERT into an expansive latex or tex editor with defined functions like in an
editor such as MikTex. I don't have time right now to tackle the problem
but that seems like the not so hacky way to deal with it.

Thanks again,
~Ben


On Wed, May 28, 2014 at 10:18 AM, Richard Heck rgh...@lyx.org wrote:

 On 05/28/2014 04:38 AM, Scott Kostyshak wrote:

 On Tue, May 27, 2014 at 7:04 PM, Benedict Holland
 benedict.m.holl...@gmail.com wrote:

 Hi everyone. Yes, I did check the archived mail and no, I didn't find an
 answer. I am running lyx 2.1 and I need to spell check ERT. How can I
 make
 this happen?

 Before you ask, why he is still using ERT the answer is tables. I cannot
 make lyx do what I want with tables and I am not going to go through and
 remove each string from ert. That would make my document unreadable. So.
 How
 do I make lyx spell check within ERT?

 Hi Benedict,

 You might be able to redefine ERT in local layout (Document  Settings 
 Local layout). Please read about layouts and about the Spellcheck keyword
 in Help  Customization. If redefining ERT doesn't work, consider making
 your own inset that does the same thing as ERT except that it spell checks.


 This is hardcoded in the case of ERT: allowSpellCheck() returns false. But
 yes, in principle, you could define your own ERT-like inset (PassThru 1,
 etc), and allow spell check inside it. You do then have the problem that
 Stephan mentioned, though.

 Richard




Re: Will there be a version 2.0.x that can import 2.1.0 files?

2014-05-29 Thread Richard Heck

On 05/29/2014 07:58 AM, David A Case wrote:

In the past, there have been final releases of a series that are able to
read files created by the next LyX format.  Are there plans (and a
estimated time) for a 2.0.8 release that can read 2.1 files?


Yes, the release is in preparation, but we have run into several issues 
involving these conversions

since the release of 2.1.0. We think we are close

If you need this now, you can grab the entire lyx2lyx/ subdirectory from

http://git.lyx.org/?p=lyx.git;a=tree;f=lib/lyx2lyx;h=e8bfb1c3ad7829197f2b3862111d41525d367630;hb=HEAD

and just replace everything in the corresponding installed subdirectory 
with those files.


Richard



Re: Spell check within ERT

2014-05-29 Thread Richard Heck

On 05/29/2014 09:20 AM, Benedict Holland wrote:


Thank you for all the fine ideas. I will try to think about how to 
better approach the problem. I suppose the huge feature request would 
be to make ERT into an expansive latex or tex editor with defined 
functions like in an editor such as MikTex. I don't have time right 
now to tackle the problem but that seems like the not so hacky way to 
deal with it.




If you're going to use huge ERT, then it would likely be better to have 
the LaTeX code in a separate file and include it using Insert File 
Child Document. This works with TeX files as well as LyX files. You can 
then right click on the inset and choose Edit included file, which 
will open whatever program you configure under Tools Preferences.


Richard



Re: LyX wants to install X11…

2014-05-29 Thread jezZiFeR
Thank you, Stephan.
Could you maybe tell me the name of the settings in 3. in German?


Am 29.05.2014 um 15:09 schrieb Stephan Witt st.w...@gmx.net:

 Am 29.05.2014 um 12:41 schrieb jezZiFeR jezzi...@gmail.com:
 
 Stephan, could you please tell me how to do that correctly? Thank you!
 Jess
 
 Yes.
 
 1. Start LyX without any document open.
 2. View - View Messages
 3. Go to Settings and choose Selected Debug Messages

I do not find this in Germen (»Angewählt«) – where would I have to look?
Thank you!

 4. Enable LaTeX generation/execution and Graphics conversion and loading
 5. Open your example
 6. Copy the text from Output and paste it to mail
 
 Stephan



Re: Spell check within ERT

2014-05-29 Thread Benedict Holland
Oh perfect! That is exactly the perfect solution!

Thank you so much. I never even knew this feature existed, particularly the
ability to configure my tex editor!
~Ben


On Thu, May 29, 2014 at 10:53 AM, Richard Heck rgh...@lyx.org wrote:

 On 05/29/2014 09:20 AM, Benedict Holland wrote:


 Thank you for all the fine ideas. I will try to think about how to better
 approach the problem. I suppose the huge feature request would be to make
 ERT into an expansive latex or tex editor with defined functions like in an
 editor such as MikTex. I don't have time right now to tackle the problem
 but that seems like the not so hacky way to deal with it.


 If you're going to use huge ERT, then it would likely be better to have
 the LaTeX code in a separate file and include it using Insert File Child
 Document. This works with TeX files as well as LyX files. You can then
 right click on the inset and choose Edit included file, which will open
 whatever program you configure under Tools Preferences.

 Richard




Re: LyX wants to install X11…

2014-05-29 Thread Stephan Witt
Am 29.05.2014 um 16:57 schrieb jezZiFeR jezzi...@gmail.com:

 Thank you, Stephan.
 Could you maybe tell me the name of the settings in 3. in German?
 
 
 Am 29.05.2014 um 15:09 schrieb Stephan Witt st.w...@gmx.net:
 
 Am 29.05.2014 um 12:41 schrieb jezZiFeR jezzi...@gmail.com:
 
 Stephan, could you please tell me how to do that correctly? Thank you!
 Jess
 
 Yes.
 
 1. Start LyX without any document open.
 2. View - View Messages
 3. Go to Settings and choose Selected Debug Messages
 
 I do not find this in Germen (»Angewählt«) – where would I have to look?
 Thank you!

2. Ansicht - Meldungen anzeigen
3. Einstellungen, Ausgewählte Testmeldungen
4. LaTeX Erzeugung/Ausführung und Laden und Konvertierung einer Grafik

Stephan

 
 4. Enable LaTeX generation/execution and Graphics conversion and loading
 5. Open your example
 6. Copy the text from Output and paste it to mail



Re: LyX wants to install X11…

2014-05-29 Thread jezZiFeR
Stephan, thank you, I have added the output . My TeX engine is TeXLive2012. Is 
it too old? 



19:09:15.215: (dialog-show prefs: ⌘,)Error: New binding for 'Kontroll-T 1' is 
overriding old binding...
Error: New binding for 'Kontroll-T 2' is overriding old binding...
Error: New binding for 'Kontroll-T O' is overriding old binding...
Error: New binding for 'Kontroll-T T' is overriding old binding...
Error: New binding for 'Kontroll-T X' is overriding old binding...
19:11:04.589: Öffne Dokument ~/Desktop/Minimal braucht X11.lyx...
19:11:07.676: Dokument ~/Desktop/Minimal braucht X11.lyx ist geöffnet.
19:11:07.678: (file-open /Users/ZZZ/Desktop/Minimal braucht 
X11.lyx)support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
graphics/PreviewLoader.cpp (473): adding snippet:
$ $
graphics/PreviewLoader.cpp (535): PreviewLoader::startLoading()
Buffer.cpp (1468): Validating buffer...
LyX needs the following commands when LaTeXing:
* Packages:\usepackage{setspace}

* Macros:
* Textclass stuff:\usepackage{enumitem}  % customizable list 
environments
\newlength{\lyxlabelwidth} % auxiliary length

* done.
Buffer.cpp (1474): Buffer validation done.
graphics/PreviewLoader.cpp (669): PreviewLoader::finishedInProgress(0): 
processing succeeded for python -tt 
/Applications/LyX.app/Contents/Resources/scripts/lyxpreview2bitmap.py png 

[Feature Request] python binding

2014-05-29 Thread Alex Vergara Gil
Hello Lyxers

I wonder why LyX is not available to process little pieces of python code 
within its own framework, like ipython notebook for instance??
This feature allows us to have beautiful graphics such the one produced by 
matplotlib package. I know there already exists a similar binding for R through 
knitr module, so why not a binding for python too??

Is there a way, like modules or whatever, to achieve the same functionality or 
at least some basic functionality of ipython notebook within LyX??

Regards
Alex Vergara
MSc Nuclear Physics
SSDL, CPHR, Havana, Cuba

[Feature Request] quality ePub export: Was [Feature Request] python binding

2014-05-29 Thread Steve Litt
On Thu, 29 May 2014 14:36:29 -0500
Alex Vergara Gil a...@cphr.edu.cu wrote:

 Hello Lyxers
 
 I wonder why LyX is not available to process little pieces of python
 code within its own framework, like ipython notebook for instance??
 This feature allows us to have beautiful graphics such the one
 produced by matplotlib package. I know there already exists a similar
 binding for R through knitr module, so why not a binding for python
 too??
 
 Is there a way, like modules or whatever, to achieve the same
 functionality or at least some basic functionality of ipython
 notebook within LyX??

Oh, if we're going consider requests for difficult additions to handle a
small subset of needs like beautiful graphics, how about filling the
GAPING HOLE that there's no practical way to export to ePub, without
massive human intervention and end-user programming? None of LyX's HTML
and xHtml exports are remotely suitable for flowing-text eBook
production, especially because different people have different ideas of
how eBooks should be built.

Personally, I think the easiest way forward on this is to take the
current half XML half something else native format, and make it well
formed XML. No doing favors of renaming graphics files with arbitrary
numbers, no doing favors of making obvious hierarchy into div, just
make the native format XML and let anyone with Python and lxml.etree
have his way with the native LyX file.

I know that two years ago I railed against XML native format, but
parsers have gotten better, and right now we have the human
unreadability of XML, combined with the unparsability of a more TeX
like language. Well formed XML can only be an improvement.

If well formed XML native format is not practical in the near future,
perhaps somebody could make a program that exports the current native
format into well-formed XML, once again without renumbering, throwing
away structure, etc. Basically, just pass the environments through: No
need to map Part to h1, once it's XML, we can trivially do that
ourselves, the way we want to. Given that most eBooks don't do a lot of
bibliography stuff, you could even have an initial version that has
hooks for the bibliography stuff but doesn't actually do it. Put in the
bibliographies next time. If it's not perfect with math, that's fine: I
can't think of anything more frustrating than trying to read a math
book on a small device.

Because of LyX's inability to author flowing text eBooks in any
reasonable way, I haven't used LyX in 9 months: I'm authoring with
Bluefish now. Slow, difficult, crashy, but at least my source document
can produce both print, PDF and ePub.

Maybe it's just me, but if there's one feature LyX should really have
in 2014, I think that one feature is a reasonable export mechanism to
something that can be turned into ePub, without undoing all the BS the
current LyX (x)Html converters throw into the export.

Mark my words: Within two years, beautiful graphics won't matter one
bit if the document can't be read on a small device.

Thanks,

SteveT

Steve Litt*  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


[Feature Request] python binding

2014-05-29 Thread Alex Vergara Gil

From: Steve Litt sl...@troubleshooters.com
Sent: Thursday, May 29, 2014 2:35 PM

On Thu, 29 May 2014 14:36:29 -0500
Alex Vergara Gil a...@cphr.edu.cu wrote:


Hello Lyxers

I wonder why LyX is not available to process little pieces of python
code within its own framework, like ipython notebook for instance??
This feature allows us to have beautiful graphics such the one
produced by matplotlib package. I know there already exists a similar
binding for R through knitr module, so why not a binding for python
too??

Is there a way, like modules or whatever, to achieve the same
functionality or at least some basic functionality of ipython
notebook within LyX??


Oh, if we're going consider requests for difficult additions to handle a
small subset of needs like beautiful graphics, how about filling the
GAPING HOLE that there's no practical way to export to ePub, without
massive human intervention and end-user programming? None of LyX's HTML
and xHtml exports are remotely suitable for flowing-text eBook
production, especially because different people have different ideas of
how eBooks should be built.


I don´t think this is a dificult addition since there is already a module 
that does something similar for what I've asked, knitr module does this but 
accepting R commands instead of python ones, so maybe the knitr author can 
put some light to this discussion. Again there should be no need to touch 
the code, just build a module similar to knitr that can be named knitpy


This is my original motivation


(...)
SteveT


Regards
Alex 



Re: [Feature Request] python binding

2014-05-29 Thread Richard Heck

On 05/29/2014 03:36 PM, Alex Vergara Gil wrote:

Hello Lyxers
I wonder why LyX is not available to process little pieces of python 
code within its own framework, like ipython notebook for instance??


This feature allows us to have beautiful graphics such the one 
produced by matplotlib package. I know there already exists a similar 
binding for R through knitr module, so why not a binding for python too??
Is there a way, like modules or whatever, to achieve the same 
functionality or at least some basic functionality of ipython notebook 
within LyX??


Can you be more precise about what you want to do? I've never heard of 
ipython notebook.


Sweave works by our having an output format (sweave) for such 
documentsand then our declaring Rscript as a sweave -- LaTeX converter, 
so PDF export (say) goes via Rscript and pdflatex. There's a special 
script in lib/scripts/ that sets up some things for LyXfirst, or so it 
claims. It would be reasonably easy to do the same sort of thing for 
Python, if you wanted to do so. You'd just need to set up an appropriate 
format and then declare an appropriate script as a whatever - latex 
converter. Then LyX will run the script and do as you wish with the 
embedded python code.


Of course, as we've discussed on the list with respect to R, there are 
large security issues here, too.


Richard



Re: LyX wants to install X11…

2014-05-29 Thread Richard Heck

On 05/29/2014 01:15 PM, jezZiFeR wrote:

Stephan, thank you, I have added the output . My TeX engine is TeXLive2012. Is 
it too old?


Hi, Jezz,

Can you clear out the cache/ subdirectory of your user directory and try 
this again? You can find the location of the user directory from About 
LyX, which I think is on the Apple menu on OSX.


Richard


19:09:15.215: (dialog-show prefs: ⌘,)Error: New binding for 'Kontroll-T 1' is 
overriding old binding...
Error: New binding for 'Kontroll-T 2' is overriding old binding...
Error: New binding for 'Kontroll-T O' is overriding old binding...
Error: New binding for 'Kontroll-T T' is overriding old binding...
Error: New binding for 'Kontroll-T X' is overriding old binding...
19:11:04.589: Öffne Dokument ~/Desktop/Minimal braucht X11.lyx...
19:11:07.676: Dokument ~/Desktop/Minimal braucht X11.lyx ist geöffnet.
19:11:07.678: (file-open /Users/ZZZ/Desktop/Minimal braucht 
X11.lyx)support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
graphics/PreviewLoader.cpp (473): adding snippet:
$ $
graphics/PreviewLoader.cpp (535): PreviewLoader::startLoading()
Buffer.cpp (1468): Validating buffer...
LyX needs the following commands when LaTeXing:
* Packages:\usepackage{setspace}

* Macros:
* Textclass stuff:\usepackage{enumitem}  % customizable list 
environments
\newlength{\lyxlabelwidth} % auxiliary length

* done.
Buffer.cpp (1474): Buffer validation done.

Re: [Feature Request] python binding

2014-05-29 Thread Alex Vergara Gil

  From: Richard Heck 
  Sent: Thursday, May 29, 2014 3:26 PM


  On 05/29/2014 03:36 PM, Alex Vergara Gil wrote:

Hello Lyxers

I wonder why LyX is not available to process little pieces of python code 
within its own framework, like ipython notebook for instance??


This feature allows us to have beautiful graphics such the one produced by 
matplotlib package. I know there already exists a similar binding for R through 
knitr module, so why not a binding for python too??

Is there a way, like modules or whatever, to achieve the same functionality 
or at least some basic functionality of ipython notebook within LyX??
  Can you be more precise about what you want to do? I've never heard of 
ipython notebook.
sudo aptitude install ipython-notebook
ipython notebook

and there you can write even thesis in a web environment with python commands 
being executed inlined, exporting to pdf and latex too, it is a wonder of our 
times, so why not letting LyX do this miracle too??

  Sweave works by our having an output format (sweave) for such documents and 
then our declaring Rscript as a sweave -- LaTeX converter, so PDF export (say) 
goes via Rscript and pdflatex. There's a special script in lib/scripts/ that 
sets up some things for LyX first, or so it claims. It would be reasonably 
easy to do the same sort of thing for Python, if you wanted to do so. You'd 
just need to set up an appropriate format and then declare an appropriate 
script as a whatever - latex converter. Then LyX will run the script and do as 
you wish with the embedded python code.

  Of course, as we've discussed on the list with respect to R, there are large 
security issues here, too.

  Richard
you obviously miss the point here, or I was not very clear! it is not a 
different format, is a facility to have python scripts running within LyX 
framework, you have to see ipython notebook to understand what I mean, you will 
be surprised!!
Basically to build graphs, for instance (and only a piece of what can be done), 
you add the (let's call it) knitpy module and then place a knitpy insert, 
write some python code that produces a matplotlib graphic and then when lyx 
compiles the document, instead of the code it is shown the graph, it also can 
be done in the lyx editing window, but thats a more dificult request.

Regards
Alex

Re: [Feature Request] python binding

2014-05-29 Thread Rainer M Krug
Alex Vergara Gil a...@cphr.edu.cu writes:

   From: Richard Heck 
   Sent: Thursday, May 29, 2014 3:26 PM


   On 05/29/2014 03:36 PM, Alex Vergara Gil wrote:

 Hello Lyxers

 I wonder why LyX is not available to process little pieces of
 python code within its own framework, like ipython notebook for
 instance??


 This feature allows us to have beautiful graphics such the one
 produced by matplotlib package. I know there already exists a
 similar binding for R through knitr module, so why not a binding
 for python too??

 Is there a way, like modules or whatever, to achieve the same
 functionality or at least some basic functionality of ipython notebook
 within LyX??  Can you be more precise about what you want to do? I've
 never heard of ipython notebook.  sudo aptitude install
 ipython-notebook ipython notebook

 and there you can write even thesis in a web environment with python
 commands being executed inlined, exporting to pdf and latex too, it is
 a wonder of our times, so why not letting LyX do this miracle too??

   Sweave works by our having an output format (sweave) for such
   documents and then our declaring Rscript as a sweave -- LaTeX
   converter, so PDF export (say) goes via Rscript and
   pdflatex. There's a special script in lib/scripts/ that sets up
   some things for LyX first, or so it claims. It would be reasonably
   easy to do the same sort of thing for Python, if you wanted to do
   so. You'd just need to set up an appropriate format and then declare
   an appropriate script as a whatever - latex converter. Then LyX
   will run the script and do as you wish with the embedded python
   code.

   Of course, as we've discussed on the list with respect to R, there are 
 large security issues here, too.

   Richard you obviously miss the point here, or I was not very clear!
 it is not a different format, is a facility to have python scripts
 running within LyX framework, you have to see ipython notebook to
 understand what I mean, you will be surprised!!  Basically to build
 graphs, for instance (and only a piece of what can be done), you add
 the (let's call it) knitpy module and then place a knitpy insert,
 write some python code that produces a matplotlib graphic and then
 when lyx compiles the document, instead of the code it is shown the
 graph, it also can be done in the lyx editing window, but thats a more
 dificult request.

I might be *completely* off, but couldn't you achieve exactly this via
defining converters? I have for example a converter defined, which
converts plantuml source fields into uml graphs, i.e. it defines the
call to compile them and return the graphs which are then inserted in
the document?

I have never used python, but I guess a similar approach should be
possible here as well?

Cheers,

Rainer



 Regards
 Alex

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


pgpNzrUAU7G2A.pgp
Description: PGP signature


Re: LyX wants to install X11…

2014-05-29 Thread Stephan Witt
Am 29.05.2014 um 22:29 schrieb Richard Heck rgh...@lyx.org:

 On 05/29/2014 01:15 PM, jezZiFeR wrote:
 Stephan, thank you, I have added the output . My TeX engine is TeXLive2012. 
 Is it too old?

No, I don't think so. I'm using the same.

 
 Hi, Jezz,
 
 Can you clear out the cache/ subdirectory of your user directory and try this 
 again? You can find the location of the user directory from About LyX, which 
 I think is on the Apple menu on OSX.

This should be the folder ~/Library/Application Support/LyX-2.0 -
to open it in Finder do this:
1. Go to your users Home Folder
2. Use Gehe zu and choose Gehe zum Ordner…
3. Type the word Library and choose Öffnen
4. Now your able to navigate to the other folders

I've tracked down the flow of control now and it possibly calls gs here too, 
like that:

I've prepared the run_command utility to print some message and started the 
converter in a terminal:
python -tt 
/Users/stephan/git/lyx-build/LyX-2.0.7.1.app/Contents/Resources/scripts/lyxpreview2bitmap.py
 png 
/var/folders/1x/zm63s22x7s591xrlgm4rl9v4gn/T/lyx_tmpdir.L33208/lyx_tmpbuf2/0lyxpreview.tex
 216 00 faf0e6 xelatex
run_command xelatex 0lyxpreview.tex ... 
xelatex had problems compiling 0lyxpreview.tex
Using XeTeX
run_command dvips -i -o 0lyxpreview.ps 0lyxpreview.dvi ... 
This is dvips(k) 5.992 Copyright 2012 Radical Eye Software (www.radicaleye.com)
dvips: DVI file can't be opened: 0lyxpreview.dvi: No such file or directory
Failed: dvips 0lyxpreview.dvi ... looking for PDF
legacy_conversion_step2 dvips_failed ... 
run_command gs -dNOPAUSE -dBATCH -dSAFER -sDEVICE=png16m 
-sOutputFile=0lyxpreview%d.png -dGraphicsAlphaBit=2 -dTextAlphaBits=2 
-r197.260274 0lyxpreview.pdf 

Then I made the gs call explicitely:

(cd 
/var/folders/1x/zm63s22x7s591xrlgm4rl9v4gn/T/lyx_tmpdir.L33208/lyx_tmpbuf2;gs
 -dNOPAUSE -dBATCH -dSAFER -sDEVICE=png16m -sOutputFile=0lyxpreview%d.png 
-dGraphicsAlphaBit=2 -dTextAlphaBits=2 -r197.260274 0lyxpreview.pdf )
GPL Ghostscript 9.10 (2013-08-30)
Copyright (C) 2013 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 1.
Page 1

I'm not sure how to interpret this. Either I have a different gs or I have X11 
somehow available.
(I know I'm having it in /opt/X11, but I've locked it for regular users before. 
I cannot open a
xterm on my system anymore, but the conversion succeeded.) 

Stephan

 
 19:09:15.215: (dialog-show prefs: ⌘,)Error: New binding for 'Kontroll-T 1' 
 is overriding old binding...
 Error: New binding for 'Kontroll-T 2' is overriding old binding...
 Error: New binding for 'Kontroll-T O' is overriding old binding...
 Error: New binding for 'Kontroll-T T' is overriding old binding...
 Error: New binding for 'Kontroll-T X' is overriding old binding...
 19:11:04.589: Öffne Dokument ~/Desktop/Minimal braucht X11.lyx...
 19:11:07.676: Dokument ~/Desktop/Minimal braucht X11.lyx ist geöffnet.
 19:11:07.678: (file-open /Users/ZZZ/Desktop/Minimal braucht 
 X11.lyx)support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
 File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
 File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
 File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 Couldn't find a known format!
 support/FileName.cpp (832): filetools(getFormatFromContents)
 File type not recognised before EOF!
 support/FileName.cpp (950): filetools(getFormatFromContents)
 

Re: [Feature Request] python binding

2014-05-29 Thread Richard Heck

On 05/29/2014 04:57 PM, Rainer M Krug wrote:

Alex Vergara Gil a...@cphr.edu.cu writes:

   Richard you obviously miss the point here, or I was not very clear!
it is not a different format, is a facility to have python scripts
running within LyX framework, you have to see ipython notebook to
understand what I mean, you will be surprised!!  Basically to build
graphs, for instance (and only a piece of what can be done), you add
the (let's call it) knitpy module and then place a knitpy insert,
write some python code that produces a matplotlib graphic and then
when lyx compiles the document, instead of the code it is shown the
graph, it also can be done in the lyx editing window, but thats a more
dificult request.
I might be *completely* off, but couldn't you achieve exactly this via
defining converters? I have for example a converter defined, which
converts plantuml source fields into uml graphs, i.e. it defines the
call to compile them and return the graphs which are then inserted in
the document?


Yes, that's more or less what I was suggesting.

rh



Re: [Feature Request] python binding

2014-05-29 Thread Richard Heck

On 05/29/2014 05:34 PM, Alex Vergara Gil wrote:


*From:* Richard Heck mailto:rgh...@lyx.org
*Sent:* Thursday, May 29, 2014 3:26 PM

On 05/29/2014 03:36 PM, Alex Vergara Gil wrote:

Hello Lyxers
I wonder why LyX is not available to process little pieces of
python code within its own framework, like ipython notebook for
instance??

This feature allows us to have beautiful graphics such the one
produced by matplotlib package. I know there already exists a
similar binding for R through knitr module, so why not a binding
for python too??
Is there a way, like modules or whatever, to achieve the same
functionality or at least some basic functionality of ipython
notebook within LyX??

Can you be more precise about what you want to do? I've never
heard of ipython notebook.

sudo aptitude install ipython-notebook
ipython notebook

and there you can write even thesis in a web environment with python 
commands being executed inlined, exporting to pdf and latex too, it is 
a wonder of our times, so why not letting LyX do this miracle too??


Sweave works by our having an output format (sweave) for such
documentsand then our declaring Rscript as a sweave -- LaTeX
converter, so PDF export (say) goes via Rscript and pdflatex.
There's a special script in lib/scripts/ that sets up some things
for LyXfirst, or so it claims. It would be reasonably easy to do
the same sort of thing for Python, if you wanted to do so. You'd
just need to set up an appropriate format and then declare an
appropriate script as a whatever - latex converter. Then LyX will
run the script and do as you wish with the embedded python code.

Of course, as we've discussed on the list with respect to R, there
are large security issues here, too.

Richard

you obviously miss the point here, or I was not very clear! it is not 
a different format, is a facility to have python scripts running 
within LyX framework, you have to see ipython notebook to understand 
what I mean, you will be surprised!!
Basically to build graphs, for instance (and only a piece of what can 
be done), you add the (let's call it) knitpy module and then place a 
knitpy insert, write some python code that produces a matplotlib 
graphic and then when lyx compiles the document, instead of the code 
it is shown the graph, it also can be done in the lyx editing window, 
but thats a more dificult request.


No, that's exactly what I had in mind: Python code inthe document that 
gets executed at compile timeto create graphsor tables---or delete all 
your files. ;-) Formats are a LyX-internal method for keeping track of 
such thingsas what stage of compilation a document is at. The file 
format wouldn't really be different.


Richard



Re: Image Format Conversion on OS X with Transmute

2014-05-29 Thread Jerry

On May 28, 2014, at 11:12 AM, James Dean Palmer ja...@tiger3k.com wrote:

 I recently wrote a little command line utility called transmute that converts 
 between various image formats using only the Quartz, CoreGraphics, and Cocoa 
 APIs.  Apple's sips utility can do the same sort of thing but, oddly, sips 
 doesn't support EPS or PS.
 
 transmute also has some other neat tricks like clipboard support, input and 
 output from stdin/stdout and setting the page number for conversion (PDF 
 only). It's available here:
 
 https://bitbucket.org/jdpalmer/transmute
 
 Once installed, you just need to add this to your preferences file:
 
 \converter ps png transmute $$i $$o 
 \converter eps png transmute $$i $$o 
 \converter pdf png transmute $$i $$o 
 
 And then there's no more dependency on ghostscript or XQuartz for EPS, PS, 
 and PDF image previews.
 
 Best,
 James
 
James, I haven't tried this but it looks awesomely awesome. Would you mind 
making a note on the LyX wiki about it? And maybe an indication, if not already 
present, how to install without brew, e.g., put in /some/path for those who 
don't know this.

And maybe you can help my confusion. PDF is listed as source-file only but the 
note about -n pageno sort of indicates that pageno can be applied to rendered 
PDFs. I'm probably misreading something.

Jerry



Re: [Feature Request] python binding

2014-05-29 Thread Scott Kostyshak
On Thu, May 29, 2014 at 3:36 PM, Alex Vergara Gil a...@cphr.edu.cu wrote:
 Hello Lyxers

 I wonder why LyX is not available to process little pieces of python code
 within its own framework, like ipython notebook for instance??
 This feature allows us to have beautiful graphics such the one produced by
 matplotlib package. I know there already exists a similar binding for R
 through knitr module, so why not a binding for python too??

 Is there a way, like modules or whatever, to achieve the same functionality
 or at least some basic functionality of ipython notebook within LyX??

Hi Alex,

Have you tried using knitr for python? Attached is a simple example
and the output created. For more info, see
http://yihui.name/knitr/demo/engines/ . graphics and everything else
should also work, although you might need to add custom hooks (not as
hard as it sounds).

This might not be ideal because you have to have R installed (knitr is
still itself written in R). But I would be curious in your thoughts.

Scott


python_knitr.21.lyx
Description: application/lyx


python_knitr.21.pdf
Description: Adobe PDF document


Re: LyX wants to install X11…

2014-05-29 Thread jezZiFeR
Stephan, could you please tell me how to do that correctly? Thank you!
Jess



Am 27.05.2014 um 22:36 schrieb Stephan Witt :
> 
> I don't have the problem with the example.
> 
> I enabled the log messages for LaTeX/generation and Graphics conversion. 
> This leads to the following output when opening Jezz's example file:
> 
> =
> 22:28:01.190: Opening document ~/Documents/lyxtest/Minimal braucht X11.lyx…
> support/FileName.cpp (832): filetools(getFormatFromContents)
>   File type not recognised before EOF!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (832): filetools(getFormatFromContents)
>   File type not recognised before EOF!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (832): filetools(getFormatFromContents)
>   File type not recognised before EOF!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (832): filetools(getFormatFromContents)
>   File type not recognised before EOF!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (832): filetools(getFormatFromContents)
>   File type not recognised before EOF!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (832): filetools(getFormatFromContents)
>   File type not recognised before EOF!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (832): filetools(getFormatFromContents)
>   File type not recognised before EOF!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (832): filetools(getFormatFromContents)
>   File type not recognised before EOF!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (832): filetools(getFormatFromContents)
>   File type not recognised before EOF!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): filetools(getFormatFromContents)
>   Couldn't find a known format!
> support/FileName.cpp (950): 

Will there be a version 2.0.x that can import 2.1.0 files?

2014-05-29 Thread David A Case
In the past, there have been "final" releases of a series that are able to
read files created by the "next" LyX format.  Are there plans (and a
estimated time) for a "2.0.8" release that can read 2.1 files?

...thanks...dave case



Re: LyX wants to install X11…

2014-05-29 Thread Stephan Witt
Am 29.05.2014 um 12:41 schrieb jezZiFeR :

> Stephan, could you please tell me how to do that correctly? Thank you!
> Jess

Yes.

1. Start LyX without any document open.
2. View -> View Messages
3. Go to Settings and choose "Selected" Debug Messages
4. Enable LaTeX generation/execution and Graphics conversion and loading
5. Open your example
6. Copy the text from Output and paste it to mail

Stephan

> Am 27.05.2014 um 22:36 schrieb Stephan Witt :
>> 
>> I don't have the problem with the example.
>> 
>> I enabled the log messages for LaTeX/generation and Graphics conversion. 
>> This leads to the following output when opening Jezz's example file:
>> 
>> =
>> 22:28:01.190: Opening document ~/Documents/lyxtest/Minimal braucht X11.lyx…
>> support/FileName.cpp (832): filetools(getFormatFromContents)
>>  File type not recognised before EOF!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (832): filetools(getFormatFromContents)
>>  File type not recognised before EOF!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (832): filetools(getFormatFromContents)
>>  File type not recognised before EOF!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (832): filetools(getFormatFromContents)
>>  File type not recognised before EOF!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (832): filetools(getFormatFromContents)
>>  File type not recognised before EOF!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (832): filetools(getFormatFromContents)
>>  File type not recognised before EOF!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (832): filetools(getFormatFromContents)
>>  File type not recognised before EOF!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>>  Couldn't find a known format!
>> support/FileName.cpp (832): filetools(getFormatFromContents)
>>  File type not recognised before EOF!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>> 

Re: Spell check within ERT

2014-05-29 Thread Benedict Holland
So I so love how I specifically that tables are a problem and get people
wondering why I can't use lyx for tables. Imagine you have to get a table
of attributes all with starting with a letter and a period with a width of
.26in but no cellpadding on that particular column because it is left
justified and the extra .01in leaves just enough space for an m to look
good. This letter should appear as a block like

a. some text
some text

AND then there should also be another column with even more text. How about
if some rows contain multi column or multi row environments? How about if I
am importing from R and need to use long tables instead? That is a simple
copy and paste, chance tabular to longtable and continue on my way. Tables
are inherently difficult. Latex knows this which is why it says in many
many documents that tables are difficult. Lyx even admits that tables are
difficult but provides a UI to get some functionality. Regularly I hit that
wall and find it much easier to just use latex markup even with sometime
like using spaces between rows as oppose to lines (which is much better
design). I tried it once a long time ago. I couldn't make it do what I
wanted. Perhaps it is time to a revisit when things are not so hectic. I
use three part tables with booktabs because I need professional looking
tables to present scientific results. These tables need to be spell checked
because there is sometimes a lot of text embedded in them.


I am less worried about having too much spelling highlighted than too many.
I see two ways easily to get around the problem. The first is to have a set
of reserved or defined words. Other editors have figured out how to write
up latex code while having the display not underline every command. It is
also possible that they prescan for all defined words and don't highlight
them. I actually have not worked with document processors befores so I
don't know how language specific commands or other defined/reserved words
are not automatically recognized. A lot of other text editors do it though
so I can't imagine that to be difficult.

The second, and slightly more hacky way, would be to just add every
reserved word to my personal dictionary. It cannot be any more hacky then
writing the ERT, copying that into a new document, fixing spelling, and
copying it back. That is actually the exact situation I want to avoid. I
suppose a third option would be to use a non-ui like device to create
tables and then import the latex into lyx. I would prefer to not have to do
that though but it sounds like redefining ERT is sort of hacky.

Thank you for all the fine ideas. I will try to think about how to better
approach the problem. I suppose the huge feature request would be to make
ERT into an expansive latex or tex editor with defined functions like in an
editor such as MikTex. I don't have time right now to tackle the problem
but that seems like the not so hacky way to deal with it.

Thanks again,
~Ben


On Wed, May 28, 2014 at 10:18 AM, Richard Heck  wrote:

> On 05/28/2014 04:38 AM, Scott Kostyshak wrote:
>
>> On Tue, May 27, 2014 at 7:04 PM, Benedict Holland
>>  wrote:
>>
>>> Hi everyone. Yes, I did check the archived mail and no, I didn't find an
>>> answer. I am running lyx 2.1 and I need to spell check ERT. How can I
>>> make
>>> this happen?
>>>
>>> Before you ask, why he is still using ERT the answer is tables. I cannot
>>> make lyx do what I want with tables and I am not going to go through and
>>> remove each string from ert. That would make my document unreadable. So.
>>> How
>>> do I make lyx spell check within ERT?
>>>
>> Hi Benedict,
>>
>> You might be able to redefine ERT in local layout (Document > Settings >
>> Local layout). Please read about layouts and about the Spellcheck keyword
>> in Help > Customization. If redefining ERT doesn't work, consider making
>> your own inset that does the same thing as ERT except that it spell checks.
>>
>
> This is hardcoded in the case of ERT: allowSpellCheck() returns false. But
> yes, in principle, you could define your own ERT-like inset (PassThru 1,
> etc), and allow spell check inside it. You do then have the problem that
> Stephan mentioned, though.
>
> Richard
>
>


Re: Will there be a version 2.0.x that can import 2.1.0 files?

2014-05-29 Thread Richard Heck

On 05/29/2014 07:58 AM, David A Case wrote:

In the past, there have been "final" releases of a series that are able to
read files created by the "next" LyX format.  Are there plans (and a
estimated time) for a "2.0.8" release that can read 2.1 files?


Yes, the release is in preparation, but we have run into several issues 
involving these conversions

since the release of 2.1.0. We think we are close

If you need this now, you can grab the entire lyx2lyx/ subdirectory from

http://git.lyx.org/?p=lyx.git;a=tree;f=lib/lyx2lyx;h=e8bfb1c3ad7829197f2b3862111d41525d367630;hb=HEAD

and just replace everything in the corresponding installed subdirectory 
with those files.


Richard



Re: Spell check within ERT

2014-05-29 Thread Richard Heck

On 05/29/2014 09:20 AM, Benedict Holland wrote:


Thank you for all the fine ideas. I will try to think about how to 
better approach the problem. I suppose the huge feature request would 
be to make ERT into an expansive latex or tex editor with defined 
functions like in an editor such as MikTex. I don't have time right 
now to tackle the problem but that seems like the not so hacky way to 
deal with it.




If you're going to use huge ERT, then it would likely be better to have 
the LaTeX code in a separate file and include it using Insert> File> 
Child Document. This works with TeX files as well as LyX files. You can 
then right click on the inset and choose "Edit included file", which 
will open whatever program you configure under Tools> Preferences.


Richard



Re: LyX wants to install X11…

2014-05-29 Thread jezZiFeR
Thank you, Stephan.
Could you maybe tell me the name of the settings in 3. in German?


Am 29.05.2014 um 15:09 schrieb Stephan Witt :

> Am 29.05.2014 um 12:41 schrieb jezZiFeR :
> 
>> Stephan, could you please tell me how to do that correctly? Thank you!
>> Jess
> 
> Yes.
> 
> 1. Start LyX without any document open.
> 2. View -> View Messages
> 3. Go to Settings and choose "Selected" Debug Messages

I do not find this in Germen (»Angewählt«) – where would I have to look?
Thank you!

> 4. Enable LaTeX generation/execution and Graphics conversion and loading
> 5. Open your example
> 6. Copy the text from Output and paste it to mail
> 
> Stephan



Re: Spell check within ERT

2014-05-29 Thread Benedict Holland
Oh perfect! That is exactly the perfect solution!

Thank you so much. I never even knew this feature existed, particularly the
ability to configure my tex editor!
~Ben


On Thu, May 29, 2014 at 10:53 AM, Richard Heck  wrote:

> On 05/29/2014 09:20 AM, Benedict Holland wrote:
>
>>
>> Thank you for all the fine ideas. I will try to think about how to better
>> approach the problem. I suppose the huge feature request would be to make
>> ERT into an expansive latex or tex editor with defined functions like in an
>> editor such as MikTex. I don't have time right now to tackle the problem
>> but that seems like the not so hacky way to deal with it.
>>
>>
> If you're going to use huge ERT, then it would likely be better to have
> the LaTeX code in a separate file and include it using Insert> File> Child
> Document. This works with TeX files as well as LyX files. You can then
> right click on the inset and choose "Edit included file", which will open
> whatever program you configure under Tools> Preferences.
>
> Richard
>
>


Re: LyX wants to install X11…

2014-05-29 Thread Stephan Witt
Am 29.05.2014 um 16:57 schrieb jezZiFeR :

> Thank you, Stephan.
> Could you maybe tell me the name of the settings in 3. in German?
> 
> 
> Am 29.05.2014 um 15:09 schrieb Stephan Witt :
> 
>> Am 29.05.2014 um 12:41 schrieb jezZiFeR :
>> 
>>> Stephan, could you please tell me how to do that correctly? Thank you!
>>> Jess
>> 
>> Yes.
>> 
>> 1. Start LyX without any document open.
>> 2. View -> View Messages
>> 3. Go to Settings and choose "Selected" Debug Messages
> 
> I do not find this in Germen (»Angewählt«) – where would I have to look?
> Thank you!

2. Ansicht -> Meldungen anzeigen
3. Einstellungen, "Ausgewählte" Testmeldungen
4. LaTeX Erzeugung/Ausführung und Laden und Konvertierung einer Grafik

Stephan

> 
>> 4. Enable LaTeX generation/execution and Graphics conversion and loading
>> 5. Open your example
>> 6. Copy the text from Output and paste it to mail



Re: LyX wants to install X11…

2014-05-29 Thread jezZiFeR
Stephan, thank you, I have added the output . My TeX engine is TeXLive2012. Is 
it too old? 



19:09:15.215: (dialog-show prefs: ⌘,)Error: New binding for 'Kontroll-T 1' is 
overriding old binding...
Error: New binding for 'Kontroll-T 2' is overriding old binding...
Error: New binding for 'Kontroll-T O' is overriding old binding...
Error: New binding for 'Kontroll-T T' is overriding old binding...
Error: New binding for 'Kontroll-T X' is overriding old binding...
19:11:04.589: Öffne Dokument ~/Desktop/Minimal braucht X11.lyx...
19:11:07.676: Dokument ~/Desktop/Minimal braucht X11.lyx ist geöffnet.
19:11:07.678: (file-open /Users/ZZZ/Desktop/Minimal braucht 
X11.lyx)support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
graphics/PreviewLoader.cpp (473): adding snippet:
$ $
graphics/PreviewLoader.cpp (535): PreviewLoader::startLoading()
Buffer.cpp (1468): Validating buffer...
LyX needs the following commands when LaTeXing:
* Packages:\usepackage{setspace}

* Macros:
* Textclass stuff:\usepackage{enumitem}  % customizable list 
environments
\newlength{\lyxlabelwidth} % auxiliary length

* done.
Buffer.cpp (1474): Buffer validation done.
graphics/PreviewLoader.cpp (669): PreviewLoader::finishedInProgress(0): 
processing succeeded for python -tt 
"/Applications/LyX.app/Contents/Resources/scripts/lyxpreview2bitmap.py" png 

[Feature Request] python binding

2014-05-29 Thread Alex Vergara Gil
Hello Lyxers

I wonder why LyX is not available to process little pieces of python code 
within its own framework, like ipython notebook for instance??
This feature allows us to have beautiful graphics such the one produced by 
matplotlib package. I know there already exists a similar binding for R through 
knitr module, so why not a binding for python too??

Is there a way, like modules or whatever, to achieve the same functionality or 
at least some basic functionality of ipython notebook within LyX??

Regards
Alex Vergara
MSc Nuclear Physics
SSDL, CPHR, Havana, Cuba

[Feature Request] quality ePub export: Was [Feature Request] python binding

2014-05-29 Thread Steve Litt
On Thu, 29 May 2014 14:36:29 -0500
"Alex Vergara Gil"  wrote:

> Hello Lyxers
> 
> I wonder why LyX is not available to process little pieces of python
> code within its own framework, like ipython notebook for instance??
> This feature allows us to have beautiful graphics such the one
> produced by matplotlib package. I know there already exists a similar
> binding for R through knitr module, so why not a binding for python
> too??
> 
> Is there a way, like modules or whatever, to achieve the same
> functionality or at least some basic functionality of ipython
> notebook within LyX??

Oh, if we're going consider requests for difficult additions to handle a
small subset of needs like beautiful graphics, how about filling the
GAPING HOLE that there's no practical way to export to ePub, without
massive human intervention and end-user programming? None of LyX's HTML
and xHtml exports are remotely suitable for flowing-text eBook
production, especially because different people have different ideas of
how eBooks should be built.

Personally, I think the easiest way forward on this is to take the
current half XML half something else native format, and make it well
formed XML. No doing favors of renaming graphics files with arbitrary
numbers, no doing favors of making obvious hierarchy into , just
make the native format XML and let anyone with Python and lxml.etree
have his way with the native LyX file.

I know that two years ago I railed against XML native format, but
parsers have gotten better, and right now we have the human
unreadability of XML, combined with the unparsability of a more TeX
like language. Well formed XML can only be an improvement.

If well formed XML native format is not practical in the near future,
perhaps somebody could make a program that exports the current native
format into well-formed XML, once again without renumbering, throwing
away structure, etc. Basically, just pass the environments through: No
need to map Part to , once it's XML, we can trivially do that
ourselves, the way we want to. Given that most eBooks don't do a lot of
bibliography stuff, you could even have an initial version that has
hooks for the bibliography stuff but doesn't actually do it. Put in the
bibliographies next time. If it's not perfect with math, that's fine: I
can't think of anything more frustrating than trying to read a math
book on a small device.

Because of LyX's inability to author flowing text eBooks in any
reasonable way, I haven't used LyX in 9 months: I'm authoring with
Bluefish now. Slow, difficult, crashy, but at least my source document
can produce both print, PDF and ePub.

Maybe it's just me, but if there's one feature LyX should really have
in 2014, I think that one feature is a reasonable export mechanism to
something that can be turned into ePub, without undoing all the BS the
current LyX (x)Html converters throw into the export.

Mark my words: Within two years, beautiful graphics won't matter one
bit if the document can't be read on a small device.

Thanks,

SteveT

Steve Litt*  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


[Feature Request] python binding

2014-05-29 Thread Alex Vergara Gil

From: "Steve Litt" 
Sent: Thursday, May 29, 2014 2:35 PM

On Thu, 29 May 2014 14:36:29 -0500
"Alex Vergara Gil"  wrote:


Hello Lyxers

I wonder why LyX is not available to process little pieces of python
code within its own framework, like ipython notebook for instance??
This feature allows us to have beautiful graphics such the one
produced by matplotlib package. I know there already exists a similar
binding for R through knitr module, so why not a binding for python
too??

Is there a way, like modules or whatever, to achieve the same
functionality or at least some basic functionality of ipython
notebook within LyX??


Oh, if we're going consider requests for difficult additions to handle a
small subset of needs like beautiful graphics, how about filling the
GAPING HOLE that there's no practical way to export to ePub, without
massive human intervention and end-user programming? None of LyX's HTML
and xHtml exports are remotely suitable for flowing-text eBook
production, especially because different people have different ideas of
how eBooks should be built.


I don´t think this is a "dificult addition" since there is already a module 
that does something similar for what I've asked, knitr module does this but 
accepting R commands instead of python ones, so maybe the knitr author can 
put some light to this discussion. Again there should be no need to touch 
the code, just build a module similar to knitr that can be named "knitpy"


This is my original motivation


(...)
SteveT


Regards
Alex 



Re: [Feature Request] python binding

2014-05-29 Thread Richard Heck

On 05/29/2014 03:36 PM, Alex Vergara Gil wrote:

Hello Lyxers
I wonder why LyX is not available to process little pieces of python 
code within its own framework, like ipython notebook for instance??


This feature allows us to have beautiful graphics such the one 
produced by matplotlib package. I know there already exists a similar 
binding for R through knitr module, so why not a binding for python too??
Is there a way, like modules or whatever, to achieve the same 
functionality or at least some basic functionality of ipython notebook 
within LyX??


Can you be more precise about what you want to do? I've never heard of 
ipython notebook.


Sweave works by our having an output format (sweave) for such 
documentsand then our declaring Rscript as a sweave --> LaTeX converter, 
so PDF export (say) goes via Rscript and pdflatex. There's a special 
script in lib/scripts/ that "sets up some things for LyX"first, or so it 
claims. It would be reasonably easy to do the same sort of thing for 
Python, if you wanted to do so. You'd just need to set up an appropriate 
format and then declare an appropriate script as a whatever -> latex 
converter. Then LyX will run the script and do as you wish with the 
embedded python code.


Of course, as we've discussed on the list with respect to R, there are 
large security issues here, too.


Richard



Re: LyX wants to install X11…

2014-05-29 Thread Richard Heck

On 05/29/2014 01:15 PM, jezZiFeR wrote:

Stephan, thank you, I have added the output . My TeX engine is TeXLive2012. Is 
it too old?


Hi, Jezz,

Can you clear out the cache/ subdirectory of your user directory and try 
this again? You can find the location of the user directory from About 
LyX, which I think is on the Apple menu on OSX.


Richard


19:09:15.215: (dialog-show prefs: ⌘,)Error: New binding for 'Kontroll-T 1' is 
overriding old binding...
Error: New binding for 'Kontroll-T 2' is overriding old binding...
Error: New binding for 'Kontroll-T O' is overriding old binding...
Error: New binding for 'Kontroll-T T' is overriding old binding...
Error: New binding for 'Kontroll-T X' is overriding old binding...
19:11:04.589: Öffne Dokument ~/Desktop/Minimal braucht X11.lyx...
19:11:07.676: Dokument ~/Desktop/Minimal braucht X11.lyx ist geöffnet.
19:11:07.678: (file-open /Users/ZZZ/Desktop/Minimal braucht 
X11.lyx)support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (832): filetools(getFormatFromContents)
File type not recognised before EOF!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
support/FileName.cpp (950): filetools(getFormatFromContents)
Couldn't find a known format!
graphics/PreviewLoader.cpp (473): adding snippet:
$ $
graphics/PreviewLoader.cpp (535): PreviewLoader::startLoading()
Buffer.cpp (1468): Validating buffer...
LyX needs the following commands when LaTeXing:
* Packages:\usepackage{setspace}

* Macros:
* Textclass stuff:\usepackage{enumitem}  % customizable list 
environments
\newlength{\lyxlabelwidth} % auxiliary length

* done.
Buffer.cpp (1474): Buffer validation done.

Re: [Feature Request] python binding

2014-05-29 Thread Alex Vergara Gil

  From: Richard Heck 
  Sent: Thursday, May 29, 2014 3:26 PM


  On 05/29/2014 03:36 PM, Alex Vergara Gil wrote:

Hello Lyxers

I wonder why LyX is not available to process little pieces of python code 
within its own framework, like ipython notebook for instance??


This feature allows us to have beautiful graphics such the one produced by 
matplotlib package. I know there already exists a similar binding for R through 
knitr module, so why not a binding for python too??

Is there a way, like modules or whatever, to achieve the same functionality 
or at least some basic functionality of ipython notebook within LyX??
  Can you be more precise about what you want to do? I've never heard of 
ipython notebook.
sudo aptitude install ipython-notebook
ipython notebook

and there you can write even thesis in a web environment with python commands 
being executed inlined, exporting to pdf and latex too, it is a wonder of our 
times, so why not letting LyX do this miracle too??

  Sweave works by our having an output format (sweave) for such documents and 
then our declaring Rscript as a sweave --> LaTeX converter, so PDF export (say) 
goes via Rscript and pdflatex. There's a special script in lib/scripts/ that 
"sets up some things for LyX" first, or so it claims. It would be reasonably 
easy to do the same sort of thing for Python, if you wanted to do so. You'd 
just need to set up an appropriate format and then declare an appropriate 
script as a whatever -> latex converter. Then LyX will run the script and do as 
you wish with the embedded python code.

  Of course, as we've discussed on the list with respect to R, there are large 
security issues here, too.

  Richard
you obviously miss the point here, or I was not very clear! it is not a 
different format, is a facility to have python scripts running within LyX 
framework, you have to see ipython notebook to understand what I mean, you will 
be surprised!!
Basically to build graphs, for instance (and only a piece of what can be done), 
you add the (let's call it) "knitpy" module and then place a knitpy insert, 
write some python code that produces a matplotlib graphic and then when lyx 
compiles the document, instead of the code it is shown the graph, it also can 
be done in the lyx editing window, but thats a more dificult request.

Regards
Alex

Re: [Feature Request] python binding

2014-05-29 Thread Rainer M Krug
"Alex Vergara Gil"  writes:

>   From: Richard Heck 
>   Sent: Thursday, May 29, 2014 3:26 PM
>
>
>   On 05/29/2014 03:36 PM, Alex Vergara Gil wrote:
>
> Hello Lyxers
>
> I wonder why LyX is not available to process little pieces of
> python code within its own framework, like ipython notebook for
> instance??
>
>
> This feature allows us to have beautiful graphics such the one
> produced by matplotlib package. I know there already exists a
> similar binding for R through knitr module, so why not a binding
> for python too??
>
> Is there a way, like modules or whatever, to achieve the same
> functionality or at least some basic functionality of ipython notebook
> within LyX??  Can you be more precise about what you want to do? I've
> never heard of ipython notebook.  sudo aptitude install
> ipython-notebook ipython notebook
>
> and there you can write even thesis in a web environment with python
> commands being executed inlined, exporting to pdf and latex too, it is
> a wonder of our times, so why not letting LyX do this miracle too??
>
>   Sweave works by our having an output format (sweave) for such
>   documents and then our declaring Rscript as a sweave --> LaTeX
>   converter, so PDF export (say) goes via Rscript and
>   pdflatex. There's a special script in lib/scripts/ that "sets up
>   some things for LyX" first, or so it claims. It would be reasonably
>   easy to do the same sort of thing for Python, if you wanted to do
>   so. You'd just need to set up an appropriate format and then declare
>   an appropriate script as a whatever -> latex converter. Then LyX
>   will run the script and do as you wish with the embedded python
>   code.
>
>   Of course, as we've discussed on the list with respect to R, there are 
> large security issues here, too.
>
>   Richard you obviously miss the point here, or I was not very clear!
> it is not a different format, is a facility to have python scripts
> running within LyX framework, you have to see ipython notebook to
> understand what I mean, you will be surprised!!  Basically to build
> graphs, for instance (and only a piece of what can be done), you add
> the (let's call it) "knitpy" module and then place a knitpy insert,
> write some python code that produces a matplotlib graphic and then
> when lyx compiles the document, instead of the code it is shown the
> graph, it also can be done in the lyx editing window, but thats a more
> dificult request.

I might be *completely* off, but couldn't you achieve exactly this via
defining converters? I have for example a converter defined, which
"converts" plantuml source fields into uml graphs, i.e. it defines the
call to compile them and return the graphs which are then inserted in
the document?

I have never used python, but I guess a similar approach should be
possible here as well?

Cheers,

Rainer


>
> Regards
> Alex

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


pgpNzrUAU7G2A.pgp
Description: PGP signature


Re: LyX wants to install X11…

2014-05-29 Thread Stephan Witt
Am 29.05.2014 um 22:29 schrieb Richard Heck :

> On 05/29/2014 01:15 PM, jezZiFeR wrote:
>> Stephan, thank you, I have added the output . My TeX engine is TeXLive2012. 
>> Is it too old?

No, I don't think so. I'm using the same.

> 
> Hi, Jezz,
> 
> Can you clear out the cache/ subdirectory of your user directory and try this 
> again? You can find the location of the user directory from About LyX, which 
> I think is on the Apple menu on OSX.

This should be the folder "~/Library/Application Support/LyX-2.0" -
to open it in Finder do this:
1. Go to your users Home Folder
2. Use "Gehe zu" and choose "Gehe zum Ordner…"
3. Type the word Library and choose "Öffnen"
4. Now your able to navigate to the other folders

I've tracked down the flow of control now and it possibly calls "gs" here too, 
like that:

I've prepared the run_command utility to print some message and started the 
converter in a terminal:
python -tt 
"/Users/stephan/git/lyx-build/LyX-2.0.7.1.app/Contents/Resources/scripts/lyxpreview2bitmap.py"
 png 
"/var/folders/1x/zm63s22x7s591xrlgm4rl9v4gn/T/lyx_tmpdir.L33208/lyx_tmpbuf2/0lyxpreview.tex"
 216 00 faf0e6 xelatex
run_command xelatex "0lyxpreview.tex" ... 
xelatex had problems compiling 0lyxpreview.tex
Using XeTeX
run_command dvips -i -o "0lyxpreview.ps" "0lyxpreview.dvi" ... 
This is dvips(k) 5.992 Copyright 2012 Radical Eye Software (www.radicaleye.com)
dvips: DVI file can't be opened: 0lyxpreview.dvi: No such file or directory
Failed: dvips 0lyxpreview.dvi ... looking for PDF
legacy_conversion_step2 dvips_failed ... 
run_command gs -dNOPAUSE -dBATCH -dSAFER -sDEVICE=png16m 
-sOutputFile="0lyxpreview%d.png" -dGraphicsAlphaBit=2 -dTextAlphaBits=2 
-r197.260274 "0lyxpreview.pdf" 

Then I made the gs call explicitely:

(cd 
/var/folders/1x/zm63s22x7s591xrlgm4rl9v4gn/T/lyx_tmpdir.L33208/lyx_tmpbuf2;gs
 -dNOPAUSE -dBATCH -dSAFER -sDEVICE=png16m -sOutputFile="0lyxpreview%d.png" 
-dGraphicsAlphaBit=2 -dTextAlphaBits=2 -r197.260274 "0lyxpreview.pdf" )
GPL Ghostscript 9.10 (2013-08-30)
Copyright (C) 2013 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 1.
Page 1

I'm not sure how to interpret this. Either I have a different gs or I have X11 
somehow available.
(I know I'm having it in /opt/X11, but I've locked it for regular users before. 
I cannot open a
xterm on my system anymore, but the conversion succeeded.) 

Stephan

> 
>> 19:09:15.215: (dialog-show prefs: ⌘,)Error: New binding for 'Kontroll-T 1' 
>> is overriding old binding...
>> Error: New binding for 'Kontroll-T 2' is overriding old binding...
>> Error: New binding for 'Kontroll-T O' is overriding old binding...
>> Error: New binding for 'Kontroll-T T' is overriding old binding...
>> Error: New binding for 'Kontroll-T X' is overriding old binding...
>> 19:11:04.589: Öffne Dokument ~/Desktop/Minimal braucht X11.lyx...
>> 19:11:07.676: Dokument ~/Desktop/Minimal braucht X11.lyx ist geöffnet.
>> 19:11:07.678: (file-open /Users/ZZZ/Desktop/Minimal braucht 
>> X11.lyx)support/FileName.cpp (950): filetools(getFormatFromContents)
>> Couldn't find a known format!
>> support/FileName.cpp (832): filetools(getFormatFromContents)
>> File type not recognised before EOF!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>> Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>> Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>> Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>> Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>> Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>> Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>> Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>> Couldn't find a known format!
>> support/FileName.cpp (832): filetools(getFormatFromContents)
>> File type not recognised before EOF!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>> Couldn't find a known format!
>> support/FileName.cpp (832): filetools(getFormatFromContents)
>> File type not recognised before EOF!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>> Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>> Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>> Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>> Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>> Couldn't find a known format!
>> support/FileName.cpp (950): filetools(getFormatFromContents)
>> Couldn't find a known format!
>> support/FileName.cpp (832): 

Re: [Feature Request] python binding

2014-05-29 Thread Richard Heck

On 05/29/2014 04:57 PM, Rainer M Krug wrote:

"Alex Vergara Gil"  writes:

   Richard you obviously miss the point here, or I was not very clear!
it is not a different format, is a facility to have python scripts
running within LyX framework, you have to see ipython notebook to
understand what I mean, you will be surprised!!  Basically to build
graphs, for instance (and only a piece of what can be done), you add
the (let's call it) "knitpy" module and then place a knitpy insert,
write some python code that produces a matplotlib graphic and then
when lyx compiles the document, instead of the code it is shown the
graph, it also can be done in the lyx editing window, but thats a more
dificult request.
I might be *completely* off, but couldn't you achieve exactly this via
defining converters? I have for example a converter defined, which
"converts" plantuml source fields into uml graphs, i.e. it defines the
call to compile them and return the graphs which are then inserted in
the document?


Yes, that's more or less what I was suggesting.

rh



Re: [Feature Request] python binding

2014-05-29 Thread Richard Heck

On 05/29/2014 05:34 PM, Alex Vergara Gil wrote:


*From:* Richard Heck 
*Sent:* Thursday, May 29, 2014 3:26 PM

On 05/29/2014 03:36 PM, Alex Vergara Gil wrote:

Hello Lyxers
I wonder why LyX is not available to process little pieces of
python code within its own framework, like ipython notebook for
instance??

This feature allows us to have beautiful graphics such the one
produced by matplotlib package. I know there already exists a
similar binding for R through knitr module, so why not a binding
for python too??
Is there a way, like modules or whatever, to achieve the same
functionality or at least some basic functionality of ipython
notebook within LyX??

Can you be more precise about what you want to do? I've never
heard of ipython notebook.

sudo aptitude install ipython-notebook
ipython notebook

and there you can write even thesis in a web environment with python 
commands being executed inlined, exporting to pdf and latex too, it is 
a wonder of our times, so why not letting LyX do this miracle too??


Sweave works by our having an output format (sweave) for such
documentsand then our declaring Rscript as a sweave --> LaTeX
converter, so PDF export (say) goes via Rscript and pdflatex.
There's a special script in lib/scripts/ that "sets up some things
for LyX"first, or so it claims. It would be reasonably easy to do
the same sort of thing for Python, if you wanted to do so. You'd
just need to set up an appropriate format and then declare an
appropriate script as a whatever -> latex converter. Then LyX will
run the script and do as you wish with the embedded python code.

Of course, as we've discussed on the list with respect to R, there
are large security issues here, too.

Richard

you obviously miss the point here, or I was not very clear! it is not 
a different format, is a facility to have python scripts running 
within LyX framework, you have to see ipython notebook to understand 
what I mean, you will be surprised!!
Basically to build graphs, for instance (and only a piece of what can 
be done), you add the (let's call it) "knitpy" module and then place a 
knitpy insert, write some python code that produces a matplotlib 
graphic and then when lyx compiles the document, instead of the code 
it is shown the graph, it also can be done in the lyx editing window, 
but thats a more dificult request.


No, that's exactly what I had in mind: Python code inthe document that 
gets executed at compile timeto create graphsor tables---or delete all 
your files. ;-) Formats are a LyX-internal method for keeping track of 
such thingsas what stage of compilation a document is at. The file 
format wouldn't really be different.


Richard



Re: Image Format Conversion on OS X with Transmute

2014-05-29 Thread Jerry

On May 28, 2014, at 11:12 AM, James Dean Palmer  wrote:

> I recently wrote a little command line utility called transmute that converts 
> between various image formats using only the Quartz, CoreGraphics, and Cocoa 
> APIs.  Apple's sips utility can do the same sort of thing but, oddly, sips 
> doesn't support EPS or PS.
> 
> transmute also has some other neat tricks like clipboard support, input and 
> output from stdin/stdout and setting the page number for conversion (PDF 
> only). It's available here:
> 
> https://bitbucket.org/jdpalmer/transmute
> 
> Once installed, you just need to add this to your preferences file:
> 
> \converter "ps" "png" "transmute $$i $$o" ""
> \converter "eps" "png" "transmute $$i $$o" ""
> \converter "pdf" "png" "transmute $$i $$o" ""
> 
> And then there's no more dependency on ghostscript or XQuartz for EPS, PS, 
> and PDF image previews.
> 
> Best,
> James
> 
James, I haven't tried this but it looks awesomely awesome. Would you mind 
making a note on the LyX wiki about it? And maybe an indication, if not already 
present, how to install without brew, e.g., put in /some/path for those who 
don't know this.

And maybe you can help my confusion. PDF is listed as source-file only but the 
note about -n pageno sort of indicates that pageno can be applied to rendered 
PDFs. I'm probably misreading something.

Jerry



Re: [Feature Request] python binding

2014-05-29 Thread Scott Kostyshak
On Thu, May 29, 2014 at 3:36 PM, Alex Vergara Gil  wrote:
> Hello Lyxers
>
> I wonder why LyX is not available to process little pieces of python code
> within its own framework, like ipython notebook for instance??
> This feature allows us to have beautiful graphics such the one produced by
> matplotlib package. I know there already exists a similar binding for R
> through knitr module, so why not a binding for python too??
>
> Is there a way, like modules or whatever, to achieve the same functionality
> or at least some basic functionality of ipython notebook within LyX??

Hi Alex,

Have you tried using knitr for python? Attached is a simple example
and the output created. For more info, see
http://yihui.name/knitr/demo/engines/ . graphics and everything else
should also work, although you might need to add custom hooks (not as
hard as it sounds).

This might not be ideal because you have to have R installed (knitr is
still itself written in R). But I would be curious in your thoughts.

Scott


python_knitr.21.lyx
Description: application/lyx


python_knitr.21.pdf
Description: Adobe PDF document