@@ -8,9 +8,9 @@ environment. Fizzbuzz is just an application example.
88
99# Links
1010
11- - [ fizzbuzz_slideshow.pdf] ( http ://cdelord.fr/fizzbuzz/fizzbuzz_slideshow.pdf ) :
11+ - [ fizzbuzz_slideshow.pdf] ( https ://github.com/CDSoft/FizzBuzz/releases ) :
1212 PDF slideshow
13- - [ fizzbuzz.pdf] ( http ://cdelord.fr/fizzbuzz/fizzbuzz.pdf ) : PDF
13+ - [ fizzbuzz.pdf] ( https ://github.com/CDSoft/FizzBuzz/releases ) : PDF
1414 demonstration (specification, implementation, tests, test report,
1515 documentation generator, …)
1616- [ github.com/CDSoft/fizzbuzz] ( https://github.com/CDSoft/fizzbuzz ) :
@@ -170,13 +170,13 @@ LuaX comes with a standard Lua interpreter and provides some libraries
170170- [ inspect] ( https://github.com/CDSoft/luax/blob/master/doc/inspect.md ) :
171171 Human-readable representation of Lua tables
172172
173- More information here: < http ://cdelord.fr /luax>
173+ More information here: < https ://github.com/CDSoft /luax>
174174
175175# Scripting with LuaX
176176
177177LuaX can be used as a general programming language. There are plenty of
178178[ good documentations for Lua] ( https://www.lua.org/docs.html ) and
179- [ LuaX] ( http ://cdelord.fr /luax) .
179+ [ LuaX] ( https ://github.com/CDSoft /luax) .
180180
181181A big advantage of Lua is the usage of Lua tables as a common data
182182format usable by various tools. It is Human-readable and structured. It
@@ -237,7 +237,7 @@ Ypp is a minimalist and generic text preprocessor using Lua macros.
237237Ypp is compiled by LuaX, i.e. Lua and LuaX functions and modules are
238238available in macros.
239239
240- More information here: < http ://cdelord.fr /ypp>
240+ More information here: < https ://github.com/CDSoft /ypp>
241241
242242Ypp is pretty simple. It searches for Lua expressions and replaces
243243macros with their results.
259259
260260is rendered as
261261
262- > $$
262+ >
263+ > ``` math
264+ >
263265> \sum_{i=1}^{100} i^2 = 338350
264- > $$
266+ > ```
265267
266268Macros can also define variables reusable later by other macros.
267269
@@ -274,7 +276,7 @@ Macros can also define variables reusable later by other macros.
274276]]
275277```
276278
277- defines ` N ` ($N = 1000$) which can be read in a Lua expression or with
279+ defines ` N ` ($` N = 1000 ` $) which can be read in a Lua expression or with
278280` @N ` and ` sumsq ` which computes the sum of squares.
279281
280282Then
287289
288290becomes
289291
290- > $$
292+ >
293+ > ``` math
294+ >
291295> \sum_{i=1}^{1000} i^2 = 333833500
292- > $$
296+ > ```
293297
294298# Pandoc
295299
@@ -322,7 +326,7 @@ It provides several interesting features:
322326- script execution (e.g. to include the result of a command)
323327- diagrams (Graphviz, PlantUML, ditaa, Asymptote, blockdiag, mermaid…)
324328
325- The documentation of Panda is here: < http ://cdelord.fr /panda>
329+ The documentation of Panda is here: <https ://github.com/CDSoft /panda>
326330
327331## Examples
328332
@@ -400,24 +404,6 @@ code blocks and are replaced by an image by panda.
400404
401405<img src="./img/example-gnuplot.svg" style="width:67.0%" />
402406
403- # Precompiled LuaX binaries
404-
405- [cdelord.fr/pub](https://cdelord.fr/pub) provides LuaX binaries as well
406- as some other useful softwares (LuaX based tools, Pandoc…).
407-
408- These tools are used to pre-process files and generate documents, using
409- Lua as a common, simple and powerful scripting language.
410-
411- These tools can easily be installed with a single shell command:
412-
413- ``` sh
414- curl https://cdelord.fr/pub/luax-full.sh | sh
415- ```
416-
417- More details on [cdelord.fr/pub](https://cdelord.fr/pub), especially for
418- Windows users who may need to download a Zip archive and decompress it
419- manually.
420-
421407# Fizzbuzz
422408
423409Fizzbuzz is a concrete example of the usage of LuaX/ypp/pandoc/panda to
@@ -435,17 +421,20 @@ From [Wikipedia](https://en.wikipedia.org/wiki/Fizz_buzz):
435421`fizzbuzz` is a function that returns `"fizz"`, `"buzz"`, `"fizzbuzz"`
436422or `n` for any positive integer `n`.
437423
438- $$
424+ ``` math
425+
439426 fizzbuzz : \mathbb{N}^+ \to \{fizz, buzz, fizzbuzz\} \cup \mathbb{N}^+
440- $$ $$
427+ ```
428+ ``` math
429+
441430 fizzbuzz(n) =
442431 \begin{cases}
443432 \text{"fizzbuzz" } & \text{if } (3|n) \land (5|n) \\
444433 \text{"fizz" } & \text{if } (3|n) \land \lnot (5|n) \\
445434 \text{"buzz" } & \text{if } (5|n) \land \lnot (3|n) \\
446435 n & \text{if } \lnot (3|n) \land \lnot (5|n) \\
447436 \end{cases}
448- $$
437+ ```
449438
450439### Requirements
451440
@@ -566,13 +555,14 @@ The functions `fizzbuzz` builds three infinite lists and combine them.
566555| fizzes | . | . | fizz | . | . | fizz | . | . | fizz | . | . | fizz | . | . | fizz | … |
567556| buzzes | . | . | . | . | buzz | . | . | . | . | buzz | . | . | . | . | buzz | … |
568557
569- $$
558+ ``` math
559+
570560fizzbuzz(n) =
571561 \begin{cases}
572562 fizz + buzz & \text{if } fizz \ne Nothing \lor buzz \ne Nothing \\
573563 n & \text{if } fizz = buzz = Nothing \\
574564 \end{cases}
575- $$
565+ ```
576566
577567``` hs
578568fizzbuzz :: [String]
0 commit comments