Closed Tougherdread2 closed 1 year ago
Il est ici: https://github.com/Gp2mv3/Syntheses/blob/a2a728d401b9325cd11d88b3acc21946ba6e0ad6/src/eplunits.sty
If it doesnt work, maybe try copy-pasting this file in the folder src/q8/sigproc-ELEC2900/exam/2022/Juin/All
with the .tex
file and remove the ../../
... but it's weird it's not finding it. Maybe Windows expects \
instead of /
...
Can you check and confirm it compiles ?
Actually it finds the file in the correct location and compiles it. When I build it using TeXnicCenter, it says "Unknown option 'binary-units=true' for package 'siunitx'" and "Undifined control sequence \$ \SI{5}{\mega\text{ samples}\per\second}\$" and on the build pdf the units just don't appear as shown on the following picture (it should show 5 M samples/s and not 5 samples).
Whereas, when I compile it on overleaf (with every packages imported in the project) everything appears correctly as shown on the following image.
I'm tempted to say that the issue comes from my TeXnicCentre application and therefore the compilation could be done correctly on the drive.
Let me know if something is not clear.
It seems the binary-units
options has been removed in v3.0.0 of siunitx
: https://github.com/josephwright/siunitx/blob/main/CHANGELOG.md
It think it is now enabled by default, it provides \bit
and \byte
, can you confirm that https://github.com/Gp2mv3/Syntheses/blob/a2a728d401b9325cd11d88b3acc21946ba6e0ad6/src/q4/os-SINF1252/summary/os-SINF1252-summary.tex#L606 is still compiling if you remove this option ?
Yes that was an issue. But another thing I have noticed is that it systematically enters in the following if and therefore never defines the \si[2]{\numprint[#2]{#1}
:
\ifthenelse{\isundefined{\SIunitschosen}}{
\RequirePackage[binary-units=true]{siunitx}
}
{
\RequirePackage{ifthen}
\RequirePackage[squaren, Gray]{SIunits}
\RequirePackage{sistyle}
\RequirePackage[autolanguage]{numprint}
\newcommand\si[2]{\numprint[#2]{#1}}
\newcommand\np[1]{\numprint{#1}}
}
The only way to compile it correctly by my side was to remove the entire \ifthenelse
condition and save the eplunits package as follows :
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{eplunits}[2014/01/14 EPL units package]
\DeclareOption{SIunits}{\newcommand{\SIunitschosen}{}}
\ProcessOptions\relax
\typeout{I see you will format your unit correctly, excellent !}
\typeout{Don't forget to criticize people that don't.}
\RequirePackage{ifthen}
\RequirePackage[squaren, Gray]{SIunits}
\RequirePackage{sistyle}
\RequirePackage[autolanguage]{numprint}
\newcommand\si[2]{\numprint[#2]{#1}}
\newcommand\np[1]{\numprint{#1}}
\endinput
If you want SIunits you need to do \usepackage[SIunits]{../../../eplunits}
however, that's kind of legacy, you should use siunitx
now with \num
instead of numprint
.
Indeed this is why it never entered the else
condition. I have committed the updated source code and it is now compiling without any error. Thank you for you help !
Thanks for the contribution ;)
Ajout de l'examen de "LELEC2900 - Signal processing" de Juin 2022. L'utilisation du package "eplunit" ne permet pas d'afficher les unités en local. Je n'ai donc pas su vérifier que l'utilisation de la commande \SI{\second} (par exemple) fonctionnait correctement.