4

I want to write

\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}

But there is a space after the arrow and before the 4. How can I get rid of that space?

  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Could you please show us the desired output? – yo' May 15 '14 at 10:05
5

I'd simply write something like

1$\to$4

enter image description here

Actually I'd probably use chemmacros for the document, anyway, and define a macro for this, maybe

\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}

enter image description here

0

Adjust the placement of the 4 with the \kern command:

\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}

I've used a negative value of \kern to place the 4 further towards the arrow. You can even place it inside the arrow, with for instance {\kern-.5em{4}}.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.