List of commits:
Subject Hash Author Date (UTC)
Minor corrections in installation manual. cb8cdfbd506a1344c81aecda055165cc1ca54ece aubert@math.cnrs.fr 2020-04-19 06:17:52
Working on install manual. 3702c6437ee163eb4a61b4d69cffee8c8a76dc3d aubert@math.cnrs.fr 2020-04-19 06:04:22
Worked on makefiles and example file. 4255d5e85bb684349f7f7798455dd8b3a273254b aubert@math.cnrs.fr 2020-04-19 04:56:53
Re-idented some of the code. 124375e6bed1edb96d1bb4bcec8f111c8a3a1197 aubert@math.cnrs.fr 2020-04-19 03:10:02
Java indentation 2b317a12b7ab52bdca576a1bb46b2a2ce295464f guest 2020-04-18 22:21:04
test 6fefa044794ff1d74a3d2493556c836b3dd97e74 guest 2020-04-18 22:18:44
Java indentation 5b0e0eb38484a8c67517a36a438f148bd5efa740 guest 2020-04-18 22:14:01
Worked on install notes. b46b931ef11e3cb7dfe87c7f91ec9d5c558567e6 aubert@math.cnrs.fr 2020-04-17 05:22:20
Started to integrate installation manual to notes. fd27b7686dd4c9d99163cf7badc720cd4a050221 aubert@math.cnrs.fr 2020-04-17 04:09:11
Replaced picture with text in Naming_Convention.md. aff8c98c70b0834f9b0f076b881975daf3cdda03 aubert@math.cnrs.fr 2020-04-17 03:48:38
Testing. b1a0942b15742ce987e4ad63848e9e2afcdde7ae aubert@math.cnrs.fr 2020-04-17 02:03:52
Added explanation on the importance of alt text in known bugs. 3bddd86e1072b095a9f9d02f8c035f8d8f3e7155 aubert@math.cnrs.fr 2020-04-17 01:44:51
Notes on passing parameters in url eea245da85acbc2e3cf2dd94e10170dcd10eb04f aubert@math.cnrs.fr 2020-04-16 01:55:57
Worked on Security Chapter. e18b82c85cf995279993fb681d53f798f14b2932 aubert@math.cnrs.fr 2020-04-15 15:23:07
Re-vamping the advanced java part. bc34886513772e6920a153752267149ef89d9a70 aubert@math.cnrs.fr 2020-04-13 18:25:23
Deleted Workflow file, since it is now in CONTRIb. 194d0e9f227b1f56f893a010247417268552b9e4 aubert@math.cnrs.fr 2020-04-13 14:45:21
SQL/XML indentation and comments 618fca553f0ffa355ca330e90e9adeeeb42c586d guest 2020-04-13 00:09:03
Cleaning 29f4f08496934561d3fdfbc46ea2393714cf1662 aubert@math.cnrs.fr 2020-04-10 21:21:37
Changing end-of-line tyes. b9efef4052a41d6444c7e3c173859f32b98f32b8 aubert@math.cnrs.fr 2020-04-10 19:54:21
Changes to ease merging. 77a481a4534bb0594e9fba45457450b14a7834b9 aubert@math.cnrs.fr 2020-04-10 19:51:38
Commit cb8cdfbd506a1344c81aecda055165cc1ca54ece - Minor corrections in installation manual.
Author: aubert@math.cnrs.fr
Author date (UTC): 2020-04-19 06:17
Committer name: aubert@math.cnrs.fr
Committer date (UTC): 2020-04-19 06:17
Parent(s): 3702c6437ee163eb4a61b4d69cffee8c8a76dc3d
Signer:
Signing key:
Signing status: N
Tree: d0189679d2f3672004d8737603a224fd0ded8ba4
File Lines added Lines deleted
install/INSTALL.md 9 10
install/manual.md 0 331
File install/INSTALL.md changed (mode: 100644) (index 3a242c4..3ab0f8f)
... ... It contains a "aux" rule that compile this document to an html document.
10 10
11 11 # Speed-Run # Speed-Run
12 12
13 To compile those notes, you need
13 To compile [those notes](../README.html), you need
14 14
15 15 - The ability to execute [makefile](https://en.wikipedia.org/wiki/Makefile) (e.g., a UNIX system, a system with [Cygwin](https://en.wikipedia.org/wiki/Cygwin), or [some other trick](https://stackoverflow.com/q/2532234/2657549)), - The ability to execute [makefile](https://en.wikipedia.org/wiki/Makefile) (e.g., a UNIX system, a system with [Cygwin](https://en.wikipedia.org/wiki/Cygwin), or [some other trick](https://stackoverflow.com/q/2532234/2657549)),
16 - Python3 and pip,
17 - the latest version of [pandoc](https://github.com/jgm/pandoc/releases/),
18 - the latest version of [pandoc-include-code](https://github.com/owickstrom/pandoc-include-code), and of [pandoc-numbering](https://github.com/chdemko/pandoc-numbering),
19 - git (cf. <https://git-scm.com/>),
20 - LaTeX (cf. <https://www.latex-project.org/get/>, <https://tex.stackexchange.com/q/1092>)^[I recommend installing a minimal installation, and then fetching the missing packages one by one, using e.g. `/usr/local/texlive/2019/bin/x86_64-linux/tlmgr install environ`]),
21 - latexmk (cf. <https://ctan.org/pkg/latexmk/>, but it is possible that it is already part of your LaTeX installation),
22 - pdf2svg (cf. <https://github.com/dawbarton/pdf2svg>),
16 - the latest version of [pandoc](https://pandoc.org/installing.html), of [pandoc-include-code](https://github.com/owickstrom/pandoc-include-code), and of [pandoc-numbering](https://github.com/chdemko/pandoc-numbering),
17 - [git](https://git-scm.com/),
18 - [LaTeX](https://www.latex-project.org/get/) (refer to the instructions on the [pandoc installation page](https://pandoc.org/installing.html] or at <https://tex.stackexchange.com/q/1092>^[It is probaby better to install a minimal installation, and then to fetch the missing packages one by one, using e.g. `/usr/local/texlive/2019/bin/x86_64-linux/tlmgr install environ` for the `environ` package.]),
19 - [latexmk](https://ctan.org/pkg/latexmk/) (it is possible that it is already part of your LaTeX installation),
20 - [pdf2svg](https://github.com/dawbarton/pdf2svg),
23 21 - librsvg2-bin, - librsvg2-bin,
24 22 - font-linuxlibertine - font-linuxlibertine
25 23
 
... ... then type: `apt-get install build-essential`
123 121 In your terminal type (as root): `apt-get install python3-pip` In your terminal type (as root): `apt-get install python3-pip`
124 122
125 123 5) Install [Pandoc](https://pandoc.org) 5) Install [Pandoc](https://pandoc.org)
126 * Download [[pandoc-2.9.2.1-amd64.deb]](https://github.com/jgm/pandoc/releases/download/2.9.1.1/pandoc-2.9.2.1-amd64.deb) (or higher) from <https://github.com/jgm/pandoc/releases/tag/2.9.1.1>
124 * Download [pandoc-2.9.2.1-amd64.deb](https://github.com/jgm/pandoc/releases/download/2.9.1.1/pandoc-2.9.2.1-amd64.deb) (or higher) from <https://github.com/jgm/pandoc/releases/tag/2.9.1.1>
127 125 * From your terminal navigate to location of the downloaded Pandoc folder (most likely the downloads folder) and type: `dpkg -i pandoc-2.9.2.1-amd64.deb` * From your terminal navigate to location of the downloaded Pandoc folder (most likely the downloads folder) and type: `dpkg -i pandoc-2.9.2.1-amd64.deb`
128 126
129 127
 
... ... In your terminal type (as root): `apt-get install texlive-xetex`
170 168 Type: `git clone https://github.com/poonamveeral/GeneralRepo` Type: `git clone https://github.com/poonamveeral/GeneralRepo`
171 169
172 170 14) Testing Pandoc 14) Testing Pandoc
173 * In your terminal, navigate to Course/install
171 * In your terminal, navigate to install/test/
174 172 * In your terminal type: `pandoc test_pandoc.md -o test_pandoc.html` * In your terminal type: `pandoc test_pandoc.md -o test_pandoc.html`
175 173 * In the install folder, you should see a file called "test_pandoc.html" containing * In the install folder, you should see a file called "test_pandoc.html" containing
176 174 ```{html} ```{html}
 
... ... Type: `git clone https://github.com/poonamveeral/GeneralRepo`
189 187 ```{html} ```{html}
190 188 <p><span id="exercise:1" class="pandoc-numbering-text exercise"><strong>Exercise 1</strong> <em>(The first exercise)</em></span></p> <p><span id="exercise:1" class="pandoc-numbering-text exercise"><strong>Exercise 1</strong> <em>(The first exercise)</em></span></p>
191 189 <p><span id="exercise:2" class="pandoc-numbering-text exercise"><strong>Exercise 2</strong> <em>(The second exercise)</em></span></p> <p><span id="exercise:2" class="pandoc-numbering-text exercise"><strong>Exercise 2</strong> <em>(The second exercise)</em></span></p>
190 ```
192 191
193 192 16) Test pandoc-citeproc 16) Test pandoc-citeproc
194 193 * In the same install folder, type: * In the same install folder, type:
File install/manual.md deleted (index 3a242c4..0000000)
1 ---
2 title: Instruction Manual
3 ---
4
5 <!---
6 To compile this document, look, in the parent folder, for the "makefile" file.
7 It contains a "aux" rule that compile this document to an html document.
8 -->
9
10
11 # Speed-Run
12
13 To compile those notes, you need
14
15 - The ability to execute [makefile](https://en.wikipedia.org/wiki/Makefile) (e.g., a UNIX system, a system with [Cygwin](https://en.wikipedia.org/wiki/Cygwin), or [some other trick](https://stackoverflow.com/q/2532234/2657549)),
16 - Python3 and pip,
17 - the latest version of [pandoc](https://github.com/jgm/pandoc/releases/),
18 - the latest version of [pandoc-include-code](https://github.com/owickstrom/pandoc-include-code), and of [pandoc-numbering](https://github.com/chdemko/pandoc-numbering),
19 - git (cf. <https://git-scm.com/>),
20 - LaTeX (cf. <https://www.latex-project.org/get/>, <https://tex.stackexchange.com/q/1092>)^[I recommend installing a minimal installation, and then fetching the missing packages one by one, using e.g. `/usr/local/texlive/2019/bin/x86_64-linux/tlmgr install environ`]),
21 - latexmk (cf. <https://ctan.org/pkg/latexmk/>, but it is possible that it is already part of your LaTeX installation),
22 - pdf2svg (cf. <https://github.com/dawbarton/pdf2svg>),
23 - librsvg2-bin,
24 - font-linuxlibertine
25
26 Then, clone the repository at <https://rocketgit.com/user/caubert/CSCI_3410>, and refer to [the example file](../notes/example.html) for a gentle test and guide on the syntax and tool of this document.
27 Change the current folder to `notes`, and execute `make example`.
28 You can have a look at `notes/Makefile` to understand what is happening in the `example` rule.
29
30 <!--
31
32 # Desinstall
33
34 All the commands are typed as root.
35
36 Clean all of cabal and the installed packages:
37
38 - Downloald <https://gist.githubusercontent.com/simonmichael/1185421/raw/7b5da412da62dadd204b9e41ccd9639097d2178e/gistfile1.sh>
39 - Type
40 source gistfile1.sh
41
42 - Type
43 ghc-pkg-reset
44
45 Completely remove pandoc:
46
47 apt-get purge pandoc
48
49 Uninstall pip:
50
51 python -m pip uninstall pip
52 -->
53
54 # Overview
55
56 *The Generating Documents (Basic) Using Markdown User Manual outlines
57 the objectives, requirements, and needs to be addressed when training
58 users on how to generate a PDF, HTML, or ODT document using markdown
59 file. The plan presents the activities needed to support file
60 development.*
61
62 # Introduction
63
64 Markdown is a fast and easy way to take notes, create content for a website, and produce print-ready documents. It's a lightweight markup language with plain text formatting syntax. Markdown is designed to be converted to many different output formats such as PDF, Word, ODT, HTML, and many more. It is both portable and platform independent, more intuitive to read and write, and can be used for websites, documents, notes, books, etc., but is often used to format readme
65 files and in online discussion forums.
66
67 ## How Does Markdown Work?
68
69 Markdown text is written and stored in plaintext file with a markdown extension (e.g. .md). Using a separate markdown application capable of processing markdown (we will be using Pandoc), it takes the markdown formatted text and converts it to HTML. The HTML file can then be viewable in a web browser or then converted to another file format, like PDF.
70
71 ![Figure 1.1: Markdown text file is converted and displayed in a web browser](markdownproc.png){ height=50% }
72
73
74 # Requirements
75
76
77 ## Skills required
78
79
80 * Markdown
81 * For a basic tutorial visit: <https://commonmark.org/help/tutorial/>
82
83 Helpful Skills:
84
85 * LaTex code
86 * Common terminal commands
87 * For more information visit: <https://www.dummies.com/computers/macs/mac-operating-systems/how-to-use-basic-unix-commands-to-work-in-terminal-on-your-mac/>
88 * Pandoc's Markdown
89 * For more information visit: <https://pandoc.org/MANUAL.html#pandocs-markdown>
90 * YAML (YAML Ain't Markup Language)
91 * For more information visit: <https://blog.stackpath.com/yaml/>
92
93 ## Software Requirements
94
95 For a fully functioning environment and step by step guide on installation instructions follow the instructions below:
96
97 NOTE: All the following steps must be installed on a Linux operating system.
98
99 1) Install [Git](https://github.com)
100 In your terminal, type (as root): `apt update`
101 then type: `apt install git`
102
103 NOTE: Upon opening your terminal, you may see username@hostname:~$. You want your terminal to run as root@hostname. To do this, upon opening your terminal, type: `su --`
104
105 Then enter your password. You should see something like this:
106
107 ![Terminal Root User](rootuser.png)\
108
109 2) Install [Make](https://gnu.org/software/make/manual/make.html)
110 In your terminal, type (as root): `apt-get update`
111 then type: `apt-get install build-essential`
112
113 3) Install [LaTex](https://latex-project.org)
114 * Download
115 [install-tl-unx.tar.gz](http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz)
116 from <https://www.tug.org/texlive/acquire-netinstall.html>
117 * Extract the folder
118 * In the terminal, navigate to the location of the extracted folder
119 * In the terminal, type (as root): perl install-tl
120 * When prompted, enter command: `I`
121
122 4) Install [Python 3](https://python.org/download/releases/3.0/)
123 In your terminal type (as root): `apt-get install python3-pip`
124
125 5) Install [Pandoc](https://pandoc.org)
126 * Download [[pandoc-2.9.2.1-amd64.deb]](https://github.com/jgm/pandoc/releases/download/2.9.1.1/pandoc-2.9.2.1-amd64.deb) (or higher) from <https://github.com/jgm/pandoc/releases/tag/2.9.1.1>
127 * From your terminal navigate to location of the downloaded Pandoc folder (most likely the downloads folder) and type: `dpkg -i pandoc-2.9.2.1-amd64.deb`
128
129
130 6) Install [pandoc-include-code](https://github.com/owickstrom/pandoc-include-code) filter
131 * In your terminal (as normal user) type: `cabal update`
132 * (cabal is a system for building and packaging Haskell libraries and programs. If cabal command not found then type (as root)):
133 `apt-get install haskell-platform`
134 * Then, (as normal user) type: `cabal update`
135
136 NOTE: To run terminal as a normal user, type: `su - username` where "username" is your username. You should see something like this:
137
138 ![Terminal Normal User](normaluser.png)\
139
140 * Then type: `cabal install pandoc-types`
141 * Go to <https://github.com/owickstrom/pandoc-include-code> and download the repository by clicking "Download ZIP" and extract the folder
142 * In your terminal, navigate to the extracted folder
143 * In your terminal type: `cabal configure`
144 * Then type: `cabal install`
145
146 7) Install [pandoc-numbering](https://github.com/chdemko/pandoc-numbering) filter
147 Type (as normal user): `pip3 install pandoc-numbering`
148
149 8) Install [latexmk](https://mg.readthedocs.io/latexmk.html) fully automated latex document generation
150 * Go to <https://ctan.org/pkg/latexmk/>
151 * Click download link and download and extract the file.
152 * Open the extracted latexmk folder, locate the "latexmk.pl" file and move it to "~/.local/bin" and rename it to "latexmk".
153
154 NOTE: You may need to expose hidden files while in "Home". To do this press Ctrl + H.
155
156 9) Install [pdf2svg](https://github.com/dawbarton/pdfsvg)
157 In your terminal type (as root): `apt-get install pdf2svg`
158
159 10) Install [librsvg2-bin](https://github.com/teemu/librsvg2-bin)
160 In your terminal type (as root): `apt-get install librsvg2-bin`
161
162 11) Install [texlive-xetex](https://packages.debian.org/sid/tex/texlive-xetex)
163 In your terminal type (as root): `apt-get install texlive-xetex`
164
165 12) Install linuxlibertine font and freefont
166 * In your terminal type (as root): `apt-get install fonts-linuxlibertine`
167 * Then type: `apt-get install fonts-freefont-ttf`
168
169 13) Clone this [basic folder structure](https://github.com/poonamveeral/GeneralRepo) (as a normal user)
170 Type: `git clone https://github.com/poonamveeral/GeneralRepo`
171
172 14) Testing Pandoc
173 * In your terminal, navigate to Course/install
174 * In your terminal type: `pandoc test_pandoc.md -o test_pandoc.html`
175 * In the install folder, you should see a file called "test_pandoc.html" containing
176 ```{html}
177 <p>I’m a test for pandoc.</p>
178 ```
179
180 15) Testing pandoc-numbering
181 * In the same install folder, type:
182
183 `pandoc test_pandoc-numbering.md --filter pandoc-numbering -o test_pandoc-numbering.html`
184
185 * If you're receiving errors, in your terminal, type:
186 `export PATH=$PATH:/home/username/.local/bin`
187 * In the install folder, you should see a file called "test_pandoc-numbering.html" containing
188
189 ```{html}
190 <p><span id="exercise:1" class="pandoc-numbering-text exercise"><strong>Exercise 1</strong> <em>(The first exercise)</em></span></p>
191 <p><span id="exercise:2" class="pandoc-numbering-text exercise"><strong>Exercise 2</strong> <em>(The second exercise)</em></span></p>
192
193 16) Test pandoc-citeproc
194 * In the same install folder, type:
195
196 `pandoc --filter pandoc-citeproc test_pandoc-citeproc.md -o test_pandoc-citeproc.html`
197
198 * In the install folder, you should see a file called "test_pandoc-citeproc.html" containing
199
200 ```{html}
201 <p><span class="citation" data-cites="item1">(Doe 2005)</span></p>
202 <h1 class="unnumbered" id="references" class="unnumbered">References</h1>
203 <div id="refs" class="references hanging-indent" role="doc-bibliography">
204 <div id="ref-item1" role="doc-biblioentry">
205 <p>Doe, John. 2005. <em>First Book</em>.</p>
206 </div>
207 </div>
208 ```
209
210 17) Test pandoc-include-code
211 * In the same install folder, type:
212 `pandoc --filter pandoc-include-code -o test_pandoc-include-code.pdf test_pandoc-include-code.md`
213 * In the install folder, you should see a file called "test_pandoc-include-code.html" containing
214
215 ```{html}
216 <p>Here is some code:</p>
217 <div class="sourceCode" id="cb1"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb1-1"><a href="#cb1-1"></a>I&#39;m a test for pandoc. </span></code></pre></div>
218 ```
219
220 If you're receiving "Could not find executable pandoc-include-code"
221
222 * Go to the root folder, and open the ".bashrc" file with a text editor
223 * Add the line below to the bottom of the file and click "save" to save the file:
224
225 `export PATH=$PATH:/home/username/.cabal/bin`
226
227 # Creating the Document
228 Follow these steps to learn how to create a simple markdown document utilizing bibliographies, images/figures, and code blocks.
229
230 ## Step 1
231
232 To start off, you're going to need a folder structure set up like this:
233
234 ![Folder Structure](folderstructure.png)\
235
236
237 If you completed number 13 from 2.2 Software Requirements skip step 2. If not, continue on.
238
239 ## Step 2
240
241 You want each folder to contain:
242
243 ```{.plain}
244 .
245 ├── install/ -- How to install requirements to compile the document.
246 │   └── .md files -- To test Pandoc
247 ├── bib/ -- References (including reference to the document).
248 │   └── .bib files -- To store citations.
249 ├── code/ -- Source code included in the document.
250 │   └── code files -- (E.g. .java, .xml, .sql)
251 ├── fig/ -- Source code for various figures used in the document.
252 ├── img/ -- Various image files itegrated in the document.
253 ├── latex/ -- Latex configuration file.
254 ├── style/ -- CSS style used for the web page.
255 ├── Makefile -- Directives to generate example.md document.
256 ├── README.md -- The present file.
257 └── example.md -- Sample file to test.
258 ```
259
260 An example of a basic template of a markdown file can be found at "example.md" in the generic repo from step 13 from above.
261
262 # Compiling and Converting the Document
263 Follow these steps to learn how to compile and convert a markdown file to PDF, ODT, and HTML. Other possible conversion formats can be found here: <https://pandoc.org/>
264
265 * Open up a terminal, inside of it, change your directory to where your markdown file is located. In this example, navigate to your "Course" folder. To do this, simply type: `cd Course` where "Course" is the name of your Course folder.
266
267 * Next, type: `make fig`
268 "make fig" compiles all the latex code in order to produce the figures from the figures folder.
269
270 * Then type: `make fig_svg`
271 "make fig_svg" compiles all the latex code in order to produce the figures from the figures folder.
272
273 * To produce a PDF document common format is:
274
275 `pandoc <filters> inputfile.md -o outputfile.ext`
276
277 or
278
279 `pandoc <filters> -o outputfile.ext inputfile.md`
280
281 ## PDF
282 For our example, in your terminal, while in the directory of where your markdown file is located, which should be your "Course" folder, type:
283
284 `make pdf`
285
286 or
287
288 ```
289 pandoc --toc --filter pandoc-numbering --filter pandoc-citeproc --filter pandoc-include-code \
290 --top-level-division=chapter -M date="$(LANG=en_us_88591 date '+%B %e, %Y (%r)')" \
291 --pdf-engine=xelatex --pdf-engine-opt=-shell-escape -V links-as-notes \
292 --default-image-extension=pdf -o example.pdf example.md
293 ```
294
295 To check if the results worked, from your desktop, navigate to your "Course" folder. You should see a new file called "example.pdf".
296
297 ## ODT
298 For our example, in your terminal, while in the directory of where your markdown file is located, which should be your "Course" folder, type:
299
300 `make odt`
301
302 or
303
304 ```
305 pandoc  --toc --filter pandoc-numbering --filter pandoc-citeproc --filter pandoc-include-code \
306 --top-level-division=chapter -M date="$(LANG=en_us_88591 date '+%B %e, %Y (%r)')" \
307 --default-image-extension=svg -o example.odt example.md
308 ```
309
310 To check if the results worked, from your desktop, navigate to your "Course" folder. You should see a new file called "example.odt".
311
312
313 ## HTML
314 For our example, in your terminal, while in the directory of where your markdown file is located, which should be your "Course" folder, type:
315
316 `make html`
317
318 or
319
320 ```
321 pandoc --toc --filter pandoc-numbering --filter pandoc-citeproc --filter pandoc-include-code \
322 --top-level-division=chapter -M date="$(LANG=en_us_88591 date '+%B %e, %Y (%r)')" \
323 --css=style/style.css --toc-depth=1 --self-contained --default-image-extension=svg \
324 -o example.html example.md
325 ```
326
327 where "style.css" is the name of your css file.
328
329 To check if the results worked, from your desktop, navigate to your "Course" folder. You should see a new file called "example.html".
330
331
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/caubert/CSCI_3410

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/caubert/CSCI_3410

Clone this repository using git:
git clone git://git.rocketgit.com/user/caubert/CSCI_3410

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main