From 506ab689c19cbe497fb47b4e5693d056daaabb34 Mon Sep 17 00:00:00 2001 From: Kenryu Shibata Date: Thu, 28 May 2026 01:10:21 +0900 Subject: [PATCH] added pandoc template --- templates/pandoc/Makefile | 2 ++ templates/pandoc/flake.nix | 23 +++++++++++++++++++++++ templates/pandoc/report.md | 30 ++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 templates/pandoc/Makefile create mode 100644 templates/pandoc/flake.nix create mode 100644 templates/pandoc/report.md diff --git a/templates/pandoc/Makefile b/templates/pandoc/Makefile new file mode 100644 index 0000000..345d5cb --- /dev/null +++ b/templates/pandoc/Makefile @@ -0,0 +1,2 @@ +%.pdf: %.md + pandoc --from markdown --to pdf -o $@ $^ --pdf-engine=lualatex -N diff --git a/templates/pandoc/flake.nix b/templates/pandoc/flake.nix new file mode 100644 index 0000000..2bd8673 --- /dev/null +++ b/templates/pandoc/flake.nix @@ -0,0 +1,23 @@ +{ + description = "Template for Pandoc Markdown"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + report-temp.url = "github:kenryuS/report-temp"; + }; + + outputs = { self, nixpkgs, flake-utils, report-temp }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { + inherit system; + config = {}; + overlays = []; + }; + in + { + devShells.default = report-temp.devShells.${system}.pandoc; + } + ); +} diff --git a/templates/pandoc/report.md b/templates/pandoc/report.md new file mode 100644 index 0000000..f86ddcf --- /dev/null +++ b/templates/pandoc/report.md @@ -0,0 +1,30 @@ +--- +documentclass: bxjsarticle +classoption: + - lualatex + - ja=standard + - 11pt +title: テストレポート +author: 高専太郎 +date: 1970-01-01 +--- + +# Test + +* Normal +* *Italic* +* **Bold** +* `code` + +> quote + +```python +def fib(n): + if n <= 2: + return 1 + return fib(n - 1) + fib(n - 2) +``` + +$$ +e^{i\pi} + 1 = 0 +$$