RE: LyX 2.4.0 & Jupyter Notebooks

2024-04-10 Thread Bernt Lie via lyx-users
Experimenting with LyX 2.4 RC4... Specifically, I'm testing whether there is 
Unicode support.



  *   I have successfully pasted in a Unicode character from VSCode into a LyX 
2.4 RC4 document, so this seems to work:

[cid:image001.png@01DA8B60.FFE8A950]

Here, the first symbol is produced in VSCode using "\frakm + TAB", and then 
pasted into a LyX text line.  The second occurrence (slightly different in 
form) is produced as in-line math "\mathfrak{m}".



I can also decorate this symbol with a dot on top, "\frakm + TAB \dot + TAB" in 
VSCode. When I paste this symbol into LyX, the dot on top of "\frakm + TAB" is 
somewhat skewed to the right.



OK - so Unicode in LyX seems to work. It also works if I preview the document 
as a PDF file.

--

Next, I try to use Unicode in listings. That does not work at the moment... 
Here is what I do:

  *   Insert/Program Listing
  *   I paste the "\frakm + TAB" symbol from VSCode into this box.
  *   This gives a paste error message:

[cid:image003.png@01DA8B61.C58642D0]



  *   I then go to Document/Settings/Listings, and change Syntax Highlighting 
Package to *minted*, which provides a message:

[cid:image004.png@01DA8B62.5053B550]



I don't understand this message...

  *   I'm on Windows, and the documentation says that Pygments driver is 
installed by default (??). Anyways, reading this warning...
  *   Where am I supposed to place command "\AtBeginDocument{...}"?? Are we 
talking about putting this command in the Document/Settings/LaTeX Preamble 
window??? Or should I open the LyX document in an ASCII editor and add the 
line... somewhere?
  *   What is the "driver command", i.e., the string I'm supposed to insert 
instead of `driver`? Is it simply `pygmentize`??

  *   Anyways, for now I just neglect this command, and go to 
Tools/Preferences/File Handling/Converters, and scroll down to

[cid:image002.png@01DA8B63.945591F0]

Here I have changed Converter from `pdflatex $$i` to what is shown above.



When I go back to the document and insert a listing, and then paste the Unicode 
symbol into the listing, I get the same error message with paste error as shown 
at the top of this e-mail.



--

So - I'm stuck. The only possible reason for the problem now are:

  *   I need to find the correct place to insert the string 
"\AtBeginDocument..." string with the correct `driver` (whatever that is), and 
live with the warning of mint & `-shell-escape` causing a security risk. 
Perhaps this will solve the problem.
  *   Or: it is not possible to use Unicode characters in LyX 2.4 listings.



Any suggestions?



-B


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


RE: LyX 2.4.0 & Jupyter Notebooks

2024-04-10 Thread Bernt Lie via lyx-users
Ah. OK.

-Original Message-
From: lyx-users  On Behalf Of Pavel Sanda
Sent: Wednesday, April 10, 2024 2:51 PM
To: lyx-de...@lists.lyx.org; lyx-users 
Subject: Re: LyX 2.4.0 & Jupyter Notebooks

On Wed, Apr 10, 2024 at 12:11:08PM +, Bernt Lie wrote:
> > knitr integration...
> 
> Thanks.
> 
> I don't use R, so I guess knitr is not useful to me.

I did not mean that you will use R, but that you can check how knitr scripts 
establish two-way communication street and reuse it for jupyter instead of R

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


Re: LyX 2.4.0 & Jupyter Notebooks

2024-04-10 Thread Pavel Sanda
On Wed, Apr 10, 2024 at 12:11:08PM +, Bernt Lie wrote:
> > knitr integration...
> 
> Thanks.
> 
> I don't use R, so I guess knitr is not useful to me.

I did not mean that you will use R, but that you can check how knitr scripts
establish two-way communication street and reuse it for jupyter instead of R

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


RE: LyX 2.4.0 & Jupyter Notebooks

2024-04-10 Thread Bernt Lie via lyx-users
> knitr integration...

Thanks.

I don't use R, so I guess knitr is not useful to me. [In in the JU corner of 
Jupyter...] There is also Quarto which is developed in the R community, 
although it can also be used with other languages. Don't know how Quarto scales 
to large documents, though... My experience is that Jupyter Notebooks start to 
become slow with documents in the order of some 30 pages (i.e., with plenty of 
plots), while LyX is still quick with documents in the order of 1000 pages.

