
より高度な書式設定ができるように教授の .doc ファイルを LaTeX に転送しているのですが、問題が発生しました。
この数直線を LaTeX で再作成したいと思います。
どのパッケージを使用するか、どのコマンドを学習するかについての助言は非常に役立ちます。
答え1
使用できますTikZ
; マニュアルは素晴らしく、多数の例が含まれています。次の例では、基本的な構成要素は\node
とです\draw
。
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
% a straight line segment
\draw (0.5,0) -- (10.5,0);
% the ticks and their labels
\foreach \x in {1,...,10}
\draw[xshift=\x cm] (0pt,2pt) -- (0pt,-1pt) node[below,fill=white] {\the\numexpr\x +112\relax};
% the thicker segment
\draw[ultra thick] (2.06,0) -- (8.94,0);
% the labels
\node[fill=white,draw=black,circle,inner sep=2pt,label=above:{$L_1=114.06$}] at (2.12,0) {};
\node[fill=white,draw=black,circle,inner sep=2pt,label=above:{$L_1=119.94$}] at (8.9,0) {};
\node at (5.5,-0.8) {$\mu$};
\end{tikzpicture}
\end{document}
そして、こちらはpgfplots
(内部的に使用されTikZ
、プロットに非常に便利です):
\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
axis y line=none,
axis lines=left,
axis line style={-},
xmin=112.5,
xmax=121.5,
ymin=0,
ymax=1,
xlabel=$\mu$,
scatter/classes={o={mark=*}},
restrict y to domain=0:1,
xtick={113,114,...,121}
]
\addplot table [y expr=0,meta index=1, header=false] {
114.06 o
119.94 o
};
\node[coordinate,label=above:{$L_1=114.06$}] at (axis cs:114.06,0.05) {};
\node[coordinate,label=above:{$L_2=119.94$}] at (axis cs:119.94,0.05) {};
\end{axis}
\end{tikzpicture}
\end{document}
答え2
この種の図には実際には追加のパッケージは必要ありません。LaTeX はそれを支援なしで実行できます。
\documentclass{article}
\begin{document}
\newcounter{nn}
\setlength\unitlength{2pt}
\begin{picture}(100,100)
\put(10,60){$L_1=114.06$}
\put(70,60){$L_2=119.94$}
\put(50,30){$\mu$}
\put(0,50){\line(1,0){100}}
\multiput(10,50)(10,0){9}{\line(0,1){5}}
\setcounter{nn}{113}%
\multiput(10,40)(10,0){9}{\makebox(0,0){\thenn\stepcounter{nn}}}
\thicklines
\put(20,50){\circle{3}}
\put(80,50){\circle{3}}
\linethickness{2pt}
\put(20,50){\line(1,0){60}}
\end{picture}
\end{document}