5 ms·
Can I make a simple point? As an academic, 99% of my time is spent doing two things: 1. Writing statistical computations using a language like R or python. 2
by dash2 3y ago
Can I make a simple point?
As an academic, 99% of my time is spent doing two things:
1. Writing statistical computations using a language like R or python.
2. Writing English text.
The most important thing about a document language is that it should prioritize those things. For example, here's why Rmarkdown/Quarto is better than TeX. A TeX document starts:
\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{geometry}
\usepackage{enumitem}
\setitemize{noitemsep}
\usepackage{tabularx}
\usepackage{setspace}
\newcolumntype{x}{>{\centering\arraybackslash}X}
\newtheorem{theo}{Theorem}
\newtheorem{prop}[theo]{Proposition}
\newtheorem{lemma}{Lemma}
\usepackage{fontspec,xunicode}
\defaultfontfeatures{Mapping=tex-text}
\setsansfont{TeX Gyre Heros}
A quarto document starts:
---
title: "Natural selection in the Health and Retirement Study"
author: "XXX"
abstract: |
I investigate natural selection on polygenic scores
in the contemporary US, using the Health and Retirement
Study. Results
partially support the economic theory of fertility as
an explanation for natural selection: among both white
and black respondents,
scores which correlate negatively (positively) with education are
selected for (against). Selection coefficients are
larger among low-income
and unmarried parents, but not among younger parents or those with less
education. I also estimate effect sizes corrected for noise in the
polygenic scores.
date: "September 2023"
You see the difference in emphasis.
- nanna 3y agoI don't get the problem. If 99% of your documents need the same packages and formatting, then all you need to do in LaTeX is create a template (eg via Yasnippet in Emacs) or dump it all in a LaTeX class file and then import it in your frontmatter, and Bob's your uncle. There are many frustrating things about LaTeX but I don't see how this is one of them.
- dash2 3y agoProbably that's true. But first, I don't know how to create a class file, or a template (if that is a LaTeX thing). And since I've never seen anyone else do this, I guess that most academics don't either. Second, my point isn't just about the specific issue, it's that this issue reveals how TeX thinks about the world. It thinks you want to spend your time writing TeX. No, I want to spend my time writing English. Here's another example. This is how you embed an image in quarto - it's just markdown:  And here is how you do it in TeX: \begin{figure}[t] \includegraphics{path/to/image} \centering \end{figure} Which of these is easier to memorize and to read past? Similar comments apply to tables, links, numbering and so on.
- mr_mitm 3y agoI understand your frustration. Maybe it helps to know where this problem comes from. TeX is extremely powerful and lets you create arbitrary documents. This is the first time I heard of quarto, but apparently it makes a lot of choices for you that you understandably don't really care about. Instead of developing quarto, one could have simply written a LaTeX class that defines a function like so: \newcommand{\image}[2]{\begin{figure}[t]\includegraphics{#2}\caption{#1}\label{#2}\centering\end{figure}} Now you can just write: \image{caption}{path/to/image} Of course, it is now much less flexible, as you cannot define a custom label or different placement instructions. But that is the price you pay for short and memorable syntax. By the way, developing a LaTeX class is not necessarily hard. It is more or less a file whose name ends in `.cls` with all the commands that you typically put in your preamble. It just needs a header of three lines that define some meta data and also supports options. See here for an example: https://github.com/latex-ninja/colour-theme-changing-class-tutorial-/blob/master/myColourChangingArticle.cls https://github.com/latex-ninja/colour-theme-changing-class-t... You put it in the same directory as your main tex file or in the system wide TEXMFHOME or user-specific TEXMHFHOME.
- xeyownt 3y agoYes, and with tools like ChatGPT it's even easier to write TeX documents. I exposed this very problem and ChatGPT proposed exactly the same solution, and also another one using a custom environment.
- gbalduzzi 3y agoThat is just an expression of the LaTex problem though. People (as in, the majority of people) will not be comfortable using a tool that is so unintuitive and hard to use that you need to use an AI to help you in writing. Writing a document is not supposed to be hard and require assistance to do.
- jacobolus 3y agoThe problem is that your goals and skills don't match the purpose and capabilities of the tool, not that the tool is insufficiently "intuitive". Manuscript composition used to be: write your document by hand or with a typewriter, handwrite some notes in the margin, throw in some pages with your figures on them, then let a professional typesetter take care of all of the technical details of making a typeset document for printed output. This was a whole separate career, and the typesetter would sink almost as much time into making your document look pretty as you put into writing it. If you are using LaTeX, you are taking on the role of the professional typesetter yourself, and you need to make some specific technical choices to get some output from it. This can be a problem if you are inexperienced and don't know which choices to make or in a hurry and don't want to make any choices, but is also good insofar as it lets you actually produce a professional quality document if you have the time and expertise to do so. The difficulty involved is at least an order of magnitude less than doing composition of metal type. If you are using markdown (or whatever), you are just punting on having a professional document at the end, and/or letting a system make all of the choices for you (often badly), or perhaps expecting to still hand off your document to a professional at the end for proper typesetting.
- systemEarth 3y agoYou might be interested in typst. It offers an incremental live compiler.
- dmulligan 3y ago\documentclass{article} \title{Natural selection in the Health and Retirement Study} \author{XXX} \date{September 2023} \begin{document} \maketitle \begin{abstract} I investigate natural selection on polygenic scores in the contemporary US, using the Health and Retirement Study. Results partially support the economic theory of fertility as an explanation for natural selection: among both white and black respondents, scores which correlate negatively (positively) with education are selected for (against). Selection coefficients are larger among low-income and unmarried parents, but not among younger parents or those with less education. I also estimate effect sizes corrected for noise in the polygenic scores. \end{abstract} \end{document}
- bionhoward 3y agoMakes me wonder if Nota did work with Rust, then we could move the dependencies into a cargo.toml file and compile our documents. That would enable declarative macros for document generation at compile time as well as interactive rust code inside your document at reading time. Plus you could refer to the dependencies by their package name like amsmath::line or something
- seanhunter 3y agoThe difference is you know the easy way to get what you want in rmarkdown/quarto but only know the hard way in latex? My latex docs look nothing like that because I put all the boiler plate in a .sty file.
- ska 3y agoYou are comparing apples and oranges, at least a bit. The latex equivalent is \documentclass{article} \title{Natural selection in the Health and Retirement Study} \author{XXX} \date{\today} \begin{document} \begin{abstract} I investigate natural selection on polygenic scores in the contemporary US, using the Health and Retirement Study. Results partially support the economic theory of fertility as an explanation for natural selection: among both white and black respondents, scores which correlate negatively (positively) with education are selected for (against). Selection coefficients are larger among low-income and unmarried parents, but not among younger parents or those with less education. I also estimate effect sizes corrected for noise in the polygenic scores. \end{abstract} ... \end{document} Everything else you have there in your preamble is about either adding capabilities or changing formatting, you don't show how that is achieved in the other markdown. I think I get your point, but in practice that part doesn't really get in the way, and if you are doing the same thing over and over (e.g. for the same publication) it's just a template anyway. I don't love Tex/Latex, but most of the other markdown comparisons that emphasize "it's simpler" are because they can't do as much. Which is fine until you need some of that capability.
- dash2 3y agoIt's absolutely true that you may need to customize things. And then you are stuck with the big quarto disadvantage: debugging a toolchain that typically looks like quarto -> knitr -> markdown -> pandoc -> [tex -> pdf | html] and not knowing exactly where the error came from. At the same time, the markdown defaults produce a nice, readable paper. The TeX defaults get you something that reminds you of Rubik's Cube and Duran Duran.
- smaudet 3y agoIs Lyx still around? I remember it had good defaults. Haven't used in ages and it had some installer issues but I got fairly comfortable writing latex papers without learning a ton of latex... Ofc that was a major downside, something other markdown editors figured out - if you give people buttons that make it easy and you make it easy to learn, they will learn what they need.