mbboardの導入

mbboardの導入

- mathema の投稿
返信数: 8
\documentclass{article} \setcounter{secnumdepth}{4} \usepackage[utf8]{inputenc} \newcommand{\maru}[1]{\ooalign{ \hfil\resizebox{.8\width}{\height}{#1}\hfil \crcr \raise.1ex\hbox{\large$\bigcirc$}}}%encircle \usepackage{fancybox}%about frame \usepackage{luatexja}%japanese \usepackage{tikz} \usetikzlibrary{positioning} \usetikzlibrary{cd}%tikzcd \usetikzlibrary{decorations.pathmorphing} \usepackage{xcolor} \usepackage{graphics}%reverse %$\usepackage[margin=15mm]{geometry}%Make margin small \usepackage[dvipdfmx]{graphicx}%about scalebox \usepackage{amsmath,amsfonts,amsthm,amssymb,amscd,ascmac}%in order to higher formula and mathfrak and so on. \usepackage{latexsym, mathtools}%arrow \usepackage{textcomp}%※ \usepackage{bussproofs}%prooftree \usepackage{pifont} \usepackage{subfigure} \usepackage{lscape}%%revolve \usepackage{stmaryrd}%bracket \usepackage{cancel}%diagonal line on a letter \usepackage{comment} \usepackage{mathrsfs}%花文字(スクリプトフォント) \usepackage{hyperref} \usepackage{here}%\figure[H]でその場に出力 \usepackage{caption} \usepackage {mbboard}%黒板の太字フォント \captionsetup[figure]{labelsep=space}%figureの後ろの:をなくす %余白関連 \usepackage{bm} \usepackage{here} \usepackage{bbm} \usepackage{fancyhdr} \usepackage[margin=15mm]{geometry} \theoremstyle{definition} \newtheorem{dfn}{定義}[subsection] \newtheorem{prop}[dfn]{命題} \newtheorem{lem}[dfn]{補題} \newtheorem{thm}[dfn]{定理} \newtheorem{cor}[dfn]{系} \newtheorem{rem}[dfn]{注意} \newtheorem{fact}[dfn]{事実} \newtheorem{exa}[dfn]{例} \renewcommand{\qedsymbol}{$\blacksquare$} \newcommand{\red}[1]{\textcolor{red}{#1}} \renewcommand{\figurename}{図} \renewcommand{\baselinestretch}{1.3}%Leave a space between lines %\renewcommand{\refname}{参考文献}%英語のクラスでthebilbliograpyのコマンドでReferenceと出るところを参考文献に変える %\usepackage{fancyhdr} %\pagestyle{fancy} %\rhead{\thepage}% \parindent = 0pt%no indent %% \usepackage[% %% backend = biber, %% bibstyle = amsplain, %% ]{biblatex} % %\nocite{*} %% \addbibresource{bib_name.bib} \pagestyle{headings}%ページ番号等なし %\rhead{\thepage}% \parindent = 0pt%no indent \setcounter{section}{-1}%番号を0から始める \begin{document} \mathbb{0} \end{document} 上記をlualatexのlatexエンジンででcloud latexで入力したら、 ! Font \OT1/mbb/bx/n/12=mbb12 at 12pt not loadable: metric data not found or bad. relax このようなエラーが出てきました。このエラーをそのまま検索してみてそれらしいことをしてみたのですが駄目でした。 styファイルの扱い方がよくわかっていないのですが、mbboardのstyファイルをダウンロードして、ネット上のlatexだとそれを張り付けるだけでよいのでしょうか。 よろしければお願いします。
mathema への返信

Re: mbboardの導入

- 和田 勇 の投稿

全般的なこと

  • 提示されたソースでは mbboard.sty の機能を利用されていないので、この点については回答できません
  • 当フォーラムではファイルを添付ファイルとしてアップロードできる機能がありますのでご利用ください
    • 提供していただいたソースをもとに差分で示そうとしましたが、コメント部分がどこまでかが判定しにくかったので言葉で説明します。
  • latex 関連の書籍 (例えば LaTeX2e 美文書作成入門)を一読されると良いと思います

lualatex でコンパイルするにあたって

  • lualatex 用の documentclass に調整して下さい

    • article タイプを使うのであれば \documentclass{ltjarticle} か \documentclass[article]{jlreq} を使います。

      前者は http://mirrors.ibiblio.org/CTAN/macros/luatex/generic/luatexja/doc/luatexja-ja.pdf の p11 の脚注を参考にして下さい

  • graphicx パッケージを利用する場合は dvipdfmx のオプションを外して下さい

  • \mathbb{0} は数式モードで使用するものなので $\mathbb{0}$ のようにして下さい

和田 勇 への返信

Re: mbboardの導入

- mathema の投稿

\documentclass{ltjarticle}

 \setcounter{secnumdepth}{4}

\usepackage[utf8]{inputenc}

\newcommand{\maru}[1]{\ooalign{

 \hfil\resizebox{.8\width}{\height}{#1}\hfil

 \crcr \raise.1ex\hbox{\large$\bigcirc$}}}%encircle \usepackage{fancybox}%about frame

\usepackage{luatexja}%japanese

\usepackage{tikz}

 \usetikzlibrary{positioning}

 \usetikzlibrary{cd}%tikzcd

 \usetikzlibrary{decorations.pathmorphing}

\usepackage{xcolor}

\usepackage{graphics}%reverse

%$\usepackage[margin=15mm]{geometry}%Make margin small \usepackage{graphicx}%about scalebox \usepackage{amsmath,amsfonts,amsthm,amssymb,amscd,ascmac}%in order to higher formula and mathfrak and so on.

\usepackage{latexsym, mathtools}%arrow

\usepackage{textcomp}%※

 \usepackage{bussproofs}%prooftree

\usepackage{pifont}

\usepackage{subfigure}

\usepackage{lscape}%%revolve

 \usepackage{stmaryrd}%bracket

 \usepackage{cancel}%diagonal line on a letter

 \usepackage{comment}

\usepackage{mathrsfs}%花文字(スクリプトフォント) \usepackage{hyperref}

\usepackage{here}%\figure[H]でその場に出力

\usepackage{caption}

 \usepackage {mbboard}%黒板の太字フォント

 \captionsetup[figure]{labelsep=space}%figureの後ろの:をなくす %余白関連

 \usepackage{bm}

 \usepackage{here}

\usepackage{bbm}

\usepackage{fancyhdr}

\usepackage[margin=15mm]{geometry}

 \theoremstyle{definition}

\newtheorem{dfn}{定義}[subsection]

\newtheorem{prop}[dfn]{命題}

\newtheorem{lem}[dfn]{補題}

\newtheorem{thm}[dfn]{定理}

\newtheorem{cor}[dfn]{系}

\newtheorem{rem}[dfn]{注意}

 \newtheorem{fact}[dfn]{事実} \newtheorem{exa}[dfn]{例} \renewcommand{\qedsymbol}{$\blacksquare$} \newcommand{\red}[1]{\textcolor{red}{#1}} \renewcommand{\figurename}{図} \renewcommand{\baselinestretch}{1.3}%Leave a space between lines %\renewcommand{\refname}{参考文献}%英語のクラスでthebilbliograpyのコマンドでReferenceと出るところを参考文献に変える 

\parindent = 0pt%no indent  \pagestyle{headings}%ページ番号等なし %\rhead{\thepage}% \parindent = 0pt%no indent \setcounter{section}{-1}%番号を0から始める \begin{document}

$ \mathbb{0}$

 \end{document}

上記をlualatexのlatexエンジンででcloud latexで入力したら、 ! Font \OT1/mbb/bx/n/12=mbb12 at 12pt not loadable: metric data not found or bad. relax このようなエラーが出てきました。このエラーをそのまま検索してみてそれらしいことをしてみたのですが駄目でした。 styファイルの扱い方がよくわかっていないのですが、mbboardのstyファイルをダウンロードして、ネット上のlatexだとそれを張り付けるだけでよいのでしょうか。 よろしければお願いします。

が本来の質問した形から指示して頂いた部分を変更したです。投稿後何故か改行部分が潰れてしまいました。今も改行すると一行空いてしまうということが起こっているかもしれないのですがよろしくお願いします。

mathema への返信

Re: mbboardの導入

- m c の投稿
CTANでmbboardを見ると,フォント自体は提供されておらず,METAFONTのソースになっています.
ですから,まずは当該のフォントファイルを作る作業が必要ではないかと思います.

試しにソースをuplatex用に修正して(Cloud LaTeXではなく)ローカルで走らせてみましたが,mfでフォントファイルを作りにいったものの,TFMファイルがないと怒られました.
# LuaLaTeXで走らせた場合はmathemaさんと同じエラーでした

mbboardのドキュメントには
---- 引用ここから ----
There are files named xxx.mf that should be placed in a directory where your MetaFont program can find them. Then there are mbboard.tex (plainTeX input file), mbboard.sty (LaTeX input file) and mbboard.dcl (file related to the former ones), that should be placed somewhere TeX can find them. I won't tell you how to deal with all of this. You must know how to proceed (that's not complicated anyway).
---- ここまで ----
とあり,一式を作ってからになります.

ですので,Cloud LaTeX上でmbboardを使うのは難しいのではないでしょうか.
mathema への返信

Re: mbboardの導入

- 和田 勇 の投稿

投稿後何故か改行部分が潰れてしまう件について

返信の仕方により若干異なりますが、返信枠の右下に 高度 というリンクボタンが表示されていたら それをクリックしてください。

(そうすると)返信枠の左下に「Moodleオートフォーマット」と表示されたものが表示されますが、 それをクリックすると、投稿時の書式選択が可能になりますので、プレインテキストフォーマット を選択すれば改行コードは保持されるようになります。

また、今回のように比較的長いばあいは。返信枠に貼り付けるのではなく、該当のファイルをドラッグ&ドロップすることで改行コードを保持したまま添付ファイルとしてアップロードすることができます。

添付の画像を参考にしてください。

添付 スクリーンショット 2024-05-24 10.18.39.png
和田 勇 への返信

Re: mbboardの導入

- mathema の投稿
https://cloudlatex.io/projects/RxiP63U4MYKTo11MoXiQNFbB 上記はcloudlatexのリンクです。 本来このような感じで書きました。 よろしければご教授よろしくお願いします。
mathema への返信

Re: mbboardの導入

- 林 かぐら の投稿

私は昔黒板文字として mbboard を使っていました。
mfソースから苦労してフォントを作った記憶がかすかにあります。
でもできあがったのはアウトラインではなく拡大するときたないので,
そのうち使わなくなりました。
今は newtxfonts の ntxmia(ntxbmia)の最後("C1~"FA)にあるのを使っています。
きれいで満足しています。大文字だけではなく小文字もあります。
ただ LaTeX での使い方はわからないので,他の人におまかせします。
unicode-math が使えるのなら数学で使うNZQRCHが U+2115 のあたりにあるので,
それを使うという手もあります。

林 かぐら への返信

Re: mbboardの導入

- 奥村 晴彦 の投稿

単に黒板文字が使いたいのであれば

\documentclass{ltjsarticle}
\usepackage{amsmath,amssymb}
\begin{document}

\[ \mathbb{ABC} \]

\end{document}

でいいのですが、mbboardのデザインのものが出したい、ということなんでしょうね。

林 かぐら への返信

Re: mbboardの導入

- mathema の投稿

ありがとうございます。

望み通りの出力ができました。

ご教授してくださった他の方々もありがとうございました。