7 ms·
LaTeX3 Automatic Labels for Fun and No Profit
- kunley 3y agoThe Post-Scriptum is hilarious:)
- fnands 3y agoSomeone knows their audience ;-)
- bmacho 3y ago> It’s weird I even have to say this, but don’t stalk me and email me at my personal address. I am not sure of what happened, and it must have been unpleasant, but someone going up on your website hierarchy, they reach https://commutative.xyz/~miguelmurca/ https://commutative.xyz/~miguelmurca/, they click the only link, and you personally list your profiles there, including email, github and insta. It is OK if someone contacts you for whatever reason on addresses and profiles that you explicitly shared. > If you email me anywhere else, I will not respond. I also cannot force you to follow basic etiquette if you do write, but it would be appreciated. This is rude, it looks bad in the article, and you are the one who doesn't follow basic netiquette.
- miguelmurca 3y agoHey, hope you enjoyed the article itself. I'm sorry if you felt that addendum was aggressive. However, I still feel like I'm justified in making it absolutely clear how (and if) I want to be contacted. I am in a complicated position where I'm speaking to a niche -- not an imaginary niche, by any means -- but actually addressing every reader. In the face of this, my option was to clearly state my boundaries, regardless. I list an email address at the end of every article, for the purposes of discussing the content of the article. I add a "+ext" to every email I list (including the one on my personal home page). I had people ignore the email I stated in the article, find a different email, strip it of the + tags, and email me there in a foreign language and opening with "I assume you speak X" (presumably because of my name?). I disagree with you that it's fair game to do the above. OSINT is, well, legal, and I'm not trying to hide my identity, clearly. But I would still be upset if, for example, someone wrote to my university email (which is not hard to find out, by your own procedure) regarding this post. Nonetheless, again, it is not my goal to sound rude, but simply to set boundaries and expectations. I will remove the second sentence towards this goal, but stand by its objective meaning, and will keep the rest as is. Cheers
- verticalscaler 3y agoThe article itself is great. > I will remove the second sentence towards this goal Your critic decided their negative emotions about a miniscule matter are more important than the actual contents of your post and worthy of derailing the conversation. And then they called you rude. There is really no need to cater to such people. It obviously has zilch to do with you in actuality.
- bombcar 3y agoThe sentiment you have is fine, but if you really wanted to you could rewrite it like this: If you wish to contact me by email, by all means do so to miguelmurca+autoref [æt] cumperativa.xyz - I may not be able to respond. If I don't please don't try to find other emails to send to me, as I'll not respond to those, either, and just delete them. This post is in English. If you wish to write me, please do so in English. Other languages will be deleted. (The key is assholes won't read it anyway, so there's no reason to snark them, just delete.)
- bmacho 3y ago> However, I still feel like I'm justified in making it absolutely clear how (and if) I want to be contacted. > I list an email address at the end of every article, for the purposes of discussing the content of the article. I am maybe blind, or because of adblockers, or because of cloudflare, but they don't show up for me, in edge, and in firefox. You definitely should make it easy for the people to contact you in your preferred way. Put it under the articles, under the blog home page https://commutative.xyz/~miguelmurca/blog/ https://commutative.xyz/~miguelmurca/blog/ , and maybe under your HN about section. My previous message was under the impression that you don't put a contact info in this blog, and I tried to demonstrate that getting messages at your other contact is your fault, not the public's fault or "HN reader"'s fault. (I wonder if But, 1. famously, HN can be quite predictable in some of their responses (by what I expect is, essentially, a meme effect), and 2. I’ve had some unexpected experiences resulting from previously reaching FP in HN. has any truth in it, and the readers from HN are worse than the other readers?)
- deleted 3y ago[deleted]
- YWall39 3y agoNice piece, and his comment on typst is spot on. I would love for typst to displace LaTex, I hate LaTex and use it every day, and deep inside know it will never go away, unless a much better programmer than I writes a LaTex -> typst converter that covers all the corner cases. One can always hope.
- cbolton 3y ago> Yes, we are aware of typst. I think it’s cool, but C++ hasn’t replaced C, Rust hasn’t replaced C++, Typst is unlikely to replace LaTeX. Likewise, many are aware of LuaTeX, but, again, the entrenching of a 40-odd year system is not to be underestimated. I am rooting for typst, anyway, and hope it finds its place. Well here's the process I went through in the last few years: I found out about LuaTeX, saw it was supposed to replace pdfTeX and thought the future of TeX was bright. Then I saw the continued efforts in LaTeX3 and thought that was weird and wasteful: code now looks even worse with all \ExplSyntaxOn ... \ExplSyntaxOff sections and the new command syntax like \exp_args:Ne. If you're going to have a mix of two languages anyway, it makes much more sense for the second language to be a a minimal but real programming language like Lua. Then the LuaTeX devs moved their efforts to LuaMetaTeX and I found myself scratching my head. Then I spent some time with typst. Now I don't care what happens in TeX land... The experience with typst is incomparably better, and the pace of development is high in both the core language and the ecosystem. Features that took a decade to be fleshed out in LaTeX are sprouting like mushrooms in typst. It's not a fair fight. The author is a PhD student that has been using LaTeX heavily for 10 years. But what should a new student use, and why? When the only reason to choose LaTeX is old colleagues and gatekeeping publishers, I know it's a matter of time.
- deleted 3y ago[deleted]
- YWall39 3y ago> The author is a PhD student that has been using LaTeX heavily for 10 years. But what should a new student use, and why? When the only reason to choose LaTeX is old colleagues and gatekeeping publishers, I know it's a matter of time. Sadly its more than that. Will we be able to compile a typst file made today in 10 years? I have to do that regularly with latex. Will everybody one collaborates with also use typst? Very unlikely. A new PhD student may find it beneficial to write papers with someone who only uses latex. then why bother with typst? (and I really want typst to win)
- kldx 3y agoTypst is a single file binary. The preview packages are versioned too. If typst breaks the API in ten years, I'd still be able to download the old binary and make a PDF from scratch. I can't begin to imagine the complexity in installing multiple texlive distributions side by side.
- wdroz 3y ago> Yes, we are aware of typst. I think it’s cool, but C++ hasn’t replaced C, Rust hasn’t replaced C++, Typst is unlikely to replace LaTeX. Likewise, many are aware of LuaTeX, but, again, the entrenching of a 40-odd year system is not to be underestimated. I am rooting for typst, anyway, and hope it finds its place. A good place to start would be to provide a compilation toolchain from typst to TeX, if they really want to replace TeX. Pandoc[0] can convert Typst to LaTeX. IMO If you are able to write in Typst, write in Typst, it's so much better and readable. Your final LaTeX3 macro are hard to read and difficult to parse with the eyes... Also Typst is easier to learn. [0] -- https://pandoc.org/try/ https://pandoc.org/try/
- crotchfire 3y agoCome on, be serious. Pandoc can "convert" html to things too, but you wouldn't use it as a web browser.
- rabbits77 3y agoI can't remember not being disappointed in pandoc. I used to try pandoc first for file conversions but at this point I try it last, only after exhausting format specific tools first. For example, the conversion from latex to html in pandoc is a joke, just unusable garbage, compared to the results of tex4ht.
- venice_benice 3y agopandoc is seriously under-powered for the kinds of things that LaTeX and Typst can do. Much of the information in Typst/LaTeX source code would simply be ignored during the conversion. It is fine for simple documents, but cannot handle a lot of stuff.
- jonhohle 3y agoPandora offers a superset of LaTeX and any other markup languages as long as you’re not using it for final rendering. I have a Markdown+LaTeX project I’m working on and try to write mostly in markdown, but can drop down into LaTeX in-line if need be. I compile a tex file with Pandoc and render with pdflatex, bibtex, makeindex, etc., etc.
- rrgok 3y agoI still wonder why anyone would create such awful grammar for a programming language. Considering LaTeX's initial release was 40 years ago, there were certainly other programming languages from which to draw inspiration. And I certainly don't believe that LaTeX DSL was the most suitable solution for solving typesetting problems.
- bombcar 3y agoLaTeX grammar makes much more sense when you spend some time using raw TeX with no macros at all - it's surprisingly capable on its own and the LaTeX becomes much more obviously "slight improvements". Many things people think of as LaTeX are actually just TeX.
- trueismywork 3y agoLaTeX grammar is actually very good to type and quite powerful and compact. It's not a programming grammar, it's a markup language. The problem with LaTeX was always the lack of underlying proper programming language and data model. The syntax always has been excellent.
- Ar-Curunir 3y agoThe syntax is full of inconsistencies and it generally user-unfriendly: why is _ allowed only in math mode? Why can't macros have numbers in their names? Why does a simple thing like bolding text require a \textbf? LaTeX is powerful and I use it every day, but let's not pretend it's got qualities it doesn't.
- deleted 3y ago[deleted]
- trueismywork 3y ago> why is _ allowed only in math mode? Because it has different meaning in different context. It's a nice shorthand for subscript in math mode and you still need it as an underscore when you write code or normal text. > Why can't macros have numbers in their names? I give you that. That's due to underlying lack of proper programming language. > Why does a simple thing like bolding text require a \textbf? What else do you want there? The markdowns * has famously bitten me multiple times when it interfered with my multiplication in math (math + mathjax). Or when the bold needs to cover a full paragraph. I don't have a better suggestion. I'll be happy to hear another one.
- larsrc 3y agoA nice intro to making macros, which is one of the most powerful parts of LaTeX indeed. Autoref itself seems a fine way of messing up your references and making your source code less readable. The beauty of naming is that you have the context at hand. Moving around blocks of text, or adding and removing text, happens throughout the process. With autoref, you now have to remember to _sometimes_ update the refs or get subtly different references. I wouldn't trust myself to get that right.
- michaelmior 3y ago> Yes, it’s $YEAR and we’re still producing PDFs. Again, historical reasons plus the fact that most people doing maths are not necessarily very interested in computers. I generally find PDFs to be a very agreeable way to read the sort of content LaTeX is typically used to write. And in writing it myself I don't need to think about what weird layout issues someone else might encounter when viewing my content. There are certainly accessibility issues with PDFs, but also ways to mitigate that[0]. [0] https://libguides.lib.msu.edu/c.php?g=995742&p=8207771 https://libguides.lib.msu.edu/c.php?g=995742&p=8207771
- nabla9 3y agoThe reason for LaTeX is the output quality, not the input. Real LaTeX users don't use LaTeX to write documents. whatever -> pandoc -> LaTeX -> perfect document ^ | LaTeX template ----+
- trueismywork 3y agoMost of the things that need to be written in LaTeX (math) cannot be written in any other language yet.
- nabla9 3y agoThere are lots of applications that can be used to write math that is converted into LaTeX equations. You can also use MathML -> Latex The equation subset is the best part of LaTeX syntax and so many people learn it. It's very compact compared to alternatives.
- cbolton 3y agoI find the typst syntax nicer and more compact: https://typst.app/docs/guides/guide-for-latex-users/#maths https://typst.app/docs/guides/guide-for-latex-users/#maths I was initially suprised to see that the typst devs chose to go with their own syntax, but I'm now very happy they did.
- trueismywork 3y agoI would be interested to see how the formula looks for a more complicated equation. For example, Eq 3.12 or 3.31 in the link https://arxiv.org/pdf/2203.09346.pdf https://arxiv.org/pdf/2203.09346.pdf
- ioasuncvinvaer 3y agoshould be close to 3.12 $ norm((u_0)_j-hat(u)_j (t=0))_(L^2 TT^d) &<= norm(u_j - hat(u)_j)_(L^2 delta Omega) \ &<= sqrt(2 max {2h_Omega,d+1} / rho_Omega) norm(u_j - hat(u)_j)_(H^1 (Omega)) \ &<= sqrt(2 max {2h_Omega,d+1} / rho_Omega) C_(1,k,d+1,u_1) lambda_1 (N) N^(-k+1) $
- thangalin 3y agoMarkdown does not specify how to add labels and cross-references for figures, equations, tables, etc. Many moons ago, I asked about them on the CommonMark forum[1] and described a syntax that was general and internationalizable. Given that CommonMark has frozen the Markdown specification, I implemented a consistent label and cross-reference syntax for my editor[2], KeenWrite[3]. These labels and cross-references are translated to XHTML, then transformed from XHTML into ConTeXt macros that are subsequently typeset. [1]: https://talk.commonmark.org/t/cross-references-and-citations/4013 https://talk.commonmark.org/t/cross-references-and-citations... [2]: https://gitlab.com/DaveJarvis/KeenWrite/-/blob/main/docs/references.md https://gitlab.com/DaveJarvis/KeenWrite/-/blob/main/docs/ref... [3]: https://keenwrite.com/ https://keenwrite.com/
- blt 3y agoAm i missing something, or is this useless when you want to refer to an equation from "the past"? I find myself doing that often. For example a methods section might pose an optimization problem, then the experiments section a page or two later says "we solve the optimization `\eqref{main-problem}` using Solver X".
- mmplxx 3y ago> but C++ hasn’t replaced C, Rust hasn’t replaced C++, Typst is unlikely to replace LaTeX. Weird conclusion, because LaTeX has mostly replaced TeX. There is a nice symmetry here: C -> C++ -> Rust ~ Typst <- LaTeX <- TeX