LoginSignup
2
1

More than 3 years have passed since last update.

LaTeX tips for student(me)

Last updated at Posted at 2019-12-01

はじめに

引き続き, B2のJabelicです. 明治大学/明治大学大学院 AdventCalendar 2019 2日目の記事です.
ちょっと特殊というか, たまーに使うものを列挙. 完全に自分用のメモになってしまいますが.

数式を縦に並べたいとき


\begin{equation*}
\hat{w}\ x + \hat{b} = 
     \left\{
     \begin{aligned}
          \geq 0 \hspace{5mm}\Longrightarrow\hspace{5mm}G_1\\
          < 0 \hspace{5mm}\Longrightarrow\hspace{5mm}G_2\\
     \end{aligned}
     \right.
 \end{equation*}
\begin{equation*}
\hat{w}\ x + \hat{b} = 
     \left\{
     \begin{aligned}
          \geq 0 \hspace{5mm}\Longrightarrow\hspace{5mm}G_1\\
          < 0 \hspace{5mm}\Longrightarrow\hspace{5mm}G_2\\
     \end{aligned}
     \right.
 \end{equation*}

左右に配置したいとき


\begin{equation}\
     \begin{aligned}\
\verb|\begin{equation}|\\
\verb|\begin{matrix}|\\
\verb|a_{11}&a_{12}\\|\\
\verb|a_{21} & a_{22}\\|\\
\verb|\end{matrix}|\\
\verb|\end{equation}|\\
     \end{aligned}\
     \quad \text{$\hspace{10mm}\Longrightarrow\hspace{10mm}$}\
     \begin{aligned}\
\begin{matrix}\
a_{11}&a_{12}\\
a_{21} & a_{22}\\
\end{matrix}\
     \end{aligned}\
\end{equation}\
\begin{equation}\
     \begin{aligned}\
\verb|\begin{equation}|\\
\verb|\begin{matrix}|\\
\verb|a_{11}&a_{12}\\|\\
\verb|a_{21} & a_{22}\\|\\
\verb|\end{matrix}|\\
\verb|\end{equation}|\\
     \end{aligned}\
     \quad \text{$\hspace{10mm}\Longrightarrow\hspace{10mm}$}\
     \begin{aligned}\
\begin{matrix}\
a_{11}&a_{12}\\
a_{21} & a_{22}\\
\end{matrix}\
     \end{aligned}\
\end{equation}\

化学組版

TeXによる化学組版
これがすごい. ヤバイ

化学式

プリアンブルに
\usepackage[version=3]{mhchem}


\[\ce{HA + H_2O <=>[K^+][K^-] A^- + H3O^+ }\cdots(5.1)\]

chemi.png

ベンゼン環

TeXによる化学組版の”picture環境によるベンゼン環の描画”から定義を引用してdocs.texをファイル内に置く.


\[\ce{ COOH{\para} NO2 <=> H+ + COO- {\para} NO2}\]

para.png

フォントサイズを強制的に変更する

プリアンブルに以下を入れる.


\usepackage[truedimen,mag=1000]{geometry}%フォントサイズを指定. 1000が10pt

これより前に\usepackage{geometry}を置いてしまっているとコンパイルが通らないので気をつけてね

問題番号

大学のレポート問題演習用のLaTeXプリアンブル
是非使おう

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1