projects
/
c-standard
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
manually fix n1570.html, fix x^y in cpow for n1256.html
[c-standard]
/
translit.sh
diff --git
a/translit.sh
b/translit.sh
index
e9f0e2f
..
dce2b08
100755
(executable)
--- a/
translit.sh
+++ b/
translit.sh
@@
-8,10
+8,13
@@
s/\f/(newpage)/g
# utf8 fixes
s/fi/fi/g
s/fl/fl/g
# utf8 fixes
s/fi/fi/g
s/fl/fl/g
+s/ff/ff/g
+s/ffi/ffi/g
s/§/!S/g
s/©/(C)/g
s/—/--/g
s/−/-/g
s/§/!S/g
s/©/(C)/g
s/—/--/g
s/−/-/g
+s/–/-/g
s/∗/*/g
s/ˆ/^/g
s/〈/</g
s/∗/*/g
s/ˆ/^/g
s/〈/</g
@@
-45,6
+48,9
@@
s/↔/<->/g
s/→/->/g
s/‘/'\''/g
s/’/'\''/g
s/→/->/g
s/‘/'\''/g
s/’/'\''/g
+s/“/"/g
+s/”/"/g
+s/∼/~/g
# pdftotext layout fixes
s/_ _/__/g
# floats are sometimes broken
# pdftotext layout fixes
s/_ _/__/g
# floats are sometimes broken
@@
-59,6
+65,17
@@
BEGIN {
nl=nl "\n"
next
}
nl=nl "\n"
next
}
+# TODO: shift page numbers
+#function inc(x) {
+# if (x ~ /[0-9]/)
+# return x+1
+# if (sub(/viii$/,"ix",x) ||
+# sub(/iii$/,"iv",x) ||
+# sub(/iv$/,"v",x) ||
+# sub(/ix$/,"x",x))
+# return x
+# return x "i"
+#}
/^\(newpage\)/ {
n=split(last,a)
if(side)
/^\(newpage\)/ {
n=split(last,a)
if(side)
@@
-66,6
+83,9
@@
BEGIN {
else
p=a[n]
side=!side
else
p=a[n]
side=!side
+# if (p !~ /[0-9]/ && $0 ~ /INTERNATIONAL STANDARD/)
+# p=0
+# print "\n[page " inc(p) "]"
print "\n[page " p "]"
getline
getline
print "\n[page " p "]"
getline
getline