add pandoc skeleton
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,2 +1,4 @@
|
||||
/target
|
||||
/.vscode
|
||||
/.vscode
|
||||
/report/*.pdf
|
||||
/report/*.html
|
||||
|
||||
12
Makefile
Normal file
12
Makefile
Normal file
@@ -0,0 +1,12 @@
|
||||
.PHONY: help
|
||||
help:
|
||||
@echo -e "List of make targets:\n"
|
||||
@grep "^\.PHONY: " Makefile | cut -d" " -f2- | sed -e "s/ /\n/g"
|
||||
|
||||
.PHONY: run
|
||||
run:
|
||||
cargo run
|
||||
|
||||
.PHONY: report
|
||||
report:
|
||||
make -C report
|
||||
@@ -1,2 +1,7 @@
|
||||
# Gloom-rs
|
||||
|
||||
To get started, make sure you have `git`, `cargo` and, `rustc` installed and available.
|
||||
|
||||
You're free to write your report any way you'd like, as long as it is delivered as a PDF file.
|
||||
To spread the word of *the one true way*, I have included a `pandoc` report skeleton in the `report` folder.
|
||||
To use it make sure you have `pandoc` with a supported latex engine installed, making sure it works before using it to write your report.
|
||||
|
||||
1
create_code_archive_for_blackboard_LINUX.sh
Normal file
1
create_code_archive_for_blackboard_LINUX.sh
Normal file
@@ -0,0 +1 @@
|
||||
zip -r source.zip gloom/src gloom/shaders
|
||||
2
create_code_archive_for_blackboard_WINDOWS.bat
Normal file
2
create_code_archive_for_blackboard_WINDOWS.bat
Normal file
@@ -0,0 +1,2 @@
|
||||
gloom/vendor/7z/7za.exe a source.zip gloom/src gloom/shaders
|
||||
pause
|
||||
21
report/Makefile
Normal file
21
report/Makefile
Normal file
@@ -0,0 +1,21 @@
|
||||
PDVARS += --verbose
|
||||
PDVARS += --highlight-style=pygments # the default theme
|
||||
|
||||
# Optional filters, must be installed to use:
|
||||
#PDVARS += --filter pandoc-include
|
||||
#PDVARS += --filter pandoc-codeblock-include
|
||||
#PDVARS += --filter pandoc-imagine
|
||||
#PDVARS += --filter pandoc-crossref
|
||||
|
||||
.PHONY: help
|
||||
help:
|
||||
@echo "try running 'make template.pdf' ;)"
|
||||
|
||||
%.pdf: %.md Makefile
|
||||
pandoc -i $< ${PDVARS} -o $@ #--pdf-engine=pdflatex
|
||||
|
||||
%.tex: %.md Makefile
|
||||
pandoc -i $< ${PDVARS} -o $@ --standalone
|
||||
|
||||
%.html: %.md Makefile
|
||||
pandoc -i $< ${PDVARS} -o $@ --katex --standalone --self-contained
|
||||
10
report/README.md
Normal file
10
report/README.md
Normal file
@@ -0,0 +1,10 @@
|
||||
To use this skeleton, install [pandoc](](https://pandoc.org/installing.html).
|
||||
|
||||
To compile `myfile.md` to PDF on linux, run:
|
||||
|
||||
make myfile.pdf
|
||||
|
||||
For example to compile `template.md`, run:
|
||||
|
||||
make template.pdf
|
||||
|
||||
BIN
report/images/logo.png
Normal file
BIN
report/images/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.5 KiB |
110
report/template.md
Normal file
110
report/template.md
Normal file
@@ -0,0 +1,110 @@
|
||||
---
|
||||
# These are meta-variables defined with YAML syntax, change them as you wish.
|
||||
# see https://pandoc.org/MANUAL.html#variables
|
||||
title: TDT4195 Assignment X
|
||||
author:
|
||||
- Gyrd Bannamule Gyrdsson
|
||||
- Gjavleik Britonis Podebusk
|
||||
date: \today # This is a latex command, ignored for HTML output
|
||||
lang: en-US
|
||||
papersize: a4
|
||||
geometry: margin=4cm
|
||||
toc: false
|
||||
toc-title: "List of Contents"
|
||||
toc-depth: 2
|
||||
numbersections: true
|
||||
colorlinks: true
|
||||
links-as-notes: true
|
||||
# The document is following the break written using Markdown syntax
|
||||
---
|
||||
|
||||
<!--
|
||||
This is a HTML-style comment, not visible in the final PDF.
|
||||
-->
|
||||
|
||||
# Heading
|
||||
|
||||
## Subheading
|
||||
|
||||
### Subsubheading
|
||||
|
||||
This is a paragraph.
|
||||
This is the same paragraph.
|
||||
|
||||
This is a new paragraph, with *italic*, **bold**, and `inline code` formatting.
|
||||
It is possible to use special classes to format text: [this is a test]{.smallcaps}.
|
||||
|
||||
```rust
|
||||
//this is a code block with rust syntax highlighting
|
||||
println!("Hello, {}", 42);
|
||||
```
|
||||
|
||||
[This](https://www.ntnu.no) is a link.
|
||||
[This][] is also a link. <!-- defined below -->
|
||||
This[^this_is_a_unique_footnote_label] is a footnote.
|
||||
|
||||
[This]: https://www.uio.no
|
||||
[^this_is_a_unique_footnote_label]: In footnotes you can write anything tangentially related.
|
||||
|
||||
* This
|
||||
* is
|
||||
* a
|
||||
* bullet
|
||||
* list
|
||||
|
||||
1. This
|
||||
1. is
|
||||
1. a
|
||||
1. numbered
|
||||
1. list
|
||||
a. with
|
||||
a. sub
|
||||
a. list
|
||||
|
||||
with multiple paragraphs
|
||||
|
||||
This is still on the first page
|
||||
|
||||
\clearpage
|
||||
|
||||
<!--
|
||||
Above is a raw LaTeX statement.
|
||||
Those are included when exporting to LaTeX or PDF, and ignored when exporting to HTML.
|
||||
-->
|
||||
|
||||
This is on the second page
|
||||
|
||||
i) Yo
|
||||
i) Yo
|
||||
i) Yo
|
||||
|
||||
This
|
||||
: is a definition
|
||||
|
||||
> this is a
|
||||
block quote
|
||||
|
||||
This is a paragraph with inline \LaTeX\ math: $\frac{1}{2}$.
|
||||
Below is a math block:
|
||||
|
||||
$$
|
||||
\int_{a}^{b} f(x)dx
|
||||
$$
|
||||
|
||||
| This | is | a | table |
|
||||
| ---- | --- | --- | ----- |
|
||||
| 1 | 2 | 3 | 4 |
|
||||
| 5 | 6 | 7 | 8 |
|
||||
|
||||
: This is a table caption
|
||||
|
||||
This is an inline image with set height:
|
||||
{height=5em}
|
||||
|
||||
Below is a figure (i.e. an image with a caption).
|
||||
It floats and may as a result move to a different page depending on the layout.
|
||||
Use the `pandoc-crossref` filter to reference figures, tables and equations.
|
||||
|
||||

|
||||
@@ -54,7 +54,7 @@ fn main() {
|
||||
// Uncomment these if you want to use the mouse for controls, but want it to be confined to the screen and/or invisible.
|
||||
// windowed_context.window().set_cursor_grab(true).expect("failed to grab cursor");
|
||||
// windowed_context.window().set_cursor_visible(false);
|
||||
|
||||
|
||||
// Set up a shared vector for keeping track of currently pressed keys
|
||||
let arc_pressed_keys = Arc::new(Mutex::new(Vec::<VirtualKeyCode>::with_capacity(10)));
|
||||
// Make a reference of this vector to send to the render thread
|
||||
@@ -142,7 +142,7 @@ fn main() {
|
||||
}
|
||||
|
||||
unsafe {
|
||||
gl::ClearColor(0.163, 0.163, 0.163, 1.0);
|
||||
gl::ClearColor(0.76862745, 0.71372549, 0.94901961, 1.0); // moon raker, full opacity
|
||||
gl::Clear(gl::COLOR_BUFFER_BIT | gl::DEPTH_BUFFER_BIT);
|
||||
|
||||
// Issue the necessary commands to draw your scene here
|
||||
@@ -151,7 +151,6 @@ fn main() {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
context.swap_buffers().unwrap();
|
||||
@@ -210,6 +209,9 @@ fn main() {
|
||||
Escape => {
|
||||
*control_flow = ControlFlow::Exit;
|
||||
},
|
||||
Q => {
|
||||
*control_flow = ControlFlow::Exit;
|
||||
}
|
||||
_ => { }
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user