News for hackers. Stuff that matters.
Re:Thoughts on Markdown by periheli0n on Monday February 21, 2022 @04:30AM (#30413649)
The discussion reminds me a little of the one around LaTeX in the scientific community. Latex is extremely powerful but reading the raw source of a text is a pain. WISYWIG is just so much more comfortable when writing, but MS Word sucks in its own specific and manifold ways (as does LibreOffice).

HTML is still not nice to read, too much boilerplate tags required. Markdown source however is mostly well-readable in a plain-text editor, and offers the basic formatting that serves 95% of the needs.

But the truth is: the ideal text layout platform for scientific writing does not exist.

Markdown+HTML+CSS could be getting close, but it currently still lacks LaTeX's tooling for citations, support for pagination.

MS Word's "track changes" is extremely useful when collaboratively editing (and no, Overleaf's version doesn't come close, unfortunately). But references and citations in Word still are no match for the flexibility of bibtex, even with Papers/Zotero/Mendeley. Figure placing can be a nightmare, although LaTeX is not infallible, either. And you need a Mac or Windows to use Word, and on a Mac it feels like it's running in an emulator.

I have given up on the belief that one tool could solve all this. There are a few good attempts like overleaf and the less-known authorea (which I liked more), but these are cloud apps which complicates writing offline.

The only solution is to choose whatever tool works for the specific use case, learn to live with its shortcomings, and never forget that in the end only the finished manuscript counts.

Re:Thoughts on Markdown by jonathanstrange on Monday February 21, 2022 @05:12AM (#30413944)
The problem is not writing or reading LaTeX, properly written LaTeX is very readable. It's easy to maintain and understand, and Bibtex for bibliographies works fine once you've gotten used to it.

The problems start once you have to convert this to MS Word, which is essentially impossible with any advanced LaTeX document which will invariably contain complex formulas and also include hacks and adjustments in the preamble. I've done it several times and it basically requires a rewrite. All of the existing tools fail. In fact, in a book I've once edited and made camera-ready in LaTeX, the LaTeX contributions were harder to integrate into the book than the Word files!

Recently I had to deliver a book I've written camera-ready, doing all the typesetting myself, because a large prestigious publisher I had a contract with turned out to be unable to deal with LaTeX. In a sense the problem really is MS Word, it's still the standard and I was astonished to learn about the publishing world in my postdoc time how surprisingly many publishers only deal with MS Word files and do not even use any special typesetting software - many use Word all the way down to creating the final PDF for printing! Looks horrible but I know of several major academic publishers who do it that way.

Re:Thoughts on Markdown by bluenose69 on Monday February 21, 2022 @05:26AM (#30414062)
You're right: LaTeX is very readable. I've never understood the complaints about the system. What's so hard about writing `\section{Introduction}` or `$R \int_0^1 f dx$`?

After a bit of learning on your first document (perhaps requiring half the time of one of the first of dozens of edits you'll be making, if the document is important), what you get is (a) ease of transition between formats (article in journal becomes chapter in thesis in about 3 minutes work) and (b) beautiful output, not just in mathematics but in support for many language characters, hyphenation hints, etc.

On publishers, I wrote a book for Springer-Nature, and they wanted LaTeX. I wouldn't have published with them, if not.

Re:Thoughts on Markdown by bayindirh on Monday February 21, 2022 @05:35AM (#30414143)
The biggest misunderstandings about LaTeX stems from comparing it with Microsoft Word or to any other word processor. LaTeX is a typesetter. You give the text, the template and the page size and it typesets it all. You nudge it with hints, and that's all. So, LaTeX is content first and layout second in a sense.

On the other hand, word processors work at absolute terms, layout first. Looking to LaTeX from this perspective distorts the vision a lot, and people get confused.

When one understands the idea of "LaTeX gets the content and fits to the constraints at hand", the rest is liberating.

Re:Thoughts on Markdown by rhn_mk1 on Monday February 21, 2022 @06:00AM (#30414310)
> "LaTeX gets the content and fits to the constraints at hand"

I'll believe this when scientific papers start appearing in the form of reflowable HTML.

Re:Thoughts on Markdown by bluenose69 on Monday February 21, 2022 @06:31AM (#30414559)
Most journals I read offer both reflowable HTML and PDF. I don't know anybody who prefers the former.

A PDF (and the paper copy it generates) is more convenient for markup, and for memory. I can look at papers I read decades ago, and know where to go to find things, because of what I might call positional memory. Somehow, my brain has information such as "The key Figure is at top of third page" or "that equation I think is wrong is at the bottom of the second-last page". I'm not alone in this. I suppose it's just how brains work (e.g. people who do memory tricks "store" the information in an imagined space).

When I look at reflowed text, I just get lost. I can't make notes that "stick" with the text if I enlarge the font. And memories don't form in the same way as for PDF/paper.

I suppose this might be field-dependent. I think in some fields the key point of a paper is a single sentence, which could be identified easily in reflowing text and then copied into a separate file. I don't read papers like that, though. That's why, in my line of work, PDF/paper is superior to reflowable text.

Re:Thoughts on Markdown by rhn_mk1 on Monday February 21, 2022 @11:07AM (#30417367)
Flowed text doesn't mean that it won't be printed. It means that it could be printed the way you want it, not the way the author wanted.

This comes in handy when the author decided that 50% of the surface of paper should remain blank, or using a tiny font. They may find it helpful, others not. Same goes for the decision to have pages at all.

The only aspect where I see in which someone else making an unappealable decision for you is superior, is convenience. Conditional on that other person being an expert in the field [of printing].

Re:Thoughts on Markdown by periheli0n on Monday February 21, 2022 @06:49AM (#30414735)
> I'll believe this when scientific papers start appearing in the form of reflowable HTML.

YES!

It's 2022 and in spite of the often-praised superiority of LaTeX, we are still getting paginated PDFs on ArXiv, instead of responsive text that reflows on different screen sizes. PDFs were great to read when I was still printing papers. For reading on screen they are quite inconvenient.

Many publishers have come around in the last decade and offer HTML versions of full papers (after you get through the paywall).

Re:Thoughts on Markdown by bayindirh on Monday February 21, 2022 @07:29AM (#30415122)
> It's 2022 and in spite of the often-praised superiority of LaTeX, we are still getting paginated PDFs on ArXiv, instead of responsive text that reflows on different screen sizes.

It's not about LaTeX per se. You can typeset EPUBs with it too, if you want. So reflow ability is not a shortcoming of LaTeX.

Publishers send you a Word or LaTeX template, and require your manuscript as a PDF, conforming to that template. If it's LaTeX, generally there's a switch to render the text in "Review mode" with line numbers and similar additional details, and omitting author data if the judgement will be done blindly.

So, the tool itself, regardless of its brand is the proverbial wrong tree to fight with. Also, it's a reality that reading a 25 page manuscript is not very efficient on a screen, at least in my discipline. I have a dedicated "Paper printer" at home for printing such manuscripts and taking a stab at it with pens and highlighters.

Re:Thoughts on Markdown by periheli0n on Monday February 21, 2022 @09:43AM (#30416386)
> You can typeset EPUBs with it too, if you want.

In theory, yes. In practice, this only works when the document is using a restricted set of packages. I tried.

I'm fighting not so much with LaTeX, rather with ArXiv. They have the sources of LaTeX submissions, but do not provide other formats than PDF by default. Judging from my own experience in converting LaTeX to HTML, epub, etc., I assume these conversions simply create too much headache.

> reading a 25 page manuscript is not very efficient on a screen, at least in my discipline

The vast majority of papers I "read" I never read back-to-back, rather than Abstract - Discussion - Results - Introduction - Methods, bailing out at any of those points when I have the information I was looking for. I couldn't possibly keep up with the literature when reading every interesting paper completely.

Those that are really relevant to my research I will read in detail, and at that point a PDF is useful, I agree. But before that, I prefer reflown text & figures.

There was some innovation in that regard, e.g. eLife's Lens, that was specifically designed to support reading on a (large) screen. IEEE also has a good system that works on phones (well, almost; so UI elements clutter the text).

Re:Thoughts on Markdown by bayindirh on Monday February 21, 2022 @06:07AM (#30414370)
I don't think that'll happen anytime soon, because scientific papers are one of the rare species of publications, which are primarily made to be printed, read and mangled with pens.

Even the templates from the publishers came with paper sizes and other crop marks coded inside them.

When publications start accepting reflow able formats and provide relevant templates, producing them is easy with LaTeX.

Re:Thoughts on Markdown by irowe on Monday February 21, 2022 @08:56AM (#30415888)
fwiw, I see a lot of papers on IEEE Xplore that are presented as reflowable HTML on the page with the option for a PDF, presumably generated from the same source.
Re:Thoughts on Markdown by forrestthewoods on Monday February 21, 2022 @05:49AM (#30414242)
I genuinely can’t tell if you’re being sarcastic.
Re:Thoughts on Markdown by goldsteinq on Tuesday February 22, 2022 @04:11AM (#30425639)
The hard part isn’t \section{Introduction}, but horrible hacks like \makeatletter you need to do something non-trivial.
Re:Thoughts on Markdown by periheli0n on Monday February 21, 2022 @06:45AM (#30414695)
> On publishers, I wrote a book for Springer-Nature, and they wanted LaTeX. I wouldn't have published with them, if not.

Do you know if they used LaTeX for the layout internally, or if they used some proprietary system that was fed the LaTeX source?

Re:Thoughts on Markdown by bluenose69 on Monday February 21, 2022 @07:24AM (#30415078)
I think they used LaTeX internally, but I've no way to be sure. They provide latex style sheets and sample files, and so those were my starting point. Of course, they are a big organization, and latex is a simple system, so they might have a program that translates it to something else, e.g. using latex to create PDFs and something else for other formats. But at least at the galley-approval stage, it was still LaTeX.
Re:Thoughts on Markdown by dash2 on Monday February 21, 2022 @03:36PM (#30420276)
> LaTeX is very readable. I've never understood the complaints about the system.

Here’s how you put an image on TeX:

\begin{figure} \caption{A picture of a tucan.} \begin{center} \includegraphics{tucan.eps} \end{center} \end{figure}

Re:Thoughts on Markdown by cprecioso on Monday February 21, 2022 @04:46AM (#30413748)
Using Markdown with pandoc and pandoc-crossref is basically perfect as a substitute of LaTeX. It allows in-line and standalone LaTeX, and citations with crossref.
Re:Thoughts on Markdown by 0thgen on Monday February 21, 2022 @09:30AM (#30416242)
Pandoc completely solves any of the issues mentioned about markdown for scientific writing.

it works flawlessly, and it unarguably way cleaner than writing in plain latex

How can anyone

- tell me

- that this

- list

Is harder to read:

\begin{itemize}

  \item than this

  \item unintuitive

  \item mess
\end{itemize}
Re:Thoughts on Markdown by gilcot on Tuesday February 22, 2022 @05:03PM (#30434533)
With the former, can you items of many paragraphs and other complex stuffs one sometimes need in a complex/advanced document? So you can understand why LaTeX had to go the less naive way MarkDown did.
Re:Thoughts on Markdown by cprecioso on Wednesday February 23, 2022 @10:33AM (#30442111)
Of course the LaTeX syntax is more capable, but for the simple and common case, it's extremely fussy. The simple case should be effortles. With markdown it is, and in Pandoc you can easily drop to more complicated syntax should you need any of its capabilities.
Re:Thoughts on Markdown by lmc on Monday February 21, 2022 @05:16AM (#30413988)
Are there any tutorials you could recommend please?
Re:Thoughts on Markdown by leephillips on Monday February 21, 2022 @08:31AM (#30415664)
The official manual is pretty complete: https://pandoc.org/MANUAL.html.
Re:Thoughts on Markdown by jonathanstrange on Monday February 21, 2022 @05:16AM (#30413981)
In my experience this has zero advantage over LaTeX since converting your markdown to formats other than LaTeX will be just as hard as converting from a LaTeX source. It's even harder because you have to deal with an eclectic mix of LaTeX and markdown, and various errors and restrictions in pandoc.
Re:Thoughts on Markdown by leephillips on Monday February 21, 2022 @08:41AM (#30415745)
I use the system to write documents that I convert to PDF (through LaTeX), Word, plain text, and HTML, with equations, tables, and internal and external links preserved (citations in plain text turn into footnotes). It works brilliantly, and this would be impossible when starting with LaTeX source. You can embed the target formats directly into the markdown when needed, and have alternative versions for different targets. I do this for things like tables, where I want to directly format them for LaTeX and HTML, rather than rely on Pandoc’s automatic translation. You can write filters¹ that extend Pandoc/markdown to do any processing that you want, so you can create your own syntax with custom translations to any target format.

[1] https://lee-phillips.org/panflute-gnuplot/ [This is sort of obsolete now, as you should probably write filters with Lua. But it’s still a good illustration of the possibilities.]

Re:Thoughts on Markdown by periheli0n on Monday February 21, 2022 @06:44AM (#30414685)
The problems in converting LaTeX usually come from third-party packages. When only a restricted set of packages is allowed then it is quite straightforward. This is the reason many publishers require latex, even if they don't use LaTeX internally (which is often the case).

They convert LaTeX to the XML dialect that their in-house layout system understands.

Re:Thoughts on Markdown by fjorde on Monday February 21, 2022 @05:32AM (#30414129)
yes, these are all fraught. Any X-to-Y format exchange is a brew/apt miracle in my experience. It's not necessarily important for a LaTeX document to be render-able in all media, but the maths disciplines, for example, should be asking themselves how they want to be able to search for things including formula, algorithms etc, and finding ways to guarantee that a maxima of media support search/find/read operations on their articles. It's not just about how easy is it to input? but it's very similar to "how easy is it to get back out?" it has been a bit of a mismatch in maths re formulae expressions, and how those are represented visually vs. textually.
Re:Thoughts on Markdown by sundarurfriend on Monday February 21, 2022 @04:57AM (#30413836)
> Latex is extremely powerful but reading the raw source of a text is a pain. WISYWIG is just so much more comfortable when writing, but MS Word sucks

The Lyx editor solves both these problems for me. I'd probably be using LaTeX a lot less if I hadn't found Lyx (that quote about fingernail clippings in oatmeal doesn't apply to Lisp IMO, but certainly does to LaTeX).

Re:Thoughts on Markdown by Semaphor on Monday February 21, 2022 @05:08AM (#30413911)
I used Lyx back in university to transcribe the math lectures. It was good enough that the professor later asked me if I can send him the PDFs and source files ;)
Re:Thoughts on Markdown by periheli0n on Monday February 21, 2022 @06:41AM (#30414654)
Lyx is great for that exact purpose! I used it too as an undergrad. But it doesn't offer the full flexibility and toolset available in LaTeX, which limits its use for more complex documents.
Re:Thoughts on Markdown by Semaphor on Monday February 21, 2022 @05:07AM (#30413894)
> Markdown+HTML+CSS could be getting close, but it currently still lacks LaTeX's tooling for citations, support for pagination.

I don’t think the citation tooling is great, but for pagination even free tools work well with CSS Paged Media [0] [1]

[0]: https://www.w3.org/TR/css-page-3/

[1]: https://www.print-css.rocks/

Re:Thoughts on Markdown by sampo on Monday February 21, 2022 @05:51AM (#30414260)
> Latex is extremely powerful but reading the raw source of a text is a pain.

For the kind of text that you'd use Markdown for, i.e. text that is mostly just text and not math heavy, LaTeX should be almost as readable as Markdown. For example,

    \section{Introduction}
is almost as readable as

    ## Introduction
Re:Thoughts on Markdown by periheli0n on Monday February 21, 2022 @06:39AM (#30414640)
Yes, almost ;)
Re:Thoughts on Markdown by gilcot on Tuesday February 22, 2022 @05:09PM (#30434593)
Plus, you can have nice stuffs like:

    \section[short title in toc]{very very long title at page}
and stared version. Those two things, Markdown cannot do, show the power of that syntax ovec simple bangs starting the line.
Re:Thoughts on Markdown by Lio on Monday February 21, 2022 @10:00AM (#30416566)
Takes a bit more typing though unless you some macros dedicated to it.

Not hard to do but Markdown is easy to write anywhere.