So, yes, in a vacuum I think that math notation in LaTeX works really, really well. However, for a larger document, there's a lot of other features that would be nice to have and they're difficult to implement in TeX.
So, yes, in a vacuum I think that math notation in LaTeX works really, really well. However, for a larger document, there's a lot of other features that would be nice to have and they're difficult to implement in TeX.
I suspect I don't recall having those issues because I avoided them in the first place. LaTeX requires thinking about the whole document before you start it. It isn't easy to work with if you don't approach it that way. Before pressing any keys, think about the document in its entirety.
In my case, I took shorthand notes on paper, did the outline, and then began working on it. It requires a holistic view, and should be envisioned before even pressing a single key. It sounds more like you're fighting it, instead of thinking within it.
These were some of the first things taught to us in the intro to LaTeX class. I realize this is a horribly generic response, but I'd suggest you take an intro to LaTeX class to go back to learning the basics.
LaTeX is pretty versatile and I can't see any reason to replace it. It just means you'll have to learn something new, so you might just as well master the tools you already have.
Again, I realize this is a very generic reply. You're not self-taught with LaTeX, are you? If you are, then I really would like to stress the value of a good professional class. You can do an intro class in just a single semester and there's almost certainly something adequate locally.
There are probably some acceptable online courses but you may have to unlearn some stuff and I suspect a classroom will be easier for that. I strongly suspect I don't recall having those problems because I never encountere them. Of all the classes I took, the intro to LaTeX was one of the more valuable.
Heck, it has been so long that I should probably take it again. It is one of those use it or lose it things and I haven't used it for well over a decade.
In fact, I ended up writing my thesis in plain TeX, and was able to write some nifty macros to solve exactly the kinds of "code reuse" problems you mention.
Anyway, the whole exercise turned TeX from "arcane and painful" to "quirky but powerful" for me. I kind of enjoy hacking around on TeX now.
Plain TeX library support is also surprisingly good. I used amstex for the document style and eplain for some commutative diagram and indexing stuff.
I did kind of a roll-your-own publishing system (focusing on ePub) in an experimental fashion and it worked okay but I didn't spend too much time on it as I had other concerns. I did a writeup on that here (http://theheratik.net/books/tech-epub/), not that it matters much.
In any case, yes, I think that pandoc may work well. Right now, the two approaches that I'd like to experiment with more are the pandoc/markdown/latex toolchain as well as LuaTex.
Thanks to ubiquitous MathJax and so on much of the TeX-like out there is already some subset that hasn't got the standard programming features of TeX. There's already some core behavioural standard that is arguably better (at what it does) than HTML/CSS as an universal document language.
And: we're starting to talk about massively transpiling to JavaScript rather than adopting a better language for remote applications. JavaScript isn't even that ensconced -- it's much easier to get programmers to change.
Maybe the entire LaTeX document model, based on the idea that the ordinary user doesn't get to do layout, needs to be scrapped. Maybe people want MS Word where you paste your figures where it well damn pleases you.
But even Word has taken to letting you type equations in TeX-like.
i think semantic macros really help with that, but they are not a silver bullet. i'd really like to see editor plugins that convert LaTeX commands to actual symbols (for example, as soon as you write the space after the q in "\neq ", it gets converted to a "=/=", and when you type backspace to erase the "=/=" you get "\ne"). that has been already implemented for languages like agda, and in a simple form is present in text editors that support fonts with ligatures.
i know that what i'm proposing more on the "wysiwyg" side (which some LaTeX fundamentalists might dislike), but i think it would be a very nice thing to have when editing complicated formulas or diagrams.
You also want to be able to define subexpressions and reuse them as needed. Is that correct? And you don't want to define those ahead of time? This sounds like the math equivalent of a lazy programmer that wants to use goto and highly unstructured coding practices. You want to write arbitrary expressions and then pull parts of them into other areas of the document without defining them individually. At least that's what I got from your comment.
How about a nice math-document editor with a mode where expressions can be seen as an assembly of previously defined items. Then you could right-click on one and select "go to definition" from a popup menu. That's how the software people do things these days. But if you want to use non-math aware text editors for writing math papers I fear you're never going to get what you want.
TL;DR my impression is that poster wants a very sophisticated math-aware document creating program that has a sort of development mode and display mode. I like it, but am not aware of such. I could also have totally misinterpreted the comment.
1. LaTeX document
2. Ability to define macros locally and more easily. For me, a macro is most of the time just easy textual substitution. However, there are times when I want to generate a piece of text repeatedly with some mild variations.
And, look, LaTeX does most of these things, but there's a huge amount of redundancy when writing up a math document. We sort of get away with things by labeling equations with numbers and referring back to them, but this is largely a remnant from the physical typesetting days when repeatedly typesetting the same expression was laborious and error prone. When we build up a completed theorem from a discussion, I don't want to refer back to old expressions, I want to repeat everything I have there. It creates a contained presentation for the reader. It's easier for everyone, including me, to refer back to later. I should not have to retype everything to do this. TeX is basically a programming language. I should be able to locally define functions and call them when I need them. My complaint with TeX is that it doesn't make this usage all that easy to accomplish and it's, frankly, not all that much to ask for.
--- Edit 1 ---
One concrete example that I'm typing up now: I'm currently typing up some circuit equations from some project. We have a three-phase inverter, so we used a dq0 transformation to simplify things. The equations been the d and q axis are basically the same except for some differences in the subscripts (some are d, some are q, sometimes we reverse things.) In a reasonable programming language, I could just write a function to swap back and forth and code the equations once. When I implement things, that's what I do. When I type them in LaTeX, I type them twice. I shouldn't have to.