假设我有以下代码:
\documentclass{article}
\usepackage{tikz,amsmath}
\begin{document}
\begin{tikzpicture}[scale=6]
\tikzstyle{xthick} = [thick, |-|]
\tikzstyle{xthin} = []
%
\draw[xthick](.93,-.6)node[left]{\bfseries 00\,00\,00\,00\,00}--(1,-.6);
\draw[xthin](1.013,-.625)--(1.082,-.625)node[right]{00\,00\,00\,00\,10};
\draw[xthin](.972,-.65)node[left]{00\,00\,00\,11\,00}--(1.041,-.65);
\draw[xthin](1.054,-.675)--(1.124,-.675)node[right]{00\,00\,00\,11\,10};
\draw[xthick](.901,-.7)node[left]{\bfseries 00\,11\,00\,01\,01}--(.971,-.7);
\draw[xthin](.983,-.725)--(1.053,-.725)node[right]{00\,11\,00\,01\,11};
%
\draw[xthin](.963,-.8)node[left]{00\,00\,00\,00\,00\,00}--(1,-.8);
\draw[xthin](.974,-.825)--(1.012,-.825)node[right]{00\,00\,00\,00\,00\,11};
\draw[xthick](.901,-.85)node[left]{\bfseries 00\,11\,00\,01\,01\,01}--(.938,-.85);
\draw[xthin](.977,-.875)--(1.015,-.875)node[right]{00\,11\,00\,01\,01\,10};
\end{tikzpicture}
\end{document}
我想要一个输出完全相同的代码,只是不需要\bfseries
。是否可以将修改嵌套的sxthick
的键设为?\draw
node
答案1
您可以指定如下\bfseries
选项font
:
\documentclass{article}
\usepackage{tikz,amsmath}
\begin{document}
\begin{tikzpicture}[scale=6]
\tikzset{
xthick/.style = {thick, |-|, font=\bfseries},
xthin/.style = {}
}
%
\draw[xthick](.93,-.6)node[left]{00\,00\,00\,00\,00}--(1,-.6);
\draw[xthin](1.013,-.625)--(1.082,-.625)node[right]{00\,00\,00\,00\,10};
\draw[xthin](.972,-.65)node[left]{00\,00\,00\,11\,00}--(1.041,-.65);
\draw[xthin](1.054,-.675)--(1.124,-.675)node[right]{00\,00\,00\,11\,10};
\draw[xthick](.901,-.7)node[left]{00\,11\,00\,01\,01}--(.971,-.7);
\draw[xthin](.983,-.725)--(1.053,-.725)node[right]{00\,11\,00\,01\,11};
%
\draw[xthin](.963,-.8)node[left]{00\,00\,00\,00\,00\,00}--(1,-.8);
\draw[xthin](.974,-.825)--(1.012,-.825)node[right]{00\,00\,00\,00\,00\,11};
\draw[xthick](.901,-.85)node[left]{00\,11\,00\,01\,01\,01}--(.938,-.85);
\draw[xthin](.977,-.875)--(1.015,-.875)node[right]{00\,11\,00\,01\,01\,10};
\end{tikzpicture}
\end{document}