LyX 2.4.0 & Jupyter Notebooks

Bernt Lie Bernt.Lie at usn.no
Wed Apr 10 14:32:20 UTC 2024


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 at 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 at 01DA8B61.C58642D0]



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

[cid:image004.png at 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 at 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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20240410/f5a9c904/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 4234 bytes
Desc: image001.png
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20240410/f5a9c904/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 22514 bytes
Desc: image003.png
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20240410/f5a9c904/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 28150 bytes
Desc: image004.png
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20240410/f5a9c904/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 14062 bytes
Desc: image002.png
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20240410/f5a9c904/attachment-0007.png>


More information about the lyx-users mailing list