
저는 패키지를 사용 chemfig
하고 특정 템플릿과 일치하는 구조를 얻는 방법을 배우고 있습니다. 중요한 매개변수 중 하나는 원자의 글꼴 크기와 글꼴 모음입니다. 지금까지 내가 얻은 그림에서 일반적인 구조를 만들려면 다음을 수행하십시오.
\documentclass{article}
\usepackage{chemfig}
\usepackage[version=4]{mhchem}
\usepackage{fp}
\usepackage{chemnum}
\usepackage{graphicx}
\usepackage{chemscheme}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\newcommand{\bondlength}{14.4}
\FPeval{\bondspacing}{clip(\bondlength*0.18)}
\setchemfig{
double bond sep=\bondspacing pt, %space between multiple bonds lines
atom sep=\bondlength pt, %distance between atoms (bond length)
cram width=2 pt, %width of wedged and hashed bonds (bold width)
cram dash width=0.5 pt, %thickness of lines in hashed bonds
cram dash sep =2.5pt, % distance between lines in hashed bonds (hash spacing)
bond offset=1.6 pt, %space between bond and atom (margin width)
compound sep=10 em,%separation between compounds
arrow coeff=1, %default length of the arrow
arrow offset=0.75em, %distance between arrow ends and compounds
arrow label sep=3pt, %distance between arrow and label
scheme debug=false, %show the anchors
%atom style=red, %color atoms
%bond style=red, %color bonds
bond style={line width=0.6pt}, %bond line width - can be combined with color as bond style={line width=1pt,red}
%compound style={draw,line width=0.5pt,semitransparent,text opacity=1,inner sep=8pt,rounded corners=1mm}, %draws a box around each compound - needs the argument A\arrow([fill=red]--[fill=blue]) to work
}
\renewcommand*\printatom[1]{\normalsize\sffamily\ensuremath{\mathsf{#1}}}
\begin{document}
\begin{scheme}
\centering
\scalebox{.8}{
\chemname{\chemfig{-[:108]-[:168]=_[:222]-[:150]=_[:78]-[:6]S(-[:294])}}{\cmpd{ethylcompound}}}
\caption{This is the compound (\cmpd{ethylcompound}).}
\label{scheme:compound}
\end{scheme}
\end{document}
(댓글을 용서해주세요).
그러나 변경해도 \sffamily
출력 글꼴은 변경되지 않는 것 같습니다.
현재 출력은 다음과 같습니다:
답변1
문자를 인쇄하기 위해 수학 글꼴을 사용 하므로 다음과 같이 옵션 과 함께 패키지를 chemfig
사용할 수 있습니다.mathastext
subdued
\usepackage[subdued]{mathastext}
\Mathastext[chem] % create a math version for chemfig
\usepackage{chemfig}
\let\chmf\chemfig % copy the chemfig command
\renewcommand*{\chemfig}[1]{{\MTVersion{chem}\chmf{#1}}} % set the math version before printing
이렇게 하면 문서의 수학은 동일하게 유지되지만 원자는 텍스트 글꼴로 인쇄됩니다.