Initial commit
commit
c5e91631d1
@ -0,0 +1,11 @@
|
|||||||
|
for /d %%A in (.\*) do (
|
||||||
|
set "except="
|
||||||
|
if /i "%%~nxA" == "temp" set "except=1"
|
||||||
|
if /i "%%~nxA" == "_site" set "except=1"
|
||||||
|
if /i "%%~nxA" == ".jekyll-cache" set "except=1"
|
||||||
|
if not defined except (
|
||||||
|
for %%j in (%%A\*.md) do (
|
||||||
|
marp %%j -o %%~pj%%~nj-slides.html --html true
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
@ -0,0 +1,11 @@
|
|||||||
|
for /d %%A in (.\*) do (
|
||||||
|
set "except="
|
||||||
|
if /i "%%~nxA" == "temp" set "except=1"
|
||||||
|
if /i "%%~nxA" == "_site" set "except=1"
|
||||||
|
if /i "%%~nxA" == ".jekyll-cache" set "except=1"
|
||||||
|
if not defined except (
|
||||||
|
for %%j in (%%A\*.md) do (
|
||||||
|
marp %%j -o %%~pj%%~nj.pdf --html true
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
@ -0,0 +1,3 @@
|
|||||||
|
for %%j in (.\*.pptx) do (
|
||||||
|
pptx2md --disable-color "%%j" -o "%%~pj%%~nj.md"
|
||||||
|
)
|
@ -0,0 +1,5 @@
|
|||||||
|
for /D %%i in (.\*) do (
|
||||||
|
for %%j in (%%i\*.md) do (
|
||||||
|
del %%~pj%%~nj.html
|
||||||
|
)
|
||||||
|
)
|
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
for file in *.md; do
|
||||||
|
perl -0777 -i -pe '
|
||||||
|
s/\r\n/\n/g; # Normalize Windows line endings to Unix
|
||||||
|
s/(?:[ \t]*\n){2,}/\n\n/g; # Collapse multiple blank lines (even with whitespace)
|
||||||
|
' "$file"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Collapsed extra blank lines."
|
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
SEARCH="$1"
|
||||||
|
REPLACE="$2"
|
||||||
|
|
||||||
|
for file in *.md; do
|
||||||
|
SEARCH="$SEARCH" REPLACE="$REPLACE" perl -i -pe '
|
||||||
|
BEGIN {
|
||||||
|
$search = quotemeta($ENV{"SEARCH"});
|
||||||
|
$replace = $ENV{"REPLACE"};
|
||||||
|
$replace =~ s/\\/\\\\/g; # escape backslashes in replacement
|
||||||
|
$replace =~ s/\$/\\\$/g; # escape $ in replacement
|
||||||
|
}
|
||||||
|
s/$search/$replace/g;
|
||||||
|
' "$file"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Literal replacement complete."
|
@ -0,0 +1,10 @@
|
|||||||
|
/* buutti.css */
|
||||||
|
/* @theme buutti */
|
||||||
|
|
||||||
|
@import "default";
|
||||||
|
|
||||||
|
.columns {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
gap: 1rem;
|
||||||
|
}
|
@ -0,0 +1,117 @@
|
|||||||
|
{
|
||||||
|
"python code block" : {
|
||||||
|
"scope": "markdown",
|
||||||
|
"prefix": "py",
|
||||||
|
"body": [
|
||||||
|
"```python",
|
||||||
|
"$0",
|
||||||
|
"```"
|
||||||
|
],
|
||||||
|
"description": "Python code block"
|
||||||
|
},
|
||||||
|
"cpp code block" : {
|
||||||
|
"scope": "markdown",
|
||||||
|
"prefix": "cpp",
|
||||||
|
"body": [
|
||||||
|
"```cpp",
|
||||||
|
"$0",
|
||||||
|
"```"
|
||||||
|
],
|
||||||
|
"description": "C++ code block"
|
||||||
|
},
|
||||||
|
"csharp code block" : {
|
||||||
|
"scope": "markdown",
|
||||||
|
"prefix": "cs",
|
||||||
|
"body": [
|
||||||
|
"```csharp",
|
||||||
|
"$0",
|
||||||
|
"```"
|
||||||
|
],
|
||||||
|
"description": "C# code block"
|
||||||
|
},
|
||||||
|
"js code block" : {
|
||||||
|
"scope": "markdown",
|
||||||
|
"prefix": "js",
|
||||||
|
"body": [
|
||||||
|
"```js",
|
||||||
|
"$0",
|
||||||
|
"```"
|
||||||
|
],
|
||||||
|
"description": "JavaScript code block"
|
||||||
|
},
|
||||||
|
"ts code block" : {
|
||||||
|
"scope": "markdown",
|
||||||
|
"prefix": "ts",
|
||||||
|
"body": [
|
||||||
|
"```ts",
|
||||||
|
"$0",
|
||||||
|
"```"
|
||||||
|
],
|
||||||
|
"description": "TypeScript code block"
|
||||||
|
},
|
||||||
|
"inline code" : {
|
||||||
|
"scope": "markdown",
|
||||||
|
"prefix": "c",
|
||||||
|
"body": [
|
||||||
|
"`$0`",
|
||||||
|
],
|
||||||
|
"description": "Inline code block"
|
||||||
|
},
|
||||||
|
"extra slide" : {
|
||||||
|
"scope": "markdown",
|
||||||
|
"prefix": "extra",
|
||||||
|
"body": [
|
||||||
|
"## Extra: $0",
|
||||||
|
"<!-- _backgroundColor: #5d275d -->",
|
||||||
|
],
|
||||||
|
"description": "Extra slide colors"
|
||||||
|
},
|
||||||
|
"exercise slide" : {
|
||||||
|
"scope": "markdown",
|
||||||
|
"prefix": "exercise",
|
||||||
|
"body": [
|
||||||
|
"## Exercise $0.",
|
||||||
|
"<!-- _backgroundColor: #29366f -->",
|
||||||
|
],
|
||||||
|
"description": "Exercise slide colors"
|
||||||
|
},
|
||||||
|
"marp front matter" : {
|
||||||
|
"scope": "markdown",
|
||||||
|
"prefix": "marp",
|
||||||
|
"body" : [
|
||||||
|
"---",
|
||||||
|
"marp: true",
|
||||||
|
"paginate: true",
|
||||||
|
"math: mathjax",
|
||||||
|
"theme: buutti",
|
||||||
|
"title: N. $0",
|
||||||
|
"---",
|
||||||
|
"",
|
||||||
|
"# $0",
|
||||||
|
"",
|
||||||
|
"<!-- headingDivider: 5 -->",
|
||||||
|
"<!-- class: invert -->"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"marp columns" : {
|
||||||
|
"scope": "markdown",
|
||||||
|
"prefix": "column",
|
||||||
|
"body" : [
|
||||||
|
"<div class='columns' markdown='1'>",
|
||||||
|
"<div markdown='1'>",
|
||||||
|
"$0",
|
||||||
|
"</div>",
|
||||||
|
"<div markdown='1'>",
|
||||||
|
"",
|
||||||
|
"</div>",
|
||||||
|
"</div>",
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"marp footer" : {
|
||||||
|
"scope": "markdown",
|
||||||
|
"prefix": "footer",
|
||||||
|
"body" : [
|
||||||
|
"<!-- _footer: $0 -->"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"markdown.marp.themes": ["./.themes/buutti.css"],
|
||||||
|
"saveAndRun": {
|
||||||
|
"commands": [
|
||||||
|
{
|
||||||
|
"match": "\\.md$",
|
||||||
|
"notMatch": "README\\.md$",
|
||||||
|
"cmd": "marp ${fileDirname}\\${fileBasename} -o ${fileDirname}\\${fileBasenameNoExt}-slides.html --html true",
|
||||||
|
"useShortcut": false,
|
||||||
|
"silent": false
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
# Contents
|
||||||
|
|
||||||
|
Material completion denoted with 🌑🌘🌗🌖🌕 .
|
||||||
|
|
||||||
|
| # | Lecture | Materials | Exercises |
|
||||||
|
| ---: | ------------------------------------- | --------: | --------: |
|
||||||
|
| 1 | [Example Lecture](example-lecture.md) | 🌕 | 🌕 |
|
||||||
|
|
||||||
|
|
||||||
|
## Repository notes (remove before publishing)
|
||||||
|
|
||||||
|
- After reading, remove [example-lecture.md](./example-lecture.md), [example-lecture-slides.html](./example-lecture-slides.html) and [buuttilogo.png](./imgs/buuttilogo.png)
|
||||||
|
- See [Markdown code snippets](.vscode/markdown.code-snippets) for autocomplete stuff.
|
||||||
|
- Remove the .gitkeep files from imgs and solutions folders after adding new files to those folders.
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,64 @@
|
|||||||
|
---
|
||||||
|
marp: true
|
||||||
|
paginate: true
|
||||||
|
math: mathjax
|
||||||
|
theme: buutti
|
||||||
|
title: N. Example Lecture
|
||||||
|
---
|
||||||
|
|
||||||
|
# Example Lecture
|
||||||
|
|
||||||
|
<!-- headingDivider: 5 -->
|
||||||
|
<!-- class: invert -->
|
||||||
|
|
||||||
|
## Section
|
||||||
|
|
||||||
|
- This line appears instantly
|
||||||
|
* This line appears by pressing spacebar
|
||||||
|
* This line has an inline code `variable`
|
||||||
|
```js
|
||||||
|
console.log("Here's a coloured JavaScript code block");
|
||||||
|
console.log("Remember indentation so it's revealed after the bullet point.");
|
||||||
|
```
|
||||||
|
* This line has an inline LaTeX maths equation $c = \frac{a^2}{\sqrt{b}}$
|
||||||
|
* Here's a maths block:
|
||||||
|
|
||||||
|
$$
|
||||||
|
F(x) = \int_a^b f(x) dx
|
||||||
|
$$
|
||||||
|
|
||||||
|
<!-- _footer: Footers are exclusive to presentation; they are not shown in the webpage markdown document -->
|
||||||
|
|
||||||
|
## Columns
|
||||||
|
|
||||||
|
<div class='columns' markdown='1'>
|
||||||
|
<div markdown='1'>
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
* Basic image example
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div markdown='1'>
|
||||||
|
|
||||||
|

|
||||||
|
* Wider image
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
* This line is outside the columns and goes from left all the way to the right
|
||||||
|
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
* In VS Code, install the extensions
|
||||||
|
* [Marp for VS code](https://marketplace.visualstudio.com/items?itemName=marp-team.marp-vscode)
|
||||||
|
* So you can see the slideshow preview when editing.
|
||||||
|
* [Markdown all in one](https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one)
|
||||||
|
* [Markdown table formatter](https://marketplace.visualstudio.com/items?itemName=fcrespo82.markdown-table-formatter)
|
||||||
|
* *Right click > Format document* makes tables pretty
|
||||||
|
* [Save and run](https://marketplace.visualstudio.com/items?itemName=wk-j.save-and-run)
|
||||||
|
* An HTML version of the lecture is created on save
|
||||||
|
* See [settings.json](./.vscode/settings.json)
|
||||||
|
* Add filenames to `notMatch` if a HTML on save is not needed
|
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Loading…
Reference in New Issue