我想写
\documentclass[12pt, a4paper, openright, twoside]{report}
\usepackage[english]{babel}
\usepackage{textgreek}
\usepackage[utf8x]{inputenc} %ÄÖÜß und griechische Buchstaben
\usepackage{chemfig} %Erstellen von Skelettformeln organischer Substanzen
\usepackage[version=3]{mhchem} % \ce zum Darstellen von chemischen Formeln
\usepackage{pgfplots}
\begin{document}
It is a polymer consisting primarily of 1\ce{\rightarrow}\!4-linked 2-\textit{O}-sulfated \textsc{l}-iduronic acid and 6-\textit{O}-sulfated, \textit{N}-sulfated glucosamine
\end{document}
但是在箭头之后和 4 之前有一个空格。我该如何去掉那个空格?
答案1
我只需要写类似
1$\to$4
实际上我可能会用chemmacros
对于文档,无论如何,并为此定义一个宏,也许
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{chemmacros}
\NewChemIUPAC\glycosidiclink{\ensuremath{\to}}
\newcommand*\glc[2]{#1\glycosidiclink#2}
\begin{document}
It is a polymer consisting primarily of \glc{1}{4}-linked 2-\oxygen-sulfated
\laevus-iduronic acid and 6-\oxygen-sulfated, \nitrogen-sulfated glucosamine
\end{document}
答案2
使用以下命令调整 4 的位置\kern
:
\documentclass[12pt, a4paper, openright, twoside]{report}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc} %ÄÖÜß und griechische Buchstaben
\usepackage[version=3]{mhchem} % \ce zum Darstellen von chemischen Formeln
\begin{document}
It is a polymer consisting primarily of 1\ce{\rightarrow}\!{\kern-.2em{4}}-linked 2-\textit{O}-sulfated \textsc{l}-iduronic acid and 6-\textit{O}-sulfated, \textit{N}-sulfated glucosamine
\end{document}
我使用了负值来\kern
将 4 放置在箭头更远处。您甚至可以将其放置在箭头内部,例如{\kern-.5em{4}}
。