Skip to content
Snippets Groups Projects
Verified Commit ebc641b9 authored by mirabilos's avatar mirabilos Committed by mirabilos
Browse files

a custom link macro for TeX makes this so much better

parent 2b4475da
No related branches found
No related tags found
No related merge requests found
...@@ -55,6 +55,7 @@ exec <linklist.dat ...@@ -55,6 +55,7 @@ exec <linklist.dat
exec 4>linklist.htm exec 4>linklist.htm
exec 5>linklist.tex exec 5>linklist.tex
cat linklist.hdr >&4 cat linklist.hdr >&4
print -ru5 -- '\newcommand{\myLink}[2]{\href{#1}{#2}\Hair\footnote{\texttt{[\url{#1}]}}}%'
print -ru5 -- '\begin{otherlanguage*}{british}' print -ru5 -- '\begin{otherlanguage*}{british}'
print -ru5 print -ru5
...@@ -119,7 +120,7 @@ function getpc { ...@@ -119,7 +120,7 @@ function getpc {
init=0 init=0
inpq=0 inpq=0
inao= inao=0
nline=0 nline=0
xnl= xnl=
tnl= tnl=
...@@ -190,18 +191,18 @@ while IFS= read -r line; do ...@@ -190,18 +191,18 @@ while IFS= read -r line; do
getpc getpc
print -nru4 -- "$xnl<a href=\"${|tohtm "$cw";}\">${|tohtm "$line";}</a>$pc" print -nru4 -- "$xnl<a href=\"${|tohtm "$cw";}\">${|tohtm "$line";}</a>$pc"
xnl=$nli xnl=$nli
print -nru5 -- "$tnl\\href{${|totex "$cw";}}{%" print -nru5 -- "$tnl\\myLink{${|totex "$cw";}}{%"
print -nru5 -- "$nlt ${|totex "$line";}%" print -nru5 -- "$nlt ${|totex "$line";}%"
print -nru5 -- "$nlt"'}\Hair\footnote{\texttt{[\url{'"${|totex "$cw";}}]}}$pc" print -nru5 -- "$nlt}$pc"
tnl=$nlt tnl=$nlt
;; ;;
(ao) (ao)
[[ -z $inao ]] || die already in a .ao (( inao )) && die already in a .ao
(( inpq <<= 1 )) (( inpq <<= 1 ))
inao=${|totex "$line";} inao=1
print -nru4 -- "$xnl<a href=\"${|tohtm "$line";}\">" print -nru4 -- "$xnl<a href=\"${|tohtm "$line";}\">"
xnl= xnl=
print -nru5 -- "$tnl\\href{$inao}{%" print -nru5 -- "$tnl\\myLink{${|totex "$line";}}{%"
nlt+=' ' nlt+=' '
tnl=$nlt tnl=$nlt
;; ;;
...@@ -211,8 +212,8 @@ while IFS= read -r line; do ...@@ -211,8 +212,8 @@ while IFS= read -r line; do
(( inpq >>= 1 )) (( inpq >>= 1 ))
getpc getpc
print -nru4 -- "</a>$pc" print -nru4 -- "</a>$pc"
print -nru5 -- "%$nlt}\\Hair\\footnote{\\texttt{[\\url{$inao}]}}$pc" print -nru5 -- "%$nlt}$pc"
inao= inao=0
;; ;;
(Em) (Em)
xmlcmd=em ltxcmd=emph xmlcmd=em ltxcmd=emph
...@@ -248,7 +249,7 @@ while IFS= read -r line; do ...@@ -248,7 +249,7 @@ while IFS= read -r line; do
done done
(( init )) && die still in .It at EOF (( init )) && die still in .It at EOF
(( inpq )) && die still in .Pq at EOF: $inpq (( inpq )) && die still in .Pq at EOF: $inpq
[[ -n $inao ]] && die still in .ao at EOF (( inao )) && die still in .ao at EOF
cat linklist.ftr >&4 cat linklist.ftr >&4
print -ru5 -- '\end{otherlanguage*}' print -ru5 -- '\end{otherlanguage*}'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment