Skip to content

Commit

Permalink
Add phperkaigi-2025-pamphlet
Browse files Browse the repository at this point in the history
  • Loading branch information
takeokunn committed Jan 19, 2025
1 parent 422e870 commit 757fbc8
Show file tree
Hide file tree
Showing 4 changed files with 137 additions and 0 deletions.
3 changes: 3 additions & 0 deletions typst/phperkaigi-2025-pamphlet/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
result
*.typ
*.pdf
61 changes: 61 additions & 0 deletions typst/phperkaigi-2025-pamphlet/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 56 additions & 0 deletions typst/phperkaigi-2025-pamphlet/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
in
{
devShells.default = pkgs.mkShell {
packages = with pkgs; [ typst ];
};

packages.default = pkgs.stdenv.mkDerivation {
name = "phperkaigi-2025-pamphlet";
src = ./src;
nativeBuildInputs = with pkgs; [
typst
migu
(emacs.pkgs.withPackages (
epkgs: with epkgs; [
org
ox-typst
]
))
];
buildPhase = ''
emacs --batch \
--eval "(progn
(require 'ox-typst)
(find-file \"main.org\")
(org-typst-export-to-typst))"
export TYPST_FONT_PATHS="${pkgs.migu}/share/fonts/truetype/migu"
typst compile main.typ
'';
installPhase = ''
mkdir -p $out
cp main.typ $out/
cp main.pdf $out/
'';
};

formatter = pkgs.nixfmt-rfc-style;
}
);
}
17 changes: 17 additions & 0 deletions typst/phperkaigi-2025-pamphlet/src/main.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#+TITLE:Phpactorから学ぶLanguage Server Protocolの仕組み
#+AUTHOR: takeokunn
#+STARTUP: content
#+STARTUP: fold
#+TYPST: #set text(lang: "ja", font: "Migu 1P", size: 10pt)
* 見出し1

これは段落です。空行は改段落を表します。

* 見出し2

テキストは **強調 (emphasis)** することもできれば、
**強調 (strong emphasis)** することもできます。

- これは箇条書きです。
- インデントは箇条書きのネストを表します。
- 先頭を =+= とすれば番号付き箇条書きとなります。

0 comments on commit 757fbc8

Please sign in to comment.