Math & Sciencesiunitx | Space after Number

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

siunitx | Space after Number

Post by ghostanime2001 »

How do I set default to adding a space after the number and just before the unit? For example I want this:

Code: Select all

\SI[group-digits = false]{0.09975}{\mol\per\L}
to have the same space after the number and before the unit as typing

Code: Select all

\text{0.09975 mol/L}
Last edited by ghostanime2001 on Sat Oct 15, 2011 10:38 pm, edited 1 time in total.

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

siunitx | Space after Number

Post by josephwright »

Simply

Code: Select all

\sistup{number-unit-product = \text{ }}
should work with the current release (v2.3 series).
Joseph Wright
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Re: siunitx | Space after Number

Post by ghostanime2001 »

How can I have a tighter space around the multiplication dot?
josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

siunitx | Space after Number

Post by josephwright »

I assume you want something like

Code: Select all

\sisetup{tight-spacing}
Joseph Wright
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Re: siunitx | Space after Number

Post by ghostanime2001 »

Doesn't produce any effect..
josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Re: siunitx | Space after Number

Post by josephwright »

Please post an example of what you are doing.
Joseph Wright
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

siunitx | Space after Number

Post by ghostanime2001 »

Code: Select all

\documentclass[fleqn]{article}
\usepackage{fullpage}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amstext}
\usepackage{wasysym}
\usepackage{type1cm}
\usepackage{xfrac}
\usepackage{xspace}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{textcomp}
\usepackage{pifont}
\usepackage{ulem}
\usepackage{enumitem} 
\usepackage[makeroom]{cancel}
\usepackage{siunitx}
\usepackage{mathtools} 
\usepackage[version=3]{mhchem}
\usepackage{chemmacros}
\usepackage{fix-cm}
\setlength{\parindent}{0in}
\setlength{\mathindent}{0pt}
\allowdisplaybreaks
\pagestyle{empty}
\sisetup{inter-unit-product={}\cdot{},number-unit-product=\text{ },tight-spacing=true}
\begin{document}
\SI[group-digits = false]{0.5}{\mol\per\L}
\end{document}
josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

siunitx | Space after Number

Post by josephwright »

The "tight-spacing" option will only work with the 'normal' \times set up. If you are using a centred dot, you need to alter the set up you use to

Code: Select all

\sisetup{inter-unit-product = \cdot}
Joseph Wright
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Re: siunitx | Space after Number

Post by ghostanime2001 »

perfect thank you sir
Post Reply