laporan-generator 2.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/.agents/skills/laporan-generator/SKILL.md +132 -0
  2. package/.agents/skills/laporan-generator/agents/openai.yaml +3 -0
  3. package/.agents/skills/laporan-generator/references/campus-guide.md +120 -0
  4. package/.agents/skills/laporan-generator/references/metadata-schema.md +76 -0
  5. package/.agents/skills/laporan-generator/references/preset-schema.md +79 -0
  6. package/.agents/skills/laporan-generator/references/syntax-cheatsheet.md +122 -0
  7. package/.agents/skills/laporan-generator/references/template-guide.md +100 -0
  8. package/.agents/skills/laporan-generator/references/troubleshooting.md +105 -0
  9. package/.agents/skills/laporan-generator/resources/Makefile +90 -0
  10. package/.agents/skills/laporan-generator/resources/apa.csl +2273 -0
  11. package/.agents/skills/laporan-generator/resources/build-docx.sh +122 -0
  12. package/.agents/skills/laporan-generator/resources/build.sh +102 -0
  13. package/.agents/skills/laporan-generator/resources/chapters/bab1-pendahuluan.md +60 -0
  14. package/.agents/skills/laporan-generator/resources/chapters/bab2-tinjauan-pustaka.md +83 -0
  15. package/.agents/skills/laporan-generator/resources/chapters/bab3-metodologi.md +116 -0
  16. package/.agents/skills/laporan-generator/resources/chapters/bab4-hasil-dan-pembahasan.md +93 -0
  17. package/.agents/skills/laporan-generator/resources/chapters/bab5-penutup.md +27 -0
  18. package/.agents/skills/laporan-generator/resources/cover.md +50 -0
  19. package/.agents/skills/laporan-generator/resources/docx.lua +416 -0
  20. package/.agents/skills/laporan-generator/resources/laporan +464 -0
  21. package/.agents/skills/laporan-generator/resources/laporan.ps1 +552 -0
  22. package/.agents/skills/laporan-generator/resources/logo.jpg +0 -0
  23. package/.agents/skills/laporan-generator/resources/metadata.yml +35 -0
  24. package/.agents/skills/laporan-generator/resources/presets/itb-ta.yml +27 -0
  25. package/.agents/skills/laporan-generator/resources/presets/its-skripsi.yml +26 -0
  26. package/.agents/skills/laporan-generator/resources/presets/skripsi-4433.yml +26 -0
  27. package/.agents/skills/laporan-generator/resources/presets/standard.yml +26 -0
  28. package/.agents/skills/laporan-generator/resources/presets/ugm-skripsi.yml +26 -0
  29. package/.agents/skills/laporan-generator/resources/presets/ui-skripsi.yml +26 -0
  30. package/.agents/skills/laporan-generator/resources/presets/unpad-skripsi.yml +27 -0
  31. package/.agents/skills/laporan-generator/resources/reference.docx +0 -0
  32. package/.agents/skills/laporan-generator/resources/references.bib +115 -0
  33. package/.agents/skills/laporan-generator/resources/scripts/bundle.py +75 -0
  34. package/.agents/skills/laporan-generator/resources/scripts/docx-pagenum.py +192 -0
  35. package/.agents/skills/laporan-generator/resources/scripts/finalize-docx.py +291 -0
  36. package/.agents/skills/laporan-generator/resources/scripts/make-reference-docx.py +670 -0
  37. package/.agents/skills/laporan-generator/resources/scripts/report-doctor.py +211 -0
  38. package/.agents/skills/laporan-generator/resources/scripts/report-stats.py +149 -0
  39. package/.agents/skills/laporan-generator/resources/scripts/scan-preset.py +311 -0
  40. package/.agents/skills/laporan-generator/resources/scripts/setup-deps.ps1 +152 -0
  41. package/.agents/skills/laporan-generator/resources/scripts/setup-deps.sh +113 -0
  42. package/.agents/skills/laporan-generator/resources/scripts/test_scripts.py +128 -0
  43. package/.agents/skills/laporan-generator/resources/scripts/validate-preset.py +166 -0
  44. package/.agents/skills/laporan-generator/resources/template.typ +394 -0
  45. package/.agents/skills/laporan-generator/scripts/build.sh +78 -0
  46. package/.agents/skills/laporan-generator/scripts/bundle.py +75 -0
  47. package/.agents/skills/laporan-generator/scripts/docx-pagenum.py +192 -0
  48. package/.agents/skills/laporan-generator/scripts/finalize-docx.py +152 -0
  49. package/.agents/skills/laporan-generator/scripts/laporan +447 -0
  50. package/.agents/skills/laporan-generator/scripts/laporan.ps1 +529 -0
  51. package/.agents/skills/laporan-generator/scripts/make-reference-docx.py +630 -0
  52. package/.agents/skills/laporan-generator/scripts/report-doctor.py +211 -0
  53. package/.agents/skills/laporan-generator/scripts/report-stats.py +149 -0
  54. package/.agents/skills/laporan-generator/scripts/scan-preset.py +311 -0
  55. package/.agents/skills/laporan-generator/scripts/setup-deps.ps1 +152 -0
  56. package/.agents/skills/laporan-generator/scripts/setup-deps.sh +113 -0
  57. package/.agents/skills/laporan-generator/scripts/test_scripts.py +103 -0
  58. package/.agents/skills/laporan-generator/scripts/validate-preset.py +166 -0
  59. package/.agents/workflows/laporan-generator.md +8 -0
  60. package/LICENSE +21 -0
  61. package/Makefile +90 -0
  62. package/README.md +389 -0
  63. package/apa.csl +2273 -0
  64. package/bin/laporan-generator.js +71 -0
  65. package/build-docx.sh +122 -0
  66. package/build.sh +102 -0
  67. package/chapters/bab1-pendahuluan.md +60 -0
  68. package/chapters/bab2-tinjauan-pustaka.md +83 -0
  69. package/chapters/bab3-metodologi.md +116 -0
  70. package/chapters/bab4-hasil-dan-pembahasan.md +93 -0
  71. package/chapters/bab5-penutup.md +27 -0
  72. package/cover.md +50 -0
  73. package/docs/campus-guide.md +120 -0
  74. package/docs/metadata-schema.md +76 -0
  75. package/docs/preset-schema.md +79 -0
  76. package/docs/syntax-cheatsheet.md +122 -0
  77. package/docs/template-guide.md +100 -0
  78. package/docs/troubleshooting.md +105 -0
  79. package/docx.lua +416 -0
  80. package/laporan +464 -0
  81. package/laporan.ps1 +552 -0
  82. package/lib/init.js +118 -0
  83. package/lib/setup.js +33 -0
  84. package/lib/sync-hosts.js +194 -0
  85. package/lib/uninstall.js +123 -0
  86. package/logo.jpg +0 -0
  87. package/metadata.yml +35 -0
  88. package/package.json +65 -0
  89. package/presets/itb-ta.yml +27 -0
  90. package/presets/its-skripsi.yml +26 -0
  91. package/presets/skripsi-4433.yml +26 -0
  92. package/presets/standard.yml +26 -0
  93. package/presets/ugm-skripsi.yml +26 -0
  94. package/presets/ui-skripsi.yml +26 -0
  95. package/presets/unpad-skripsi.yml +27 -0
  96. package/reference.docx +0 -0
  97. package/references.bib +115 -0
  98. package/scripts/bundle.py +75 -0
  99. package/scripts/docx-pagenum.py +192 -0
  100. package/scripts/finalize-docx.py +291 -0
  101. package/scripts/make-reference-docx.py +670 -0
  102. package/scripts/report-doctor.py +211 -0
  103. package/scripts/report-stats.py +149 -0
  104. package/scripts/scan-preset.py +311 -0
  105. package/scripts/setup-deps.ps1 +152 -0
  106. package/scripts/setup-deps.sh +113 -0
  107. package/scripts/test_scripts.py +128 -0
  108. package/scripts/validate-preset.py +166 -0
  109. package/template.typ +394 -0
