News for hackers. Stuff that matters.
Re:JupyterLab LaTeX – live-editing of LaTeX documents in Jup... by thangalin on Monday May 17, 2021 @08:16PM (#27189917)
I took a different architectural approach with my plain text editor, KeenWrite[0]. Edit the document in plain text and plain TeX with a real-time preview, then generate the final stylized PDF using ConTeXt. In the screenshots[1], the "pdf themes" section shows a single source of truth being edited in the background with three different PDFs in the foreground: a manuscript format, a format using Baskerville, and a plain Times Roman-esque version.

This approach allows complete separation of content versus presentation, thanks to ConTeXt. (Although separating the two is possible with LaTeX, seldom does anybody do so.)

The motivation behind building yet another text editor, though, wasn't TeX integration; rather, I wanted a text editor that allows me to quickly and easily reference variables organized hierarchically[2].

[0]: https://github.com/DaveJarvis/keenwrite

[1]: https://github.com/DaveJarvis/keenwrite/blob/master/docs/scr...

[2]: https://www.youtube.com/watch?v=u_dFd6UhdV8

Re:JupyterLab LaTeX – live-editing of LaTeX documents in Jup... by Myrmornis on Monday May 17, 2021 @08:18PM (#27189925)
Plug: If you're an Emacs user, I've written an emacs LaTeX editing environment with automatic live rendering of LaTeX math, tables, and TikZ images. The images are rendered asynchronously using emacs-aio.

https://github.com/dandavison/xenops

Re:JupyterLab LaTeX – live-editing of LaTeX documents in Jup... by r-zip on Tuesday May 18, 2021 @10:21AM (#27194918)
Your project looks super interesting. I unfortunately haven't been able to get it to work with native-comp.
Re:JupyterLab LaTeX – live-editing of LaTeX documents in Jup... by Myrmornis on Tuesday May 18, 2021 @10:46AM (#27195301)
Hi, thanks. I hadn't tried emacs 28 with native-comp but I just tried it now and I did encounter some problems. They looked like problems with (unreleased) emacs 28, not native comp issues specifically, right? Do feel free to open an issue or let me know what problems you encountered in case I can help.
Re:JupyterLab LaTeX – live-editing of LaTeX documents in Jup... by anon_tor_12345 on Monday May 17, 2021 @08:06PM (#27189869)
Anyone that wants actually wysiwyg* editing for latex should use lyx which is absolutely fantastic. I've been writing latex for >10 years and I wish someone told me about it on day 1. It even integrates with a CAS if you're so inclined.

*Technically "what you see is what you mean" but I have no idea what the difference and whatever the subtle difference is, it has never affected my paper/presentation/hw work flow.

Re:JupyterLab LaTeX – live-editing of LaTeX documents in Jup... by dpflan on Monday May 17, 2021 @07:36PM (#27189668)
This looks interesting, and I like to see LaTeX made easier to work with. I recently used Overleaf [1] which was a pretty smooth experience.

[1] https://www.overleaf.com/

Re:JupyterLab LaTeX – live-editing of LaTeX documents in Jup... by physicsgraph on Monday May 17, 2021 @09:47PM (#27190468)
The Overleaf source code is available online [0], so you could even run your own instance.

[0] https://github.com/overleaf/overleaf

Re:JupyterLab LaTeX – live-editing of LaTeX documents in Jup... by gjvc on Tuesday May 18, 2021 @04:56AM (#27192539)
How complete is this? What features are in the paid-for edition that are not in the open source version?
Re:JupyterLab LaTeX – live-editing of LaTeX documents in Jup... by vaastav on Monday May 17, 2021 @06:14PM (#27189060)
As a potential user, I am quite unsure as to why I would use this over something like TexStudio or even VSCode enabled with some LaTeX plugins. Could you tell me/us some pro/cons of this?
Re:JupyterLab LaTeX – live-editing of LaTeX documents in Jup... by williamstein on Monday May 17, 2021 @06:32PM (#27189224)
I am the co-author of a very similar application (CoCalc for LaTeX) and our landing page https://cocalc.com/doc/latex-editor.html lists many of the reasons people use it. A number of the reasons apply also to JupyterLab LaTeX, or will soon. A quick summary: realtime collaboration, having the paper you're writing and the data you're computing in the same place, having a very high-resolution history of edits, using latex in course management, using a Chromebook or other lightweight client, and zero configuration support for PythonTex and R (knitr). Note that some of these reasons for using JupyterLab or CoCalc are things that https://www.overleaf.com/ doesn't provide.
Re:JupyterLab LaTeX – live-editing of LaTeX documents in Jup... by harles on Monday May 17, 2021 @07:15PM (#27189521)
Having your data and your reports all in one place seems like the big selling point and I see this as pretty exciting.
Re:JupyterLab LaTeX – live-editing of LaTeX documents in Jup... by mrlatinos on Monday May 17, 2021 @07:33PM (#27189643)
> realtime collaboration, ... having a very high-resolution history of edits

It's my understanding that JupyterLab doesn't support concurrent editing or version control, unless these are baked into this extension?

Re:JupyterLab LaTeX – live-editing of LaTeX documents in Jup... by williamstein on Tuesday May 18, 2021 @08:10AM (#27193595)
Coming soon - they just closed their concurrent editing ticket! :-). https://github.com/jupyterlab/jupyterlab/issues/5382#event-4...
Re:JupyterLab LaTeX – live-editing of LaTeX documents in Jup... by jdnier on Tuesday May 18, 2021 @01:58AM (#27191649)
Same here. It's the most painful limitation of Jupyter, in my experience.
Re:JupyterLab LaTeX – live-editing of LaTeX documents in Jup... by vinni2 on Monday May 17, 2021 @06:31PM (#27189212)
May be you could host it like overleaf? Eliminates the need to install latex which can be quite space consuming.
Re:JupyterLab LaTeX – live-editing of LaTeX documents in Jup... by adornedCupcake on Monday May 17, 2021 @08:20PM (#27189941)
Using texlive package manager plus a python auto-package installer wrapper for latexmk I was able to get my latex install down to a 300MB.
Re:JupyterLab LaTeX – live-editing of LaTeX documents in Jup... by activatedgeek on Tuesday May 18, 2021 @02:29AM (#27191797)
I don't quite understand the value of using a LaTeX editor in JupyterLab. For most purposes, JupyterLab already supports a subset of LaTeX within the Markdown cells.

Perhaps, the objective is to make JupyterLab the IDE for everything. I just hope JupyterLab doesn't go down the path of becoming everything for everything because honestly, I just don't see why the community's attention should be divided to solve problems that they aren't in the business of in the first place. But as a demonstration that you can run a latex compiler with JupyterLab plugins, great!

I recently started using Texpad [1]. A pretty fair $30/year/seat price point, if you want a local alternative to Overleaf [2]. Their incremental compilation is delightfully real-time; the lag from typing to rendering the PDF is virtually zero.

There are a few unsupported packages which I think are mostly not needed [3]. For instance, the minted package for code highlighting is something that I felt I needed, but then almost never do. The support for microtype package is hopefully coming soon. In any case, the usual fallback is available to MacTex and is supported within Texpad.

[1]: https://www.texpad.com

[2]: https://www.overleaf.com

[3]: https://www.texpad.com/docs/tutorials/tex/typesetters/texpad...

Re:JupyterLab LaTeX – live-editing of LaTeX documents in Jup... by nojito on Monday May 17, 2021 @08:37PM (#27190052)
I think this is one area where rstudio has the lead.

https://blog.rstudio.com/2020/09/30/rstudio-v1-4-preview-vis...

Re:JupyterLab LaTeX – live-editing of LaTeX documents in Jup... by heisenzombie on Monday May 17, 2021 @09:30PM (#27190377)
I wonder if this could be extended to provide a live preview of the LaTeX export of an '.ipynb' notebook?

The ease of creating custom nbconvert templates is slowly getting better, and that makes notebooks a pretty interesting platform for technical documents.

Re:JupyterLab LaTeX – live-editing of LaTeX documents in Jup... by airocker on Monday May 17, 2021 @10:16PM (#27190628)
I use overleaf to write latex and collaborate. It’s pricy at 15$ a month though.
Re:JupyterLab LaTeX – live-editing of LaTeX documents in Jup... by gjvc on Tuesday May 18, 2021 @04:54AM (#27192526)
Overleaf is open source, so you could run it locally.

https://github.com/overleaf/overleaf