53 ms·
Web-assembly powered WYSIWYG LaTeX Editor, supporting nearly all LaTeX package
- ivan_ah 7y agoWhaaaaaat. This is amazing! I know so many people who have difficulties collaborating on manuscripts the mismatch between skills document skills (life sciences vs. computer science), but thanks to WYSIWYG, they will now be able to collaborate. The checkpointing thing is very impressive... typing + update is near instant. Never seen that before.
- krackers 7y agoThe rendering happens in real-time when you type! Is this using pdflatex? Because I've never seen an editor with this low of a response time. Only slight nit is the blue progress bar/page load bar that appears across the top of the screen while you're typing is annoying. And the baseline kerning of the fonts in math mode seem a bit off: $$x^2 + 2x + 1$$ has the x in 2x a bit raised
- ulrikrasmussen 7y agoIt appears to be using a heuristic to update the PDF directly when you type, and then it periodically runs LaTeX to do global layout. Try putting the cursor before \LaTeX in the example document and input a few spaces. For me, it shifted the first characters into the later ones, perhaps because their heuristic couldn't detect that they are on the same line due to the vertical offset.
- xuejie 7y agoThis is indeed amazing! But I was wondering if it's possible to compile the whole TeXmacs into WebAssembly and have it in the browser. That will be a totally different world.
- alphagrep12345 7y agoOne thing I'd really like to see is the ability to adjust line spacing. It's insanely painful in latex, and a WYSIWYG editor would be amazing.
- linux2647 7y agoThis works surprisingly well on mobile. It’s not 100% usable, but it works
- ericjang 7y agoThis is incredible. I've never seen LaTeX render so fast; it almost feels like WYSIWYG editing.
- Slartie 7y agoOne of the key aspects about LaTeX that made me very productive with it was that I could just dump lots and lots of text pretty much directly from my brain into the plaintext editor, without thinking much about the intricate details of the layout. I suspect that an important "feature" that enabled this was the fact that I didn't have the exact layout present and visible in front of me all the time, but just the semantic aspects of it - until I manually triggered a compilation to actually get everything laid out. However, this is still an awesome editor, and I would probably have loved to use the near-instant WYSIWYG updates for more complex and layout-sensitive parts of papers, like tables and such. I'd just wish this editor would allow to disable the distracting layout rendering completely for "dump-text-from-brain" phases.
- PeterStuer 7y agoFor me it was the reverse. Layout and content always went hand in hand, with both engaging and influencing each other. I have noticed these different approaches, text as 'data' irrespective of presentation and text as an element part of a holistic piece of work, to be strongly preferred by different people and either of them struggling to be productive when mismatched.
- Toenex 7y agoThis is a good observation. Interestingly, I'm quite a visual writer in that the final form of the piece influences my writing. However, I still prefer the latex workflow of entering the text in a raw form coupled with regular compilation into the final layout. Perhaps as a developer of just feels more like coding to isolate and iterate.
- usrusr 7y agoI think that this is because the source form is visual as well and an author in the process of writing has completely different formatting needs than a reader.
- andrepd 7y agoExactly. My writing process is always sort of "two-phased". First get the content right, use semantic commands (section, theorem, keyword, algorithm listing, etc). For this the LaTeX plaintext is great, I define macros for everything that I'm going to use more than a couple of times that has a semantic meaning. Then, the second phase is adjusting the layout/typography to convey my meaning in the best way possible.
- babayega2 7y agoVery nice. Used ShareLatex back in the days. Now it is Overleaf[0]. I guess this will help to bring in competition. One of the benchmark I use to test Latex Editor is my Bachelor paper [1] written in French with all the accents and math symbols. I used that to test this new Latex editor and it seems not produce the PDF. But Texmaker ( my favorite) would just produce the PDF even if there are errors. [0]: https://www.overleaf.com/ https://www.overleaf.com/ [1]: https://bitbucket.org/iMitwe/my-thesis/src/master/inegalites.tex https://bitbucket.org/iMitwe/my-thesis/src/master/inegalites...
- xvilka 7y agoWith the development of pure Rust[1] TeX engine (based on XeTeX) it will be possible to compile into WebAssembly too. [1] https://github.com/crlf0710/tectonic https://github.com/crlf0710/tectonic
- fivre 7y agoWhile I don't doubt the utility of this at all, I am quite amused by the concept of WYSISYG LaTeX.
- pjmlp 7y agoWhy? It is almost as old as LaTeX. Not everyone enjoys programming their documents and visual editors for LateX written in Motif were the first ones to become available.
- stabbles 7y agoSome people I know literally share LaTeX math in emails and chats and assume my head has an internal LaTeX-compiler to understand it (usually I do). I guess this means people are really accustomed to writing maths in one go in LaTeX -- it's like the pseudo-code of maths.
- jordantours 7y agothanks to WYSIWYG
- savolai 7y agoI'm getting this on ios Safari when creating document: "Oops Error Detected! Looks like there was a problem when creating the project: DataCloneError: Failed to store record in an IDBObjectStore: BlobURLs are not yet supported."
- zekrioca 7y agoIt went very smoothly on Firefox.. Maybe this is a thing with iOS/Safari?
- ColinEberhardt 7y agoThis tool is very cool - however it appears to be written in JavaScript. I can't see any evidence of the use of WebAssembly.
- danappelxx 7y agohttps://github.com/search?utf8=&q=repo%3ASwiftLaTeX%2FSwiftLaTeX+extension%3Awasm&type=Code&ref=advsearch&l=&l= https://github.com/search?utf8=&q=repo%3ASwiftLaTeX%2FSwiftL...
- PudgePacket 7y agoBoot up the sandbox demo https://www.swiftlatex.com/oauth/login_oauth?type=sandbox https://www.swiftlatex.com/oauth/login_oauth?type=sandbox, it fetches and runs this wasm blob: https://www.swiftlatex.com/ide/js/fastlatex/cpdfetex.wasm https://www.swiftlatex.com/ide/js/fastlatex/cpdfetex.wasm
- conorliv1 7y agoThe typing update speed blows Overleaf out of the water. I've used Overleaf for the past 3 years. It's a great product, but one of my biggest complaints is slow LaTeX rendering. If this product were a bit more polished I would use it instead of Overleaf.
- LolWolf 7y agoYou should check out TexPad![0] It’s lovely and essentially real-time, with autocomplete, etc. I use it as my editor of choice for all of my papers (not that any of them have particularly challenging layouts). Really cannot recommend it enough. :) ——— [0] https://www.texpad.com/ https://www.texpad.com/
- porker 7y agoShame it's Mac only as it looks exceptionally good. Would love to use on Windows.
- fg6hr 7y agoA web grandmaster see I. Office365/GoogleDocs should be very interested in this stuff and by "very" I mean 50 millions at least (they burn way more money on complete bs projects). It's very likely that the author knows more than I do, but it seems reasonable to work out some sort of dual-licensing deal: one for corps who want to take it and develop further and one for smaller businesses who are ok with saas-ish solution.
- throwGuardian 7y agoI'm a big fan of LaTex, having used it for my thesis, presentation (beamer) and a few peer reviewed articles/jounals. With that disclaimer I can safely contend that Google/MSFT will not be interested in this. LaTex is for academic typesetting, with a special focus on math-y content. Even with WYSIWYG, every now and then one will need to get into the weeds of Tex syntax, which is simply not for the average computer user. As for academia, they will not pay a Google/Microsoft for LaTex use when they might as well use Lyx/Kile or their favorite editor with some syntax highlighting support for Tex. And unlike regular note taking, academic writing isn't so spontaneous that you start editing your IEEE manuscript on the pot, while on your phone. My guess is that the FAANG tribe have little incentive to commercialize this, and hence acquire it
- Double_a_92 7y agoIt would be a way to get all the techy academics onto some platform such as Office365. Once they are there they might start using other (paid) things on there.
- orhanhh 7y agoHave you checked out Overleaf? I would say they are proof that there is definitely a market. My university (40k students, 8k employees) has a deal with them where all students and employees get access to premium features, and they probably pay a decent chunk of money for that. They have published a list of institutions using Overleaf here: https://www.overleaf.com/for/universities https://www.overleaf.com/for/universities
- dsqrt 7y ago
- qxfys 7y agothis is absolutely amazing! Even though I prefer to write everything locally, I've been forced to use overleaf due to the fact that my collaborator forced me to do so. But, with this speed, I will probably throw away overleaf. :)
- svat 7y agoThis is amazing. • This seems to be their main page: https://www.swiftlatex.com/ https://www.swiftlatex.com/ • Not all the source code is on GitHub; crucially their modification of the TeX engine seems to be distributed only as the two `.wasm` binary files). Not sure if they plan to share more or not. • As mentioned in the FAQ/docs page, this is the work of just two people from New Zealand (Gerald Weber and Elliott Wen), and they have a paper about it from 2018 (“SwiftLaTeX: Exploring Web-based True WYSIWYG Editing for Digital Publishing”, DOI: 10.1145/3209280.3209522). Based on a quick skim so far, the paper looks fantastic, looking forward to reading it in more detail. • In the paper, Figure 5 and the surrounding text describe how TeX was modified (the part of most interest to me); it's really clever! To avoid modifying the data structures and introducing new bugs, they hook only into TeX's internal allocation functions for tokens. (TeX as originally written by Knuth does not use malloc() or equivalent; it does all its own allocation out of giant arrays called "mem" and "str".) They can then look up this bookkeeping when the token lists are being shipped out to PDF format. • Looks like it has some limitations as far as PS/PDF specials goes (aka “drivers” in the TeX world), so TikZ or tcolorbox don't work too well for example. However my guess is that this is just an issue with their PDF rendering (per the paper they use something like Pdf2htmlEX rather than pdf.js, for speed), and not a fundamental issue. • But otherwise most of the standard LaTeX features and packages seem to work (labels and cross-references, etc); you can \usepackage anything and it will download the corresponding files but no data leaves your system; everything happens in the browser. Heck I even pasted in xii.tex (without the final "jbye") and it works (can click on “partridge” in the PDF and go to the corresponding part of the source). • This sort of WYSIWYG editing for LaTeX has been done in a couple of proprietary systems before (BaKoMa TeX / Texpad), and some ancient systems as well (VorTeX), but they've been buggy in my limited experience. There was also a very impressive demo at this year's TUG meeting, by David Fuchs (who Knuth described as his “right-hand man” on the TeX project). All these projects have had to grapple with the same issues (achieving quiescence etc). This one seems to have its share of minor bugs (some artefacts seem to be visible in their published paper too!), so e.g. a feature to fully update the PDF after a (very) long typing pause (or manual user request) seems desirable. Nevertheless it's very impressive as it is. • I think some sort of engagement with the TeX community (the mailing lists at http://tug.org/texlive/lists.html http://tug.org/texlive/lists.html etc) may help: it appears their code is currently based on pdfTeX; they should probably consider XeTeX / LuaTeX as well (given that the doc page at https://swiftlatex.readthedocs.io/en/latest/ https://swiftlatex.readthedocs.io/en/latest/ mentions “Lack of Unicode Support”). There are experts there with some idea of corner cases, the weird things that users want, etc. Hope this becomes part of the TeX mainstream (what little there is of it) to benefit all users (good typesetting for everyone!) and not some sort of edge case that dies when/if the authors lose interest. Overall, am really awestruck by all this. Congratulations and good luck to the authors!
- porker 7y agoLyX [0] eat your heart out. It's good to see competition in this space as LyX's development has slowed the last few years. I still like it, but will be interested to try this alternative. 0. https://wiki.lyx.org https://wiki.lyx.org
- codeduck 7y agoI use Lyx as my primary tool for writing. I know it's clunky but it's as reliable as the tides.
- upofadown 7y agoLyX is WYSIWYM (What You See Is What You Mean). So an entirely different sort of thing. I guess you could argue that there is really no point to doing a WYSIWYG editor on top of LaTex. If it entirely works then the LaTex is just a internal layer that adds nothing but pointless complexity. WYSIWYM is the primary reason that people bother with LaTex in the first place. It's for the people that want the computer to do the work of laying out the text.
- dariosalvi78 7y agothis is excellent! My main reason for a web-based Latex editor is multi user editing. Overleaf/ShareLatex had it, but now they are closing it down and charging for it. An open source competitor, even if with less features than the commercial ones, is a great piece of news.
- pulse7 7y agoThis is great! It still needs some polishing (like autoscrolling the output to where I just made a change), but it FEELS really great!
- radarsat1 7y agoOut of curiosity, and in the context of Latex, does anyone know of a good self-hosted collaborative web-based editor with preview? Or even something decentralized that works over WebRTC?
- ketzu 7y agoIf you want one using latex, you can use open source self hosted overleaf variant. The worst part is the user management though, as they even keep somewhat sensible user management for the paid version.
- s_gourichon 7y agoFrom the referenced document : > Known bug lists > 1. WYSIWYG I agree. The first bug is that it is WYSIWYG. ;-) Oh that's not what they meant. Or is it a clever innuendo ? /Joke ## Praise of WYSIWYM (WYM for "what you mean") Seriously, I wrote my Ph.D. as LaTeX source code with the help of LaTeX-mode in Emacs, including colored syntax highlighting, and was/am very happy. As explained in a number of places, the point is to write for content without diluting your brainpower with appearance issues. Moreover it is a common experience that proofreading a rendered copy allows the brain to more easily find typos without the filtering effect that cause one to miss them in a document being edited WYSIWYG fashion. Also, editing source code has the nice property that there is no hidden state. Ever been annoyed in Word or Google Docs by undesired formatting conflict on a copy-paste? (yes I know "paste as plain text") Also, bullet list with some bullets having mysteriously different appearance from their siblings and you can't fix it. With sane source document editing these issues cannot happen. ## What next That said, imagine a hybrid future from assertions below: * I now use asciidoc as it is simpler to edit (much simpler for things like tables), and have a toolchain that renders it to PDF via LaTeX (the xsl-fo path was never near as visually clean). I wrote a LaTeX style for my personal freelancing company (quotes, invoices, reports, technical documentation) and the fact that one cannot deviate from the style is a feature. * Side-by-side source+rendered editing somehow can make sense. * There is practical educational value to let newcomers benefit from LaTeX power and rendering quality with the WYSIWYG they still perceive as comfortable, some will migrate to source editing. * This project could spawn some variants with other rendering engines. * Did they solve all the problems with cursor positioning (see "text editing hates you" mentioned here on HN recently) ? In many cases, several visual positions correspond to same source position and vice versa. * What will happen in practice is the tech will be applied to some other places, which is the very point of public research. That reminds me the project Boomerang. https://www.seas.upenn.edu/~harmony/ https://www.seas.upenn.edu/~harmony/ there is probably some common ground between those projects.
- superfist 7y agoPersonally I hate Tex/LaTeX and I think it should be replacted by something else long time ago. First of all syntax is horrible, if you don't work with it on daily basis try to figure out what macro you wrote one year ago is doing. Each time you have to jump to manual and learn almost everythig from very beginning. Next thing is lack of utf-8 and TrueType fonts supports (I know there is XeTeX and LuaTeX) but today such features such be in very core of text system no in some software branch. Extensibility is next thing and here again it is very poor unless you use something modern like LuaTeX or you are an expert in TeX macros. Packages dependency hell is next thing side by side with stupid compilation process with meaningless error messages. Am I the only one who think this way?
- porker 7y ago> Am I the only one who think this way? No. But redoing it all from scratch and getting mindshare is difficult. Substance.io is one project I've followed for years who aim to do this, and the time, false starts etc show just how tricky it is. https://twitter.com/_mql/status/1202200085288935430 https://twitter.com/_mql/status/1202200085288935430 One could argue that Adobe InDesign, Quark XPress et al are the replacement. They have the typesetting and layout capabilities that common software lacks.
- workthrowaway 7y ago> No. But redoing it all from scratch and getting mindshare is difficult. i think it's more because it does not really matter for most people. not because it's too difficult. there are companies today that can put the resources to the task. i am just going to assume that the priorities are elsewhere.
- jimhefferon 7y ago> Next thing is lack of utf-8 and TrueType fonts supports (I know there is XeTeX and LuaTeX) The two halves of that sentence seem to be in conflict. Could you say more?
- elaus 7y ago
- andrepd 7y agoDissapointing that it requires a Google account.
- jpdus 7y agoReally nice, the speed is way better than e.g. Overleaf. Is there any way to divide the screen horizontally instead of vertically for use with widescreens? Did not find an option at first glance.
- _emacsomancer_ 7y agoFortunately, the WYSIWYG-bit is non-mandatory. You can also edit the source directly. I assume Google Drive files can be simultaneously edited by multiple people? If so, then this represents a real competitor to Overleaf.
- Quanttek 7y agoAre there similar, "true WYSIWYG" LaTeX clients that are not web-based but native for one's platform? I know about Lyx but it's honestly quite disappointing in comparison to this project
- GnarfGnarf 7y agoI sat next to Prof. Knuth in 1982 at Stanford, while he did a demo of TeX on the university's DEC-10. I asked him what was next? He said: real-time, WYSYWIG display. At the time, the idea struck me as utterly impossible.
- xyproto 7y agoThe future is now.
- todd8 7y agoBack in the 80’s I worked as an OS software architect. I used to do a mental exercise occasionally. I would imagine how I would design things if processors were infinitely fast. Back then we were still following Moore’s law, even for single processor machines. Processor speed, memory size, disk speed, and network speed all put hurdles up for what we could do. I remember talking to a colleague about the possibility of a TeX system that would rerender a page as it was typed in one screen and viewed in another. Ok
- iliyangermanov 7y agoThis is incredible. The render speed is amazing!
- appleflaxen 7y agoI think it's really funny that swiftlatex is written in python! Somebody should write an application called pythonlatex in swift!
- sabujp 7y agoI'm getting a giant pink screen, this is broken.
- Weebs 7y agoGetting the same issue on the Master Thesis template in Firefox 71.0
- sabujp 7y agoi don't see anyone outside of math/csci/physics folks using latex. Almost all profs in chemistry, biology, pharmaceuticals, etc field just use word.
- velcrovan 7y agoTried creating a resume using one of the provided templates. Failed because XeLaTeX was required. Tried creating a Tufte-style book using the provided template. Failed because of a missing file.
- thekingofh 7y agoCan someone enlighten me on the benefits of LaTeX? I've never run across it or someone who uses it.
- chabons 7y agoSome people use it for everything, but I think it really shines in writing documents with heavy mathematical content due to the straightforward math syntax. There was a paper posted here a couple months ago that claimed that even expert LaTeX users wrote documents slower than novice Word users, but the interesting caveat is that LaTeX users were far faster across the board when the text included a lot of math.
- ska 7y agoIt's a markup language with a long history I won't get into. But that means it at least aims at separating content and presentation. Relative to producing a document in something like Word, it has a few real strengths. It's very good at:typesetting mathematical notation, typesetting different languages properly in the same document, and pretty good managing large complicated documents. It tends to do hyphenation breaks and spacing better than word processors. You can easily solve versioning and collaboration issues because the input is plain text (like source code, just version control it and use patches, PRs, etc.) This works better than "track changes" in practice, especially with multiple authors. So those are the upsides. Downsides: it's a bit esoteric, and clunky for lots of documentation tasks. The implementation is complex and the package/module system can step all over itself. If you have output that is nearly but not quite right, it can be a real bear to fix it. These days Markdown may be a better choice for a lot of simple documentation tasks where you don't care much about the final output presentation details. Any word processor can probably let you do some things more quickly. When I was a grad student I knew multiple people in STEM fields who tried to do their thesis in Word (or equivalent) and gave up in frustration, moving it all to LaTeX. I never knew anyone who successfully went the other direction. I don't know if that is still the case. If you use it a lot, you may find yourself wanting to use it for everything (letters, resumes, presentations, etc.) but many of those things aren't particularly strengths. If you don't use it a lot you will find it hard to come back to casually. One other strength I should mention, especially for automated documentation. Knuth was very particular about stability in TeX, and LaTeX has mostly-kinda-sorta followed this philosophy. So unless you have used a lot of marginal packages or something, it's entirely reasonable to expect that processing a 20 year old input will work fine using current builds. This is not something you can say of most systems.
- 1980phipsi 7y agoGoogle drive and dropbox are blocked at work for me...It would be nice if they had an option for if you don't want to save your work. Like just an in-browser editor without saving. Sometimes I just might want to write up some Latex and then copy it into something else. Nowadays I usually need to open up Lyx to do the same thing.
- 1980phipsi 7y agoAh, so the sandbox mode on github is what works for me. However, there is no link for it on the main page. Regardless, I suppose I was mistaken on what the project was. I assumed it was like a WYSIWYG version of Lyx in the browser. You're still writing Latex with this.
- philistine 7y agoThis seems like an incredible tool to increase adoption of TeX systems. It solves the problem of: I want to try my hand at TeX but you’re saying I have to install what now?
- _emacsomancer_ 7y agoOverleaf.com is another place to try out TeX without installing anything. (The free version is perfectly fine for almost anything other than collaborating with 3+ people on the same project.) The web interface isn't as nice as a proper text editor, but it's not too bad.
- vagab0nd 7y agoThis is interesting. I noticed that the first compilation is sort of slow (takes a couple seconds). But each subsequent small change is almost instant. How is this done? I'd imagine each tex->ps should take at least a few seconds.
- m0zg 7y agoEven works on my iPhone 11. Very cool.