-B

-Original Message-
From: lyx-users  On Behalf Of Pavel Sanda
Sent: Wednesday, April 10, 2024 11:05 AM
To: lyx-de...@lists.lyx.org; lyx-users 
Subject: Re: LyX 2.4.0 & Jupyter Notebooks

On Tue, Apr 09, 2024 at 11:37:48AM -0400, Richard Kimberly Heck wrote:
> On 4/9/24 08:48, Bernt Lie wrote:
> >Is there a way to import Jupyter Notebooks into LyX 2.4.0 (when v. 2.4.0 is 
> >released)?
> >
> >I'm particularly interested in the possibility to...
> >
> >* link the notebooks into LyX so that I always get the latest 
> >version/computations in the notebook, i.e., preferably not a static 
> >import
> >
> >* inclusion of mark-up text with headlines, math, etc.
> >
> >* inclusion of input and output cells, with figures, etc.
> >
> >* linked-in notebooks would be multipage. Perhaps it should be possible to 
> >embed the notebooks in some theorem-like environment.
> >
> >OK -- don't know if this is possible, but it would go a long way towards 
> >getting a literal programming environment.
> 
> The most plausible way to do this would be to use an external inset. 
> That's the way that Lilypond files (music) are included, for example. 
> Such insets are user definable. Basically, you tell LyX how to convert 
> the file to something LaTeX can process. This is discussed in section 
> 7.1 of the Embedded Objects manual. You can use the existing xtemplate 
> files as a starting point, too.

You might also want to check how knitr integrates into lyx (basically embedding 
R code into lyx).

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


Re: LyX 2.4.0 & Jupyter Notebooks

2024-04-10 Thread Pavel Sanda
On Tue, Apr 09, 2024 at 11:37:48AM -0400, Richard Kimberly Heck wrote:
> On 4/9/24 08:48, Bernt Lie wrote:
> >Is there a way to import Jupyter Notebooks into LyX 2.4.0 (when v. 2.4.0 is 
> >released)?
> >
> >I'm particularly interested in the possibility to...
> >
> >* link the notebooks into LyX so that I always get the latest 
> >version/computations in the notebook, i.e., preferably not a static import
> >
> >* inclusion of mark-up text with headlines, math, etc.
> >
> >* inclusion of input and output cells, with figures, etc.
> >
> >* linked-in notebooks would be multipage. Perhaps it should be possible to 
> >embed the notebooks in some theorem-like environment.
> >
> >OK -- don't know if this is possible, but it would go a long way towards 
> >getting a literal programming environment.
> 
> The most plausible way to do this would be to use an external inset. That's
> the way that Lilypond files (music) are included, for example. Such insets
> are user definable. Basically, you tell LyX how to convert the file to
> something LaTeX can process. This is discussed in section 7.1 of the
> Embedded Objects manual. You can use the existing xtemplate files as a
> starting point, too.

You might also want to check how knitr integrates into lyx (basically embedding
R code into lyx).

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


Re: LyX 2.4.0 & Jupyter Notebooks

2024-04-09 Thread Richard Kimberly Heck

On 4/9/24 15:59, Bernt Lie wrote:

OK -- so I could just as well start using RC4?


I have been using the master branch for regular work for well over a 
year. My recent book


    https://academic.oup.com/book/56184

was produced using it. I.e., the book was printed from a PDF I provided 
to OUP. So it's entirely usable.



I'm not super software savvy, so I have been hesitant not knowing:
* Can I install RC4 and still use LyX 2.7.1?
That may depend upon your OS, but someone else should be able to say. 
The one thing you have to do is keep the user directories separate.

* Do I have to uninstall RC4 and install the official release when it becomes 
available?

Again, that will depend upon your OS.

* With 2.7.1, I have used MikTeX. Should I still use MikTeX, or use something 
else? (Does MikTeX also come with LuaTeX, XeTeX, TeXLive, or whatever?)


The background TeX installation should not matter. They all have the 
same bits. (TeXLive, though, is an alternative to MikTeX.)


Riki


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


RE: LyX 2.4.0 & Jupyter Notebooks

2024-04-09 Thread Bernt Lie via lyx-users
OK -- so I could just as well start using RC4?

