Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
shell-workshop
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirabilos
shell-workshop
Commits
2d6f4bb8
Verified
Commit
2d6f4bb8
authored
6 years ago
by
mirabilos
Committed by
mirabilos
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
introduce definition list mode for HTML (to match TeX)…
parent
e88dd4cf
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
notes/Makefile
+1
-1
1 addition, 1 deletion
notes/Makefile
notes/cvtdat.sh
+36
-13
36 additions, 13 deletions
notes/cvtdat.sh
with
37 additions
and
14 deletions
notes/Makefile
+
1
−
1
View file @
2d6f4bb8
...
@@ -4,7 +4,7 @@ GENERATED+= linklist.htm linklist.tex
...
@@ -4,7 +4,7 @@ GENERATED+= linklist.htm linklist.tex
all
:
linklist.htm linklist.tex
all
:
linklist.htm linklist.tex
linklist.htm linklist.tex
:
cvtdat.sh linklist.dat
linklist.htm linklist.tex
:
cvtdat.sh linklist.dat
${
MKSH
}
cvtdat.sh linklist
${
MKSH
}
cvtdat.sh
-d
linklist
clean
:
clean
:
rm
-f
${
CLEANFILES
}
${
GENERATED
}
rm
-f
${
CLEANFILES
}
${
GENERATED
}
...
...
This diff is collapsed.
Click to expand it.
notes/cvtdat.sh
+
36
−
13
View file @
2d6f4bb8
...
@@ -24,8 +24,40 @@
...
@@ -24,8 +24,40 @@
#-
#-
# Take input in nroff-like syntax and create Teχ and XHTML from it.
# Take input in nroff-like syntax and create Teχ and XHTML from it.
nline
=
0
die
()
{
print
-ru2
--
"E:
$0
:
$*
"
print
-ru2
--
"N: line #
$nline
'
$oline
'"
exit
1
}
dl
=
0
while
getopts
"d"
ch
;
do
case
$ch
{
(
d
)
dl
=
1
;;
(
*
)
die syntax error
;;
}
done
shift
$((
OPTIND
-
1
))
bn
=
$1
bn
=
$1
if
((
dl
)
)
;
then
ul
=
dl
function
htm_li
{
local
itemkey
=
${
|tohtm
"
$1
"
;
}
print
-nru4
--
"<dt>
${
itemkey
:-
✹
}
</dt><dd
$xmllang
${
1
:+
id=\
"
$itemkey
\"
}>"
xnl=
}
li=dd
else
ul=ul
function htm_li {
print -nru4 -- "
<li
$xmllang
${
1
:+
id=\
"
${
|tohtm
"
$1
"
;
}
\"
}>"
xnl=
}
li
=
li
fi
function
tohtm
{
function
tohtm
{
REPLY
=
${
1
//
'&'
/
'&'
}
REPLY
=
${
1
//
'&'
/
'&'
}
REPLY
=
${
REPLY
//
'<'
/
'<'
}
REPLY
=
${
REPLY
//
'<'
/
'<'
}
...
@@ -56,12 +88,6 @@ function css_escape {
...
@@ -56,12 +88,6 @@ function css_escape {
print
-r
--
"/*]]>*/--></style>"
print
-r
--
"/*]]>*/--></style>"
}
}
die
()
{
print
-ru2
--
"E:
$0
:
$*
"
print
-ru2
--
"N: line #
$nline
'
$oline
'"
exit
1
}
function
doheader
{
function
doheader
{
css_escape
<<
\
EOF
css_escape
<<
\
EOF
.marker {
.marker {
...
@@ -116,7 +142,7 @@ print -ru5 -- '\newcommand{\myLink}[2]{\href{#1}{#2}\Hair\footnote{\texttt{[\url
...
@@ -116,7 +142,7 @@ print -ru5 -- '\newcommand{\myLink}[2]{\href{#1}{#2}\Hair\footnote{\texttt{[\url
# end item
# end item
function
endit
{
function
endit
{
((
init
))
||
return
0
((
init
))
||
return
0
print
-ru4
--
'
</li>
'
print
-ru4
--
"
</
$
li
>
"
xnl
=
xnl
=
print
-ru5
--
'%'
print
-ru5
--
'%'
print
-ru5
--
'}'
print
-ru5
--
'}'
...
@@ -175,7 +201,6 @@ function getpc {
...
@@ -175,7 +201,6 @@ function getpc {
init
=
0
init
=
0
inpq
=
0
inpq
=
0
inao
=
0
inao
=
0
nline
=
0
xnl
=
xnl
=
tnl
=
tnl
=
while
IFS
=
read
-r
line
;
do
while
IFS
=
read
-r
line
;
do
...
@@ -225,7 +250,7 @@ while IFS= read -r line; do
...
@@ -225,7 +250,7 @@ while IFS= read -r line; do
xnl
=
xnl
=
;;
;;
(
Bl
)
(
Bl
)
print
-ru4
--
"<h4>
${
|tohtm
"
$line
"
;
}
</h4><ul>"
print
-ru4
--
"<h4>
${
|tohtm
"
$line
"
;
}
</h4><
$
ul
>"
xnl
=
xnl
=
print
-ru5
--
'\defcaptionname{german,british}{\refname}{'
"
${
|totex
"
$line
"
;
}
"
'}%'
print
-ru5
--
'\defcaptionname{german,british}{\refname}{'
"
${
|totex
"
$line
"
;
}
"
'}%'
print
-ru5
--
'\begin{autosizedbibliography}'
print
-ru5
--
'\begin{autosizedbibliography}'
...
@@ -237,7 +262,7 @@ while IFS= read -r line; do
...
@@ -237,7 +262,7 @@ while IFS= read -r line; do
[[
-z
$line
]]
||
die .El takes no arguments
[[
-z
$line
]]
||
die .El takes no arguments
((
init
))
||
die empty list
((
init
))
||
die empty list
endit
endit
print
-ru4
--
"</ul>"
print
-ru4
--
"</
$
ul
>"
print
-ru4
print
-ru4
xnl
=
xnl
=
print
-ru5
--
'\end{autosizedbibliography}'
print
-ru5
--
'\end{autosizedbibliography}'
...
@@ -247,15 +272,13 @@ while IFS= read -r line; do
...
@@ -247,15 +272,13 @@ while IFS= read -r line; do
(
It
)
(
It
)
endit
endit
getlang
getlang
htm_li
"
$line
"
if
[[
-z
$line
]]
;
then
if
[[
-z
$line
]]
;
then
print
-nru4
--
"<li
$xmllang
>"
print
-ru5
--
'\item[\TwelweStar\hfill]'
"
$ltxlang
{%"
print
-ru5
--
'\item[\TwelweStar\hfill]'
"
$ltxlang
{%"
else
else
print
-nru4
--
"<li
$xmllang
id=
\"
${
|tohtm
"
$line
"
;
}
\"
>"
print
-ru5
--
'\bibitem{'
"
${
|totex
"
$line
"
;
}
}
$ltxlang
{%"
print
-ru5
--
'\bibitem{'
"
${
|totex
"
$line
"
;
}
}
$ltxlang
{%"
fi
fi
init
=
1
init
=
1
xnl
=
tnl
=
' '
tnl
=
' '
;;
;;
(
a
)
(
a
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment