I'm out of office, and read e-mail on a smartphone, so it is a little difficult 
to see the image. However, the Listing options menu with its 10-20 choices 
clearly illustrate the problem of creating totally inconsistent documents wrt 
style of listing. And the need for optionally defining named styles.

Is there a package for this? I think it is so important that it should be 
built-in.

Best regards
Bernt

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: Bernt Lie
Sent: Thursday, January 18, 2018 9:00:46 AM
To: Joel Kulesza
Cc: lyx-devel@lists.lyx.org
Subject: Re: LyX & feature wishes

On Jupyter & LyX:

See presentation by noted researcher Randall J LeVeque (numerics of hyperbolic 
PDEs) on how to produce a LaTeX book from Jupyter Notebook; I find this very 
interesting:

https://m.youtube.com/watch?v=mC_RERKi56c

I currently develop examples partly in Jupyter, and need to integrate them in 
LyX documents.

Best regards
Bernt

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: Joel Kulesza <jkule...@gmail.com>
Sent: Thursday, January 18, 2018 8:00:41 AM
To: Bernt Lie
Cc: lyx-devel@lists.lyx.org
Subject: Re: LyX & feature wishes

On Mon, Jan 15, 2018 at 2:51 AM, Bernt Lie 
<bernt....@usn.no<mailto:bernt....@usn.no>> wrote:
1.       I have spent tens of hours trying to get a consistent look for Program 
Listing. It would be really, really helpful if I can assign a Program Listing 
to a “program listing group”, where I define computer language, possible 
numbering of lines, location of line numbering, fonts for line numbering, fonts 
for code, line breaks, tabs, etc.,etc. Thus, I’d like to be able to define 
groups such as “Displayed-MATLAB”, “InLine-MATLAB”, “Displayed-Python”, etc., 
etc. Such a possibility would be priceless for getting a consistent look.

I'm not sure about in-line use; however, I've defined a style for the 
"listings" package that colors language keywords, strings, etc. consistently 
across languages. See this gist: 
https://gist.github.com/jkulesza/d76be674d902d4e65f1fbc5c9d3d56fe and the 
attached screenshot.  Note that when I use a program listing I only need to 
specify the language to obtain highlighting.

2.       Similarly: styles for Floats would be useful. By default, all floats 
seem to be left adjusted. I tend to use center adjustment of figures/tables and 
caption. If I could set a default, or define a group – that would be useful.

This is a mechanism I'd also like to have. You might be interested in the 
discussion here: https://www.lyx.org/trac/ticket/8665.  In particular, and in 
the meantime, you might be interested in using JMarc's snippet from that 
conversation:

\g@addto@macro\@floatboxreset{\centering}

in your preamble to achieve the desired effect.  However, floats aren't 
reflected as centered in the LyX interface.

Some integration of Jupyter Notebook/Lab with LyX??


5.       I tend to more and more use Jupyter Notebooks when I develop examples 
in courses, etc. (and soon: Jupyter Lab). Jupyter Notebooks are notebooks that 
are opened and run in a web browser, and currently supports some 40 computer 
languages (Jupyter  originally referred to Julia, Python and R). In a Jupyter 
Notebook, I can download the document as LaTeX. Such notebooks have a simple 
markdown system for defining document structure.

I've used Jupyter (and before that IPython) somewhat extensively.  However, I'm 
not sure I see a use case for combining both pieces of software.  Maybe you can 
describe how you would integrate Jupyter and LyX together in your workflow 
(maybe I can improve my own workflow)?  Because of Jupyter's simple markdown 
and ability to export integrated documentation, code, and results, I don't see 
what part LyX plays.  In this instance, I keep both tools available and select 
the one that will suit my task better: interactive documentation/investigative 
coding or archival documentation.


b.       I will use such Notebooks more and more in the future, and it would be 
extremely useful if I could import then in an easy way into LyX.

Here I've used the pdfpages 
package<http://texdoc.net/texmf-dist/doc/latex/pdfpages/pdfpages.pdf> to 
include PDFs from Jupyter (or other tools) embedded in the containing 
LyX-produced PDF.


c.       It would also be useful if there was a simple way to copy math from 
LyX, and insert it into Jupyter Notebooks. Currently, multiline math doesn’t 
fare well.

If you use View -> Source Pane (in 2.2.3), you can see the LaTeX equation code 
that can be copied/pasted into Jupyter.  See attached screenshot (sorry for 
economizing two very different responses into the same PNG).

Sorry also for a response full of hacks, but I've had similar types of needs 
and these are the expedient albeit inelegant solutions I've used.

Regards,
Joel

Reply via email to