LoginSignup
57
50

More than 5 years have passed since last update.

Qiitaで色々なフォントを使う

Last updated at Posted at 2015-05-18

QiitaはMarkdownを用いて文章を書いて投稿するツールですが、Qiitaでフォントをいじれるという秘密に気がついている人は少ないのではないでしょうか。今回はQiitaが数式を書くために採用しているMathJaxを使って、色々なフォントに挑戦してみました。
また、このページには載っていないが「このようなテクニックを知っている」というものがありましたら、お気軽にコメントや編集リクエストでご指摘ください。

このページで紹介しているソースコードはやむを得ない事情でU+200c(‌ZERO WIDTH NON-JOINER)が混入しています。コピペしても動かない可能性があるので、気をつけてください。(手動で入力するか、エディタなど機能で取り除くとよいでしょう。)

フォントサイズ

```math
\def\textlarge#1{%
  {\rm\Large #1}
}
\def\textsmall#1{%
  {\rm\scriptsize #1}
}
​​​​​​​​```‌​‌‌

This is $\textlarge{Large}$
This is $\textlarge{Small}$
\def\textlarge#1{%
  {\rm\Large #1}
}
\def\textsmall#1{%
  {\rm\scriptsize #1}
}

This is $\textlarge{Large}$
This is $\textsmall{Small}$

This is $\color{red}{\rm Red}$
This is $\color{blue}{\rm Blue}$

This is $\color{red}{\rm Red}$
This is $\color{blue}{\rm Blue}$

STIXGeneral

```math
\def\textrm#1{%
  {\rm #1}
}
​​​​​​​​```‌​‌‌

This is $\textrm{STIXGeneral}$
\def\textrm#1{%
  {\rm #1}
}

This is $\textrm{STIXGeneral}$

Blackboard Bold

This is $\mathbb{Blackboard Bold}$

This is $\mathbb{Blackboard Bold}$

Small Caps

```math
\def\textsc#1{\dosc#1\csod}
\def\dosc#1#2\csod{{\rm #1{\scriptsize #2}}}
‌```

This is $\textsc{SMALL} \textsc{CAPS}$
\def\textsc#1{\dosc#1\csod}
\def\dosc#1#2\csod{{\rm #1{\scriptsize #2}}}

This is $\textsc{SMALL} \textsc{CAPS}$

57
50
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
57
50