LyX is a LaTeX frontend, you still need to understand some notions of LaTeX.
MonsterWriter is a WYSIWYM Word Processor, LaTeX is just used as internal tool to create PDF files. There are other exports available (e.g. HTML, Markdown, you also can publish to Ghost directly)
LaTeX needs replacing with something faster and more program-y, and that isn't just a python script.
LateX's successor should be opinionated, safe, easy to build in parallel, and also good at integrating with other tooling:
Let a CAS generate the next equation for you, for example.
Make sure that figure is never out of date (e.g. a build system rather than relying on a web of files and button clicks)
Etc.
This will likely never happen because latex is still very good at what people want it to do push comes to shove, but we could have a much better document format and publishing system around it.
LuaLaTeX is a lot slower than pdfLaTeX or XeLaTeX and default settings give different output than the other two, e.g., around line breaks at – or —. I only recommend it if you need it. Most people don't.
I don't know that this is the major pain point. The thing is, writing complex-structure/programmed documents is not something which needs immediate re-rendering with every character - just like you don't recompile your program with every character you change.
This would, however, be very useful for syntax and compiler-detectable error. You would have an effectively-immediate indication of warnings and errors per line in your document, like an IDE. So it would be Java-like compilation speed rather than C++-like compilation speed...
> safe
LaTeX programming is basically sandboxed, or at least you have to work _very_ hard to do dangerous things.
> latex is still very good at what people want it to do
That's not it. It is actually usually pretty bad in doing what we want it to do (e.g. tables. Oh, the pain!) ... but what it has going for it is that you can do almost anything you want?: It will take effort and the "source code" will be ugly, but it'll work.
Please no. Stop replacing useful tools with "opinionated" ones. Nothing makes me nope out of using a tool faster than hearing it described as "opinionated".
For anyone with a software background, this is pretty straightforward - once you start thinking of the latex file(s) as source code rather than the document, it's a short jump to setting up a build environment...
You can embed CAS-generated equations and computations in LaTeX[1]. This came in handy for undergraduate linear algebra homework that combined proofs (where I could use my existing LaTeX macros) and computations (where we were expected to use a CAS). Mathematica or Jupyter notebooks would also work, but I prefer Emacs over the notebook UI (and Jupyter didn't actually exist at the time).
I have a related feeling about TeX. It has superb output quality but the programming is awful. When LuaTeX finally arrived a few years ago, it was possible to do almost everything you have done before in the TeX language (starting with \backslashes) in Lua.
I have (shameless plug) created a database publishing software using this technique (https://github.com/speedata/publisher/). Once in a while I have to use LaTeX and it feels a bit old school to do the macro programming.
My next project is to rewrite the TeX algorithms in Go - see https://github.com/speedata/boxesandglue. Already usable but not TeX like in any way (this is just a library, not a frontend software like TeX)
I feel the same way! I also feel like the LaTeX crap on top of Plain TeX is crap and it fills me with rage when I try to find info about TeX and always get back something assuming LaTeX.
Various senses that concur.
It has, in addition to the line-breaking algorithm, a global page-breaking algorithm ... and for the rest may I suggest reading (it's brief) section 4.2 of GNU TeXmacs, A free, structured, wysiwyg and technical text editor, J. Van der Hoeven, Cahiers GUTenberg, no. 39-40 (2001), pp. 39-50, that you can find at the official website of the journal at http://www.numdam.org/article/CG_2001___39-40_39_0.pdf
You sometimes see people ask fairly simple Python questions on Stack Overflow, that could be solved by five lines of plain Python, and be answered with some Pandas magic incantation that happens to do what they want with one call. I always find this a bit sad, because it seems to take away the idea that programming is about assembling composable parts, replacing it by a search for the right magic thing from a box of ready-made magic things.
(Plain)TeX always seems the opposite of this. There is never a keyword that does what you want, but you can always do it by using five different mechanisms in concert. You always feel like you are trying to trick the system into doing something it was not designed for.
> You always feel like you are trying to trick the system into doing something it was not designed for.
This is one of the hallmarks of human civilization.
Your hands were designed for throwing a stone at the eye of a mammoth. But you can play the violin with them! Yes; it is totally awkward and anti-natural for your hands, obviously not their intended purpose... but so beautiful!
No, its definitely relevant. Hands were not designed with any specific function in mind. There was not evolutionary pressure to "throw rocks at the eye of a mammoth"
Did orangutans evolve hands to throw rocks at mammoths? No, they did not
The parent comment is making ridiculous claims without evidence
You've smoothly shot right past solid ground (evolution doesn't design things) to a fairly wild claim (rock-throwing apes didn't experience evolutionary pressure to get better at throwing rocks).
Orangutans aren't humans, so what are you saying, apes which don't throw rocks to kill their prey don't... throw rocks to kill their prey?
Like complex brains are evolutionarily fit because they can solve lots of disparate problems, hands are evolutionarily fit because they can do lots of disparate things.
Of course, we do also then design violins for our specific dexterity.
The poster didn't say "hands", they said "your hands".
Your human hands, which co-evolved with throwing things, we have abundant paleontological evidence of this and you may read as many papers on the subject as you would care to.
I think you're assigning too much weight to the word itself. In
informal settings, or even quasi-formal ones, it's not uncommon to use "designed" when we don't mean "literally designed".
The use of "design" in the context of the structure and capability of human bodies means precisely "literally designed" to many religious people, including many readers of HN.
So I don't think it's out of place for the GP to address this.
Thank you. This was exactly the point of my comment. While some readers interpret the word lightly, there are many who use it literally in the context of biology with a reference to creationism. There is no evidence for creationism
I'd go so far to say that linguistically nature is the antithesis of artificial (made by hands).
Avoiding silly theological tropes, evolution is often mistakenly referred to as a designer when it's just an emergent property of competing, replicating agents. People don't normally bother with precision though, so we are where we are.
I always like to see it the other way around, it eliminates entities that are not a good fit, and the remainder is what drives adaptation. Of course, people could argue that's just like Michelangelo [1], and we're back at 'designed'.
[1] “The sculpture is already complete within the marble block, before I start my work. It is already there, I just have to chisel away the superfluous material.”
But evolution doesn't eliminate entities. Low fitness entities are eliminated by hunger, or predators, or lower reproductive rates.
The marble on the other hand is eliminated by Michelangelo.
There's a linguistic confusion where because evolution is a noun, we think we can treat it as a subject. But in the person/place/thing/idea delineation, it is an idea.
Not only does it not design, not only does it not eliminate: "it" doesn't do anything!
Of course 'evolution' is not an actor, it's just the overall pattern we give a name to. And the pattern we observe is that low fitness entities are eliminated. That plus variation yields adaptation.
The process of evolution is more than just the elimination of unfit specimens. That suggests that a tiger is just a tiger, and the only kind of evolution that can occur in the tiger is for it to become a better (faster, stronger) tiger. But in fact there was a time when carnivores didn't even exist, and then some random genetic flux produced an animal that was inclined to start eating other animals and a new ecological niche was discovered. Evolution is therefore a creative process of adaptation and specialization under constantly changing circumstances.
Not at all. Everything can come from variation (mutation, cross over) + elimination of the worst. It's just that 'worst' is not a global minimum. Are we as humans superior to animals in strength, agility, speed, etc? Not at all. But some distant ancestor had some bigger brain, and that gave it all the edge it needed compared to weak and dumber siblings that were eaten, while our ancestor hid on a tree.
When some animal mutated to be able to eat meat in addition to plants, it had some advantage and was less likely to be eliminated when food got scarce. That's all you need to eventually arrive at something tiger-like.
That said, some animals seem to have reached a local maximum: sharks haven't changed in millions of years, cockroaches seem pretty successful, too.
If you consider a "design" to result from a process where someone sketches out a plan, builds it, and it works first time. I've designed a lot of systems, and it is clearly an iterative process. Balancing tradeoffs, figuring out the essentials, build prototypes, test, etc. If you are patient and diligent a solution emerges. That sounds a lot like evolution, so in my mind everything in nature has been designed by the collective intelligence of an iterative process that rewards useful optimizations.
There is no plan in evolution. That's the point. It's a reactionary phenomenon. If it had a plan, it would be a proactive phenomenon. Evolution is happenstance.
The nice thing about a goal, is that one goal begets other sub-goals.
Or rather, a goal begets a strategy, and a strategy begets sub-goals. Beautifully at some point these sub-goals start being optimized for. A few steps of this is how I believe humans went from the sub goal "Survive, eat, reproduce" to "Make art, understand life, explore the world".
The cool thing is that I think this extends beyond humans to tools. Because at some point humans had a sub-goal of "hit thing hard" they made a hammer. And this hammer has a goal (or a purpose) which is "hit things hard". This purpose can be traced back, through human sub-goals, to the final goal of evolution: "reproduce".
Note that I am not saying that the point of a hammer is to produce more hammer. But the point of a hammer is (very indirectly) to allow a human to reproduce.
Interestingly there is a weird game of telephone that can happen, where the sub-goals are imperfect for achieving the final goal. I would argue that this is (part of) why humans can be truly selfless. Take a soldier going to a battle he considers unwinnable but going out of a sense of duty / fear of ridicule. This will not help him reproduce, since the battle is unwinnable it will not help his progeny reproduce either. From the 'ultimate' goal, this is an irrational step.
But there are sub-goals at play. Things like "be honorable", "do your duty".
This idea that a sub-goal can subvert the 'ultimate' goal is very beautiful to me. It means that evolution is not some tyranny that sets our purpose in life. Instead evolution brought 'purpose' into the world. And then some stochastic process put you and me on into the universe with some, vaguely related, sense of purpose. But we have our own purpose. Sure our purpose was 'created by' the ultimate purpose of evolution. But our purpose is not subordinate to the ultimate purpose of evolution. A human life can have so much more value that just "continue the genetic line and have children". I find that freeing.
I would disagree. You can play the violin firstly because the violin was designed so that it could produce beautiful sounds under _human_hands_. This way, not another.
It seems you are actually in agreement with the underlying argument. Humans were able to use their body, originally developed for hunting large prey, to design, build and play violins.
Our hands were not designed, and they have no “intended purpose”. We have hands because throughout the extremely long line of evolutionary adaptations the individuals that had them ended up surviving and procreating, and so we ended up having them.
This is not true of a violin, which is of cause the product of intelligent design and is designed to fit our hands, no
Awkwardness intended.
Though naturally there are constraints dictated by the physics of the sound generation.
> Your hands were designed for throwing a stone at the eye of a mammoth.
No, they weren't designed at all.
And utility in fine as well as gross manipulation of the type you describe is clearly part of what they were selected (not designed) for.
> But you can play the violin with them
Violins, unlike human hands, were designed, and specifically for people with human hands to use. They aren't just something existing outside of humans in nature that hands happen to work with.
So, it's not at all surprising that they can be used with human hands.
Yes! Plain python is almost always crystal clear and self explanatory. But "idiomatic python" which people seem to compete to be "more idiomatic than thou" is none of these things. It's actually a barrier to learning the language.
> almost always crystal clear and self explanatory
and slow. Most of the time the idiomatic pandas answer takes advantage of its vectorization capabilities while plain python would require nested loops.
This is one of the advantages of languages with optimizing compilers. In Python, there's a tradeoff between clarity and performance. But in C++ for example, your for-loop is just as fast as any library's for-loop.
Edit: My assumption is that many Python libraries are written in C for performance, but maybe that's not the case.
In case of these libraries it is mostly the case of painstaking optimizations in low level code. No common language has sufficiently smart auto-vectorization to reliably convert for loops in most cases to SIMD instructions - so no, your average C++ for loop wouldn’t be that much faster, unless you spend a lot of time optimizing it for the specific task.
Another example is the order in which you access memory. To multiply two matrices, in one you move by row and in the other you move by columns. One makes the cache happy and the other unhappy, so it's faster to transpose one of them (the correct one, I never remember) and them "multiply" them. We notice this in Fortran with -O2, but the difference disappears in Fortran with -O3, so the compiler is doing some magic.
Idiomatic python is slow. Trying to convert everything into the mini-DSL that a C implemented library can understand is oftentimes considerably faster.
Someone pointed out to me recently as you say, the idiomatic python sometimes seems like more of a barrier. It takes more time to parse and grok, for their human brain, a for loop with a zip having multiple interables vs nested for loops. I've been thinking about this. So take, a list comprehension, supposedly better than a for loop at times. The canted take would be that list comprehensions are said in a way of what a human wants, the for loop is more how to do it, and the former is better ipso facto. And I think I've come to appreciate this difference and preference.
My conclusion is that I rather like the opinionated take of python. It might take a liiiiittle bit of a learning curve, but you do come to appreciate the zen of choices they've arrived at after a few decades of going at it.
Worth pointing out that list comprehensions aren't just a stylistic preference or syntactic sugar, they're significantly better performance than the equivalent for loops.
Not to mention that when it fails to compile, at least in Overleaf you get an error log that is hopelessly useless and the only thing you can do is just remove your changes until it works again.
LaTeX is a cool idea, but the implementation? Absolutely horrid.
There are two big challenges: One is that TeX, the underlying executable behind LaTeX, is pushed to its limits¹ to run. The macro expansion paradigm behind LaTeX made sense in 1982 but there are a lot of decisions underlying the executable and TeX-the-language that were dictated by the computing technology of the 1970s (forget Unicode, standard ASCII wasn’t universally available when Knuth wrote TeX).
The other problem was the questionable decision by the LaTeX core team to, rather than release LaTeX3, they instead decided to evolve LaTeX2e which means that they are encumbered by backwards compatibility issues.
The noisy output from LaTeX is also not so great. One of the things I’m doing with finl is (a) assuming that there won’t be an attempt to fix errors mid-run (one of those 1982-era decisions that no longer makes sense) so a comprehensive list of errors can be presented to the user (or revealed programmatically) and (2) Adding indications in the output (which can be disabled) of errors in the input. I’m debating between errors being PDF annotations so users would click on an error or warning icon in the PDF to see the message and indication of where the issue was found, or just making it a big blot of overprinting (so many times on tex.stackexchange there are so many issues where a user—usually on Overleaf—ignored the error messages being output.
⸻
1. Actually beyond its limits. LaTeX will no longer run on a Knuth TeX executable but requires eTeX extensions to run.
I should have an update when the next crate is ready for publication—I ended up writing some Unicode handling stuff because unicode-segmentation didn’t offer the interface I needed while unicode_categories is outdated and has a flawed implementation (my replacement code is 10x faster by my benchmarks). I need to do some additional work to verify that my segmentation algorithm is at least comparable in speed to unicode-segmentation and fix that if it’s not and I’ll have a 1.0 release of finl_unicode ready probably in the next month.
> errors being PDF annotations so users would click on an error or warning icon in the PDF to see the message and indication of where the issue was found
> I always find this a bit sad, because it seems to take away the idea that programming is about assembling composable parts
[OT] Concerning "programming is about assembling composable parts": I always find both sad and ridiculous when self-proclaimed software developers bash Unix because they are not able to appreciate its philosophy.
It would help Unix’s case if the glue between the parts wouldn’t be byte streams and some very crude int result code, signals, etc.
A monolith can be just as composable if not more, with a much “stronger glue” in the form of language-mandated guarantees. Also, sometimes doing multiple things well is the better direction — IPC is additional complexity and essential complexity can’t be decomposed.
When contributing to uutils (the coreutils written in Rust), one of the bigger pain points with cross platform support is the way that in Unix, everything, including arguments, is just bytes, while on Windows, arguments are semi-opaque text strings. E.g., the -t option in sort, join, etc. takes an arbitrary byte (other than null, which is supported via \0), so you can sort, join, etc. binary inputs. However, the -t option will not let you use a multi-byte character, even valid Unicode characters like é, which, if Unix actually used text for everything, you would expect it to. Meanwhile, on Windows, uutils still doesn't support non-ASCII byte values for -t, because Windows doesn't provide a way to represent those.
Unix has gotten pretty far using just text and return codes. But there's no need to be dogmatic about it I guess, it could be nice to pass objects around, rather than text, like Powershell does. Although, their implementation seems quite verbose.
I think to really use something like that, I'd want a well-defined ordering for the fields and the ability to also do something like
variable.1
in addition to
variable.someLongFieldName
This could result in less than obvious scripts, but a shell language also needs to be compact, for interactive usage.
I'm not sure if it's necessary to use auxiliary files.
I made something implementing fake vectors using \csname . I think that a similar approach can be used for this problem, but I prefer to never see my old code again. IWIMM
Hi! Author here. This is a cool idea for a vector implementation, but you still need to work around the fact that the command definition can come after the \get
Perhaps you can use the main aux file, as other packages do. I think I never did that, so I'm not sure about how difficult it is. Or perhaps I used the aux file and I forgot about that. [ I should write an article titled "I hate LaTeX. I hate MSWord." :) . ]
Since your code doesn't write the authors to the file it already requires that the authors are given before `\maketitle`, so then it's also reasonable to require affiliations there. Then you get something like https://gist.github.com/zauguin/19bf1bc9128a8abaedfe3081717b... which doesn't need a file.
Hello, I thought about it a little and indeed you are both right! For the sake of completeness I've updated beamleeto to use this mechanism instead :) thank you for your help!
I also have a love & hate relationship with LaTeX. I think it really boils down to the following:
LaTeX will work excellently for you, so long as your use case was envisioned by the original authors.
I can't say that the original authors of LaTeX didn't envision using it for creating slideshows/presentations, but I can say that making a beamer theme is uniquely complicated. I wish that LaTeX had something as flexible as CSS for styling documents rather than the awkward commands, etc. used now—so much so that I attempted to replace LaTeX with a HTML & CSS -> PDF workflow in the past [0]. It is still an idea I want to revisit someday when I have more time.
If you have a lot of time on your hands, nothing makes your math/cs hw look quite as slick. Was fun to play around with in undergrad for sure. I've forgotten all my LaTeX skills since though.
I used it avidly for years. It’s still fun to see pretty LaTeX documents, but my patience for working with it—despite being rather fluent with it—has grown too slim.
I don't mind Beamer, there's some boilerplate but it is like a once-per-institution setup so it doesn't seem like too big of a pain. It was hopefully done by someone else, and if not, I only have to do it once for myself -- and then I can share it.
However, drawing figures in TikZ seems to be the main way of getting figures into a beamer presentation. This is a total nightmare and not really worth the effort, IMO.
Academia. At least, its widespread (almost universal) where I am studying. Mainly to manage citations, figures, and tables of contents automatically. Tools like Sharelatex are used for collaboration on papers.
For most usages, you don't need to write the code. Sometimes buff out rough edges for your specific application, but in my 12 years in academia, I think I've only really _written_ Latex twice.
By just using the existing "code"/markup. Similarly, I would not count writing markdown as programming. Now if you need some new stuff, e.g. complicated tree diagrams, it starts to turn into programming.
There really isn't much code to write for a typical scientific document, just sectioning and math. You usually include the same preamble in your own documents and a preamble from the editor if you're targeting a scientific journal, but most of the time you focus on the content.
expanding on what others mentioned, usually each university has latex templates for their papers and reports which handle most of the complicated parts, the only real latex ive worked on for reports is for eqations and tables, and many people just use gui tools that generate the code for them.
New students do occasionally complain about images/figures not being where they are relative to the text in the code, thats a solvable problem in latex by embedding it in a minipage but honestly people complain about images having a mind of their own in word too ;)
Anything where decent typography is desired. Also, of course, mathematics. Mathjax is very good, but we sometimes want a canonical version of a document that looks the same for every reader, and doesn’t depend of the vagaries of constantly evolving browser engines. This means PDF.
For as long as I use time sitting on public transport and airplanes to review them. Nothing beats the ergonomics of a printout, a red pen and no internet.
Yep. A while ago, I used wkhtml2pdf to write a document in Markdown (Pandoc) and convert it to PDF.
It worked fine. There where some minor issues around page breaks. But then again, most people don't use paper for reading anymore, so I'll happily accept these minor issues over the absolute inconsistent hell that is text-selection, searching and hyperlinks in most PDFs.
> single file HTML with embedded images would be a much better format
Or use epub, which lets you store the images as part of the zip archive without having to store binary files as bloated and text editor killing base64 text.
We use a lot of LaTeX to make the midterms and final exams in the math department of my university. Everyone knows how to write in LaTeX, so if I make a internal helper package or a bunch of macros, then everyone can use it with minimal training.
The problem with wysiwyg word processors is that people get creative and it's very difficult to enforce the same style for all the material.
Laying out books. The fact that all of this can be done in a text file, without hidden codes and being tied to this file format or another, is extraordinary. Images are easily handled, fonts simply work (XeTeX & friends work well for me), and — with sufficient warnings — these files can be handed over to an author and edited without messing much, if anything, up. The PDFs generated work well with all the PDF tools I've attempted to use on them, and there's none of the weirdness that too-often shows up in Word or other WPs. If all you want is good-looking text, generated from truly basic documents, it will give it to you without effort.
Basic LaTeX is easy; ramping up has a significant learning curve, but once that mount has been scaled, things level off quickly. Doing tables in straight LaTeX is miserable — CTAN, however, is filled with fantastic packages that make them easy. XeLaTeX makes inserting images pretty easy without packages. I will say that what may cause difficulty with images for people new to LaTeX are floats — tables, images, and the like may move page to page depending on how the document flows; if you're used to anchoring an image on a particular page in a WP, that may put one's mind a bit out of joint until it makes sense.
Very late but just in case: If you're referring to my post, it was the particular layout I was trying to achieve. The board wanted me to imitate the existing minutes title page layout from their Word "template." The image was inside a table cell, the table had a lot of column/row spans, and things got messy really fast. As with HTML, using tables for layout is just a bad idea all around.
Also, as pointed out deeper in other responses, the basic tabular environment is not terrific when you're not just presenting standard table data.
Breaking apart the image and table and letting LaTeX handle the layout Just Worked (TM) and looked better in my opinion. That said, LaTeX images and tables are pretty easy and look great by default when you're not doing something weird with them.
Edit: A better way to phrase this might actually be that a major principle for LaTeX is that I should be able to just drop in a new chapter in the middle of a large document and LaTeX will automatically reflow and typeset the entire document without any of the very specific fiddling necessary in WYSIWYG word processors.
A major example is for instance, figures/images/tables will move to new pages but will remain correctly placed between paragraph X and Y. Because I've marked it up as such, if paragraph Y is on the page following paragraph X, it will bring the figure along with it to the new page. In WYSIWYG word processors, that figure would likely just sit at the end of the page until I manually moved it myself.
When you try to micromanage the layout of a very specific page, even if it's just the title page, you're going to have a pretty bad time unless you've written your own \documentclass. :-)
Writing anything with complicated mathematical typesetting, for one; their have been improvements in word processors and thinks like MathML/MathJax, but they are still behind.
Works pretty well for autogenerated docs with more going on than is easy in Markdown, also - but that's often a bit of a wash.
LaTeX is particularly suited to print (and by extension PDF). When you get into writing your own custom LaTeX macros/commands, yes it's difficult. However, the vast majority of users are simply consuming these sorts of custom commands in the article, not producing them. This leads into environments where people writing papers or articles just use what's handed to them.
LaTeX works out amazingly for two very specific use cases: 1) Large, collaborative documents and 2) producing the exact same, highly structured print document over and over. I have pretty extensive experience with the second use case.
When I was Secretary for a non-profit organization, I had an entire little personal library of macros that sat on top of the minutes[1] package. I could open an empty text file, type in \attendee{Name} as people arrived. Type in \maketitle and do a quick preview and the document would instantly build out a front page that included if we had quorum or not, etc. I typed the document exactly as the meeting happened while marking up things like tasks (and who they're assigned to), decisions made (with voting tallies and who motioned what), and so on.
All that data would get duplicated to the end of the document in nice lists for quick reference. It had consistent formatting. The build system (a make file and latexmk iirc) would wrap my new file in the basic boilerplate and spit out the PDF for me to email. I consistently had the meeting minutes published an hour after every meeting whereas my predecessors often took 24 hours or more to publish meeting minutes due to Word being Word. Those documents also lacked a table of contents or the various appendices with summary data.
That said, there were things that I tended to avoid doing, like complex tables or something. There's something to be said for staying inside the box of what comes built into LaTeX. I recall giving up with floating an image to the left of a table on our title page and just plopping the image inline in a horizontally centered paragraph and then putting the rest of the title content beneath it.
Also, many documentation frameworks (sphinx comes to mind) use LaTeX under the covers to produce their PDF output. So you might think you're just using markdown or RST, but somewhere someone is converting that to LaTex or TeX in order to leverage a very good typesetting engine.
I'm a professor and research mathematician, and I use LaTeX for nearly everything I write. In addition to what others wrote --
- The way I conceptualize it, LaTeX is a word processor. So, for example, if I'm writing a rec letter and I choose LaTeX over Word, I'm thinking "I like this word processor better than that one."
- LaTeX/PDF is often criticized for being static, but in my experience, this is a good thing in most cases. If I am discussing the contents of a file with someone else, it is useful if we are both looking at exactly the same thing.
- I don't try to do any significant programming, or extensive customization of how my documents look. I agree that trying to do so would be annoying, but this is not part of my use case. If you look at a random selection of math papers, say here
Take a look at https://sile-typesetter.org/. IIRC it literally reuses some core C libraries from TeX/LaTeX, and glues them together in a different way using Lua, keeping Lua as the only language available. Notably, SILE recently achieved the long overdue milestone of math/equations support (https://sile-typesetter.org/2021/09/sile-0-12-0-is-released). Obviously, open-source.
In my opinion LaTeX fails to deliver when doing anything other than text based work.
Tables, images, etc are always a hassle. It gets even worse when changing one page to landscape mode. Debugging is a pain and there aren't any tools to help with that.
The solution presented in this anonymous, undated article is relevant if you’re constrained to only using LaTeX. But you’re not, and there are certainly easier ways to go about such things. We have Python and other higher level languages that we can use to pre-process source and extract metadata. This type of problem is made much easier if you write in Markdown, putting authors, affiliations, and other metadata in (say) YAML blocks, and use Pandoc to convert to LaTeX (or anything else). You can write a filter in Python, Lua, or Haskell to rearrange the metadata the way the author wants. This would be a far more pleasant experience, and easier to extend and generalize.
This anonymous, undated article was written by me, yesterday. The strong backwards compatibility of LaTeX(2e) [0] make it so that the date is not especially relevant (since I'm using primitives); in any case my point was pedagogical, in the sense of diving into the operational mechanisms of (La)TeX to develop a better mental model of what's going on. And while Pandoc is very nice, if you're in academia none of your alternatives are viable, since LaTeX is a de facto standard for most journals.
Fun fact: the article was written in Markdown, with some front matter for metadata!
I certainly appreciate the pedagogical purpose; what you did there goes beyond any pure TeX programming I’ve ever tried to do.
My suggestion was to use Pandoc to create a LaTeX document. You can easily tell it to use RevTeX or any style required by a journal. The only friction with my approach is when you need to work with coauthors or editors on revisions.
EDIT: I think I caused some confusion due to my sloppiness. I should have written “constrained to only writing in LaTeX”.
Pandoc uses LaTeX to make the PDF, so you have to set up LaTeX somehow to be able to handle the emoji. I use “normal” Unicode in md source all the time, but not emoji, so, sorry, I don’t know what to do.
I am in academia and I do all of my writing in pandoc. I simply submit the .tex file that pandoc outputs if and when the manuscript is accepted. (I liked and learned a lot from your post, just wanted to prevent a possible misunderstanding about the usefulness of pandoc for academic writing).
It doesn't shield you from much of the pain, initially at least. But you can separate it from the document and treat it as markup, and reuse bits more easily.
Of course pollen itself is a thing to learn. But if you work with text a lot and like lisp it might be worth it. It's been good to me.
Yeah it is kind of surprising. Scribble supports latex output but I don't know the details and it's probably similar to pollen, since pollen is built on it.
It doesn't seem that hard (famous last words tho) especially since turning arbitrary DSLs into xexprs is one of the things racket truly excels at.
Just having proper semantic closing syntax would be a huge improvement for any member of the TeX family. It drives me nuts wrestling with shit falling into or out of some macro expanded function based on argument parsing logic. If it had defined closing syntax the damn tools would just tell me there was a mistake or get it correct not mysteriously screw up my document because I added or removed one row from my document. Or my favourite because I added a second table and that macro could only handle one table of that kind per document because it was designed for a table based bibliography that would only exist once at the end of a document…
I put TeX and Perl in my “decent tool with extremely shitty syntax” mental categorisation of languages. I basically never look at anything TeX related directly anymore unless I have to. It’s either the input material I converted to something better like plain text or vector graphics (fuck Tkiz based graphics are so miserable to use) or it’s the output from putting something more sensible into pandoc.
Try TeXmacs, it's neither TeX nor it's Emacs clone.
TeXmacs is WYSIWYG scientific editing platform. Documents created can be saved in TeXmacs, Xml, Scheme, PDF or Postscript. Converters exist for TeX/LaTeX and HTML/MathML. It can also be used as a graphical front-end for other computer algebra, numerical analysis, statistics software[1].
I write all my papers with it since few years, and my lecture notes, and my talks. The papers are converted to LaTeX when sending to the publisher. Several of my PhD students used it to write their thesis. Also some Master students.
I recently published a paper [1] that I wrote using TeXmacs and then converted to LaTeX before publishing it on arXiv. The conversion was not completely seamless: it took me around 2 hours to tweak it to my liking. However, I feel that I would not have been able to finish the paper without TeXmacs. Honestly, 2 hours was a fair trade-off. Probably I would have spent a similar amount of time aligning equations by hand once I was done with writing. Texmacs -> LaTeX conversion actually made that part more streamlined.
Another good WYSIWYG front end is LyX: www.lyx.org . I've written a few hundred physics lecture notes with it, as well as a number of Beamer presentations. I find it much easier to use than TeXmacs (mainly because of keyboard shortcuts), and the output is excellent. And yes, it produces true TeX/LaTeX.
Finding Lyx when I was at university saved me an immense amount of frustration while producing beautiful output. My girlfriend used Word 95 and I spent many more hours helping her format and fix her projects than I ever spent dealing with issues in Lyx. Once I had it setup how I needed it it just works.
TeXmacs is not a front-end for LaTeX, but a completely original system, superior to TeX and LaTeX under every point of view: typographic quality, ease of use, control over your document.
LyX is good but the quality of the typesetter is not. Early on, when looking for a replacement for my TeX workflow I was taken back by the rendering. It improved lately, but still TeXmacs is a superior tecnology which renders onscreen exactly as on paper, and it is fully scriptable in scheme, including the user interface. I use it to lecture online, via Zoom, for example and I would not be able to do the same with LyX. See e.g. https://www.youtube.com/watch?v=FL50D2PpswE Also thinking about mathematics in TeXmacs is really pleasant. I wrote here my reflection on mathematical writing in TeXmacs: https://texmacs.github.io/notes/docs/art-of-math-writing.htm...
Before starting to use TeXmacs I tried LyX. It is true that the typesetting is not optimal, as often pointed out by TeXmacs users, but for me that was not a dealbreaker. I found LyX to be extremely un-customizable. TeXmacs has Scheme that allows you to do potentially anything! That made me very happy coming from Emacs land.
An important thing for me was having context-aware keyboard shortcuts (that are barely possible in LyX).
Another cool thing that seems to be possible that I plan on exploring next is integrating math typing in TeXmacs with sympy and or Maxima. This would allow symbolic manipulation using the above packages directly in TeXmacs.
We seldom choose our names, ourselves. The name was chosen early on to pay due respect to the two main sources of inspiration: the TeX system and the Emacs editor. TeXmacs takes the good features of both, but just because I have the same name as your parents it does not mean I'm the same kind of person. A family is not a clone hierarchy. One can argue that Javascript also has the wrong name, there are reason for this, but usually this does not stop people to appreciate the good sides.
I recently converted myself to using TeXmacs. I did it because I was constantly getting lost in the minutiae of proofs of a large paper I was working on [1]
The WYSIWYG aspect of TeXmacs was crucial for me because I was able to "think about math" while working on the PC. When doing things in LaTeX I always found myself thinking on paper and then writing down in TeX.
I personally believe that "thinking on paper" is still better for me at the starting stage of mathematical research. However, once the outline of the proof was clear and I needed to clean up details and to write technical proofs then working directly on the PC helped a lot
Another fantastic feature of TeXmacs is the "preview on hover" package. If you have a reference to an equation and you put your mouse over it, TeXmacs can show you the equation in a popup. This was very important when I was going over the draft once I have written the proofs and when checking for correctness. I have hundreds of numbered equations and checking that I was citing the correct bound in a proof of a lemma was made much easier by this feature. Before passing to TeXmacs I tried to find way to do this efficiently using LaTeX. Intrestingly enough very few PDF's have a "breadcrumbs" feature for you to be able to jump to a reference and then go "back" to your previous position in the paper. The closest I came was Emacs+Auctex+preview. Since Emacs is scriptable and already has the notion of "mark ring" that is essentially the "breadcrumb" feature, that helped a lot.
TeXmacs also has some shortcomings. While it is written in Scheme, I found discoverability and documentation lacking. However, there is a very friendly community of people that are very active on the forum. Any question I had about how to do something was usually answered in at most a day. This is actually great because the "basics" that one needs to work immediately are actually well documented. The things that are hidden are more advanced features. For example, there is math folding [2] that I accidentally discovered browsing the menus and then figured/asked on the forums. I had to ask about how to remove sub-sub-sections from the TOC [3] but, to be fair, even in LaTeX you cannot figure it out unless you know the macro.
The thing that I miss most from Emacs is the "self-documenting" nature of all the Lisp (Scheme in the case of TeXmacs) code and functions and the somewhat quirky search/replace functionality in TeXmacs. Honestly, the regexp search and replace (especially with a visual help package) in emacs was very powerful. But I believe the community is actively working on the former.
I can only hope to curse you with a TeX nerd-snipe :) I can recommend reading the first few chapters of The TeX Book (it's a genuinely fun read) followed by the links in the article's footnotes for more operational information.
If found “TeX by Topic” a great introduction, it's less overwhelming than the TeX book. Also really helpful in wrapping your head around macro expansion is the `texdef` cli tool, which allows you to quickly evaluate a line of macro code. Finally, https://www.tug.org/utilities/plain/cseq.html is nice for reference.
There are three books that are worth looking at to get plain TeX. I’d start with Viktor Eijkhout’s TeX by Topic (which I think is free in PDF on CTAN). Then the TeXbook to really get everything (the PDFs that float around the net are illegal. Please buy your copy. DEK donated his royalties to TUG so your purchase will help support the continuation of things like CTAN and the LaTeX project). And finally, if you really want to dig deep, Stephan v. Bechtolsheim’s four-volume magnum opus, TeX in Practice will tell you more than you ever wanted to know.
I found The Advanced TeXbook by David Salomon to be helpful. It shows how to make your own format on top of plain TeX, including table of contents, page numbering, cross-references and insertions.
I also found A Beginner's Book of TeX by Raymond Seroul and Silvio Levy helpful as a quick reference.
Also I have an anti-recommendation for Knuth's TeXBook. I did not find this book helpful at all- too much information buried in exercises (which I don't think is appropriate for a reference), and not enough directly said on how to do useful things. Figure out how to make a table of contents using only the TeXBook..
Jesus H Carnegie. I JUST WANT TO WRITE AN ACADEMIC ARTICLE.
I mean, look at this abhorrence. And look at what you open up in a TeX file, which again is meant to represent English prose.
% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
%
\documentclass[
]{article}
\usepackage{amsmath,amssymb}
\usepackage{lmodern}
\usepackage{iftex}
\ifPDFTeX
... and more and more of this dross ...
I want to get stuck into the article. At least show me my abstract. But no. It's just more and more backslashes.
It's just vile. And the people who use it have Stockholm syndrome, and they pass it on to their PhD students who spend nights before their presentation at 2am, trying to align a table and crying. Then they have Stockholm syndrome too, and they tell you "it's pronounced LARTECH" and give themselves a little pat on the back.
How are you supposed to manipulate that? I can open up a WYSIWYG editor and literally do maths by just copy-pasting parts from one side to another. But this, I can't even read, let alone intuit.
I am with you for all* of it. The Stockholm syndrome bit is oh so true. But I take exception with the math, Latex math is its only redeeming quality (with Adobe FrameMaker coming in a distant second).
The equation example is artificial. In practice there will be no curly brackets around these single-token sub/superscripts, nor should the \left / \right present in this example. With properly added whitespaces this equation becomes quite legible.
For more complex equations people use line breaks and indentations, and/or macros.
(note that, using my editor defaults, none of this equation's lines are truncated or wrapped)
The \g... and \pdF... are trivial ad hoc macros defined in the document. Producing the same document by repeatedly copy/pasting the tensor components and partial derivatives would have been considerably more time-consuming and error-prone.
Also notable is the align environment: type \\ for a manual line break and & at each point that is to be aligned.
I just tried to reproduce this with the "WYSIWYG" equation editor in Word, and I can't figure out how to do it — right-clicking on plus and equal signs gives an "Align at this Character" option, but this appears to be a special case, as the option doesn't appear when clicking on anything else in the example.
In particular, had the first line involved (implied) multiplication instead of addition, there apparently wouldn't be any acceptable point to declare alignment!?!
I'm also not sure what it means to align "at" a character, as characters have width, and characters to be aligned aren't necessarily the same width. Does it align the left sides? The right sides? The center?
Moreover, the default key bindings in the Word equation editor are counterintuitive: the usual binding for "manual line break" instead splits the equation in two and there doesn't appear to be any default binding for the "Insert Manual Break" equation editor command at all.
Sure, LaTeX has a learning curve, but it's not at all obvious to me that Word is any better in this respect.
That equation is easily workable with the code as is, and that options block is also fine. My bigger concern is someone coming in without enough experience and trying to disrupt the whole academia. Yes, the learning curve is steep - can anyone even say they finally know TeX? Aligning stuff and other things may take time. But if you're writing papers, the output quality is amazing and, what is important, consistent - light years ahead of WYSIWYG editors. I'd rather edit my equations manually in TeX rather than, say, popular office suites. And why would anyone want to do presentations in TeX anyways? It's like using a spaceship to shop for groceries.
I agree. LyX is a much better alternative to LaTeX. It's a sort of GUI front-end to it, but it lets you do all the normal editing in normal WYSWYG way (but without the "is the space bold? why is the font of this blank line different?" you get with Word). Most importantly it has a really amazing equation editor.
I agree that TeX sources are often damn near impossible to read. That stuff is... ugly. But at least it's there. You can see it. You can manipulate it. You can understand it (though it sometimes takes more time flipping through the TeXbook than any sane person is willing to spend). In comparison, WYSIWYGgery is like boxing with an invisible opponent. Where do I click, what magic check box three levels deep in dialogs do I need to check? Why does that word come out in a different font? How do I move the cursor across the italic/roman boundary? Why is there extra space here, but not there? How can I interact with things that I cannot see?
Out of all the problems of TeX/LaTeX, the worst I found is that subscripts and superscripts visually dominate the line noise when they ought to be less visible than the main content. I think your example helps to illustrate that by the equations I tended to typeset where way worse for that problem. (But I only dipped my toe in properly programming it like OP, which I realise is even worse.)
This is really solved by the graphical equation editor in LyX. I wrote my master's thesis and PhD thesis using it, having previously written an undergrad thesis in raw LaTeX. When I switched, I was part way through writing up notes for a masters course and ended up rewriting them in LyX (sadly its LaTeX import is terrible). I found that I was able to write notes faster by a factor of 3! And I honestly was no LaTeX novice, it just really is less efficient. I shudder to imagine how long I would've spent on my PhD thesis without LyX.
The mistake people make with LyX is assuming it is for beginners trying to avoid LaTeX (and it does partly market itself that way). I consider it the opposite: it's best suited to those who already fully understand LaTeX. You still need to dip into it occasionally to edit the preamble or stick in the odd little snippet of manual LaTeX (that's ERT in LyX terminology). And while typesetting errors are much rarer with LyX (it's much harder to forget a closing brace when you don't put them in in the first place), when they do occur it's because something has gone really wrong so you better know what's going on.
Honestly, do you have any idea how to improve the math mess?
I did use both Word and LaTeX für equations, the latter is much faster for me. So WYSIWYM seems to have its usecase. But I agree, reading that equation is just awful. My idea would be tooling to partially render tha equation, e.g. rendering sections the cursor is not in.
I use word with embedded latex and I'd say it's almost as fast to write once you get the tweaks and hot keys going (eg. learn to never use the horrible "equation editor"). You make up in overall speed by readibility. Write an equation, render and its just there, write next equation, render, etc.
Right, sure. This is indeed copy-pasted from LyX, which is a saviour. Manually written, TeX can be better. But as soon as anything gets complicated, you're gonna be stuck again. The problem is not understanding something conceptually. It's intuiting it. I want my brain to be working on the maths. I don't want to use valuable brain cycles understanding the notation!
I agree that LaTeX has not the best syntax, but that is a better alternative?
I mostly write in Word and I can tell you that it is not that much better than LaTeX. Sure, the editor is WYSIWYG so you can see right away the title, abstract, text, etc.
The problems I have with Word are mostly solved in LaTeX. For example, references are automatically managed in LaTeX. In Word, that's mostly a manual process (I know there are integrations with Zotero/Mendeley/whatever, but those are a little wonky on a long paper---I have never used the built-in citation manager). I sometimes feel bad for the editors that have to check all my reference lists. They usually find 1-2 papers that are either missing or included and no longer cited.
Tables are also a problem in Word, especially if your collaborators use an older version that breaks the formatting (Moving between Google Docs -> Word -> Google Docs also breaks a lot of things). I can't tell you how many times I had to reformat tables that a collaborator broke. Making complex tables is also wack sometimes, like adding a simple sub-rule between cells requires some column hacks in Word.
Table/figure numbering is also another thing that I loathe in Word. Manually renumbering is a pain and the automatic numbering always breaks for me in a way or another (maybe still thanks to my collaborators).
All those things work pretty well in LaTeX with some backslash commands.
What Word really shines is track changes and commenting. I don't know if there is a LaTeX editor where you can track changes and comments like in Word (I know that Overleaf has something that kind of works).
Powerpoint vs. Beamer is a whole different ball of wax. Both have pros and cons. But with presentations with a lot of equations, beamer is definitely better but, as you point out, it doesn't play well when you want to put an equation in a specific spot in the slide. In powerpoint, you can just click and drag and you are done.
Not a TeXnicians nor a TeXpert but I've learnt it at a certain point in high school after a professor suggestion, than much used at the uni and now just used casually for letters, reports etc I do love the quality, that's is.
As far as I do not find something with equivalent or better typesetting quality I'm stick with LaTeX :-)
To those who hate it: try to learn some tangible "alternatives" like *roff or TeXinfo and than you'll see LaTeX syntax is not that horrid or difficult, then try to learn some modern typesetting tools like those from Adobe. LaTeX win easily, that's is. Said that IF someone can offer something equivalent with a far simpler/nicer markup as I said before my love is just to the quality of the output!
I don't understand why they encode these expressions f^{(2)}(x) like so. They should be written like a regular function: f 2 x. Then you apply your styling depending on eg. the domain definitions. Eg. for f : N x R -> R, then the first argument is sub/super-scripted... etc.
Another eg. In python, we would render this expression: sum([i*2 for i in range(0, n)]) with sigma expression... etc.
I don't use LateX explicitly (my colleagues and supervisors didn't know LaTeX and exclusively use MS Word) but I like how I can write equation in MS Word using LateX notations.
Same. I'm a PhD student in CS and manage just fine with embedded latex in word documents and a reference plugin (I use zotero). There's definitely pros/cons. Imo biggest con is the absence of something like overleaf and biggest pro is ease of use.
For several years (a decade maybe?) I authored my resume in LaTeX. Then a few years ago I wanted to restructure it radically, and make an interactive version that showed off some simple subset of my full-stack skillset (from design to implementation). This goal led me to authoring it in HTML with CSS. I never actually got around to implementing my full vision because I had an unexpected opportunity land in my lap before I'd officially started looking. I had the design and static mockup completed, so I just exported that to PDF and used it. In hindsight, I spent a lot less time getting the look I wanted in HTML than I did in LaTeX.
I still tend to use LaTeX for some long-form documentation, but I'll probably stick to HTML for my resume and I'm finding myself using HTML + Markdown a lot more for other authoring tasks too.
It's not the right tool for the job, in this case perfectly laying out text on a A4 sheet of paper. HTML is made for variable-sized screens, and can be repurposed to be printed, but it's still trying to screw a nail in when all you need is a hammer.
Having written a report in Word that was about 1/4 of the size of my dissertation, but had some of the same content, and then the dissertation in LaTeX, I can say that as much as LaTeX wastes your time, it's by far the least wasteful option.
Strong agree. My fiance and I wrote our thesis simultaneously, she in Word, while I used LaTeX. The amount of stupid figure- and page- rearrangements she suffered because she removed half a sentence from the middle, while LaTeX generated sane output with basically any text seriously made me much more productive.
Word has had automatic reference numbering for a while now (see for instance [0]). Not denying that it's not very known (nor pleasant to use), and I'm not even talking about bibliography.
I made my partner switch to Latex thanks to the bibliography. Writing tables almost made her switch back to Word.
I meant it more in terms of bad figure placement. LaTeX tries to place the figure relatively close to the source, it has a sane fallback policy, like grouping them together at the end of the section.
With word one can get from a decently formatted text to multiple quarter-filled pages with a single additional sentence, because it has comparatively bad algorithm for text-block reflow.
Among fellow students countless hours were lost playing with spaces, line breaks, font sizes just to get tables/figures stay or move to the next page.
This did look like an endless task: adding few chars in a chapter could have messed up positioning of bunch of figs.
> Word has had automatic reference numbering for a while now
It also breaks regularly. I know a student in the middle of a thesis writing up marathon, and the time he wastes with this is unbelievable. For example, there are the references that just end up garbled, with Word putting in an error message instead, the references that somehow don't get updated despite having been entered exactly like all the others that do. It adds at least two passes every time he wants to send a chapter to proofread.
Tables in LaTeX are bad. References, notes, and bibliography in Word are horrendous.
I've written two thesis in Latex and a small 100 page book in Word.
Word 2000 performed wonderfully. I had no problems with references or images shifting around, no strange errors, nothing. Bibliography sucked, but in general it was a pleasure to work with.
Word 365, on the other hand, is something I have to force to do what I want again and again. It is built in such a way that doing things cleanly and error-free is difficult and much less obvious than in Word 2000. Even standard tools like image anchors, which worked nicely in 2k, are not reliable anymore. I got the feeling that this is due to automatisms aimed at casual users.
I did typesetting in Lyx/LaTeX of two PhD theses: my own (eng) and my GF's (esp) a decade+ later. In both cases the adventure started with admitted a vanilla Word doc without all the bells and whistles (= no templates, no version control).
Once you enter the area of strange formatting, chars typed by who knows either a cat walking on the keyboard or sleep deprived student typing madly, fixing these in a binary format is a real PITA. Lyx/LaTex text formats are trivial to grep, diff, etc.
Today I would probably start and try to stay as long as possible in Markdown, then reformat it at the very end.
LaTeX? I just use TeX. The documentation for TeX is clear, very precise, and much shorter.
LaTeX is just TeX but with a lot of new macros. The intent is different: With TeX, you just say in detail what steps you want the software to do. With LaTeX you say what you want in general terms and f'get about the details.
In the last three decades of having the opportunity to learn and use TeX, i have managed to avoid it. In the same time i've helped a friend with word processing for her dissertation. I'm still not sure how we managed to get it to work with all the horror stories about data loss and Microsoft Word at the time. But it did its job and I'm still in the WYSIWYG camp.
I have the exact opposite story to tell. A friend of mine asked me to convert a 300 pages Word document to LaTeX, because Word couldn’t handle it. It was text, mostly, so it worked out quite well.
I find Word is only tolerable when used like Latex. I.e., extensive use of Styles. Define a Style for every object type in your doc. Also, carefully choose the Next Style option. Define Sections if columns or pagination vary across the document. With that in hand, it is now just a matter of plugging in text and images. If something isn't working quite right, edit the Style instead of macdinking the text on the screen.
You are still left with formatting equations, but Word lets us use Latex-ish syntax for that now, so you can keep the fine control of Latex within the GUI context.
Don't get me wrong, I hate Word, but it is required in many environments. Adopting a rational use strategy helps a bit.
People write dissertations in Word all the time. How painful it is depends a bit on how complicated the dissertation is as a document.
This is of course only an anecdote, but I know many people who started in word, gave up on it and moved to Tex/Latex, but nobody who went the other way (that is to say, I know people who tried to give up on Tex, but eventually went back - not anyone who actually published with it). This might have quite a bit to do with subject matter - Word has always been an awkward fit for mathematics.
In 1999, I was editing a telecom industry standard as an intern and, of course, decided to use LaTeX instead of Word. The seasoned industry veterans on the technical committee were super impressed with my “Word” abilities and wondered if I could share my much-improved template with them.
It suffices to say that I hastily hired a friend in school to work over the weekend converting the beautiful LaTeX into Word.
My rule of thumb is that once I start writing imperative LaTeX with loops and stuff, I'm almost always on the wrong path. Now, I might be missing some important corner cases, but by skimming through the blog post, I feel like the author's solution is too complicated. For example, I don't get why this requires auxiliary files.
I would create a counter for the affiliations, let the \affiliation command define macros that contain the name of the affiliation and the value of the counter and then append the output to two different helper macros, one for authors and one for affiliations, whose contents I dump in \maketitle.
244 comments
[ 3.1 ms ] story [ 250 ms ] threadIs a Windows build planned?
LyX is a LaTeX frontend, you still need to understand some notions of LaTeX. MonsterWriter is a WYSIWYM Word Processor, LaTeX is just used as internal tool to create PDF files. There are other exports available (e.g. HTML, Markdown, you also can publish to Ghost directly)
LateX's successor should be opinionated, safe, easy to build in parallel, and also good at integrating with other tooling:
Let a CAS generate the next equation for you, for example.
Make sure that figure is never out of date (e.g. a build system rather than relying on a web of files and button clicks)
Etc.
This will likely never happen because latex is still very good at what people want it to do push comes to shove, but we could have a much better document format and publishing system around it.
I've never truly immersed myself in it so maybe it's more powerfully elegant than I remember.
I don't know that this is the major pain point. The thing is, writing complex-structure/programmed documents is not something which needs immediate re-rendering with every character - just like you don't recompile your program with every character you change.
This would, however, be very useful for syntax and compiler-detectable error. You would have an effectively-immediate indication of warnings and errors per line in your document, like an IDE. So it would be Java-like compilation speed rather than C++-like compilation speed...
> safe
LaTeX programming is basically sandboxed, or at least you have to work _very_ hard to do dangerous things.
> latex is still very good at what people want it to do
That's not it. It is actually usually pretty bad in doing what we want it to do (e.g. tables. Oh, the pain!) ... but what it has going for it is that you can do almost anything you want?: It will take effort and the "source code" will be ugly, but it'll work.
For anyone with a software background, this is pretty straightforward - once you start thinking of the latex file(s) as source code rather than the document, it's a short jump to setting up a build environment...
[1] See, e.g., https://github.com/tmolteno/SympyTeX/
TeXmacs (http://www.texmacs.org/ and http://forum.texmacs.cn/), and it happens right now!
See http://wiki.luatex.org/index.php/TeX_without_TeX for an introduction.
I have (shameless plug) created a database publishing software using this technique (https://github.com/speedata/publisher/). Once in a while I have to use LaTeX and it feels a bit old school to do the macro programming.
My next project is to rewrite the TeX algorithms in Go - see https://github.com/speedata/boxesandglue. Already usable but not TeX like in any way (this is just a library, not a frontend software like TeX)
Your stuff looks cool, I will take a look!
TeXmacs (http://www.texmacs.org/) has better output quality and nicer programming (it is Scheme :-) ) and it is easier to use.
And also looking at https://www.jonmsterling.com/papers/sterling:2022:wg6.pdf, I find it beautiful ... but perhaps there are better judges.
(Plain)TeX always seems the opposite of this. There is never a keyword that does what you want, but you can always do it by using five different mechanisms in concert. You always feel like you are trying to trick the system into doing something it was not designed for.
This is one of the hallmarks of human civilization.
Your hands were designed for throwing a stone at the eye of a mammoth. But you can play the violin with them! Yes; it is totally awkward and anti-natural for your hands, obviously not their intended purpose... but so beautiful!
Did orangutans evolve hands to throw rocks at mammoths? No, they did not
The parent comment is making ridiculous claims without evidence
https://www.worldatlas.com/articles/what-do-orangutans-eat.h...
Orangutans aren't humans, so what are you saying, apes which don't throw rocks to kill their prey don't... throw rocks to kill their prey?
I'm specifically talking about the evolution of hands, humans are not the only organism with hands.
Like complex brains are evolutionarily fit because they can solve lots of disparate problems, hands are evolutionarily fit because they can do lots of disparate things.
Of course, we do also then design violins for our specific dexterity.
Your human hands, which co-evolved with throwing things, we have abundant paleontological evidence of this and you may read as many papers on the subject as you would care to.
Also unsure how that's an appropriate response to a request for citations?
So I don't think it's out of place for the GP to address this.
The anthropic principle does not imply designed, it implies suited for.
Avoiding silly theological tropes, evolution is often mistakenly referred to as a designer when it's just an emergent property of competing, replicating agents. People don't normally bother with precision though, so we are where we are.
[1] “The sculpture is already complete within the marble block, before I start my work. It is already there, I just have to chisel away the superfluous material.”
But evolution doesn't eliminate entities. Low fitness entities are eliminated by hunger, or predators, or lower reproductive rates.
The marble on the other hand is eliminated by Michelangelo.
There's a linguistic confusion where because evolution is a noun, we think we can treat it as a subject. But in the person/place/thing/idea delineation, it is an idea.
Not only does it not design, not only does it not eliminate: "it" doesn't do anything!
Entities could be alleles, genes, or gene products
Not at all. Everything can come from variation (mutation, cross over) + elimination of the worst. It's just that 'worst' is not a global minimum. Are we as humans superior to animals in strength, agility, speed, etc? Not at all. But some distant ancestor had some bigger brain, and that gave it all the edge it needed compared to weak and dumber siblings that were eaten, while our ancestor hid on a tree.
When some animal mutated to be able to eat meat in addition to plants, it had some advantage and was less likely to be eliminated when food got scarce. That's all you need to eventually arrive at something tiger-like.
That said, some animals seem to have reached a local maximum: sharks haven't changed in millions of years, cockroaches seem pretty successful, too.
But there's nothing 'creative' about it.
Or rather, a goal begets a strategy, and a strategy begets sub-goals. Beautifully at some point these sub-goals start being optimized for. A few steps of this is how I believe humans went from the sub goal "Survive, eat, reproduce" to "Make art, understand life, explore the world".
The cool thing is that I think this extends beyond humans to tools. Because at some point humans had a sub-goal of "hit thing hard" they made a hammer. And this hammer has a goal (or a purpose) which is "hit things hard". This purpose can be traced back, through human sub-goals, to the final goal of evolution: "reproduce".
Note that I am not saying that the point of a hammer is to produce more hammer. But the point of a hammer is (very indirectly) to allow a human to reproduce.
Interestingly there is a weird game of telephone that can happen, where the sub-goals are imperfect for achieving the final goal. I would argue that this is (part of) why humans can be truly selfless. Take a soldier going to a battle he considers unwinnable but going out of a sense of duty / fear of ridicule. This will not help him reproduce, since the battle is unwinnable it will not help his progeny reproduce either. From the 'ultimate' goal, this is an irrational step. But there are sub-goals at play. Things like "be honorable", "do your duty".
This idea that a sub-goal can subvert the 'ultimate' goal is very beautiful to me. It means that evolution is not some tyranny that sets our purpose in life. Instead evolution brought 'purpose' into the world. And then some stochastic process put you and me on into the universe with some, vaguely related, sense of purpose. But we have our own purpose. Sure our purpose was 'created by' the ultimate purpose of evolution. But our purpose is not subordinate to the ultimate purpose of evolution. A human life can have so much more value that just "continue the genetic line and have children". I find that freeing.
This is one of the hallmarks of evolution.
How do you think wings evolved? By repurposing an appendage that was already had a purpose other than flight.
This is not true of a violin, which is of cause the product of intelligent design and is designed to fit our hands, no Awkwardness intended. Though naturally there are constraints dictated by the physics of the sound generation.
No, they weren't designed at all.
And utility in fine as well as gross manipulation of the type you describe is clearly part of what they were selected (not designed) for.
> But you can play the violin with them
Violins, unlike human hands, were designed, and specifically for people with human hands to use. They aren't just something existing outside of humans in nature that hands happen to work with.
So, it's not at all surprising that they can be used with human hands.
and slow. Most of the time the idiomatic pandas answer takes advantage of its vectorization capabilities while plain python would require nested loops.
Edit: My assumption is that many Python libraries are written in C for performance, but maybe that's not the case.
This is most definitely not true. Even stuff like subtle aliasing guarantees can make code run an order of magnitude faster or slower.
My conclusion is that I rather like the opinionated take of python. It might take a liiiiittle bit of a learning curve, but you do come to appreciate the zen of choices they've arrived at after a few decades of going at it.
LaTeX makes it difficult to compose stuff. Even HTML did this better.
LaTeX is a cool idea, but the implementation? Absolutely horrid.
The other problem was the questionable decision by the LaTeX core team to, rather than release LaTeX3, they instead decided to evolve LaTeX2e which means that they are encumbered by backwards compatibility issues.
The noisy output from LaTeX is also not so great. One of the things I’m doing with finl is (a) assuming that there won’t be an attempt to fix errors mid-run (one of those 1982-era decisions that no longer makes sense) so a comprehensive list of errors can be presented to the user (or revealed programmatically) and (2) Adding indications in the output (which can be disabled) of errors in the input. I’m debating between errors being PDF annotations so users would click on an error or warning icon in the PDF to see the message and indication of where the issue was found, or just making it a big blot of overprinting (so many times on tex.stackexchange there are so many issues where a user—usually on Overleaf—ignored the error messages being output.
⸻
1. Actually beyond its limits. LaTeX will no longer run on a Knuth TeX executable but requires eTeX extensions to run.
This would be by far the best approach, no?
[OT] Concerning "programming is about assembling composable parts": I always find both sad and ridiculous when self-proclaimed software developers bash Unix because they are not able to appreciate its philosophy.
A monolith can be just as composable if not more, with a much “stronger glue” in the form of language-mandated guarantees. Also, sometimes doing multiple things well is the better direction — IPC is additional complexity and essential complexity can’t be decomposed.
I think to really use something like that, I'd want a well-defined ordering for the fields and the ability to also do something like
variable.1
in addition to
variable.someLongFieldName
This could result in less than obvious scripts, but a shell language also needs to be compact, for interactive usage.
Clearly you haven't seen https://github.com/mscroggs/realhats
I made something implementing fake vectors using \csname . I think that a similar approach can be used for this problem, but I prefer to never see my old code again. IWIMM
(You probably need the two dimensional version.)LaTeX will work excellently for you, so long as your use case was envisioned by the original authors.
I can't say that the original authors of LaTeX didn't envision using it for creating slideshows/presentations, but I can say that making a beamer theme is uniquely complicated. I wish that LaTeX had something as flexible as CSS for styling documents rather than the awkward commands, etc. used now—so much so that I attempted to replace LaTeX with a HTML & CSS -> PDF workflow in the past [0]. It is still an idea I want to revisit someday when I have more time.
[0] https://github.com/jonpalmisc/pmt (no longer actively maintained)
However, drawing figures in TikZ seems to be the main way of getting figures into a beamer presentation. This is a total nightmare and not really worth the effort, IMO.
I actually used to use TexMaxer:
https://en.wikipedia.org/wiki/Texmaker
It's on my list of things I want to deploy a fuzzer on when I get around to learning that -- I've been focused more on data visualization lately.
I’m not trying to flame, I just have no idea why anyone would choose to use it over html/css or just a word processor.
Is it really a problem that requires manually writing the code? Seems like there should be more elegant solutions by this point.
You can turn on citation linking (in the text), you can apply a custom latex template.
Once it is all setup, you just write text in Pandoc Markdown.
New students do occasionally complain about images/figures not being where they are relative to the text in the code, thats a solvable problem in latex by embedding it in a minipage but honestly people complain about images having a mind of their own in word too ;)
And you're right, single file HTML with embedded images would be a much better format, but I assume publishers are preventing this.
Reading long form content on a screen gives me awful eyestrain.
Plus I love the smell of a good book.
I hope that e-inc displays will mature. Paired with the UX of a modern I Pad this will replace printed stuff.
It worked fine. There where some minor issues around page breaks. But then again, most people don't use paper for reading anymore, so I'll happily accept these minor issues over the absolute inconsistent hell that is text-selection, searching and hyperlinks in most PDFs.
Or use epub, which lets you store the images as part of the zip archive without having to store binary files as bloated and text editor killing base64 text.
The problem with wysiwyg word processors is that people get creative and it's very difficult to enforce the same style for all the material.
HTML is not an authoring tool. Maybe pandoc or sphinx or other system would compete.
- I can use my text editor of choice
- I don't have to worry about messing with the formatting by accident
- It goes through git easily
Anything shorter and I just use a word processor, it's not worth the time messing with the boilerplate.
I do use it for writing letters - I have a template I just fill out and it spits out a nicely formatted letter with an envelope.
It's also handy for when I need documents in multiple languages - you can make one change to the formatting and it changes them all.
It's not what it's designed for, but Eledmac has some interesting tabular features — https://ctan.math.washington.edu/tex-archive/macros/latex/co...
There's a good list here — https://tex.stackexchange.com/questions/12672/which-tabular-...
Also, with some care, the tabular environment can be made to work very well. Example —
% In the preamble:
\def\qfont{\usefont{T1}{AlegreyaSans-LF}{m}{}} % only here as used in example document
% In the body:
{\footnotesize
\begin{center}
\begin{tabular}[pos]{| >{\qfont}c | >{\qfont}c | >{\qfont}c || >{\qfont}c |}
\hline
{\textbf{YEAR}} & {\textbf{PLATE OFFERINGS}} & {\textbf{ENVELOPES}} & {\textbf{TOTAL}} \\ \hline
1915 & 1,904.86 & 4,587.50 & 6,492.36 \\ \hline
1916 & 2,165.21 & 5,091.24 & 7,256.45 \\ \hline
1917 & 2,259.34 & 5,441.92 & 7,701.35 \\ \hline
1918 & 2,325.87 & 6,877.40 & 9,203.27 \\ \hline
1919 & 2,848.31 & 8,842.37 & 11,690.68 \\ \hline
1920 & 3,188.90 & 10,785.15 & 13,974.05 \\ \hline
1921 & 3,404.60 & 11,069.74 & 14,474.42 \\ \hline
\end{tabular}
\end{center}
}
Also, as pointed out deeper in other responses, the basic tabular environment is not terrific when you're not just presenting standard table data.
Breaking apart the image and table and letting LaTeX handle the layout Just Worked (TM) and looked better in my opinion. That said, LaTeX images and tables are pretty easy and look great by default when you're not doing something weird with them.
Edit: A better way to phrase this might actually be that a major principle for LaTeX is that I should be able to just drop in a new chapter in the middle of a large document and LaTeX will automatically reflow and typeset the entire document without any of the very specific fiddling necessary in WYSIWYG word processors.
A major example is for instance, figures/images/tables will move to new pages but will remain correctly placed between paragraph X and Y. Because I've marked it up as such, if paragraph Y is on the page following paragraph X, it will bring the figure along with it to the new page. In WYSIWYG word processors, that figure would likely just sit at the end of the page until I manually moved it myself.
When you try to micromanage the layout of a very specific page, even if it's just the title page, you're going to have a pretty bad time unless you've written your own \documentclass. :-)
Writing anything with complicated mathematical typesetting, for one; their have been improvements in word processors and thinks like MathML/MathJax, but they are still behind.
Works pretty well for autogenerated docs with more going on than is easy in Markdown, also - but that's often a bit of a wash.
LaTeX works out amazingly for two very specific use cases: 1) Large, collaborative documents and 2) producing the exact same, highly structured print document over and over. I have pretty extensive experience with the second use case.
When I was Secretary for a non-profit organization, I had an entire little personal library of macros that sat on top of the minutes[1] package. I could open an empty text file, type in \attendee{Name} as people arrived. Type in \maketitle and do a quick preview and the document would instantly build out a front page that included if we had quorum or not, etc. I typed the document exactly as the meeting happened while marking up things like tasks (and who they're assigned to), decisions made (with voting tallies and who motioned what), and so on.
All that data would get duplicated to the end of the document in nice lists for quick reference. It had consistent formatting. The build system (a make file and latexmk iirc) would wrap my new file in the basic boilerplate and spit out the PDF for me to email. I consistently had the meeting minutes published an hour after every meeting whereas my predecessors often took 24 hours or more to publish meeting minutes due to Word being Word. Those documents also lacked a table of contents or the various appendices with summary data.
That said, there were things that I tended to avoid doing, like complex tables or something. There's something to be said for staying inside the box of what comes built into LaTeX. I recall giving up with floating an image to the left of a table on our title page and just plopping the image inline in a horizontally centered paragraph and then putting the rest of the title content beneath it.
Also, many documentation frameworks (sphinx comes to mind) use LaTeX under the covers to produce their PDF output. So you might think you're just using markdown or RST, but somewhere someone is converting that to LaTex or TeX in order to leverage a very good typesetting engine.
[1]: https://www.ctan.org/pkg/minutes
- The way I conceptualize it, LaTeX is a word processor. So, for example, if I'm writing a rec letter and I choose LaTeX over Word, I'm thinking "I like this word processor better than that one."
- LaTeX/PDF is often criticized for being static, but in my experience, this is a good thing in most cases. If I am discussing the contents of a file with someone else, it is useful if we are both looking at exactly the same thing.
- I don't try to do any significant programming, or extensive customization of how my documents look. I agree that trying to do so would be annoying, but this is not part of my use case. If you look at a random selection of math papers, say here
https://arxiv.org/list/math/new
you'll notice that all of them look more or less identical.
I have various custom C++ programs to generate the puzzles. But, getting the results to a formatted PDF was nearly impossible.
I use LaTeX as I can have my C++ program output a text file which, when compiled with LaTeX, creates the pretty puzzle books.
Essentially, I can press a button and “poof” I have a print-ready puzzle book ready to go up on Amazon.
edit: for some attempt at an explicit discussion of pros & cons & history vs. TeX, see: https://sile-typesetter.org/what-is/#sile-versus-tex
Fun fact: the article was written in Markdown, with some front matter for metadata!
[0] https://tex.stackexchange.com/questions/247524/do-i-risk-bre...
My suggestion was to use Pandoc to create a LaTeX document. You can easily tell it to use RevTeX or any style required by a journal. The only friction with my approach is when you need to work with coauthors or editors on revisions.
EDIT: I think I caused some confusion due to my sloppiness. I should have written “constrained to only writing in LaTeX”.
It doesn't shield you from much of the pain, initially at least. But you can separate it from the document and treat it as markup, and reuse bits more easily.
Of course pollen itself is a thing to learn. But if you work with text a lot and like lisp it might be worth it. It's been good to me.
Your comment made me want a modern TeX, written in Racket/Lisp.
How does this not exist yet??It doesn't seem that hard (famous last words tho) especially since turning arbitrary DSLs into xexprs is one of the things racket truly excels at.
I put TeX and Perl in my “decent tool with extremely shitty syntax” mental categorisation of languages. I basically never look at anything TeX related directly anymore unless I have to. It’s either the input material I converted to something better like plain text or vector graphics (fuck Tkiz based graphics are so miserable to use) or it’s the output from putting something more sensible into pandoc.
TeXmacs is WYSIWYG scientific editing platform. Documents created can be saved in TeXmacs, Xml, Scheme, PDF or Postscript. Converters exist for TeX/LaTeX and HTML/MathML. It can also be used as a graphical front-end for other computer algebra, numerical analysis, statistics software[1].
[1]https://www.texmacs.org/tmweb/home/welcome.en.html
Some pointers here: Papers: - https://arxiv.org/abs/2004.09637 - https://arxiv.org/abs/2112.05562 - https://arxiv.org/abs/2107.12115 Lecture notes: - https://www.iam.uni-bonn.de/abteilung-gubinelli/teaching/sto... Online lectures with TeXmacs: - https://www.youtube.com/watch?v=FL50D2PpswE&t=4990s
[1] https://arxiv.org/abs/2205.09851
An important thing for me was having context-aware keyboard shortcuts (that are barely possible in LyX).
Another cool thing that seems to be possible that I plan on exploring next is integrating math typing in TeXmacs with sympy and or Maxima. This would allow symbolic manipulation using the above packages directly in TeXmacs.
Seems to be about the worst name they could have chosen then
The WYSIWYG aspect of TeXmacs was crucial for me because I was able to "think about math" while working on the PC. When doing things in LaTeX I always found myself thinking on paper and then writing down in TeX.
I personally believe that "thinking on paper" is still better for me at the starting stage of mathematical research. However, once the outline of the proof was clear and I needed to clean up details and to write technical proofs then working directly on the PC helped a lot
Another fantastic feature of TeXmacs is the "preview on hover" package. If you have a reference to an equation and you put your mouse over it, TeXmacs can show you the equation in a popup. This was very important when I was going over the draft once I have written the proofs and when checking for correctness. I have hundreds of numbered equations and checking that I was citing the correct bound in a proof of a lemma was made much easier by this feature. Before passing to TeXmacs I tried to find way to do this efficiently using LaTeX. Intrestingly enough very few PDF's have a "breadcrumbs" feature for you to be able to jump to a reference and then go "back" to your previous position in the paper. The closest I came was Emacs+Auctex+preview. Since Emacs is scriptable and already has the notion of "mark ring" that is essentially the "breadcrumb" feature, that helped a lot.
TeXmacs also has some shortcomings. While it is written in Scheme, I found discoverability and documentation lacking. However, there is a very friendly community of people that are very active on the forum. Any question I had about how to do something was usually answered in at most a day. This is actually great because the "basics" that one needs to work immediately are actually well documented. The things that are hidden are more advanced features. For example, there is math folding [2] that I accidentally discovered browsing the menus and then figured/asked on the forums. I had to ask about how to remove sub-sub-sections from the TOC [3] but, to be fair, even in LaTeX you cannot figure it out unless you know the macro.
The thing that I miss most from Emacs is the "self-documenting" nature of all the Lisp (Scheme in the case of TeXmacs) code and functions and the somewhat quirky search/replace functionality in TeXmacs. Honestly, the regexp search and replace (especially with a visual help package) in emacs was very powerful. But I believe the community is actively working on the former.
[1] https://arxiv.org/abs/2205.09851
[2] http://forum.texmacs.cn/t/folding-computation/551/5
I'd really like to get to know plain TeX a bit better, but I've got no idea where to start.
I also found A Beginner's Book of TeX by Raymond Seroul and Silvio Levy helpful as a quick reference.
Also I have an anti-recommendation for Knuth's TeXBook. I did not find this book helpful at all- too much information buried in exercises (which I don't think is appropriate for a reference), and not enough directly said on how to do useful things. Figure out how to make a table of contents using only the TeXBook..
I mean, look at this abhorrence. And look at what you open up in a TeX file, which again is meant to represent English prose.
I want to get stuck into the article. At least show me my abstract. But no. It's just more and more backslashes.It's just vile. And the people who use it have Stockholm syndrome, and they pass it on to their PhD students who spend nights before their presentation at 2am, trying to align a table and crying. Then they have Stockholm syndrome too, and they tell you "it's pronounced LARTECH" and give themselves a little pat on the back.
And here's an equation:
How are you supposed to manipulate that? I can open up a WYSIWYG editor and literally do maths by just copy-pasting parts from one side to another. But this, I can't even read, let alone intuit.TeX. It's the worst.
For more complex equations people use line breaks and indentations, and/or macros.
https://jasomill.at/metric.pdf
produced with
(note that, using my editor defaults, none of this equation's lines are truncated or wrapped)The \g... and \pdF... are trivial ad hoc macros defined in the document. Producing the same document by repeatedly copy/pasting the tensor components and partial derivatives would have been considerably more time-consuming and error-prone.
Also notable is the align environment: type \\ for a manual line break and & at each point that is to be aligned.
I just tried to reproduce this with the "WYSIWYG" equation editor in Word, and I can't figure out how to do it — right-clicking on plus and equal signs gives an "Align at this Character" option, but this appears to be a special case, as the option doesn't appear when clicking on anything else in the example.
In particular, had the first line involved (implied) multiplication instead of addition, there apparently wouldn't be any acceptable point to declare alignment!?!
I'm also not sure what it means to align "at" a character, as characters have width, and characters to be aligned aren't necessarily the same width. Does it align the left sides? The right sides? The center?
Moreover, the default key bindings in the Word equation editor are counterintuitive: the usual binding for "manual line break" instead splits the equation in two and there doesn't appear to be any default binding for the "Insert Manual Break" equation editor command at all.
Sure, LaTeX has a learning curve, but it's not at all obvious to me that Word is any better in this respect.
This is really solved by the graphical equation editor in LyX. I wrote my master's thesis and PhD thesis using it, having previously written an undergrad thesis in raw LaTeX. When I switched, I was part way through writing up notes for a masters course and ended up rewriting them in LyX (sadly its LaTeX import is terrible). I found that I was able to write notes faster by a factor of 3! And I honestly was no LaTeX novice, it just really is less efficient. I shudder to imagine how long I would've spent on my PhD thesis without LyX.
The mistake people make with LyX is assuming it is for beginners trying to avoid LaTeX (and it does partly market itself that way). I consider it the opposite: it's best suited to those who already fully understand LaTeX. You still need to dip into it occasionally to edit the preamble or stick in the odd little snippet of manual LaTeX (that's ERT in LyX terminology). And while typesetting errors are much rarer with LyX (it's much harder to forget a closing brace when you don't put them in in the first place), when they do occur it's because something has gone really wrong so you better know what's going on.
http://asciimath.org/
I wish someone would integrate this into pandoc so I could use it in rmarkdown.
I'd write the above expression as the following:
\sigma_I^2 = a^2 s^2 + (1-a)^2 S^2 + 2a(1-a) \sigma
The only thing you need to know to understand it conceptually is `_ -> move next character down`, `^ -> move next character up`.
I mostly write in Word and I can tell you that it is not that much better than LaTeX. Sure, the editor is WYSIWYG so you can see right away the title, abstract, text, etc.
The problems I have with Word are mostly solved in LaTeX. For example, references are automatically managed in LaTeX. In Word, that's mostly a manual process (I know there are integrations with Zotero/Mendeley/whatever, but those are a little wonky on a long paper---I have never used the built-in citation manager). I sometimes feel bad for the editors that have to check all my reference lists. They usually find 1-2 papers that are either missing or included and no longer cited.
Tables are also a problem in Word, especially if your collaborators use an older version that breaks the formatting (Moving between Google Docs -> Word -> Google Docs also breaks a lot of things). I can't tell you how many times I had to reformat tables that a collaborator broke. Making complex tables is also wack sometimes, like adding a simple sub-rule between cells requires some column hacks in Word.
Table/figure numbering is also another thing that I loathe in Word. Manually renumbering is a pain and the automatic numbering always breaks for me in a way or another (maybe still thanks to my collaborators).
All those things work pretty well in LaTeX with some backslash commands.
What Word really shines is track changes and commenting. I don't know if there is a LaTeX editor where you can track changes and comments like in Word (I know that Overleaf has something that kind of works).
Powerpoint vs. Beamer is a whole different ball of wax. Both have pros and cons. But with presentations with a lot of equations, beamer is definitely better but, as you point out, it doesn't play well when you want to put an equation in a specific spot in the slide. In powerpoint, you can just click and drag and you are done.
You know how people make animations in Beamer?
They write the same picture on multiple slides and then flip through the slides really fast. Like drawing flipbook pictures as a kid.
This, with computers thousands of times more powerful than what took us to the moon.
As far as I do not find something with equivalent or better typesetting quality I'm stick with LaTeX :-)
To those who hate it: try to learn some tangible "alternatives" like *roff or TeXinfo and than you'll see LaTeX syntax is not that horrid or difficult, then try to learn some modern typesetting tools like those from Adobe. LaTeX win easily, that's is. Said that IF someone can offer something equivalent with a far simpler/nicer markup as I said before my love is just to the quality of the output!
I don't understand why they encode these expressions f^{(2)}(x) like so. They should be written like a regular function: f 2 x. Then you apply your styling depending on eg. the domain definitions. Eg. for f : N x R -> R, then the first argument is sub/super-scripted... etc.
Another eg. In python, we would render this expression: sum([i*2 for i in range(0, n)]) with sigma expression... etc.
Hey btw, I'm looking for contract work! https://github.com/1player/resume/blob/master/resume.pdf
I still tend to use LaTeX for some long-form documentation, but I'll probably stick to HTML for my resume and I'm finding myself using HTML + Markdown a lot more for other authoring tasks too.
* Cross-platform
* Industry standard in the sciences
I made my partner switch to Latex thanks to the bibliography. Writing tables almost made her switch back to Word.
[0]: https://www.sfu.ca/~ljilja/cnl/info/UseCrossReference/index....
With word one can get from a decently formatted text to multiple quarter-filled pages with a single additional sentence, because it has comparatively bad algorithm for text-block reflow.
It also breaks regularly. I know a student in the middle of a thesis writing up marathon, and the time he wastes with this is unbelievable. For example, there are the references that just end up garbled, with Word putting in an error message instead, the references that somehow don't get updated despite having been entered exactly like all the others that do. It adds at least two passes every time he wants to send a chapter to proofread.
Tables in LaTeX are bad. References, notes, and bibliography in Word are horrendous.
Word 2000 performed wonderfully. I had no problems with references or images shifting around, no strange errors, nothing. Bibliography sucked, but in general it was a pleasure to work with.
Word 365, on the other hand, is something I have to force to do what I want again and again. It is built in such a way that doing things cleanly and error-free is difficult and much less obvious than in Word 2000. Even standard tools like image anchors, which worked nicely in 2k, are not reliable anymore. I got the feeling that this is due to automatisms aimed at casual users.
Once you enter the area of strange formatting, chars typed by who knows either a cat walking on the keyboard or sleep deprived student typing madly, fixing these in a binary format is a real PITA. Lyx/LaTex text formats are trivial to grep, diff, etc.
Today I would probably start and try to stay as long as possible in Markdown, then reformat it at the very end.
LaTeX is just TeX but with a lot of new macros. The intent is different: With TeX, you just say in detail what steps you want the software to do. With LaTeX you say what you want in general terms and f'get about the details.
Maybe in another life...
You are still left with formatting equations, but Word lets us use Latex-ish syntax for that now, so you can keep the fine control of Latex within the GUI context.
Don't get me wrong, I hate Word, but it is required in many environments. Adopting a rational use strategy helps a bit.
https://www.wordsense.eu/macdink/#English
This is of course only an anecdote, but I know many people who started in word, gave up on it and moved to Tex/Latex, but nobody who went the other way (that is to say, I know people who tried to give up on Tex, but eventually went back - not anyone who actually published with it). This might have quite a bit to do with subject matter - Word has always been an awkward fit for mathematics.
It suffices to say that I hastily hired a friend in school to work over the weekend converting the beautiful LaTeX into Word.
I would create a counter for the affiliations, let the \affiliation command define macros that contain the name of the affiliation and the value of the counter and then append the output to two different helper macros, one for authors and one for affiliations, whose contents I dump in \maketitle.