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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
changequote(`«', `»')dnl
dnl Discard output by diverting to a negative diversion to suppress
dnl unwanted trailing newlines after macro definitions.
divert(«-1»)
define(«LOCAL_LINK_NAME», «translit(«$1», «A-Z
», «a-z__»)»)
define(«REMOVE_NEWLINE», «translit(«$1»,«
», « »)»)
define(«REFERENCE», [«REMOVE_NEWLINE(«$2»)»](««#»»«LOCAL_LINK_NAME(«$1»)»))
define(«XREFERENCE», «[$2]»«($1)»)
define(«EMPH», ««_»REMOVE_NEWLINE(«$1»)«_»»)
define(«CMD», «`REMOVE_NEWLINE(«$1»)`»)
define(«SECTION», « divert(«0») <a
href='«#»LOCAL_LINK_NAME(«$1»)'>$1</a><br> divert(«2») <h2
id="LOCAL_LINK_NAME(«$1»)">$1</h2> ») define(«SUBSECTION»,
«<h3 id="LOCAL_LINK_NAME(«$1»)">$1</h3> »)
define(«OVERVIEW», «
<div class="overview">
<center> <strong>
ifelse(«$2», «», «Overview», «$2»)
</strong> </center>
$1
</div>
»)
define(«EXERCISES», «<h3> Exercises </h3>»)
define(«HOMEWORK», «
<h3> Homework </h3>
ifelse(«$2», «», «$1», «dnl
<details> <summary>
$1
</summary> <h4> Solution </h4>
<div class="solution">$2</div> </details>»)
»)
define(«SUPPLEMENTS», «SECTION(«Supplements»)»)
define(«TOC_ENTRY», «
ifelse(«$1.m4», «$2», «», «<a href="$1.html">»)
translit(«$1», «_», « »)
ifelse(«$1.m4», «$2», «», «</a>»)
<br>
»)
define(«LOGO», «<a title="home" href="."><img src="aple.svg" alt="logo"></a>»)
define(«HEADER», «
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
<title>Unix course</title>
<link href="aple.css" rel="stylesheet" type="text/css">
<link rel="shortcut icon" href="aple.ico">
</head>
<body>
<table class="logo"> <tr>
<td class="logo">LOGO()</td>
<td class="logo"> <h1>
ifelse(«$3», «», «
substr(translit(«$2», «_», « »), 0, index(«$2», .m4))
», «
$3
»)
</h1> <p> <small> $1 </small> </p>
</td>
</tr> </table>
»)
define(«TABLE_OF_CONTENTS», «
TOC_ENTRY(«Introduction», «$2»)
TOC_ENTRY(«Unix_Concepts», «$2»)
ifelse(PUBLIC(), «false», «
TOC_ENTRY(Command_Line_Utilities, «$2»)
»)
TOC_ENTRY(Networking, «$2»)
TOC_ENTRY(LVM, «$2»)
TOC_ENTRY(«Filesystems», «$2»)
TOC_ENTRY(OS-Level_Virtualization, «$2»)
ifelse(PUBLIC(), «false», «
TOC_ENTRY(Gridengine, «$2»)
TOC_ENTRY(Git, «$2»)
TOC_ENTRY(Bash, «$2»)
TOC_ENTRY(Debugging, «$2»)
»)
»)
define(«TITLE», «
HEADER(«$1», «$2», «$3»)
<div class="dropdown">
<svg
height="35" width="30"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
>
<rect fill="black" height="3" width="20" x="5" y="5" rx="2"/>
<rect fill="black" height="3" width="20" x="5" y="11" rx="2"/>
<rect fill="black" height="3" width="20" x="5" y="17" rx="2"/>
</svg>
<div class="dropdown-content">
<table class="menu">
<tr>
<th> Chapter </th>
<th> Section </th>
</tr> <tr>
<td class="menu">
TABLE_OF_CONTENTS(«chapter_list»)
</td> <td class="menu">
divert(«1»)
</td>
</tr>
</table>
</div>
</div>
divert(«2»)
»)
divert(«0»)dnl
|