굵은 글꼴로 노드 조판

굵은 글꼴로 노드 조판

${\mathrm{HR}}(\ray{r}, \, P)$굵은 글꼴로 노드를 어떻게 조판합니까 ? 번거로운 코드에 대해 사과드립니다. 해당 노드에 대한 명령은 마지막 줄에 있습니다.

\documentclass{amsart}
\usepackage{amsmath}
\usepackage{amsfonts}

\usepackage{tikz}
\usetikzlibrary{calc,angles,positioning,intersections}

%The following commands are taken from a reply by Steven B. Segletes to my post
%"Typesetting arrows above a pair of letters to indicate a line" on
%tex.stackexchange.com.  These commands typeset arrows above letters to indicate
%lines and rays.
  \usepackage{scalerel}
  \def\shrinkage{-2.4mu}
  \def\vecsign#1{\rule[1.388\LMex]{\dimexpr#1-2.5pt}{.36\LMpt}%
  \kern-6.0\LMpt\mathchar"017E}
  \def\dvecsign#1{\smash{\stackon[-1.989\LMpt]{\SavedStyle\mkern-\shrinkage\vecsign{#1}}%
  {\rotatebox{180}{$\SavedStyle\mkern-\shrinkage\vecsign{#1}$}}}}
  \def\dvec#1{\ThisStyle{\setbox0=\hbox{$\SavedStyle#1$}%
  \def\useanchorwidth{T}\stackon[-4.2\LMpt]{\SavedStyle#1}{\,\dvecsign{\wd0}}}}
  \def\theraysign#1{\rule[1.384\LMex]{\dimexpr#1-2.5pt}{.40\LMpt}%
  \kern-6.0\LMpt\mathchar"017E}
  \def\raysign#1{\smash{\SavedStyle\mkern-\shrinkage\theraysign{#1}}}
  \def\ray#1{\ThisStyle{\setbox0=\hbox{$\SavedStyle#1$}%
  \def\useanchorwidth{T}\stackon[-4.2\LMpt]{\SavedStyle#1}{\,\raysign{\wd0}}}}
  \usepackage{stackengine,amsmath}
  \stackMath
  \usepackage{graphicx}

\begin{document}

\begin{tikzpicture}

\coordinate (O) at (0,0);
\draw[fill] (O) circle (1.5pt);
\coordinate (label_for_O) at ($(O)!-3mm!90:(15:4)$);
\node at (label_for_O){$O$};

%Line $\ell$ is drawn.
\coordinate (left_endpoint_of_ell) at (195:4);
\coordinate (right_endpoint_of_ell) at  (15:4);
\draw[latex-latex] (left_endpoint_of_ell) -- (right_endpoint_of_ell);
\coordinate (label_for_ell) at ($(right_endpoint_of_ell)!-3mm!(left_endpoint_of_ell)$);
\node at (label_for_ell){$\ell$};

%A point P off $\ell$ is plotted.
\coordinate (P) at (170:1.75);
\draw[fill] (P) circle (1.5pt);
\coordinate (P) at ($(170:1.75)!-3mm!(O)$);
\node at (P){$P$};

%Some rays in the closed half 
\draw[-latex, line width=0.8pt] (O) -- (195:2.75);
\coordinate (label_for_ray_r) at ($(195:2.75)!-3mm!-90:(O)$);
\node at (label_for_ray_r){$\ray{r}$};

\draw[-latex] (O) -- (135:2.75);
\coordinate (label_for_ray_a) at ($(135:2.75)!-3mm!(O)$);
\node at (label_for_ray_a){$\ray{a}$};

\draw[-latex] (O) -- (90:2.5);
\coordinate (label_for_ray_b) at ($(90:2.5)!-3mm!(O)$);
\node at (label_for_ray_b){$\ray{b}$};

\draw[-latex] (O) -- (50:3.75);
\coordinate (label_for_ray_c) at ($(50:3.75)!-3mm!(O)$);
\node at (label_for_ray_c){$\ray{c}$};


%Title for ${\mathrm{HR}}(\ray{r}, \, P)$ is typeset.
\coordinate (a_point_on_left_edge) at (left_endpoint_of_ell |- O);
\coordinate (a_horizontal_midpoint) at ($(a_point_on_left_edge)!0.5!(label_for_ell)$);
\coordinate (another_horizontal_midpoint_along_bottom_edge) at (a_horizontal_midpoint |- left_endpoint_of_ell);
\coordinate (title_for_a_set_of_rays) at ($(another_horizontal_midpoint_along_bottom_edge)!-3mm!(a_horizontal_midpoint)$);
\node[font=\bfseries,anchor=north,inner sep=0] at (title_for_a_set_of_rays){${\mathrm{HR}}(\ray{r}, \, P)$};%\unboldmath

\end{tikzpicture}

\end{document}

답변1

상자에 물건을 숨기고 싶다고 가정합니다.

\node[anchor=north,inner sep=0] at (title_for_a_set_of_rays){%
  \mbox{\boldmath$\mathrm{HR}(\ray{r},P)$}%   
};

여기에 이미지 설명을 입력하세요

노트. \ray귀하가 제공하지 않았기 때문에 에 대한 모의 정의를 사용했습니다 . \,쉼표 뒤에는 no가 없어야 합니다 .

답변2

\usepackage{bm} % defines commands to access bold math symbols

그런 다음...

\node[anchor=north,inner sep=0] at (title_for_a_set_of_rays)%
    {$\bm{\mathrm{HR}(\ray{r}, P)}$}

font=\bfseries필요하지 않습니다.

여기에 이미지 설명을 입력하세요

관련 정보