Re: [dev] Pandoc replacement that sucks less
Troff seems to be one of the better options. Luke Smith has some tutorials on using troff and groff here: https://www.youtube.com/playlist?list=PL-p5XmQHB_JRe2YeaMjPTKXSc5FqJZ_km For live previewing I suggest zathura instead of mupdf, since zathura automatically refreshes when it detects changes to the PDF file. Lukáa, do you mind sharing what you use to watch for changes? Is it entr? With regards, Przemek On 29/04/19 02:03, Lukáa Hozda wrote: > Howdy, > > for documents, > > I am currently using troff + mupdf + a small program to watch file > changes. Whenever I spot a change of my source file, I rebuild the PDF > from the troff and send SIGHUP to mupdf, which will reload the > document. It is reasonably lightweight and it does meet your > requirements - files in git, any editor (that supports troff), and > worrying about styling later. > > Admittedly, there are likely tons of better solutions, for example > embedding images in troff seems to be a nightmare to my limited > knowledge. But my workflow may serve as some inspiration. > > Regards, > Lukáa > Sent via Migadu.com, world's easiest email hosting
Re: [dev] Pandoc replacement that sucks less
HTML renderers are vast and somewhat easy to code, depending how far you want to go. After seeing that css4.pub website, it has opened my eyes: why are we doing Markdown at all? If we stick to using tags like header, article, main, div, p, ul/ol/li, and maybe a few others, what more do we really need? "It's too verbose" - yes and no? It depends on what you're doing really. Even then, there are tools like https://emmet.io/ that can auto-expand to large amounts of HTML, or you can use something like vim-surround to quickly add tags. Essentially: use an editor with tag support, or write tag support, what is not insane to do. HTML is also somewhat future proof, and self describing. While TeX is nice, there's duplication of work between it and HTML, and I think HTML has a long life ahead of it. This doesn't mean TeX will ever disappear, but support around it to continually shrink. I've heard it's also not trivial to write a TeX renderer. Again, after seeing css4.pub, I think it'd be worth it to at least spend some time with this way of writing documents! On Mon, Apr 29, 2019 at 5:54 AM Przemek Dragańczuk wrote: > > Troff seems to be one of the better options. Luke Smith has some tutorials on > using troff and groff > here: https://www.youtube.com/playlist?list=PL-p5XmQHB_JRe2YeaMjPTKXSc5FqJZ_km > > For live previewing I suggest zathura instead of mupdf, since zathura > automatically refreshes > when it detects changes to the PDF file. > > Lukáa, do you mind sharing what you use to watch for changes? Is it entr? > > With regards, > Przemek > > > On 29/04/19 02:03, Lukáa Hozda wrote: > > Howdy, > > > > for documents, > > > > I am currently using troff + mupdf + a small program to watch file > > changes. Whenever I spot a change of my source file, I rebuild the PDF > > from the troff and send SIGHUP to mupdf, which will reload the > > document. It is reasonably lightweight and it does meet your > > requirements - files in git, any editor (that supports troff), and > > worrying about styling later. > > > > Admittedly, there are likely tons of better solutions, for example > > embedding images in troff seems to be a nightmare to my limited > > knowledge. But my workflow may serve as some inspiration. > > > > Regards, > > Lukáa > > > > Sent via Migadu.com, world's easiest email hosting >
Re: [dev] Pandoc replacement that sucks less
On Mon 29 Apr 2019 at 02:53:10 PDT Przemek Dragańczuk wrote: Troff seems to be one of the better options. Luke Smith has some tutorials on using troff and groff here: https://www.youtube.com/playlist?list=PL-p5XmQHB_JRe2YeaMjPTKXSc5FqJZ_km For live previewing I suggest zathura instead of mupdf, since zathura automatically refreshes when it detects changes to the PDF file. Thomas has markdown and wants pdf. Are you suggesting he convert markdown to troff and then to pdf? The only markdown to troff converters I can find probably suck more than the pandoc solution he's currently using. Am I missing something? And doesn't zathura use poppler, which is bloated and slow compared to mupdf?
Re: [dev] Pandoc replacement that sucks less
niedz., 28 kwi 2019 o 21:46 Thomas Meulendijks napisał(a): > > Hi all, > > I am currently using pandoc to convert my markdown files into pdf. > I do this because of a few things, > > - I want to be able to manage my documents in git. > - I want to edit my documents in my text editor of choice > - I want to first type and afterwards worry about styling (for this I use > latex templates now) > > I want to move away from pandoc since (on arch Linux at least) the package > with dependency is 420MiB. > > Does anyone know a program or programs that can help with this or maybe > suggestions on > changing my workflow / requerments? > > The over all goal is an easy and manageable workflow to create simple pdf 's > . You haven't written anything about the format in which you want to write your documents. Does it necessarily have to be markdown? If so, then choose the script written in awk that would convert markdown to mdoc[1]. I think you can look for markup parsers written in awk on the web and rewrite the script. However, it is best to write the documentation in the mdoc format from the beginning. This format is just for that. If you already have the mdoc format, then use the mandoc[2] to convert what you want: ascii/utf8, html, troff (man), markdown, pdf, ps. My statically linked mandoc binary weighs 466 KB (musl): # ls -lh /usr/bin/mandoc -r-xr-xr-x6 root bin466.4k Nov 6 21:42 /usr/bin/mandoc And it contains several programs[3], such as man, apropos etc. LaTeX can be completely replaced by troff (see neatroff[4]). Daniel [1] https://man.openbsd.org/mdoc.7 [2] https://man.openbsd.org/mandoc.1 [3] https://github.com/openbsd/src/blob/master/usr.bin/mandoc/Makefile#L26 [4] http://litcave.rudi.ir/neatroff.pdf > Greetings and thanks in advance, > > Thomas > > >
Re: [dev] Pandoc replacement that sucks less
If this has (de)evolved into a general sucks less document writing thread, I too would recommend {g,t}roff. Luke Smith’s YouTube series is a good intro for the impatient. OpenBSD’s manpage for roff is an excellent read over coffee: https://man.openbsd.org/roff.7
Re: [dev] Pandoc replacement that sucks less
On 2019-04-29 09:06, Charlie Kester wrote: > And doesn't zathura use poppler, which is bloated and slow compared to > mupdf? Zathura can use mupdf as a PDF/EPUB/XPS backend. -- Stephen Gregoratto PGP: 3FC6 3D0E 2801 C348 1C44 2D34 A80C 0F8E 8BAB EC8B