10

I want to load both the ascii package and the siunitx package. The problem is that both define a symbol \SI. Is there any way to make both packages work together?

11

You can "store" the functionality of asciis \SI macro in another (hitherto unused) macro (say, \aSI), then \let\SI\relax and then load the siunitx package. (Make sure before that no other package expects \SI to be asciis variant.)

\documentclass{article}

\usepackage{ascii}

\let\aSI\SI

\let\SI\relax

\usepackage{siunitx}

\begin{document}

Some text.

\end{document}
8

I just figured out that one could also use the savesym package.

\documentclass{article}

\usepackage{savesym}
\usepackage{siunitx}
\savesymbol{SI}
\usepackage{ascii}
\restoresymbol{a}{SI}


\begin{document}
\asciifamily

Some Text and \aSI. Some units \SI{2}{\m\per\second}.

\end{document}

output

See also http://www.tex.ac.uk/cgi-bin/texfaq2html?label=alreadydef for a reference.

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.