Template
mirror of
https://github.com/kenryuS/report-temp.git
synced 2026-08-13 20:51:42 +09:00
update
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
PANDOC:=pandoc
|
||||
TEX:=xelatex
|
||||
|
||||
OUTPUT:=./out
|
||||
|
||||
SRC:=$(wildcard *.md)
|
||||
SRC_MAIN_TEX:=report.tex
|
||||
TEX_OUT:=$(SRC:.md=.tex)
|
||||
|
||||
TEMPLATE:=./template.tex
|
||||
|
||||
all: report.pdf
|
||||
|
||||
generate-template:
|
||||
pandoc --from markdown --to latex --template=${TEMPLATE} -o ${TEMPLATE:.tex=.sty} *.md
|
||||
sed -i '/====/,/++++/d' ${TEMPLATE:.tex=.sty}
|
||||
|
||||
%.tex: %.md
|
||||
pandoc --from markdown --to latex --strip-comments -o $@ $^
|
||||
|
||||
# for multi-file report
|
||||
report.pdf: ${TEX_OUT}
|
||||
@mkdir -p ${OUTPUT}
|
||||
${TEX} --output-directory=${OUTPUT} ${SRC_MAIN_TEX}
|
||||
|
||||
clean:
|
||||
rm ${TEX_OUT}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
description = "Template for Pandoc Multi-file 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;
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
# Part 1
|
||||
|
||||
* Normal
|
||||
* *Italic*
|
||||
* **Bold**
|
||||
* `code`
|
||||
|
||||
> quote
|
||||
|
||||
```python
|
||||
def fib(n):
|
||||
if n <= 2:
|
||||
return 1
|
||||
return fib(n - 1) + fib(n - 2)
|
||||
```
|
||||
@@ -0,0 +1,9 @@
|
||||
# Part 2
|
||||
|
||||
1. uno
|
||||
2. dos
|
||||
3. tres
|
||||
|
||||
$$
|
||||
e^{i\pi} + 1 = 0
|
||||
$$
|
||||
@@ -0,0 +1,14 @@
|
||||
\documentclass[xelatex,ja=standard,11pt]{bxjsarticle}
|
||||
|
||||
\title{テストレポート}
|
||||
\author{高専太郎}
|
||||
\date{1970-01-01}
|
||||
|
||||
\usepackage{./template}
|
||||
|
||||
\begin{document}
|
||||
\maketitle
|
||||
|
||||
\input{part1}
|
||||
\input{part2}
|
||||
\end{document}
|
||||
@@ -0,0 +1,6 @@
|
||||
$passoptions.latex()$
|
||||
$common.latex()$
|
||||
|
||||
====
|
||||
$body$
|
||||
++++
|
||||
Reference in New Issue
Block a user