Math & Sciencebpchem | Annoying Space after Sub-label

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
hoytesara
Posts: 13
Joined: Sat Feb 18, 2012 10:46 am

bpchem | Annoying Space after Sub-label

Post by hoytesara »

I'm using bpchem to label my compounds with sub-labels, and end up with a space after the label that I can't get rid of.
Attachments
number pic.png
number pic.png (15.77 KiB) Viewed 3440 times
Last edited by Stefan Kottwitz on Sun Feb 19, 2012 11:53 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10359
Joined: Mon Mar 10, 2008 9:44 pm

bpchem | Annoying Space after Sub-label

Post by Stefan Kottwitz »

Hi hoytesara,

welcome to the board!

I converted your TIFF image to PNG, this format is better viewable here.

Though we are now able to see the output, it would be good if you would post your code here, so we could examine it and fix the problem. The best would be a Infominimal working example.

Stefan
LaTeX.org admin
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

bpchem | Annoying Space after Sub-label

Post by cgnieder »

That's probably due to a missing % in bpchem's definition of \CNrefsub (lines 168 to 172 of bpchem.sty):

Code: Select all

%% reference a CNlabel/sublabel
\DeclareRobustCommand*{\CNrefsub}[2]{%
\ref{cn:#1#2}
%%\textbf{\csname cna@#1#2\endcsname}%
}
You could redefine it:

Code: Select all

\DeclareRobustCommand*{\CNrefsub}[2]{\ref{cn:#1#2}}
You could also have a look at chemnum.

Regards
site moderator & package author
hoytesara
Posts: 13
Joined: Sat Feb 18, 2012 10:46 am

bpchem | Annoying Space after Sub-label

Post by hoytesara »

Ok, here's my code.

Code: Select all

\documentclass{article}
\usepackage{bpchem}

\begin{document}

Compound (\CNlabelsub{PtBCPPP}{a}),  (\CNlabelsub{PtBCPPP}{b}), \CNlabelsub{PtBCPPP}{c}, and \CNlabelsub{PtBCPPP}{d}.

\end{document}
Thanks!


Sarah
Post Reply