fsmMLK/inkscapeCircuitSymbols

Issue with siunitx (old version?)

deganii opened this issue · 2 comments

Thanks for the great work! I tried to run the extension as-is but got exceptions about:

  1. There being no "per" parameter in the siunitx package
  2. There being no "\newunit" command

In order to make the extension work in Inkscape 1.1 (I am using MikTex 21.6-x64 on Windows 7) I had to update the circuitSymbolsPreamble.tex as follows: remove the [per=slash] on line 2, and replace \newunit with \DeclareSIUnit

The updated working file is shown below. I'm not sure whether this is an issue with the siunitx 3.x version or whether there is some other breaking change that is causing this.

\usepackage{amsmath,amsthm,amsbsy,amsfonts,amssymb}
\usepackage{siunitx}
\usepackage{steinmetz}
\usepackage[utf8]{inputenc}
%\usepackage[T1]{fontenc}

\newcommand{\micro}{\ensuremath{\mu}}
\newcommand{\phasorName}[1]{ \ensuremath{ \boldsymbol{\hat #1} } }
\newcommand{\impedance}[1]{ \ensuremath{ \boldsymbol{#1} } }
\newcommand{\complexPol}[2]{\ensuremath{#1\phase{#2}}}
\newcommand{\complexPolDeg}[2]{\ensuremath{#1\phase{#2\degree}}}

% new units
\DeclareSIUnit{\Vef}{\volt_{ef}} % volt eficaz
\DeclareSIUnit{\Vrms}{\volt_{rms}} % volt RMS
\DeclareSIUnit{\Vpp}{\volt_{pp}} % volt peak-to-peak

\DeclareSIUnit{\Aef}{\ampere_{ef}} % ampere eficaz
\DeclareSIUnit{\Arms}{\ampere_{rms}} % ampere rms
\DeclareSIUnit{\App}{\ampere_{pp}} % ampere peak-to-peak

% logic Commands
\newcommand{\NOT}[1]{\ensuremath{\overline{\mbox{\ensuremath{#1}}}}}
\newcommand{\AND}{\ensuremath{\cdot}}
\newcommand{\OR}{\ensuremath{+}}
\newcommand{\XOR}{\ensuremath{\oplus}}
\newcommand{\XNOR}{\ensuremath{\odot}}

Also other extensions based on basicLatexPackages.tex may run into some trouble.
Thanks to @fsmMLK support (fsmMLK/inkscapeMadeEasy#14 (comment)) I solved modifying the second row of basicLatexPackages.tex inside inkcapeMadeEasy:
from
\usepackage[per=slash]{siunitx}
to
\usepackage{siunitx}

updated the repository to fix this issue.