I'm not super software savvy, so I have been hesitant not knowing:
* Can I install RC4 and still use LyX 2.7.1?
* Do I have to uninstall RC4 and install the official release when it becomes 
available?
* With 2.7.1, I have used MikTeX. Should I still use MikTeX, or use something 
else? (Does MikTeX also come with LuaTeX, XeTeX, TeXLive, or whatever?)

If these three bullet points do not cause any problems, I may try to download 
and use RC4.
 

-Original Message-
From: Richard Kimberly Heck  
Sent: Tuesday, April 9, 2024 9:51 PM
To: Bernt Lie ; LyX Developers ; 
lyx-users 
Subject: Re: LyX 2.4.0 & Jupyter Notebooks

On 4/9/24 12:00, Bernt Lie wrote:
> Thanks. Will look at it when the new version is released.

I don't think there have been any major changes in that machinery. And there 
definitely won't be any before the final release. Changes from RC4 to the 
official release are going to be pretty minor (as one would hope).

Riki


> -Original Message-
> From: Richard Kimberly Heck 
> Sent: Tuesday, April 9, 2024 5:38 PM
> To: Bernt Lie ; LyX Developers 
> ; lyx-users 
> Subject: Re: LyX 2.4.0 & Jupyter Notebooks
>
> On 4/9/24 08:48, Bernt Lie wrote:
>> Is there a way to import Jupyter Notebooks into LyX 2.4.0 (when v. 2.4.0 is 
>> released)?
>>
>> I'm particularly interested in the possibility to...
>>
>> * link the notebooks into LyX so that I always get the latest 
>> version/computations in the notebook, i.e., preferably not a static 
>> import
>>
>> * inclusion of mark-up text with headlines, math, etc.
>>
>> * inclusion of input and output cells, with figures, etc.
>>
>> * linked-in notebooks would be multipage. Perhaps it should be possible to 
>> embed the notebooks in some theorem-like environment.
>>
>> OK -- don't know if this is possible, but it would go a long way towards 
>> getting a literal programming environment.
> The most plausible way to do this would be to use an external inset.
> That's the way that Lilypond files (music) are included, for example.
> Such insets are user definable. Basically, you tell LyX how to convert 
> the file to something LaTeX can process. This is discussed in section
> 7.1 of the Embedded Objects manual. You can use the existing xtemplate files 
> as a starting point, too.
>
> Riki
>
>

--

Richard Kimberly (Riki) Heck
Professor of Philosophy
Brown University

Pronouns: they/them/their
Website:  http://rkheck.frege.org/

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


Re: LyX 2.4.0 & Jupyter Notebooks

2024-04-09 Thread Richard Kimberly Heck

On 4/9/24 12:00, Bernt Lie wrote:

Thanks. Will look at it when the new version is released.


I don't think there have been any major changes in that machinery. And 
there definitely won't be any before the final release. Changes from RC4 
to the official release are going to be pretty minor (as one would hope).


Riki



-Original Message-
From: Richard Kimberly Heck 
Sent: Tuesday, April 9, 2024 5:38 PM
To: Bernt Lie ; LyX Developers ; lyx-users 

Subject: Re: LyX 2.4.0 & Jupyter Notebooks

On 4/9/24 08:48, Bernt Lie wrote:

Is there a way to import Jupyter Notebooks into LyX 2.4.0 (when v. 2.4.0 is 
released)?

I'm particularly interested in the possibility to...

* link the notebooks into LyX so that I always get the latest
version/computations in the notebook, i.e., preferably not a static
import

* inclusion of mark-up text with headlines, math, etc.

* inclusion of input and output cells, with figures, etc.

* linked-in notebooks would be multipage. Perhaps it should be possible to 
embed the notebooks in some theorem-like environment.

OK -- don't know if this is possible, but it would go a long way towards 
getting a literal programming environment.

The most plausible way to do this would be to use an external inset.
That's the way that Lilypond files (music) are included, for example.
Such insets are user definable. Basically, you tell LyX how to convert the file 
to something LaTeX can process. This is discussed in section
7.1 of the Embedded Objects manual. You can use the existing xtemplate files as 
a starting point, too.

Riki




--

Richard Kimberly (Riki) Heck
Professor of Philosophy
Brown University

Pronouns: they/them/their
Website:  http://rkheck.frege.org/

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


RE: LyX 2.4.0 & Jupyter Notebooks

