Live data from Hacker News

Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS

htmldocs.com

81–90 of 94 posts

Re: Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS

#81

How does this compare to Typst?[1] What I like about Typst is that I can use it completely offline and with my editor of choice. Is this planned for htmldocs too? [1] https://typst.app/

Offline isn’t a priority at the moment but can be done in the future by packaging with Electron.

Typst is great but there are a few key differences:

- full CSS support, allowing for more customizability and familiar styling without a learning curve

- less tailored towards academic use-cases are more towards personal/business use-cases like resumes, invoices, reports. Also adding a template gallery in the near future.

- has a templating engine and API baked in

- can use JS packages and ecosystem (ex. icon sets, fonts, etc.)

Re: Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS

#82
It’s a good idea. You’ll want to support GitHub flavoured markdown as an input, if you don’t already. Be sure to allow an inline so documents can still be customised using code.

I’d also like to have a mode — the default? — where all rendering was being done locally. There are documents I write that just can’t be stored on a third party computer.

Overleaf, to some extent, has shown the appeal for letting people focus on writing 100% of the time and running software 0% of the time. I’d prefer to use your tool though to write a quick letter to go in a parcel as a packing slip.

By the way: on mobile, your animated headline causes the page to jump up and down.

Re: Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS

#84

Earlier quoted context omitted.

I dunno about that. For simple stuff, sure HTML and CSS is great, but when I want something print-perfect I use LaTeX. A simple table in LaTeX is no harder than in HTML, assuming the same level of knowledge in the tool. But then when you throw in a simple requirement like "left margins on even pages and right margins on odd pages need to be larger", HTML becomes hell to work in. HTML and CSS, even with a media query…

In CSS you can directly target even or odd or some other arithmetic sequence. :nth-of-type(2n+1)

I'm not an expert in CSS, but I don't know how I can use that to refer to pages.

I mean, I'm not creating pages with `...`.

Re: Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS

#85

Earlier quoted context omitted.

I dunno about that. For simple stuff, sure HTML and CSS is great, but when I want something print-perfect I use LaTeX. A simple table in LaTeX is no harder than in HTML, assuming the same level of knowledge in the tool. But then when you throw in a simple requirement like "left margins on even pages and right margins on odd pages need to be larger", HTML becomes hell to work in. HTML and CSS, even with a media query…

Once I had the chance to move away from Word, TeX was the first place I went. That said, I eventually tired of the obtuse error messages and felt I was making things more complicated for no real gain. Even keeping a BasicTex environment working requires effort that HTML does not.

> That said, I eventually tired of the obtuse error messages and felt I was making things more complicated for no real gain.

The error messages are pretty poor.

> Even keeping a BasicTex environment working requires effort that HTML does not.

I've been told, by Mac and Winodws users, that it's a pain.

Personally I've never had to download extra packages/styles directly on Debian. Performing `apt-get install tex-` normally installs everything (where `` is something I find from a search in synaptic).

Re: Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS

#86

Earlier quoted context omitted.

I dunno about that. For simple stuff, sure HTML and CSS is great, but when I want something print-perfect I use LaTeX. A simple table in LaTeX is no harder than in HTML, assuming the same level of knowledge in the tool. But then when you throw in a simple requirement like "left margins on even pages and right margins on odd pages need to be larger", HTML becomes hell to work in. HTML and CSS, even with a media query…

TeX at this point has entered computing legend. It has such a long and storied life. But it’s old. We need something modern, that represents current ways to make documents from code. And that way is CSS. I bet within my lifetime most scientific publications will move to a PDF tool that ingests CSS. We just need to find something open-source and clean that has no missing functionality.

> But it’s old. We need something modern, that represents current ways to make documents from code.

I'd love something newer than TeX/LaTeX. Something with consistency (is it \$CMD{...}, \begin{$CMD}...\end{$CMD} or \{$CMD ...}?), better error messages, more specific and targeted warnings (most hbox-full warnings can be ignored, but many can't!), support for specifying `-Werror` (like gcc) and other things like that.

> I bet within my lifetime most scientific publications will move to a PDF tool that ingests CSS.

Maybe[1]. CSS and HTML needs a lot more functionality though. They have no page counter, no chapter counter, section counters, etc. No river detection, run detection, orphan detection, etc. No automatic reference manager[2], no automatic referencing of chapters, sections, tables, figures, etc. Missing correct hyphenation breakpoints.

Additionally, some things are there, but in a poor (for typesetting) way - inter-paragraph spacing must be faked (no, `:after` isn't a good way to specify `inter` spacing), no way to prevent what should be an atomic element (say ... an mbox containing a paragraph and an image) being broken across pages, no way to float an element to the next point in the document where it will fit (LaTeX does this by default, and it annoyed me no end when I could not find a way to get HTML documents to stop breaking my pretty short table across a page, and instead just place it on the next page).

Another thing that I think are a poor fit, but others think are superior, are the scripting facilities for creating new commands: doing `\newcommand or \newenvironment` is a lot less friction than doing an entire custom element. It's so little friction, that for an invoice I can simply do `\newcommand{\client}{\textbf\emph{The Client PTY LTD}}` and then use `\client` everywhere in the document.

I'm looking forward to a new LaTeX/TeX that fixes all those things. Maybe CSS+HTML would eventually get them, but many of those things are table stakes for typesetting, and yet they are not even on the horizon (or roadmap) for CSS+HTML.

[1] Could be I'm wrong. Like I said in another response, I'm no expert in CSS or HTML. [1] This can be easily resolved with a custom web component

> And that way is CSS. I bet within my lifetime most scientific publications will move to a PDF tool that ingests CSS. We just need to find something open-source and clean that has no missing functionality.

Re: Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS

#88

Earlier quoted context omitted.

In CSS you can directly target even or odd or some other arithmetic sequence. :nth-of-type(2n+1)

I'm not an expert in CSS, but I don't know how I can use that to refer to pages. I mean, I'm not creating pages with ` ... `.

[deleted]

Re: Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS

#89

Earlier quoted context omitted.

TeX at this point has entered computing legend. It has such a long and storied life. But it’s old. We need something modern, that represents current ways to make documents from code. And that way is CSS. I bet within my lifetime most scientific publications will move to a PDF tool that ingests CSS. We just need to find something open-source and clean that has no missing functionality.

> But it’s old. We need something modern, that represents current ways to make documents from code. I'd love something newer than TeX/LaTeX. Something with consistency (is it \$CMD{...}, \begin{$CMD}...\end{$CMD} or \{$CMD ...}?), better error messages, more specific and targeted warnings (most hbox-full warnings can be ignored, but many can't!), support for specifying `-Werror` (like gcc) and other things like that.…

> Could be I'm wrong. Like I said in another response, I'm no expert in CSS or HTML.

Looks like it. I'm pretty sure most of the things you mentioned are either already possible or in the paged media spec / covered by paged.js.

Re: Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS

#90

Earlier quoted context omitted.

In CSS you can directly target even or odd or some other arithmetic sequence. :nth-of-type(2n+1)

I'm not an expert in CSS, but I don't know how I can use that to refer to pages. I mean, I'm not creating pages with ` ... `.

See

https://developer.mozilla.org/en-US/docs/Web/CSS/@page

https://developer.mozilla.org/en-US/docs/Web/CSS/page

Post reply on HN