Typesetting general

Let's have a troff,groff, and Latex thread.
Discuss languages, macros, templates, sperg out about documents, r8 muh resume etc. Text editors shitslinging also welcome.
Links:
>gnu.org/software/groff/manual/groff.pdf
>schaffter.ca/mom/mom-01.html
>texdoc.net/texmf-dist/doc/latex/latex2e-help-texinfo/latex2e.pdf

Attached: 2018-12-08-1544320240.png (755x464, 122K)

Other urls found in this thread:

github.com/posquit0/Awesome-CV
cs.ait.ac.th/~on/O/oreilly/unix/ksh/ch01_06.htm
docstore.mik.ua/orelly/unix3/korn/ch01_06.htm
github.com/tectonic-typesetting/tectonic
patoline.org/
savannah.nongnu.org/projects/lout
adrianjwells.freeuk.com/lout.pdf
archlinux.org/packages/community/x86_64/lout/
people.bordeaux.inria.fr/lcourtes/doc/lout-20120925.pdf
jeffreykingston.id.au/lout/rtr.c
twitter.com/NSFWRedditVideo

What do normies use for typesetting books/journals/docs? LaTeX would be my choice but it seems to be confined to technical fields

look at the OP pic, you can use it for general documents. I have my own groff template for medical SOAP notes.
makes creating flowcharts easy too

Attached: 2018-12-02-1543805674.png (883x789, 26K)

I know what groff is. I'm not asking what you can use, I'm asking what normal people use when MS word gets too unwieldy (writing a book, a textbook, or a large report for example)

define normal

people who don't use latex or groff

they use a normal program then

There's Adobe InDesign but I don't know how many people have actually used it for writing books.

Woah! It just occurred to me that I haven't used either troff/groff or TeX since my Mac user days (which ended last June).

They use word processors.

They'll suffer Word.

how do you make flowcharts and graphs like this in LaTeX?

someone please help
I want to write new resume (medical not CS memeshit) my current one is a latex template
>github.com/posquit0/Awesome-CV
but it needs the full latex suite to compile and it's really fucking stupid. I only used it because it was the best looking and I had like 4 hours before an application deadline.
I want to write a real one and I don't know what to use.
I've noticed that because of sites like overleaf medfags are all just using templates, in fact the residency newsletter thing that my school gives out literally have overleaf links to templates.
Hence why I'm thinking of using groff with ms or mom, because it would have the same advantages of latex + look different. I also noticecd that I can cat out my calcurse todo list and echo them to a groff file with a cronjob/script, so I can have my resume update automatically.
Can anyone tell me how to do the following with groff?
>Title with my name number etc, left justified. I literally can't find a way to do this
>Sections with an underline to the end to the page
>like: Section______________________________
>3 columns that don't overlap and wont flow into each other.
>change the page background color.
I know there's 2 groff fags on Jow Forums that use it for everything. Summoning them

Attached: medicalapu.png (657x527, 224K)

I don't know about LaTeX, but I do know troff has an entire preprocessing language called pic dedicated to drawing graphs and charts.

I'm not sure if this is more or less "normie" than LaTeX/groff, but we use XSL-FO where I work producing technical publications in the aviation field. Most people I've asked haven't even really heard of LaTeX or groff surprisingly.

That's odd. I always got the impression that LaTeX was way more popular than any XML-based typesetter.

