From 6866dc10caefa2ec353cc1ad1ba0d5faefa6469c Mon Sep 17 00:00:00 2001 From: Karchnu Date: Fri, 7 Jan 2022 10:36:37 +0100 Subject: [PATCH] Small fixes (-P -e and image), eqn mentioned in the readme. --- Makefile.in | 3 ++- README.md | 6 ++++++ grofftut.ms | 7 +++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Makefile.in b/Makefile.in index 366d6e8..2b7137b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -53,7 +53,8 @@ REFER = refer $(REFER_OPTS) # -U => unsafe (because of PDF inclusion) # -Tpdf => output device is PDF # -mspdf => include PDF (so, images converted in PDF) in the document -GROFF_OPTS ?= -ms -t -Tpdf -U -mspdf -mpdfmark -M ~/ +# -P -e => provide "-e" to gropdf to embed fonts +GROFF_OPTS ?= -ms -t -Tpdf -U -mspdf -mpdfmark -M ~/ -P -e GROFF = groff $(GROFF_OPTS) $(SRC).pdf: diff --git a/README.md b/README.md index 745175c..5a012ce 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ This repository is an introduction to the good old tools to produce documents: - `roff` as the language to describe documents (`groff` is the implementation) - `tbl` and **hdtbl** for tables +- `eqn` for math equations - `pic` for drawing images - `grap` for drawing graphs - `refer` for handling references and bibliography @@ -21,7 +22,12 @@ Furthermore, this repository includes: https://t.karchnu.fr/doc/grofftut.pdf +(Read this document on a PDF viewer, not directly in your browser!) + # Limitations Images are poorly handled, and they aren't easily managed with `roff` by default. Some macros exist to do it properly, but it still is to include in custom macros then to document. + +Browser preview is ugly as fuck. +It may have something to do with font embedding, I have to investigate, but right now you just can't have a nice preview on a browser. diff --git a/grofftut.ms b/grofftut.ms index e98d258..3900e95 100644 --- a/grofftut.ms +++ b/grofftut.ms @@ -482,9 +482,12 @@ Only PDF can be included, so images need to be converted beforehand. .METAINFO2 . .nr figurespace 15 -.sp \n[figurespace] +.\" KS and KE: keep different stuff together (no page break) +.KS .PDFPIC -R "./are-you.pdf" 3.2 -.sv \n[figurespace] +.sp \n[figurespace] +.KE +.\".sv \n[figurespace] .METAINFO1 Note: for now, on my system, I need a hack.