Live data from Hacker News

Show HN: RinohType – A modern LaTeX in 6500 lines of Python

mos6581.org

51–60 of 104 posts

Re: Show HN: RinohType – A modern LaTeX in 6500 lines of Python

#51
Since I'm working right now on a report generator using LaTeX, I was all excited until I hit this: "Because of the Unicode requirement, I opted to skip Python 2 and go with Python 3 which uses Unicode for all text strings."

Really? Python2 is still extremely common, it's too bad I can't this now, if it's not backwards compatible.

Re: Show HN: RinohType – A modern LaTeX in 6500 lines of Python

#53

Since I'm working right now on a report generator using LaTeX, I was all excited until I hit this: "Because of the Unicode requirement, I opted to skip Python 2 and go with Python 3 which uses Unicode for all text strings." Really? Python2 is still extremely common, it's too bad I can't this now, if it's not backwards compatible.

> Python2 is still extremely common

So is Python3. They are not mutually exclusive. Python3 is in Debian oldstable (released in 2011), Ubuntu 10.04 LTS, Fedora since version 13 (from 2010), and in openSuse since 11.2 (from 2009).

Re: Show HN: RinohType – A modern LaTeX in 6500 lines of Python

#54
post #49
post #14

So, the situations in which I would use LaTeX rather than something cruder but friendlier are these: (1) I am typesetting something with nontrivial mathematical formulae in it. (2) I want the excellent typographical quality that comes from, e.g., the very nice Knuth-Plass dynamic-programming algorithm for line breaks. (3) I want to use some clever thing someone has implemented in LaTeX (say, to add Feynman diagrams t…

What are the "cruder but friendlier" alternatives that you use?

I guess markdown is in the list?

Re: Show HN: RinohType – A modern LaTeX in 6500 lines of Python

#55

Since I'm working right now on a report generator using LaTeX, I was all excited until I hit this: "Because of the Unicode requirement, I opted to skip Python 2 and go with Python 3 which uses Unicode for all text strings." Really? Python2 is still extremely common, it's too bad I can't this now, if it's not backwards compatible.

[deleted]

Re: Show HN: RinohType – A modern LaTeX in 6500 lines of Python

#56
post #34

XML format is a non-starter for me. It adds too much cruft to the text; it requires putting everything inside of open and close tags, including paragraphs.

Plus it's already been done to death in XML with XSL:FO, which does the job quite nicely. I don't think it'd be too tricky to rig up an XSL:T for the XML format here to produce FO and run that through Apache FOP.

LaTeX is much nicer to hand edit, and if you're not hand editing you may as well use Word or something.

Re: Show HN: RinohType – A modern LaTeX in 6500 lines of Python

#57
post #38
post #31

Earlier quoted context omitted.

You might like Pandoc[1]. 1: http://johnmacfarlane.net/pandoc/

Indeed! Or Org Mode[1]. 1: http://orgmode.org/

I wanted to recommend that! ;)

But to expand a little, orgmode has two modes of LaTeX-integration. The first one gets normally passed from text, so you can just use e.g. \emph{} in your orgmode source file. The other is a dedicated LaTeX-environemt (#+BEGIN_LaTeX ... #+END_LaTeX) that puts the appropriate literal LaTeX in the appropriate place within the document. I use its beamer-mode and do any tikz-graphics as literal LaTeX code within the org-file.

Though I do my normal writing simply in LaTeX, because that just deals more neatly with edge-cases, really.

Re: Show HN: RinohType – A modern LaTeX in 6500 lines of Python

#58
> It is worth pointing out the other gripes I have with (La)TeX at this point. I will probably regret this later (I have the impression TeXies can be quite fanatical)

Probably. I applaud efforts to try to rethink typesetting, and this is clearly a substantial accomplishment. Tex is, however, an outstanding design, both in a number of of its aspects and as an overall design, and a lot of later effort has gone into remedying its limitations.

> TeX is not transparent. It is a huge, complex system ... With hundreds of megabytes and seemingly millions of files for a typical TeX installation, I have no idea what is going on when TeX processes a document.

Knuth's contribution is, in fact, quite small in terms of Mb. This covers just the Computer Modern Roman fonts and the eufrak maths fonts, and Plain Tex. Most of a system such as a full Texlive install is made up of fonts. It covers a huge number of specialist journal styles, and support for the needs of specialist fields (linguistic glosses, setting code, chemical notations, Feynman diagrams, etc.). The complexity is that of a library, and kpathsea is its index system.

I have the idea that maybe you think a package whose value you don't see is fluff: there is fluff in Texlive, but probably much less than you think.

> The arcane TeX macro language is not accessible to a broad audience. I believe this is why most LaTeX-generated documents you come across have exactly the same (retro) look; very few people are capable of creating new document styles.

There is a point here, but I think the reason is that most people don't want to fuss about with style. CSS makes it easy to experiment with page styles, and still most web pages either follow a standard formula or look very ugly. Understanding markup conventions is not usually going to be the biggest obstacle to achieving good design.

> TeX is not very modern

There is not a real problem outlined here: you could equally say that the basic layout engine has proven itself by being capable of accommodating all these later technologies. The Office 2007 team even rewrote its formula layout engine so that it would conform to that described in the Tex book, and employed Knuth as a consultant.

I'd put it this way: Knuth's code combines a very deep insight into the nature of the requirements of computer typesetting with outstanding implementation skills. The basic design has not really been surpassed.

> TeX’s warnings/errors are often very cryptic. It can sometimes take a long time to figure out what’s wrong.

Yes, very much so. This is probably the best reason to consider alternative document description languages. But note that Tex is very successful at allowing "code" invocation to be mixed with text - I'd like to see rivals that challenge Tex on this point.

> But why do I even need to mess around with all these extension packages when all I’m doing is writing a simple article? Doesn’t this mean that LaTeX should include at least some of the most commonly used packages by default?

The Latex3 team concede this. Context, a rival Tex-based system, does not have this problem.

> This might largely be a solved problem by now, but I remember often running into input and font encoding issues with LaTeX in the past.

Use Xetex or Luatex, and standardise everything on Unicode; these problems go away.

> There is no strict separation of content and style.

I'd put it this way: the system offers the possibility of such a separation, but does not enforce it. This is bad if you often have to work with other people's Latex, although in practice, you learn how to deal with it.

Addressing some of the problems raised in http://tex.stackexchange.com/questions/128454/are-there-any-... could be helpful for showing off your design and the advantages of a fresh start.

Re: Show HN: RinohType – A modern LaTeX in 6500 lines of Python

#59
post #36
post #34

XML format is a non-starter for me. It adds too much cruft to the text; it requires putting everything inside of open and close tags, including paragraphs.

Thats what I thought too. However, there's a plethora of tools that can generate (and parse!) XML for you, e.g. HAML or Markdown. I write all my TeX docs in Markdown and then convert it to TeX, but stuff like figure placement has to be done in weird comments containing TeX, which'd be easier with RhinoType. HAML for content: http://chriseppstein.github.io/blog/2010/02/08/haml-sucks-fo... (its not so bad :P)

> I write all my TeX docs in Markdown and then convert it to TeX

Is there some program that converts Markdown into TeX? Or are you saying that you do this manually?

Post reply on HN