(しばらく工事中)
X (旧 Twitter) のトレンドに LaTeX が登場!! (2024/2/4)
数日前に Typst (発音は /taɪpst/ タイプストかな -- ちなみに typist は /tάıpıst/ タイピスト) いう組版システムの話題が出て、その影響らしい。
Mac ならば brew install typst でインストールしなさい、 とのことだけど、私は過去のしがらみで MacPorts 派なので、
| 
% port search typst
typst @0.10.0 (textproc)
    A new markup-based typesetting system that is powerful and easy to learn.
%
なるほど、用意されていると。sudo port install typst | 
| コンパイル (PDFを作る) | 
| typst compile file.typ | 
えーと、どんなふうに書くのだろう?? シンプルな例が意外とすぐ出て来ない。
実例としてネットに置いてあるものが「何だかなあ」というのが多い。
Tutorial を見るのかな?
| enumerate | 
| + The climate + The topography + The geology | 
| itemize | 
| + The climate - Temperature - Precipitation + The topography + The geology | 
こういうのはマークダウン形式みたいだね。 LATEX だったら、それぞれ次のようにするところ。
| 
\begin{enumerate}
\item The climate
\item The ropography
\item The geology
\end{enumerate}
 | 
| 
\begin{enumerate}
\item The climate
\begin{itemize}
\item 
  Temparature
\item 
  Precipitation
\end{itemize}
\item The ropography
\item The geology
\end{enumerate}
 | 
| 図の取り込み | 
| 
#image("meijiro.png")
#image("meijiro.png", width: 70%)
#figure(
  image("meijiro.png", width: 70%),
  caption: [
    A Japanese famous yuru-character named Meijiro
  ],
)
 | 
| figure環境みたいに | 
| 
\includegraphics{meijiro.png}
\includegraphics[scale=0.7]{meijiro.png}
\begin{figure}
  \includegraphics[scale=0.7]{meijiro.png}
  \caption{A Japanese famous yuru-character named Meijiro}
\end{figure}
 | 
参考文献表は、BibTeX が使えるのか!嬉しいと思ったけれど、 LATEX よりもチェックが厳しく、普段使っているファイルはエラーだらけで、 通らなかった (長大なファイルになっているので、直すの面倒くさいなあ)。
| 
= Methods
We follow the glacier melting models
established in @奥村・黒木2023.
#bibliography("reference2.bib")
 | 
| フォントの指定の例 | 
| #set text(font: "Hiragino Kaku Gothic ProN") | 
これは Mac で Hiragino を使うということか (ダイレクトにフォントの名前を書いてしまう)。
数式は $ と $ でくくるか、
$  と  $ でくくると (空白を入れる)。
| 数式の例 | 
| The equation $Q = rho A v + C$ defines the glacial flow rate. The flow rate of a glacier is defined by the following equation: $ Q = rho A v + C $ | 
| 分数は / でいいとか、グループするには丸括弧とか | 
| Total displaced soil by glacial flow: $ 7.32 beta + sum_(i=0)^nabla Q_i / 2 $ | 
(Microsoft Office の数式もそうなんだけど、こういうのは中途半端に似せるよりも、 完全な互換性を持たせた方がこちらは楽なんだけどなあ…)
LATEX の maketitle をしたいのだけれど、 どうすればいいのかな。 そういう意味では plain TEX みたいなのかしらん (40年くらい前に戻った感じがする)。
pandoc で、LuaTeX と Typst の間で相互変換できるようで (https://github.com/lvignoli/typst-pandoc)、 それで何か分かるかなあと考えたけれど、分からなかった。
| pandoc -t writer.lua input.tex -o output.typ pandoc -f reader.lua input.typ -o output.html | 
次は読んでいて面白かった。 “LaTeX v.s. Typst: What is TeX Community's Future Plan? [closed]”
Typst LSP, Typst Preview