summaryrefslogtreecommitdiff
path: root/doc.go
blob: 6bb93049336d2f92cd17ee2072ef48ac84c9e63d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
Sort references in a neatroff document.
ref | tbl | neatroff
Here is a real-world script which calls this program.

#!/bin/sh

BASE="/home/kaa/src/neatroff_make"
ROFF="$BASE/neatroff/roff"
POST="$BASE/neatpost/post"
PPDF="$BASE/neatpost/pdf"
EQN="$BASE/neateqn/eqn"
REFR="$BASE/neatrefer/refer"
PIC="$BASE/troff/pic/pic"
TBL="$BASE/troff/tbl/tbl"
SOIN="$BASE/soin/soin"
GRAP="$BASE/troff/all/grap/grap"

ROFFOPTS="-F$BASE -M$BASE/tmac"
ROFFMACS="-mpost"
POSTOPTS="-F$BASE -w80"
POSTOPTS="$POSTOPTS -pletter"
REFROPTS="-m -e -o ct -p ref.bib"

tmp=/mnt/mem
#tmp=/tmp
# PDF
< $1 $SOIN | ref | $TBL | $GRAP | $PIC |  $ROFF $ROFFOPTS $ROFFMACS | tee ${1%%[.]*}.int | $PPDF $POSTOPTS > $tmp/a.pdf
mutool clean -gggg -z -c -s $tmp/a.pdf ${1%.*}.pdf
#| gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -dSubsetFonts=true -dPermissions=-44 -o ${1%.*}.pdf -
#gs -sDEVICE=pdfwrite -dSubsetFonts=true -o - - > ${1%%[.]*}.pdf

# PS
GS_FONTPATH=$BASE/fonts
#< $1 $ROFF $ROFFOPTS $ROFFMACS | tee ${1%%.*}.int | $POST $POSTOPTS | tee ${1%%.*}.ps | ps2pdf -dPDFSETTINGS=/prepress - ${1%%.*}.pdf

hup()
{
	if ! [ $1 ]
	then
		return
	else
		kill -HUP $1
	fi
}

mupid=$(ps ax | grep "mupdf.*${1%%tr}pdf" | \
	grep -v grep)
hup $mupid
*/
package main