@@ -0,0 +1,132 @@
1
+ ---
2
+ name: laporan-generator
3
+ description: >-
4
+ Universal Academic Report & Thesis Generator for AI Agents. Use when the user wants
5
+ to create, draft, format, or compile academic reports, thesis (skripsi/TA), internship reports (PKL),
6
+ or scientific papers adhering to Indonesian & international campus standards.
7
+ ---
8
+
9
+ # Laporan Generator AI Agent Skill
10
+
11
+ This skill empowers AI coding agents to autonomously scaffold, draft, format, audit, and compile publication-grade academic documents using the bundled Typst and Pandoc engines.
12
+
13
+ > [!CRITICAL]
14
+ > **DO NOT WRITE RAW TYPST FILES FROM SCRATCH (e.g. `laporan.typ` or importing `@preview/ieee`).**
15
+ > Never attempt to craft a monolithic `.typ` file or manually configure Typst margins and headers.
16
+ > The engine uses a battle-tested **Modular Markdown Architecture**:
17
+ > 1. Document metadata is defined in `metadata.yml`.
18
+ > 2. Cover, preface, and outline are in `cover.md`.
19
+ > 3. Document body is written in **pure standard Markdown** inside `chapters/bab*.md`.
20
+ > 4. Bibliography is stored in BibTeX format in `references.bib`.
21
+ > 5. Compilation to PDF (via Typst) and Word DOCX (via OpenXML) is handled automatically by `./laporan build` or `bash build.sh && make docx`.
22
+
23
+ --------------------------------------------------------------------------------
24
+
25
+ ## 1. Resource Locations & Scaffolding
26
+
27
+ The full engine and templates are bundled in `resources/` inside this skill:
28
+ - Location: `<skill_dir>/resources/` or `~/.agents/skills/laporan-generator/resources/`
29
+
30
+ ### Starter & Template Files Included:
31
+ - `metadata.yml`: Official academic metadata (title, author, institution, faculty, department, year, preset, fonts).
32
+ - `cover.md`: Official academic cover page & abstract/kata pengantar.
33
+ - `references.bib`: Standard academic citation database (BibTeX APA 7th).
34
+ - `apa.csl`: APA 7th edition citation style file for Pandoc citeproc.
35
+ - `logo.jpg`: Institution logo placeholder.
36
+ - `chapters/`: Modular chapter templates:
37
+ - `chapters/bab1-pendahuluan.md`: Background, problem formulation, objectives, scope.
38
+ - `chapters/bab2-tinjauan-pustaka.md`: Theoretical framework, literature review.
39
+ - `chapters/bab3-metodologi.md`: Research design, workflow, data collection.
40
+ - `chapters/bab4-hasil-dan-pembahasan.md`: Implementation, experimental results, discussion.
41
+ - `chapters/bab5-penutup.md`: Conclusions and future work recommendations.
42
+ - `presets/`: Campus presets:
43
+ - `standard.yml`: Standard university margins (2.5/2.5/2/3 cm)
44
+ - `skripsi-4433.yml`: National standard skripsi/thesis (4/4/3/3 cm)
45
+ - `ui-skripsi.yml`: Universitas Indonesia
46
+ - `itb-ta.yml`: Institut Teknologi Bandung
47
+ - `ugm-skripsi.yml`: Universitas Gadjah Mada
48
+ - `its-skripsi.yml`: Institut Teknologi Sepuluh Nopember
49
+ - `template.typ`: Typst typesetting engine (dual roman/arabic pagination, inverted pyramid title).
50
+ - `reference.docx` & `docx.lua`: Pandoc OpenXML Word engine with page breaks & table formatting.
51
+ - `build.sh`, `laporan`, `laporan.ps1`, `Makefile`: One-click compilation scripts.
52
+
53
+ ### How to Scaffold a Project in Current Directory:
54
+ If the workspace does not yet have `metadata.yml` or `chapters/`, run:
55
+ ```bash
56
+ # Copy all templates directly from bundled resources:
57
+ cp -r ~/.agents/skills/laporan-generator/resources/* .
58
+ # Or if npx is available:
59
+ npx laporan-generator init
60
+ ```
61
+
62
+ --------------------------------------------------------------------------------
63
+
64
+ ## 2. Multi-Stage Interactive Protocol (Wajib)
65
+
66
+ When the user requests an academic report or thesis, execute these 3 stages:
67
+
68
+ ### Stage 1: Identification & Genre Selection
69
+ Identify document type & campus target:
70
+ 1. **Laporan Proyek / Praktikum / Tugas Besar**: Standard 5 chapters (`bab1` to `bab5`).
71
+ 2. **Laporan Magang / PKL / KKN**: Executive summary, company profile, activity log, system analysis.
72
+ 3. **Tugas Akhir / Skripsi**: Formal approval sheet, bilingual abstract, TOC, list of figures/tables, standard academic bibliography.
73
+ 4. **Makalah Kuliah / Paper Akademik**: Makalah tugas kuliah di Indonesia tetap menggunakan format penomoran bab standar kampus (`BAB I`, `BAB II`, dst.) dengan angka Romawi secara default. HANYA gunakan `heading_chapter_prefix: ""` jika pengguna secara eksplisit meminta format artikel jurnal ilmiah internasional/manuskrip tanpa bab.
74
+
75
+ ### Stage 2: Workspace Setup & Metadata Configuration
76
+ 1. Scaffold workspace using `cp -r ~/.agents/skills/laporan-generator/resources/* .`
77
+ 2. Edit `metadata.yml` with the user's specific details:
78
+ - `title`: Inverted pyramid title
79
+ - `author`: Array of authors with name and NIM/ID
80
+ - `institution`, `faculty`, `department`, `year`
81
+ - `preset`: Select appropriate campus preset (e.g. `skripsi-4433`, `itb-ta`, `ui-skripsi`, etc.)
82
+ 3. Edit `cover.md` with appropriate preface, acknowledgments, or abstract.
83
+
84
+ ### Stage 3: Drafting Chapters in Pure Markdown
85
+ Write high quality content into separate files in `chapters/`:
86
+ - `chapters/bab1-pendahuluan.md`
87
+ - `chapters/bab2-tinjauan-pustaka.md`
88
+ - `chapters/bab3-metodologi.md`
89
+ - `chapters/bab4-hasil-dan-pembahasan.md`
90
+ - `chapters/bab5-penutup.md`
91
+
92
+ #### Formatting Rules for Chapters:
93
+ - **Headings**: Use `# Judul Bab` for chapter level (e.g. `# Pendahuluan`), `## Sub-bab` for section level.
94
+ - **Citations**: Use Pandoc syntax `[@citekey]` matching keys in `references.bib`.
95
+ - **Formulas**: Inline `$E = m c^2$`, block `$$\sum_{i=1}^n x_i$$`.
96
+ - **Currencies & Special Symbols**: Escape dollar signs in body text as `\$100` or write `100 USD` so Pandoc does not parse it as LaTeX math.
97
+ - **Images**: Store images in `gambar/` and reference them as `![Caption](gambar/file.png)`. Never reference non-existent images.
98
+
99
+ --------------------------------------------------------------------------------
100
+
101
+ ## 3. Compilation & Verification Commands
102
+
103
+ Compile both PDF & Word DOCX:
104
+ ```bash
105
+ ./laporan build
106
+ # Atau manual:
107
+ bash build.sh && make docx
108
+ ```
109
+
110
+ Audit document health & check for broken images or missing citation keys:
111
+ ```bash
112
+ ./laporan doctor
113
+ # Atau:
114
+ python3 scripts/report-doctor.py
115
+ ```
116
+
117
+ Analyze word count, statistics & distribution:
118
+ ```bash
119
+ ./laporan stats
120
+ ```
121
+
122
+ --------------------------------------------------------------------------------
123
+
124
+ ## 4. Common AI Pitfalls to Avoid
125
+
126
+ | Pitfall | Why It Fails | Correct Solution |
127
+ | :--- | :--- | :--- |
128
+ | **Writing `.typ` files manually** | Creates syntax errors, breaks DOCX export, loses presets | Always write Markdown in `chapters/bab*.md` and let the engine compile. |
129
+ | **`#import "@preview/ieee"`** | Offline environments fail with package not found | Use the bundled self-contained `template.typ`. |
130
+ | **Unescaped `$` in text** | Treated as math mode delimiter causing syntax errors | Use `\$10,000` or text `10,000 USD`. |
131
+ | **Missing images** | Referenced images not present cause build failure | Ensure images exist in `gambar/` before referencing. |
132
+ | **Monolithic single file** | Incompatible with multi-pass DOCX and chapter numbering | Keep chapters strictly split into `chapters/bab*.md`. |
@@ -0,0 +1,3 @@
1
+ interface:
2
+ display_name: "Laporan Generator"
3
+ short_description: "Universal Academic Report & Thesis Generator (Typst + DOCX)"
@@ -0,0 +1,120 @@
1
+ # Panduan Preset & Kustomisasi Format Kampus
2
+
3
+ Dokumen ini berisi panduan untuk menyesuaikan format laporan akademik sesuai dengan pedoman penulisan di berbagai perguruan tinggi di Indonesia menggunakan sistem **Preset Declarative** (`presets/*.yml`).
4
+
5
+ ---
6
+
7
+ ## 1. Menggunakan Preset Kampus
8
+
9
+ Setiap perguruan tinggi memiliki aturan tata letak, margin, jenis huruf, dan gaya sampul tersendiri. Anda dapat memilih preset yang diinginkan melalui berkas `metadata.yml`:
10
+
11
+ ```yaml
12
+ preset: "itb-ta" # Ganti dengan ID preset kampus Anda
13
+ ```
14
+
15
+ Atau gunakan bantuan CLI interaktif:
16
+ ```bash
17
+ ./laporan preset list # Lihat semua preset yang tersedia
18
+ ./laporan preset show ui-skripsi # Lihat rincian konfigurasi preset
19
+ ./laporan preset apply itb-ta # Terapkan langsung ke metadata.yml
20
+ ```
21
+
22
+ > **Kompatibilitas**: Field lama `margin_preset: "skripsi-4433"` atau `margin_preset: "standard"` tetap didukung penuh.
23
+
24
+ ---
25
+
26
+ ## 2. Daftar Preset Kampus Bawaan
27
+
28
+ | ID Preset | Institusi / Format | Margin (Atas - Bawah - Kiri - Kanan) | Catatan Khusus |
29
+ |---|---|---|---|
30
+ | `standard` | Standar Modern | 2.0 cm - 3.0 cm - 2.5 cm - 2.5 cm | Format default tugas akhir, magang, praktikum |
31
+ | `skripsi-4433` | Skripsi Tradisional | 4.0 cm - 3.0 cm - 4.0 cm - 3.0 cm | Hardcover jilid tebal margin kiri 4cm |
32
+ | `ui-skripsi` | Universitas Indonesia (UI) | 2.5 cm - 2.5 cm - 2.5 cm - 2.5 cm | Sesuai Pedoman Karya Ilmiah UI |
33
+ | `itb-ta` | Institut Teknologi Bandung (ITB) | 4.0 cm - 3.0 cm - 4.0 cm - 3.0 cm | Cover minimalis (tanpa dosen pembimbing di cover luar) |
34
+ | `ugm-skripsi` | Universitas Gadjah Mada (UGM) | 4.0 cm - 3.0 cm - 4.0 cm - 3.0 cm | Full academic cover |
35
+ | `its-skripsi` | Institut Teknologi Sepuluh Nopember (ITS) | 4.0 cm - 3.0 cm - 4.0 cm - 3.0 cm | Standard Tugas Akhir & Tesis ITS |
36
+
37
+ ---
38
+
39
+ ## 3. Contoh Konfigurasi Berbagai Kampus
40
+
41
+ ### A. Format Universitas Indonesia (UI)
42
+ ```yaml
43
+ title: "IMPLEMENTASI DEEP LEARNING UNTUK DETEKSI PENYAKIT PADA CITRA MEDIS"
44
+ subtitle: "LAPORAN TUGAS AKHIR"
45
+ course: "Proyek Perangkat Lunak Lanjut"
46
+ lecturer: "Prof. Dr. Ir. Dosen Pengampu, M.Sc."
47
+ author:
48
+ - name: "Nama Mahasiswa"
49
+ nim: "2106012345"
50
+ institution: "UNIVERSITAS INDONESIA"
51
+ faculty: "FAKULTAS ILMU KOMPUTER"
52
+ year: "2026"
53
+ preset: "ui-skripsi"
54
+ ```
55
+
56
+ ### B. Format Institut Teknologi Bandung (ITB)
57
+ ```yaml
58
+ title: "RANCANG BANGUN SISTEM KONTROL DAN MONITORING SMART GRID BERBASIS IOT"
59
+ subtitle: "LAPORAN TUGAS AKHIR"
60
+ course: "Sistem Tertanam"
61
+ author:
62
+ - name: "Nama Mahasiswa"
63
+ nim: "13521001"
64
+ institution: "INSTITUT TEKNOLOGI BANDUNG"
65
+ faculty: "SEKOLAH TEKNIK ELEKTRO DAN INFORMATIKA"
66
+ year: "2026"
67
+ preset: "itb-ta"
68
+ ```
69
+
70
+ ### C. Format Universitas Gadjah Mada (UGM)
71
+ ```yaml
72
+ title: "ANALISIS PERFORMA ARSITEKTUR MICROSERVICES PADA CLOUD COMPUTING"
73
+ subtitle: "LAPORAN PRAKTIKUM LAPANGAN"
74
+ course: "Rekayasa Perangkat Lunak"
75
+ lecturer: "Dr. Dosen Pengampu, S.Kom., M.Cs."
76
+ author:
77
+ - name: "Mahasiswa Satu"
78
+ nim: "21/475123/TK/52123"
79
+ - name: "Mahasiswa Dua"
80
+ nim: "21/475124/TK/52124"
81
+ institution: "UNIVERSITAS GADJAH MADA"
82
+ faculty: "FAKULTAS TEKNIK"
83
+ year: "2026"
84
+ preset: "ugm-skripsi"
85
+ ```
86
+
87
+ ---
88
+
89
+ ## 4. Mengganti Logo Kampus
90
+ Cukup salin gambar logo resmi kampus Anda ke direktori utama dengan nama **`logo.jpg`** (atau format PNG yang dikonversi ke JPEG):
91
+ ```bash
92
+ cp /path/ke/logo-kampus.png logo.jpg
93
+ ```
94
+ Pipeline akan secara otomatis menyesuaikan ukuran dan memposisikannya secara proporsional di tengah halaman sampul sesuai konfigurasi `cover_logo_width` pada preset.
95
+
96
+ ---
97
+
98
+ ## 5. Memindai Otomatis Pedoman Kampus Baru (PDF Scanner)
99
+
100
+ Jika kampus Anda belum tersedia di daftar preset bawaan, Anda dapat memindai berkas PDF Buku Pedoman Penulisan Skripsi / Tugas Akhir kampus Anda secara otomatis:
101
+
102
+ ```bash
103
+ ./laporan preset scan /path/ke/pedoman-penulisan-kampus.pdf
104
+ ```
105
+
106
+ Sistem pemindai cerdas akan:
107
+ 1. Mengekstraksi teks dokumen dan mencari pasal format fisik/tata cara pengetikan.
108
+ 2. Mendeteksi margin (kiri, atas, kanan, bawah), jenis dan ukuran font, spasi baris, format penomoran bab/sub-bab, dan nama institusi.
109
+ 3. Menampilkan ringkasan temuan aturan format di terminal.
110
+ 4. Menyimpan konfigurasi otomatis ke berkas `presets/<preset-id>.yml`.
111
+
112
+ Contoh pemindaian dengan opsi khusus:
113
+ ```bash
114
+ ./laporan preset scan pedoman-unpad.pdf --preset-id unpad-skripsi --name "Universitas Padjadjaran" --apply
115
+ ```
116
+
117
+ ---
118
+
119
+ ## 6. Membuat Preset Kustom Secara Manual
120
+ Selain pemindaian otomatis, Anda juga dapat menulis berkas preset YAML baru secara manual di direktori `presets/`. Baca panduan lengkapnya di [docs/preset-schema.md](preset-schema.md).
@@ -0,0 +1,76 @@
1
+ # Spesifikasi Skema Metadata (metadata.yml)
2
+
3
+ File `metadata.yml` digunakan oleh Pandoc, template Typst (`template.typ`), dan filter DOCX (`docx.lua`) untuk mengisikan informasi sampul (cover page), judul laporan, identitas penyusun, dosen pengampu/pembimbing, serta abstrak laporan.
4
+
5
+ ---
6
+
7
+ ## Struktur File & Contoh Lengkap
8
+
9
+ ```yaml
10
+ ---
11
+ title: "Otomatisasi Pembuatan Dokumen Laporan Akademik Menggunakan Pandoc, Typst, dan Markdown"
12
+ subtitle: "Laporan Projek Akhir Pipeline Dokumentasi"
13
+ author:
14
+ - name: "Ahmad Dahlan"
15
+ nim: "101234567"
16
+ - name: "Budi Santoso"
17
+ nim: "101234568"
18
+ lecturer: "Dr. Ir. Hendra Wijaya, M.T."
19
+ lecturer_label: "Dosen Pengampu:" # Opsional: "Dosen Pembimbing:", "Pembimbing 1:", dll.
20
+ course: "Pengolahan Citra Digital dan Pembelajaran Mesin"
21
+ institution: "Universitas Gadjah Mada"
22
+ faculty: "Departemen Teknik Elektro dan Teknologi Informasi"
23
+ year: "2025/2026"
24
+ date: "Juli 2026"
25
+ abstract: |
26
+ Laporan ini membahas pipeline otomatisasi dokumen akademik
27
+ menggunakan Markdown, Pandoc, Typst, dan Bash. Pipeline ini
28
+ memungkinkan penulisan konten laporan dalam format Markdown
29
+ yang kemudian dikonversi menjadi PDF berkualitas percetakan
30
+ melalui Pandoc dan Typst serta berkas Microsoft Word (.docx).
31
+ ...
32
+ ```
33
+
34
+ ---
35
+
36
+ ## Penjelasan Field Metadata
37
+
38
+ | Field | Tipe Data | Wajib? | Keterangan |
39
+ |---|---|---|---|
40
+ | `title` | String | **Ya** | Judul utama laporan (tampil tebal di halaman sampul). |
41
+ | `subtitle` | String | Opsional | Sub-judul atau keterangan tambahan laporan. |
42
+ | `author` | List of Objects | **Ya** | Daftar penulis. Setiap entri memiliki `name` dan `nim`. |
43
+ | `author[].name` | String | **Ya** | Nama lengkap mahasiswa / penyusun. |
44
+ | `author[].nim` | String | **Ya** | Nomor Induk Mahasiswa (NIM / NPM / NISN). |
45
+ | `lecturer` | String | **Ya** | Nama lengkap dan gelar Dosen / Guru Pengampu / Pembimbing. |
46
+ | `lecturer_label` | String | Opsional | Label peran dosen (default: `"Dosen Pengampu:"`, bisa `"Dosen Pembimbing:"`). |
47
+ | `course` | String | **Ya** | Nama Mata Kuliah atau Mata Pelajaran. |
48
+ | `institution` | String | **Ya** | Nama Universitas, Institut, Politeknik, atau Sekolah. |
49
+ | `faculty` | String | **Ya** | Nama Fakultas, Departemen, atau Program Studi. |
50
+ | `year` | String | **Ya** | Tahun Ajaran (contoh: `2025/2026`). |
51
+ | `date` | String | Opsional | Bulan dan Tahun pembuatan (contoh: `Juli 2026`). |
52
+ | `abstract` | Multiline String | Opsional | Ringkasan/Abstrak laporan dalam Bahasa Indonesia. |
53
+
54
+ ---
55
+
56
+ ## Dukungan Multi-Author (Individu / Kelompok)
57
+
58
+ Skema ini mendukung jumlah penulis dinamis (1 orang hingga banyak orang):
59
+
60
+ * **Single Author (Individu)**:
61
+ ```yaml
62
+ author:
63
+ - name: "Budi Santoso"
64
+ nim: "101234567"
65
+ ```
66
+
67
+ * **Multi Author (Kelompok)**:
68
+ ```yaml
69
+ author:
70
+ - name: "Mahasiswa A"
71
+ nim: "101234561"
72
+ - name: "Mahasiswa B"
73
+ nim: "101234562"
74
+ - name: "Mahasiswa C"
75
+ nim: "101234563"
76
+ ```
@@ -0,0 +1,79 @@
1
+ # Spesifikasi Skema Preset Format Kampus (Preset Schema)
2
+
3
+ File preset format kampus disimpan di dalam direktori `presets/<preset-id>.yml`. File ini mendefinisikan aturan tata letak visual (*page geometry*), tipografi, gaya penomoran heading, serta susunan sampul (*cover page*) untuk dokumen PDF (Typst) dan Word (DOCX).
4
+
5
+ ---
6
+
7
+ ## Contoh Lengkap Skema Preset
8
+
9
+ ```yaml
10
+ # presets/itb-ta.yml
11
+ preset_id: "itb-ta"
12
+ name: "Institut Teknologi Bandung (ITB)"
13
+ description: "Format Tugas Akhir / Tesis sesuai Pedoman Penulisan Karya Ilmiah ITB."
14
+
15
+ # 1. Geometri & Margin Halaman
16
+ margin_top: 4cm
17
+ margin_bottom: 3cm
18
+ margin_left: 4cm
19
+ margin_right: 3cm
20
+
21
+ # 2. Tipografi & Spasi
22
+ font_family: "Libertinus Serif" # Font utama (Times New Roman standard)
23
+ font_size: 12pt # Ukuran teks isi
24
+ line_spacing: 0.75em # Spasi antar baris (1.5 spasi)
25
+ first_line_indent: 1.25cm # Indentasi awal paragraf
26
+
27
+ # 3. Penomoran Heading
28
+ heading_chapter_prefix: "BAB " # Prefix bab ("BAB ")
29
+ heading_chapter_num_format: "roman" # Angka Romawi ("roman") atau Arab ("arabic")
30
+ heading_sub_dot: true # true: "1.1." | false: "1.1"
31
+ heading_subsub_dot: false # true: "1.1.1." | false: "1.1.1"
32
+
33
+ # 4. Pengaturan Halaman Sampul (Cover)
34
+ cover_show_lecturer: false # true: tampilkan dosen | false: sembunyikan
35
+ cover_hide_lecturer: true # Flag pembantu untuk parser
36
+ cover_logo_width: 4.5cm # Lebar logo di sampul depan
37
+ ```
38
+
39
+ ---
40
+
41
+ ## Daftar Field & Tipe Data
42
+
43
+ | Kategori | Field | Tipe Data | Nilai Bawaan (Default) | Keterangan |
44
+ |---|---|---|---|---|
45
+ | **Identitas** | `preset_id` | String | *Nama file tanpa .yml* | ID unik preset (contoh: `ui-skripsi`). |
46
+ | | `name` | String | - | Nama lengkap format / institusi. |
47
+ | | `description` | String | - | Penjelasan singkat karakteristik preset. |
48
+ | **Margin** | `margin_top` | String / Satuan | `2cm` | Jarak batas atas halaman. |
49
+ | | `margin_bottom` | String / Satuan | `3cm` | Jarak batas bawah halaman. |
50
+ | | `margin_left` | String / Satuan | `2.5cm` | Jarak batas kiri halaman (misal: `4cm` untuk jilid). |
51
+ | | `margin_right` | String / Satuan | `2.5cm` | Jarak batas kanan halaman. |
52
+ | **Tipografi** | `font_family` | String | `Libertinus Serif` | Keluarga font dokumen (TNR standard Typst). |
53
+ | | `font_size` | String / pt | `12pt` | Ukuran font teks isi. |
54
+ | | `line_spacing` | String / em | `0.75em` | Jarak leading baris (0.75em = setara 1.5 line). |
55
+ | | `first_line_indent` | String / cm | `1.25cm` | Lebar indentasi baris pertama paragraf. |
56
+ | **Heading** | `heading_chapter_prefix` | String | `BAB ` | Awalan judul bab level 1. |
57
+ | | `heading_sub_dot` | Boolean | `true` | Apakah nomor sub-bab diakhiri titik (`1.1.` vs `1.1`). |
58
+ | | `heading_subsub_dot` | Boolean | `false` | Apakah nomor sub-sub-bab diakhiri titik (`1.1.1`). |
59
+ | **Cover** | `cover_show_lecturer` | Boolean | `true` | Tampilkan blok Dosen Pengampu di cover depan. |
60
+ | | `cover_logo_width` | String / cm | `4cm` | Lebar visual gambar logo di halaman cover. |
61
+
62
+ ---
63
+
64
+ ## Cara Membuat Preset Kampus Baru
65
+
66
+ 1. Buat berkas baru di direktori `presets/`, misalnya `presets/its-skripsi.yml`.
67
+ 2. Isi nilai sesuai buku pedoman kampus Anda.
68
+ 3. Terapkan preset pada dokumen dengan menambahkan field `preset` di `metadata.yml`:
69
+ ```yaml
70
+ preset: "its-skripsi"
71
+ ```
72
+ Atau gunakan perintah CLI helper:
73
+ ```bash
74
+ ./laporan preset apply its-skripsi
75
+ ```
76
+ 4. Jalankan kompilasi:
77
+ ```bash
78
+ ./laporan build
79
+ ```
@@ -0,0 +1,122 @@
1
+ # Cheatsheet Sintaks Markdown Akademik
2
+
3
+ Panduan referensi cepat sintaks Markdown yang kompatibel dan teruji untuk pipeline **Laporan Generator** (Typst PDF dan Microsoft Word DOCX).
4
+
5
+ ---
6
+
7
+ ## 1. Sitasi & Bibliografi (BibTeX APA)
8
+
9
+ Daftar pustaka dikelola melalui `references.bib` dan format APA melalui `apa.csl`.
10
+
11
+ | Sintaks Markdown | Hasil Tipografi | Keterangan |
12
+ |---|---|---|
13
+ | `[@knuth1984texbook]` | (Knuth, 1984) | Sitasi tanda kurung standar |
14
+ | `@knuth1984texbook menyatakan bahwa...` | Knuth (1984) menyatakan bahwa... | Sitasi naratif dalam kalimat |
15
+ | `[-@knuth1984texbook]` | (1984) | Hanya tahun penerbitan |
16
+ | `[@apa2020manual, hal. 45]` | (American Psychological Association, 2020, hal. 45) | Sitasi dengan nomor halaman |
17
+ | `[@apa2020manual; @pandoc2024]` | (American Psychological Association, 2020; Pandoc, 2024) | Multi-sitasi sekaligus |
18
+
19
+ ---
20
+
21
+ ## 2. Struktur Heading & Penomoran Bab
22
+
23
+ Gunakan heading Markdown tanpa menyisipkan angka manual. Engine Typst dan Lua filter DOCX akan menomori sub-bab secara otomatis:
24
+
25
+ ```markdown
26
+ # PENDAHULUAN
27
+ Heading Level 1 akan menjadi "BAB I PENDAHULUAN" secara otomatis.
28
+
29
+ ## Latar Belakang
30
+ Heading Level 2 akan menjadi "1.1 Latar Belakang".
31
+
32
+ ### Identifikasi Masalah
33
+ Heading Level 3 akan menjadi "1.1.1 Identifikasi Masalah".
34
+
35
+ # KATA PENGANTAR {-}
36
+ Gunakan atribut `{-}` atau `{.unnumbered}` untuk bagian front-matter tanpa nomor bab.
37
+ ```
38
+
39
+ ---
40
+
41
+ ## 3. Gambar & Diagram
42
+
43
+ Letakkan berkas gambar di dalam folder `gambar/`:
44
+
45
+ ```markdown
46
+ ![Arsitektur Sistem Multi-Engine](gambar/arsitektur.png){#fig:arsitektur width=80%}
47
+ ```
48
+
49
+ * **Penomoran Otomatis**: Menjadi `Gambar 1.1: Arsitektur Sistem Multi-Engine` (indeks bab otomatis).
50
+ * **Format yang Didukung**: `.png`, `.jpg`, `.jpeg`, `.webp`.
51
+ * **Transparansi Alpha**: Script `build.sh` otomatis menormalkan saluran alpha PNG agar optimal di Typst.
52
+
53
+ ---
54
+
55
+ ## 4. Tabel Formal Akademik
56
+
57
+ Gunakan format Pipe Table standar Pandoc:
58
+
59
+ ```markdown
60
+ : Ringkasan Pengujian Kompatibilitas {#tbl:pengujian}
61
+
62
+ | Platform | Versi Minimum | Status Dukungan |
63
+ |:---|:---:|:---|
64
+ | Linux (Ubuntu/Debian) | 20.04 LTS | Didukung Penuh (Nix / Native) |
65
+ | macOS | Monterey 12+ | Didukung Penuh (Apple Silicon & Intel) |
66
+ | Windows | 10 / 11 | Didukung Penuh (PowerShell native) |
67
+ ```
68
+
69
+ * Judul tabel diletakkan di atas dengan awalan titik dua `:`.
70
+ * Menjadi `Tabel 1.1: Ringkasan Pengujian Kompatibilitas` secara otomatis.
71
+
72
+ ---
73
+
74
+ ## 5. Persamaan Matematika (LaTeX Math)
75
+
76
+ * **Persamaan Inline**:
77
+ ```markdown
78
+ Nilai fungsi aktivasi dihitung dengan formula $f(x) = \frac{1}{1 + e^{-x}}$.
79
+ ```
80
+ * **Persamaan Blok (Display Math)**:
81
+ ```markdown
82
+ $$
83
+ MSE = \frac{1}{n} \sum_{i=1}^{n} (y_i - \hat{y}_i)^2
84
+ $$
85
+ ```
86
+ Persamaan blok secara otomatis diberi nomor indeks bab, misalnya `(1.1)`.
87
+
88
+ ---
89
+
90
+ ## 6. Blok Kode & Listing
91
+
92
+ ```markdown
93
+ ```python
94
+ def hitung_akurasi(y_true, y_pred):
95
+ return sum(t == p for t, p in zip(y_true, y_pred)) / len(y_true)
96
+ ```
97
+ ```
98
+
99
+ Typst akan membungkus blok kode dalam background abu-abu terang dengan font `DejaVu Sans Mono`.
100
+
101
+ ---
102
+
103
+ ## 7. Catatan Kaki & Kutipan Langsung
104
+
105
+ * **Kutipan Blok (Blockquote)**:
106
+ ```markdown
107
+ > "Rekayasa perangkat lunak bukan sekadar menulis kode, melainkan membangun sistem yang dapat diandalkan dan dipelihara dalam jangka panjang."
108
+ ```
109
+ * **Catatan Kaki (*Footnotes*)**:
110
+ ```markdown
111
+ Laporan ini menggunakan Pandoc[^pandoc_note] sebagai compiler dokumen universal.
112
+
113
+ [^pandoc_note]: Pandoc dikembangkan oleh John MacFarlane dan mendukung lebih dari 40 format dokumen.
114
+ ```
115
+
116
+ ---
117
+
118
+ ## 8. Tips Kompatibilitas Lintas Engine
119
+
120
+ 1. **Hindari Karakter Box-Drawing**: Jangan menggunakan karakter seperti `├──`, `└──`, atau `│` di dalam teks biasa; gunakan list Markdown (`-` atau `*`) atau blok kode monospace.
121
+ 2. **Jangan Mengetik Angka Bab Manual**: Jangan menulis `## 1.1 Latar Belakang` karena akan menghasilkan penomoran ganda `1.1 1.1 Latar Belakang`.
122
+ 3. **Nama File Gambar Tanpa Spasi**: Gunakan tanda hubung (`diagram-alur.png`) alih-alih spasi (`diagram alur.png`).
@@ -0,0 +1,100 @@
1
+ # Panduan Arsitektur Template Typst (template.typ)
2
+
3
+ File `template.typ` merupakan jantung dari pemformatan visual PDF pada **Laporan Generator**. Template ini dirancang untuk memenuhi standar penyusunan laporan akademik resmi di Indonesia, dan dikompilasi dengan **Typst** sebagai engine typesetting.
4
+
5
+ > **Catatan**: Pipeline utama sepenuhnya menggunakan **Typst** (`template.typ`). Template LaTeX lama diarsipkan pada branch `legacy/latex-engine`.
6
+
7
+ ---
8
+
9
+ ## Desain Arsitektur & Pemilihan Font
10
+
11
+ ### 1. Pemilihan Font (Libertinus Serif)
12
+ * Standardisasi karya ilmiah di Indonesia mewajibkan penggunaan font tipe *Times New Roman* 12pt.
13
+ * Untuk menjamin portabilitas kompilasi cross-platform tanpa dependensi font eksternal, template menggunakan **Libertinus Serif** (`Libertinus Serif`) yang sudah dibundel langsung di dalam binary Typst.
14
+ * Blok kode menggunakan **DejaVu Sans Mono** (juga font bawaan Typst).
15
+
16
+ ### 2. Pengaturan Margin & Spacing
17
+ ```typst
18
+ #set page(
19
+ paper: "a4",
20
+ margin: (top: 2cm, bottom: 3cm, left: 2.5cm, right: 2.5cm),
21
+ )
22
+ #set text(font: "Libertinus Serif", size: 12pt)
23
+ #set par(justify: true, leading: 1.5em)
24
+ ```
25
+ * Margin Kiri & Kanan: 2.5 cm
26
+ * Margin Atas: 2.0 cm
27
+ * Margin Bawah: 3.0 cm
28
+ * Spasi Antar Baris: 1.5 spasi (*one half spacing*)
29
+ * Paragraf rata kanan-kiri (*justify*)
30
+
31
+ ---
32
+
33
+ ## Penomoran Bab dan Halaman
34
+
35
+ ### 1. Format Bab & Heading
36
+ ```typst
37
+ #set heading(numbering: (..ns) => {
38
+ if ns.len() == 1 {
39
+ "BAB " + numbering("I", ns.at(0)) + linebreak()
40
+ } else if ns.len() == 2 {
41
+ numbering("1.1", ..ns)
42
+ } else {
43
+ numbering("1.1.1", ..ns)
44
+ }
45
+ })
46
+ ```
47
+ * **Bab**: Diformat dengan Angka Romawi (`BAB I`, `BAB II`, `BAB III`, dst). Angka Romawi dan judul dipisahkan oleh *line break*.
48
+ * **Sub-bab**: Diformat dengan Angka Arab (`1.1`, `1.2`, `2.1`).
49
+ * **Sub-sub-bab**: Diformat dengan Angka Arab 3 tingkat (`1.1.1`, `1.1.2`).
50
+ * **Heading tanpa nomor** (Kata Pengantar, Daftar Isi, Daftar Pustaka): menggunakan `{-}` di Markdown yang diterjemahkan Pandoc menjadi `#heading(level: 1, numbering: none)`.
51
+
52
+ > **Catatan**: Jangan menulis pola `"BAB I"` langsung sebagai format string `numbering(...)`. Typst menginterpretasikan rangkaian huruf `BAB` sebagai pola huruf dan memotong angka Romawinya. Selalu concat literal secara manual: `"BAB " + numbering("I", n)`.
53
+
54
+ ### 2. Penomoran Halaman (frontmatter vs mainmatter)
55
+ * **Bagian Depan** (Kata Pengantar, Daftar Isi): Menggunakan penomoran Romawi kapital (`I`, `II`, `III`) di bagian tengah bawah. Diatur di `cover.md`:
56
+ ```typst
57
+ #set page(numbering: "I")
58
+ ```
59
+ * **Bagian Utama** (BAB I hingga BAB V): Menggunakan penomoran Angka Arab (`1`, `2`, `3`) berurutan, di-reset ulang:
60
+ ```typst
61
+ #set page(numbering: "1")
62
+ #counter(page).update(1)
63
+ ```
64
+
65
+ ---
66
+
67
+ ## Halaman Sampul (Cover)
68
+
69
+ Bagian sampul dirender dari metadata `metadata.yml` dengan variabel: `title`, `subtitle`, `course`, `lecturer`, `authors`, `institution`, `logo`, `year`.
70
+
71
+ ```typst
72
+ #block(
73
+ width: 100%,
74
+ align(center)[
75
+ #image(logo, width: 4cm)
76
+ ...
77
+ ]
78
+ )
79
+ ```
80
+
81
+ ---
82
+
83
+ ## Pemrosesan Elemen Konten
84
+
85
+ ### 1. Tabel
86
+ ```typst
87
+ #show table: set stroke(0.75pt)
88
+ #show table.header: set text(weight: "bold")
89
+ ```
90
+ * Header tabel dicetak tebal, garis tabel 0.75pt.
91
+
92
+ ### 2. Gambar
93
+ * Caption gambar dirender di bawah gambar (`#show figure: set figure.caption(position: bottom)`).
94
+ * Gambar diproses oleh ImageMagick di `build.sh` (alpha channel dihapus) sebelum dikompilasi.
95
+
96
+ ### 3. Blok Kode
97
+ ```typst
98
+ #show raw: set text(font: "DejaVu Sans Mono", size: 9pt)
99
+ ```
100
+ * Blok kode menggunakan font monospaced 9pt dengan latar abu-abu muda (`#show raw: set block(fill: luma(240))`).