Notion-MW
Notion-MW
 
(同じ利用者による、間の3版が非表示)
3行目: 3行目:
== 数式の基本 ==
== 数式の基本 ==


Web上のTeX風数式レンダリングのJavaScriptライブラリは古くからあるMathJaxと新興のKaTeXが有名だが、Markdownで主に使われるのはMathJaxで、TyporaでもMathJaxが使われている。ちなみにNotionで使われているのはKaTeX。
TeX風数式レンダリングのJavaScriptライブラリとしては、古くからあるMathJaxと新興のKaTeXが有名だが、Markdownで主に使われるのはMathJaxで、TyporaでもMathJaxが使われている。ちなみにNotionで使われているのはKaTeX。


* インライン数式を使うには<strong>設定で有効にする必要がある</strong>。
* インライン数式を使うには<strong>設定で有効にする必要がある</strong>。
20行目: 20行目:
最も汎用的なのが\labelとともに\tagで式の名前を指定するもので、上記の全ての設定で有効である。
最も汎用的なのが\labelとともに\tagで式の名前を指定するもので、上記の全ての設定で有効である。


<syntaxhighlight lang="python">markdown
<syntaxhighlight lang="markdown">$$
$$
a=b\label{expr1}\tag{*}
a=b\label{expr1}\tag{*}
$$
$$
32行目: 31行目:
auto numberingを利用するとこの\tagの部分をわざわざ書かなくて済むようになる。「Use AMS Numbering Rules」の場合、equationなど一部の環境に自動で番号が付加される。このとき\labelは\begin&#123;equation&#125;と\end&#123;equation&#125;の間に書く必要がある。実用的にはこれが最も使いやすい?
auto numberingを利用するとこの\tagの部分をわざわざ書かなくて済むようになる。「Use AMS Numbering Rules」の場合、equationなど一部の環境に自動で番号が付加される。このとき\labelは\begin&#123;equation&#125;と\end&#123;equation&#125;の間に書く必要がある。実用的にはこれが最も使いやすい?


<syntaxhighlight lang="python">markdown
<syntaxhighlight lang="markdown">$$
$$
\begin{equation}
\begin{equation}
a=b\label{expr2}
a=b\label{expr2}
42行目: 40行目:
「Auto Numbering for All Math Equations」の場合はequation環境などがなくても全てのdisplay style数式ブロックに番号が付けられる。
「Auto Numbering for All Math Equations」の場合はequation環境などがなくても全てのdisplay style数式ブロックに番号が付けられる。


<syntaxhighlight lang="python">markdown
<syntaxhighlight lang="markdown">$$
$$
a=b\label{expr3}
a=b\label{expr3}
$$
$$
101行目: 98行目:
== テーマ ==
== テーマ ==


「テーマフォルダを開く」とやると各テーマのCSSがみられるので好きに変えられる。ただ<code>&quot;C&#58;\Program Files\Typora\resources\DO NOT ADD FILES HERE&quot;</code>を見るとわかるがTyporaをアップデートするとまたもとに戻ってしまう。
[https://support.typora.io/Add-Custom-CSS/ Add Custom CSS &#45; Typora Support]にある通り、ユーザー独自のCSSを追加できる。「テーマフォルダを開く」とやるとフォルダが表示されるので、そこにCSSファイルを作る。<code>base.user.css</code>は全テーマ、<code>&#123;current&#45;theme&#125;.user.css</code>(例えば<code>github.user.css</code>)は特定のテーマに対してカスタムCSSを適用する。


==== 行間 ====
==== 行間 ====
109行目: 106行目:
まず基本の行の高さは
まず基本の行の高さは


<syntaxhighlight lang="python">css
<syntaxhighlight lang="css">body {
body {
     font-family: "TRIVFONT", "NazoMin", "NazoMin+", "Open Sans","Clear Sans", "Helvetica Neue", Helvetica, Arial, 'Segoe UI Emoji', sans-serif;
     font-family: "TRIVFONT", "NazoMin", "NazoMin+", "Open Sans","Clear Sans", "Helvetica Neue", Helvetica, Arial, 'Segoe UI Emoji', sans-serif;
     color: rgb(51, 51, 51);
     color: rgb(51, 51, 51);
     line-height: <strong>1.3;</strong>
     line-height: 1.3;
}</syntaxhighlight>
}</syntaxhighlight>
ここで変える。(もともとは1.6)
ここで変える。(もともとは1.6)
119行目: 115行目:
次に段落間は
次に段落間は


<syntaxhighlight lang="python">css
<syntaxhighlight lang="css">p,
p,
blockquote,
blockquote,
ul,
ul,
130行目: 125行目:


<syntaxhighlight lang="python">css
<syntaxhighlight lang="css">h1,
h1,
h2,
h2,
h3,
h3,
146行目: 140行目:
となっているので、それぞれ
となっているので、それぞれ


<syntaxhighlight lang="python">css
<syntaxhighlight lang="css">p{
p<strong>{
     margin: 0.4em 0;
     margin: 0.4em 0;
}</strong>
}
blockquote,
blockquote,
ul,
ul,
157行目: 150行目:
     margin: 0.8em 0;
     margin: 0.8em 0;
}</syntaxhighlight>
}</syntaxhighlight>
<syntaxhighlight lang="python">css
<syntaxhighlight lang="css">h1,
h1,
h2,
h2,
h3,
h3,
165行目: 157行目:
h6 {
h6 {
     position: relative;
     position: relative;
     margin-top: <strong>0.6rem</strong>;
     margin-top: 0.6rem;
     margin-bottom: <strong>0.6rem</strong>;
     margin-bottom: 0.6rem;
     font-weight: bold;
     font-weight: bold;
     line-height: 1.4;
     line-height: 1.4;