Registry / RepositoryTypeScriptRustPython
Rollpie
ReadmeFiles
Versions
Info
Download
0.4.01085.8 KB2026-10-160.3.21087.6 KB2026-10-160.3.11087.5 KB2026-10-160.3.0117.8 KB2026-10-160.2.1106.1 KB2026-10-150.2.0105.5 KB2026-10-15
Version
0.4.0
Copyright
Rollpie, Irohabook
Publisher
math
Published
2026-10-16
Size
1085.8 KB
Downloads
19
Checksum
df10d3447b809454aba0a9fd252d07428b819520aff22324461ba2dcbf1e43fb
Dependencies
rust/[email protected]
rust/[email protected]

sample.tex

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
\documentclass[a4paper,10pt]{article}

\title{hongo で組んだ文書}
\author{本郷}
\date{2026年9月7日}

\newcommand{\hongo}{\texttt{hongo}}

\begin{document}

\maketitle

\begin{abstract}
この文書は \hongo{} が LaTeX の原稿から直に組んだものです。
数式は suki が、化学式は lina が組み、ページと PDF は \hongo{} が作ります。
外の crate には依存していません。
\end{abstract}

\tableofcontents

\section{はじめに}
\label{sec:start}

日本語と欧文が混じった文章を組みます。and mixing English words works too。
行分割は Knuth と Plass のやり方で段落全体を見て決めるので、
語間の空きがそろいます。和文の字間にも 0 幅の空きが入っているので、
両端がきれいに揃います。句読点が行頭に来ないように、禁則も見ています。

ふりがなは \ruby{振}{ふ}り\ruby{仮名}{がな}のように付きます。
\ruby{行間}{ぎょうかん}に入るので、行送りは変わりません。

段落を変えると、先頭が 1 文字ぶん下がります。
\textbf{太字}と\textit{斜体}も使えます。数式の書体しかないときは、
数式用の英字(\textbf{bold} と \textit{italic})で代えています。
脚注もつきます\footnote{脚注はそれを載せる行と同じページに置かれます。}。

\subsection{箇条書き}

\begin{itemize}
\item 印のある箇条書き。
\item 項目が長くなると折り返して、2 行目からは字下げの位置にそろいます。
  これは箇条書きの中身が本文と同じ組み方で組まれているからです。
\end{itemize}

\begin{enumerate}
\item 番号のある箇条書き。
\item 番号は右にそろえて置きます。
\end{enumerate}

\subsection{引用とそのまま出す文字}

\begin{quote}
引用は左右を下げて組みます。まわりの本文より内側に入ります。
\end{quote}

\begin{verbatim}
./target/release/hongo test/sample.tex
    ここは書いたとおりに出ます。
\end{verbatim}

\section{数式}
\label{sec:math}

文中に $e^{i\pi} + 1 = 0$ のように置けます。独立した行にも置けます。

\begin{equation}
\label{eq:quadratic}
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
\end{equation}

式 \ref{eq:quadratic} は \pageref{eq:quadratic} ページにあります。
複数行を揃えることもできます。

\begin{align}
(a+b)^2 &= a^2 + 2ab + b^2 \\
(a-b)^2 &= a^2 - 2ab + b^2
\end{align}

行列と場合分けも組めます。

\[
A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}, \quad
f(x) = \begin{cases} 1 & x > 0 \\ 0 & x \leq 0 \end{cases}
\]

\section{化学式}

文中に \chemfig{H_2O} と置けます。独立した行にも置けます。

\chemname{\chemfig{*6(-=-=-=)}}{ベンゼン}

\section{表と図}

表 \ref{tab:size} に用紙の大きさを並べます。

\begin{table}[htbp]
\centering
\begin{tabular}{|l|r|r|}
\hline
名前 & 幅 (mm) & 高さ (mm) \\
\hline
A4 & 210 & 297 \\
A5 & 148 & 210 \\
B5 & 176 & 250 \\
\hline
\end{tabular}
\caption{用紙の大きさ}
\label{tab:size}
\end{table}

\section{参考文献の引き方}

行分割のやり方は \cite{knuth} に、TeX そのものは \cite{tex} にあります。

\begin{thebibliography}{9}
\bibitem{knuth} Donald E. Knuth and Michael F. Plass.
  \textit{Breaking Paragraphs into Lines}. 1981.
\bibitem{tex} Donald E. Knuth. \textit{The \TeX book}. 1984.
\end{thebibliography}

\end{document}