Skip to content

Instantly share code, notes, and snippets.

@MasWag
Created December 14, 2023 08:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MasWag/e9a2d6c1791975ae28d4947548a082c3 to your computer and use it in GitHub Desktop.
Save MasWag/e9a2d6c1791975ae28d4947548a082c3 to your computer and use it in GitHub Desktop.
Question about \cases with multiple lines in SATySFi/azmath
@require: stdja
@require: azmath/azmath
document (|
author = {MasWag};
show-title = true;
show-toc = false;
title = {条件が複数行に渡る\code(`\cases`);};
|) '<
+p{
\code(`azmath`);の\code(`\cases`);に関連する質問です。
これくらいの長さの式だとページ内に収まりますが、もっと長いと収まらないこともあります。こういうときに上手く組める方法をご存知の方はいますか?
}
+eqn(${A_f = \cases{
| \top | \forall i \in \set{1,2,\ldots,n}. \app{f}{w_i} = \top
| \bot | \app{f}{w_i} = \bot \land \forall j \in \set{1,2,\ldots,i-1}. \app{f}{w_i} = \top \notag
|}});
+p{
そのまま組むと例えばこういう感じになります
}
+eqn(${A = \cases{
| \top | \forall i \in \set{1,2,\ldots,n}. \app{f}{w_i} = \top
| \bot | \app{f}{w_i} = \bot \land \forall j \in \set{1,2,\ldots,i-1}. \app{f}{w_i} = \top \land \forall j \in \set{1,2,\ldots,i-1}. \app{g}{w_i} = \top \land \forall j \in \set{1,2,\ldots,i-1}. \app{h}{w_i} = \top \notag
|}});
+p{
例えば無理矢理 \code(`\aligned`); で詰め込むと、baselineがずれてしまいます。\code(`|`);の位置を調整してみても同じようになるみたいです。
\eqn(${A = \cases{
| \top | \forall i \in \set{1,2,\ldots,n}. \app{f}{w_i} = \top
| \bot | \aligned{||\app{f}{w_i} = \bot |
\land| \forall j \in \set{1,2,\ldots,i-1}. \app{f}{w_i} = \top|
\land| \forall j \in \set{1,2,\ldots,i-1}. \app{g}{w_i} = \top|
\land| \forall j \in \set{1,2,\ldots,i-1}. \app{h}{w_i} = \top|}
\notag|}});
}
+code(`
+eqn(${A = \cases{
| \top | \forall i \in \set{1,2,\ldots,n}. \app{f}{w_i} = \top
| \bot | \aligned{||\app{f}{w_i} = \bot |
\land| \forall j \in \set{1,2,\ldots,i-1}. \app{f}{w_i} = \top|
\land| \forall j \in \set{1,2,\ldots,i-1}. \app{g}{w_i} = \top|
\land| \forall j \in \set{1,2,\ldots,i-1}. \app{h}{w_i} = \top|}
\notag|}});`);
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment