Text FormattingTypesetting Units

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Typesetting Units

Post by svend_tveskaeg »

Hi all.

Consider the following MWE:

Code: Select all

\documentclass{article}
\usepackage{siunitx}

\begin{document}
Three kilograms can be typeset as either `\SI{3}{\kg}' or `\SI{3}{kg}'?
\end{document}
What is the difference between \kg and kg?

Thank you in advance!
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)

Recommended reading 2024:

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

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Typesetting Units

Post by localghost »

The command \kg is an abbreviation for \kilo\gram and would obey any format settings by the \sisetup command. Just a simple kg is plain text and would not do that. So the former one is preferable. For details see the package manual.


Thorsten
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Re: Typesetting Units

Post by svend_tveskaeg »

Okay; then I understood it correct.

Thank you, Thorsten.
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
Post Reply