Not now. The old editions of O'Rielly's shell books say they were written in troff, while the new versions say DocBook (I believe, I can't check at the second).

Is OPs LaTeX?

It's groff with the -mom macro set.

How the fuck do I set up LaTeX with emacs or vim. I need some brainlet tutorial.

It's troff with a macro package.

You don't. Vim and Emacs are text editors. They edit text. They don't do typesetting. You write the LaTeX code in a text editor, but the actual typesetting is done by a separate program.

groff with mommy

I was right, it is DocBook.
First edition Korn Shell:
cs.ait.ac.th/~on/O/oreilly/unix/ksh/ch01_06.htm
> the text of the book plus human-readable formatting instructions to the troff word processor.
Second edition:
docstore.mik.ua/orelly/unix3/korn/ch01_06.htm
>the text of the book plus human-readable DocBook XML formatting instructions.

I know that, but I want to use a text editor to write the LaTeX code, I just don't know how to set it up. Should I learn more emacs in that case?

Depends on your usecase. Tikz is the barebones graphics package that can technically do anything. Then for example I use circuitikz for circuit diagrams. I'm pretty sure there is a package for flowcharts specifically as well but I can't remember the details

pic is unironically better than most drawing tools that latex has

There's sort of a "lingua franca" in this field called S1000D, which is a specification for managing technical publications, which a lot of airlines use. S1000D provides XML schemas for writing/interchanging data between manufacturers and distributors, although 90% of the specification is more about organizational concepts than what particular encoding you use to store data.

Still, I have almost never seen anyone talk about using XSL-FO, DocBook, DITA, or S1000D on Jow Forums despite dealing with these things on a daily basis, so you may still be right and I just stumbled in to a weird niche.

download texmaker

can someone explain typesetting to me like i don't know what it is and why i shouldn't just use libreoffice for my documents

Emacs has nothing to do with it. You set up LaTeX by installing the proper packages, and then running the tex command on a LaTeX file that you typed up in a text editor of your choice. Since I've never used LaTeX in particular, I can only tell you generally how to typeset code written in TeX (which LaTeX is a specific macro package for).

>Hints for Preparing DocumentsMost documents go through several versions (always more than you expected) before they are finally finished. Accordingly, you should do whatever possible to make the job of changing them easy.
>First, when you do the purely mechanical operations of typing, type so subsequent editing will be easy. Start each sentence on a new line. Make lines short, and break lines at natural places, such as after commas and semicolons, rather than randomly. Since most people change documents by rewriting phrases and adding, deleting and rearranging sentences, these precautions simplify any editing you have to do later.
>— Brian W. Kernighan

LibreOffice isn't scalable. Try changing all the section headers in a 200 page document to a different size in LibreOffice and you'll begin to understand where tools like TeX and groff become useful.

I'm currently using this

github.com/tectonic-typesetting/tectonic

I keep a simple Makefile in every project root directory, whenever I want to preview my changes I just do a :make from inside vim (I keep vim and the pdf side-by-side). It's not the most optimal workflow perhaps but it's light and keeps the job done.

I wish there was some sort of simple/minimalist typesetting standard. A bit like markdown but actually good.

You mean like Patoline?

patoline.org/

Awesome, this is wha tI was looking for, thanks!

I don't know if you noticed but they produce documents which look like regurgitated dogshit

>normie engineer asked me to review his masters thesis
>220 pages written in word
>text was not justified
>used spaces and tabs to align things
>different fonts
I offered to help him format it in latex, but he said no.

Unless you give these mooks a template to fill in which was produced by a competent human it will look like a disasted and is liable to break if you sneeze at it.
And it's not impossible to procude well typeset and consistently editable documents in Word. I did it in school. I used to type live in the lecture, formulas, graphs and all.
Eventually you just realize they're probably brain damaged and should be given one task as narrowly defined as possible in the hopes they don't catch on fire by looking at a glass of water the wrong way

LaTeX is dope. I used it to write an academic paper last week and used bibtex for the first time and it worked so smoothly. I'm never going back to a gui typesetter/word processor.

Emacs is all set up from the moment you install the package for LaTeX support.
Look up Luke's LaTeX tutorials on YT for VIM setup.
Texmaker should do the job just fine for anyone who doesn't insist on using their favorite editor though.

happy to see a typesetting thread.

I use Emacs: divide the window in two C-x 3, then open the pdf in the right one and M-x auto-revert-mode. In the left window open the LaTeX file, use AUCtex if you want (I think it also does inline fragments for formulas), auto-complete-mode and flyspell. Then you can just: pdflatex pdflatex bibtex pdflatex, from command line M-! or use an AUCtex bind (C-c something I don't remember, just use the minor mouse help). If you want make an elisp function that does everything for you and bind it to C-c something.

I used only vim before, but there are packages in emacs that are really convenient and the auto indentation is smart, I like modal, but modes are better.

Try org

s/mouse/mode/g

Sorry, wrong reply () to
Meant for

is it possible to set a background color for the page in groff? like if I want a black background with white text?

Awesome. This made me not want to kms.

You can also run "latexmk" instead of "pdflatex pdflatex bibtex pdflatex" senpai.

This looks awesome. Sadly it uses xelatex only and I need luatex to fulfill my microtype typeset autismo.

Word, docs, writer, etc. I use word and foxit phantompdf that I got for free sometimes for actual typesetting. The """"typesetting"""" in this thread is just freetards trying to recruit more cult members to their particular brand of autism.

Thanks! I'll see about this, didn't know it

>I only used it because it was the best looking and I had like 4 hours before an application deadline.
Why would you even think about writing a resume in 4 hours.

> because it would have the same advantages of latex
It really doesn't, the serious advantage of LaTeX is that it has an enormous already existing base of packages and pretty much every question you have about it has already been answered or is very well documented.

>Hence why I'm thinking of using groff with ms or mom, because it would have the same advantages of latex + look different.
It is a really bad idea to use something like groff for a resume, as it requires a lot of styling which is significantly easier to do with LaTeX due to the abundance of package and help available. The rest of your post proves this pretty conclusively, you are using a decade old software which barely anyone uses to create something unique, that is a pretty bad idea.

If you want your LaTeX document to look "unique" write your own template, its the same thing you want to do with groff, but without a couple of hundreds of hours of research you will have to do.

How about RTL support? I had serious issues with that in groff.
Any workarounds?

Tikz, which is practically its own language and can be used to pretty much do anything.
It will also look significantly better then the output pic produces.

Not technology.

Org-mode to organize it, then convert to latex

Did you even read the post?

Okay, I don't understand this, how do you "set up" [La]TeX for Vim or Emacs? The TeX is handled by a completely separate program. The only part of the editor that actually recognizes the TeX language is the syntax highlighting, and that's already there by default.

Is there a good tool to fix text that have erroneous line breaks. Let's say you copy from a PDF and the text have been hyphenated so it wraps to the page layout but then when you copy it it retains all the line breaks. If you regex out all the line breaks, you get a long string. But what if I want to preserve parts of the original line breaks, say ones following after a dot and other ones that follows naturally from natural language, how can you preserve them while fixing the rest? Also, is there a way to "de-hyphenate" words? Say "Hyph-enation" > "Hyphenation".

Regex obviously isn't a good solution. What about machine learning?

>What about machine learning?
You will also certainly spend hundreds of times more time on implementing such a thing then fixing these errors manually.

>In the GNU/Linux world there are two major text editing programs: the minimalist vi (known in some implementations as elvis) and the maximalist emacs. I use emacs, which might be thought of as a thermonuclear word processor. It was created by Richard Stallman; enough said. It is written in Lisp, which is the only computer language that is beautiful. It is colossal, and yet it only edits straight ASCII text files, which is to say, no fonts, no boldface, no underlining. In other words, the engineer-hours that, in the case of Microsoft Word, were devoted to features like mail merge, and the ability to embed feature-length motion pictures in corporate memoranda, were, in the case of emacs, focused with maniacal intensity on the deceptively simple-seeming problem of editing text. If you are a professional writer – i.e., if someone else is getting paid to worry about how your words are formatted and printed – emacs outshines all other editing software in approximately the same way that the noonday sun does the stars. It is not just bigger and brighter; it simply makes everything else vanish.
>– Neal Stephenson, In the Beginning was the Command Line (1998)

In all seriousness, emacs' ability to handle multiple files and windows with ease is far more convenient to a modern writer than vim. Don't get me wrong, if I lived in a time when computers could just be a digital typewriter, I'd totally use vi(m), but these days the writer herself is required to be also a typesetter (and in the case of web pages, publisher as well) and emacs' makes this far more convenient.

But I have thousands of documents..

I have spend hours and hours writing a regex to handle it and others to highlight likely errors for manual checkup, for it's just not viable. The data is too messy. I've been thinking about using a dictionary match to fix likely hyphenation candidates, but then I have to account for grammar as well and things become very complex very quickly. There are some pretty neat hypenation algorithms out there, why isn't there any good de-hypenation algorithms?

>I've been thinking about using a dictionary match to fix likely hyphenation candidates
That should work pretty well, shouldn't it? Just look at every hyphenated word and see if it's dehyphination exists in a dictionary.

>but then I have to account for grammar as well
Why?

>why isn't there any good de-hypenation algorithms?
Because barely anyone cares.

On grammar just have the shell script ask if you want to delete the hyphen.

I am normal.

Has anyone used the lout typesetting which is written from scratch completely different from *roff and *tex?
savannah.nongnu.org/projects/lout

How the hell does no one use Joe?

Attached: capture.gif (652x331, 13K)

Maybe I didn't use the correct words, I suppose the problem I'm having is "syllabification" with the use of hyphens to mark the split in the words. Pic related is an example. Grammar comes in to play here, the word could be singular or plural etc so if I were to match this to a dictionary then I would have to be able to account for that and still get a match. Then there is the issue of punctuation, like this word has a comma in it, so i need to deal with that. Then there re all the edge cases to deal with. Also, this is just one form of problems with text wrapping, I also need to account for this without the "-" being used.

Basically I want to restore a piece of text to it's original flow when the text have been reflowed to fit into a specific layout and that reflowing have been "locked in" as is the case when copying from a PDF. I guess it's a niche problem.

Attached: serveimage.jpg (720x540, 39K)

>the word could be singular or plural etc so if I were to match this to a dictionary then I would have to be able to account for that
Why?
Most dictionaries contain words in all their grammatical forms.

This is what I use for working with latex the CHAD (tm) way:

>texlive
>Emacs and org-mode (because writing tex is for virgins)
>Spacemacs with the org, latex and bibtex layers (because configuring emacs from scratch is for virgins)
>A custom article class for handouts, a custom one for homeworks, a custom memoir class that I used for my thesis and a custom beamer one for presentations (with custom fonts and the microtype package for ultra typesetting goodness).
>org-ref and a single global bib file with all the documents I use. (this is really what makes it all worth it IMO, instead of dealing with Zotero I just deal with my references with org-ref).
>Compile everything with latexmk and luatex.

None of this has really made a better scientist/student, if anything I think I spent too much working on templates and themes. But teachers sometimes ask me how do I make my documents and presentations look pretty. Which is nice I guess.

Attached: Chad-bachelorette-badboy.jpg (640x854, 92K)

>Why would you even think about writing a resume in 4 hours.
user I wrote my 40 page final thesis in 16 straight hours.
I can conceed that I can't find away to change the page color in groff, so I'll probably try latex again.
with one rule, I'm only going to use texlive-core with no xelatex or special fonts etc.
even pic related is unacceptable for me but whatever.
any hints for writing a resume in latex? I won't be using a template.

Attached: 2018-12-09-1544349420.png (864x297, 24K)

Guys I think I fucking found it.
Lout.
adrianjwells.freeuk.com/lout.pdf
It has everything, graphics, full color support, flow charts, math, lists, fucking graphs etc.
check out how big it is. It doesn't have any real dependencies:
archlinux.org/packages/community/x86_64/lout/
and unless you have graphs it can output directly to PDF. Otherwise it outputs to postscript and you can convert it with ps2pdf.
amazing. Anyone use this? I think I'm gonna learn it and convert, the syntax seems to be more wordy than groff but much less so than latex.
I don't know what compile times are gonna be like on large documents but I bet it's quicker and less cpu intense than latex. My poor X200 suffers whenever I have zathura open and constantly updating and compiling.

Attached: 2018-12-09-1544374019.png (642x449, 46K)

it seems to be pretty good for presentations too
people.bordeaux.inria.fr/lcourtes/doc/lout-20120925.pdf
I really think I found it guys

Wow, I didn't even parse this as english at first. That's some impressive jargon density.

>user I wrote my 40 page final thesis in 16 straight hours.
I am not saying that it is impossible, I am saying it is retarded.

>with one rule, I'm only going to use texlive-core with no xelatex or special fonts etc.
Why would you do that? Whats the point of making up hurdles for yourself?

>even pic related is unacceptable for me but whatever.
What is unacceptable about that?

>any hints for writing a resume in latex?
Find something which already exists and looks good in your eyes, figure out why it looks good and replicate that. Tabulars are your friends for alignment.

The funny thing is that I'm dyslexic. Forcing myself to distill info like this is one of the few ways I can really chunk something into memory long term. Telling it like a story helps too. The rest is just medical abbreviations.
that's literally just one use for one drug that you use to bridge a VKA in HIT. So like 1 exam question would have you know all that and apply it on the boards.
user I'm not proud of my [lack of] work ethic kek.
I dislike "bloated" software. Real talk though, that's half a gig in my /bin, half a gig in my cache and it'll accumulate over time. A full install is well over 2 gigs and I won't use 99% of it.
I like using cheap 64gig SSDs for some of my machines and it just wouldn't cut it for latex + the rest of the system. Also it sucks to have like 1.5 hours of battery life while writing because the CPU is constantly being maxed out on your shitbox. It's hard for me to look at the raw typesetting and visualize what the document would look like after writing it, so I need my previews constantly updated. Even a basic one like just compiling and viewing through zathura is a lot of work for a C2D/early i.
most of my computers are weak as shit.
But anyway I think I'm gonna give lout a shot. It looks like it's exactly what I'm looking for.

Attached: memepads.png (1600x900, 1.64M)

Could just do them in Inkscape. It even has export functions dedicated to latex.

absolute bloat and a waste of time
the lout approach is superior

Attached: 2018-12-09-1544377110.png (738x768, 108K)

Try a lightweight markup. My favorite is txt2tags. It's kiss and has a nice syntax. Also it has various output formats (HTML, LaTeX, almost every other markup)

Except I can steal textbook assets more easily via Inkscapes PDF import.

Don't you get tired of not being lazy?

50th post best post

I doubt it's more lightweight than based lout over here.
what are you doing where you can just copy paste assests? also laxtex and lout let you import graphics so it's no big deal.

Attached: 2018-12-09-1544378334.png (902x322, 53K)

do this in word
kek is this the same joe with the shitty window manager? There's no way that's more lighweight than vim, and it doesn't seem to have 1% of the functionality either.

Attached: 2018-12-09-1544378466.png (1063x720, 135K)

>herself

A simplified breakdown of the average professional workflow:
Authors write in Word or LibreOffice. Parts of the text get marked up semantically by paragraph templates. Then the stuff gets converted to XML (or, if you are very unlucky SGML) and automated stuff (scripts, XSLT) happens. Publishers have their own DTD and Schema, often per Journal, sometimes per article type. In rare cases, docbook is used, but it's rare that is was a good choice. For actually typesetting the stuff for printed media, I've seen Framemaker, InDesign, Quark, 3B2, XPP and more obscure shit. All in heavy combination with automation scripts.
Typesetting software is a stagnating, rotten market. Opposed to webdev open source has close to no relevance in professional typesetting.
Roff is dead, if TeX is used it's for formula snippets because there is no money in formula renderers. I've seen Scribus in a hobby FOSS magazine, but it's long gone.

just import a page from a pdf book, ungroup everything and copy the elements you want

that way you can steal all the nice vector assets and build your own shit with them

/thread

user pls find me a single female with 2 X chromosomes that uses vim or emacs or even fucking nano to type up documents.

Attached: 2018-12-09-1544378409.png (975x570, 152K)

They write books in Word. I know two who did.

To anyone that actually got shilled into lout, here's a program that will convery latex references to lout ones.
jeffreykingston.id.au/lout/rtr.c
Also lout is mostly written in C, pretty based.