2024-04-09 Thread Bernt Lie via lyx-users
Thanks. Will look at it when the new version is released.

-Original Message-
From: Richard Kimberly Heck  
Sent: Tuesday, April 9, 2024 5:38 PM
To: Bernt Lie ; LyX Developers ; 
lyx-users 
Subject: Re: LyX 2.4.0 & Jupyter Notebooks

On 4/9/24 08:48, Bernt Lie wrote:
> Is there a way to import Jupyter Notebooks into LyX 2.4.0 (when v. 2.4.0 is 
> released)?
>
> I'm particularly interested in the possibility to...
>
> * link the notebooks into LyX so that I always get the latest 
> version/computations in the notebook, i.e., preferably not a static 
> import
>
> * inclusion of mark-up text with headlines, math, etc.
>
> * inclusion of input and output cells, with figures, etc.
>
> * linked-in notebooks would be multipage. Perhaps it should be possible to 
> embed the notebooks in some theorem-like environment.
>
> OK -- don't know if this is possible, but it would go a long way towards 
> getting a literal programming environment.

The most plausible way to do this would be to use an external inset. 
That's the way that Lilypond files (music) are included, for example. 
Such insets are user definable. Basically, you tell LyX how to convert the file 
to something LaTeX can process. This is discussed in section
7.1 of the Embedded Objects manual. You can use the existing xtemplate files as 
a starting point, too.

Riki


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


Re: LyX 2.4.0 & Jupyter Notebooks

2024-04-09 Thread Richard Kimberly Heck

On 4/9/24 08:48, Bernt Lie wrote:

Is there a way to import Jupyter Notebooks into LyX 2.4.0 (when v. 2.4.0 is 
released)?

I'm particularly interested in the possibility to...

* link the notebooks into LyX so that I always get the latest 
version/computations in the notebook, i.e., preferably not a static import

* inclusion of mark-up text with headlines, math, etc.

* inclusion of input and output cells, with figures, etc.

* linked-in notebooks would be multipage. Perhaps it should be possible to 
embed the notebooks in some theorem-like environment.

OK -- don't know if this is possible, but it would go a long way towards 
getting a literal programming environment.


The most plausible way to do this would be to use an external inset. 
That's the way that Lilypond files (music) are included, for example. 
Such insets are user definable. Basically, you tell LyX how to convert 
the file to something LaTeX can process. This is discussed in section 
7.1 of the Embedded Objects manual. You can use the existing xtemplate 
files as a starting point, too.


Riki


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


LyX 2.4.0 & Jupyter Notebooks

2024-04-09 Thread Bernt Lie via lyx-users
Is there a way to import Jupyter Notebooks into LyX 2.4.0 (when v. 2.4.0 is 
released)? 

I'm particularly interested in the possibility to...

* link the notebooks into LyX so that I always get the latest 
version/computations in the notebook, i.e., preferably not a static import

* inclusion of mark-up text with headlines, math, etc.

* inclusion of input and output cells, with figures, etc.

* linked-in notebooks would be multipage. Perhaps it should be possible to 
embed the notebooks in some theorem-like environment.

OK -- don't know if this is possible, but it would go a long way towards 
getting a literal programming environment. 

-B

-Original Message-
From: lyx-users  On Behalf Of Rich Shepard
Sent: Monday, April 1, 2024 11:58 PM
To: LyX Developers ; lyx-users 

Subject: Re: LyX 2.4.0 RC4

On Sun, 31 Mar 2024, Richard Kimberly Heck wrote:

> What we hope will be the final release candidate for 2.4.0 is now 
> available
> here:
> http://ftp.lyx.org/pub/lyx/devel/lyx-2.4/
>
> Please report bugs to lyx-de...@lists.lyx.org.

Riki,

Just upgraded from 2.3.7.1 to 2.4.0~RC4 on Slackware64-15.0 on a ThinkPad T430; 
no bugs seen crawling around. The issues that bugged me in 2.3.6.2 and
2.3.7.1 (not finding biblatex.sty and biber, needing to use the File menu to 
export a pdflatex because c-x h wouldn't work) are gone.

I had a concern about Tools -> Preferences -> Look & Feel -> Display showed 
Default when I use emacs turned out that (at least on my system) emacs key 
chords are the default.

Congratulations and many thanks to all devs.

Best regards,

Rich

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