From ee70b7a2646b215dc38b46510e3edac921785f03 Mon Sep 17 00:00:00 2001 From: eqkter Date: Thu, 8 Dec 2022 23:20:01 +0100 Subject: initial commit --- .gitignore | 302 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ physics-ng.pdf | Bin 0 -> 95229 bytes physics-ng.sty | 147 ++++++++++++++++++++++++++++ physics-ng.tex | 51 ++++++++++ 4 files changed, 500 insertions(+) create mode 100644 .gitignore create mode 100644 physics-ng.pdf create mode 100644 physics-ng.sty create mode 100644 physics-ng.tex diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..502fc3c --- /dev/null +++ b/.gitignore @@ -0,0 +1,302 @@ +### LaTeX ### +## Core latex/pdflatex auxiliary files: +*.aux +*.lof +*.log +*.lot +*.fls +*.out +*.toc +*.fmt +*.fot +*.cb +*.cb2 +.*.lb + +## Intermediate documents: +*.dvi +*.xdv +*-converted-to.* + +## Bibliography auxiliary files (bibtex/biblatex/biber): +*.bbl +*.bcf +*.blg +*-blx.aux +*-blx.bib +*.run.xml + +## Build tool auxiliary files: +*.fdb_latexmk +*.synctex +*.synctex(busy) +*.synctex.gz +*.synctex.gz(busy) +*.pdfsync + +## Build tool directories for auxiliary files +# latexrun +latex.out/ + +## Auxiliary and intermediate files from other packages: +# algorithms +*.alg +*.loa + +# achemso +acs-*.bib + +# amsthm +*.thm + +# beamer +*.nav +*.pre +*.snm +*.vrb + +# changes +*.soc + +# comment +*.cut + +# cprotect +*.cpt + +# elsarticle (documentclass of Elsevier journals) +*.spl + +# endnotes +*.ent + +# fixme +*.lox + +# feynmf/feynmp +*.mf +*.mp +*.t[1-9] +*.t[1-9][0-9] +*.tfm + +#(r)(e)ledmac/(r)(e)ledpar +*.end +*.?end +*.[1-9] +*.[1-9][0-9] +*.[1-9][0-9][0-9] +*.[1-9]R +*.[1-9][0-9]R +*.[1-9][0-9][0-9]R +*.eledsec[1-9] +*.eledsec[1-9]R +*.eledsec[1-9][0-9] +*.eledsec[1-9][0-9]R +*.eledsec[1-9][0-9][0-9] +*.eledsec[1-9][0-9][0-9]R + +# glossaries +*.acn +*.acr +*.glg +*.glo +*.gls +*.glsdefs +*.lzo +*.lzs +*.slg +*.slo +*.sls + +# uncomment this for glossaries-extra (will ignore makeindex's style files!) +# *.ist + +# gnuplot +*.gnuplot +*.table + +# gnuplottex +*-gnuplottex-* + +# gregoriotex +*.gaux +*.glog +*.gtex + +# htlatex +*.4ct +*.4tc +*.idv +*.lg +*.trc +*.xref + +# hyperref +*.brf + +# knitr +*-concordance.tex +# TODO Uncomment the next line if you use knitr and want to ignore its generated tikz files +# *.tikz +*-tikzDictionary + +# listings +*.lol + +# luatexja-ruby +*.ltjruby + +# makeidx +*.idx +*.ilg +*.ind + +# minitoc +*.maf +*.mlf +*.mlt +*.mtc[0-9]* +*.slf[0-9]* +*.slt[0-9]* +*.stc[0-9]* + +# minted +_minted* +*.pyg + +# morewrites +*.mw + +# newpax +*.newpax + +# nomencl +*.nlg +*.nlo +*.nls + +# pax +*.pax + +# pdfpcnotes +*.pdfpc + +# sagetex +*.sagetex.sage +*.sagetex.py +*.sagetex.scmd + +# scrwfile +*.wrt + +# svg +svg-inkscape/ + +# sympy +*.sout +*.sympy +sympy-plots-for-*.tex/ + +# pdfcomment +*.upa +*.upb + +# pythontex +*.pytxcode +pythontex-files-*/ + +# tcolorbox +*.listing + +# thmtools +*.loe + +# TikZ & PGF +*.dpth +*.md5 +*.auxlock + +# titletoc +*.ptc + +# todonotes +*.tdo + +# vhistory +*.hst +*.ver + +# easy-todo +*.lod + +# xcolor +*.xcp + +# xmpincl +*.xmpi + +# xindy +*.xdy + +# xypic precompiled matrices and outlines +*.xyc +*.xyd + +# endfloat +*.ttt +*.fff + +# Latexian +TSWLatexianTemp* + +## Editors: +# WinEdt +*.bak +*.sav + +# Texpad +.texpadtmp + +# LyX +*.lyx~ + +# Kile +*.backup + +# gummi +.*.swp + +# KBibTeX +*~[0-9]* + +# TeXnicCenter +*.tps + +# auto folder when using emacs and auctex +./auto/* +*.el + +# expex forward references with \gathertags +*-tags.tex + +# standalone packages +*.sta + +# Makeindex log files +*.lpz + +# xwatermark package +*.xwm + +# REVTeX puts footnotes in the bibliography by default, unless the nofootinbib +# option is specified. Footnotes are the stored in a file with suffix Notes.bib. +# Uncomment the next line to have this generated file ignored. +#*Notes.bib + +### LaTeX Patch ### +# LIPIcs / OASIcs +*.vtc + +# glossaries +*.glstex diff --git a/physics-ng.pdf b/physics-ng.pdf new file mode 100644 index 0000000..30a2223 Binary files /dev/null and b/physics-ng.pdf differ diff --git a/physics-ng.sty b/physics-ng.sty new file mode 100644 index 0000000..763a687 --- /dev/null +++ b/physics-ng.sty @@ -0,0 +1,147 @@ +\ProvidesPackage{physics-ng} +% physics-ng 1.0 +% This material is subject to the LaTeX Project Public License. +% See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for the details of that license. +% +% Personal substitute to the obselete physics package, might not be adapted to every one +% The derivative part and the Dirac brakets are respectively taken of by the +% diffcoeff and braket packages. +% It depends on asm ecosystem, siunitx, and esvect (for black board vector notation) +% design for Fourier mathtype-font with sloped setting +% +% Created by Alexis Draussin +% Updated on December 8, 2022 +% Uploaded on December 20, 2022 + +\RequirePackage{amsmath} +\RequirePackage{fourier} +\RequirePackage{bm} +\RequirePackage{siunitx} +\RequirePackage{esvect} + +\DeclareOption{bb}{\let\arrowopt = 1} +\DeclareOption{nobb}{\let\arrowopt = 0} % default +\ExecuteOptions{nobb} +\ProcessOptions\relax + +% incertitude command, using siunitx +\newcommand{\incert}[3]{\left(\num{#1}\pm\num{#2}\right)~\si{#3}} + +% transforms: Laplace, Fourier and Z +\DeclareMathAlphabet{\pazocal}{OMS}{zplm}{m}{n} % fourier overwrite the mathcal alpabet +\newcommand{\LT}[1]{\ensuremath{\pazocal{L}\left\lbrace#1\right\rbrace}} +\newcommand{\FT}[1]{\ensuremath{\pazocal{F}\left\lbrace#1\right\rbrace}} +\newcommand{\ZT}[1]{\ensuremath{\pazocal{Z}\left\lbrace#1\right\rbrace}} + +% math constants +\newcommand{\e}{\ensuremath{\mathrm{e}}} +\newcommand{\im}{\ensuremath{\mathrm{i}}} +\newcommand{\jm}{\ensuremath{\mathrm{j}}} + +% derivative +\DeclareDocumentCommand\dd{ o g d() }{ % Differential 'd' + % o: optional n for nth differential + % g: optional argument for readability and to control spacing + % d: long-form as in d(cos x) + \IfNoValueTF{#2}{ + \IfNoValueTF{#3} + {\mathrm{d}\IfNoValueTF{#1}{}{^{#1}}} + {\mathinner{\mathrm{d}\IfNoValueTF{#1}{}{^{#1}}\argopen(#3\argclose)}} + } + {\mathinner{\mathrm{d}\IfNoValueTF{#1}{}{^{#1}}#2} \IfNoValueTF{#3}{}{(#3)}} + } + +% vectors, bb arrows with \vv or \vv* (for indexes) +\ifx\arrowopt 1 % just use esvect at this point + \newcommand{\vect}[1]{\ensuremath{\vv{#1}}} % italic arrowed + \newcommand{\mat}[1]{\ensuremath{{\mathrm{#1}}} % roman + \newcommand{\tensor}[1]{\ensuremath{\vv{\vv{\mathsf{#1}}}}} % arrow and sans-serif +\else + \newcommand{\vect}[1]{\ensuremath{\bm{#1}}} % bold and italic + \newcommand{\mat}[1]{\ensuremath{\bm{\mathbf{#1}}}} % bold and roman + \newcommand{\tensor}[1]{\ensuremath{\bm{\mathsf{#1}}}} % bold and sans-serif +\fi +\newcommand{\vecu}[1]{\ensuremath{\hat{\vect{#1}}}} % vector unit +\newcommand{\vecui}[1]{\ensuremath{\hat{\vect{e}}_{\bm{#1}}}} % vector unit wth index + +\newcommand{\abs}[1]{\ensuremath{\left|#1\right|}} +\newcommand{\norm}[1]{\ensuremath{\left\|#1\right\|}} + +% Note on vectors: +% - vec v = (v_i) = (v)_i +% - product by scalar, no dot xv = x(v)_i +% - |v| or bb with ||v|| +% - hat e_a = a / |a| +% - scalar product, dot a . b = sum_i a_ib_i +% - vector product, cross a x b = sum_j sum_k LeviCivita_ijk a_j b_k +% - nabla roman, arrow in bb +% - grad, rot and div with nable notation, letter in bb +% - laplacian := nabla^2 only +% - D'Alembertian := square only + +% Note on matrices: +% - mat A = (a_ij) = (A)_ij +% - scalar product, no dot xA = x(A)_ij +% - matrix product, no dot AB = sum_j (A)ij(B)jk +% - unit matrix I = (I)_ij = Krodelta_ij +% - det A, rank A, tr A, ||A|| + +% Note on tensors: +% - dyatic product, between 2 vectors: a otimes b = (ab)_ij = a_ib_j +% - tensor product, between 2 tensors: T otimes S = T_ij S_kl +% - inner product, between 2 tensors: T . S = sum_j T_ij S_jk +% - inner product with a vector: T . a = sum_j T_ij a_j +% - scalar product, column: T:S = sum_i sum_j T_ij S_ji + +% bunch functions not base-declared +\DeclareMathOperator{\tr}{tr} +\DeclareMathOperator{\rank}{rank} +\DeclareMathOperator{\sinc}{sinc} +\DeclareMathOperator{\Ei}{Ei} +\DeclareMathOperator{\Li}{Li} +\DeclareMathOperator{\Si}{Si} +\DeclareMathOperator{\erf}{erf} +\DeclareMathOperator{\erfc}{erfc} +\DeclareMathOperator{\arccot}{arccot} +\DeclareMathOperator{\arcsec}{arcsec} +\DeclareMathOperator{\arccsc}{arccsc} +\DeclareMathOperator{\sech}{sech} +\DeclareMathOperator{\csch}{csch} +\DeclareMathOperator{\arsinh}{arsinh} +\DeclareMathOperator{\arcosh}{arcosh} +\DeclareMathOperator{\artanh}{artanh} +\DeclareMathOperator{\arcoth}{arcoth} +\DeclareMathOperator{\arsech}{arsech} +\DeclareMathOperator{\arcsch}{arcsch} + +\DeclareDocumentCommand\nqty{}{{\ifnum\z@=`}\fi\@nqty} +\DeclareDocumentCommand\@nqty{ t\big t\Big t\bigg t\Bigg g o d() d|| } +{ % Flexible automatic bracketing of an expression in () or [] or {} or || + % Handles manual override of sizing + \IfBooleanTF{#1}{\let\ltag\bigl \let\rtag\bigr}{ + \IfBooleanTF{#2}{\let\ltag\Bigl \let\rtag\Bigr}{ + \IfBooleanTF{#3}{\let\ltag\biggl \let\rtag\biggr}{ + \IfBooleanTF{#4} + {\let\ltag\Biggl \let\rtag\Biggr} + {\let\ltag\left \let\rtag\right} + } + } + } + % Handles actual bracketing + \IfNoValueTF{#5}{ + \IfNoValueTF{#6}{ + \IfNoValueTF{#7}{ + \IfNoValueTF{#8} + {()} + {\ltag\lvert{#8}\rtag\rvert} + } + {\ltag(#7\rtag) \IfNoValueTF{#8}{}{|#8|}} + } + {\ltag[#6\rtag] \IfNoValueTF{#7}{}{(#7)} \IfNoValueTF{#8}{}{|#8|}} + } + {\ltag\lbrace#5\rtag\rbrace \IfNoValueTF{#6}{}{[#6]} \IfNoValueTF{#7}{}{(#7)} \IfNoValueTF{#8}{}{|#8|}} + \ifnum\z@=`{\fi} +} + +\newcommand{\comm}[2]{\ensuremath{\nqty[#1,#2]}} +\newcommand{\acomm}[2]{\ensuremath{\nqty{#1,#2}}} diff --git a/physics-ng.tex b/physics-ng.tex new file mode 100644 index 0000000..7d6d5dd --- /dev/null +++ b/physics-ng.tex @@ -0,0 +1,51 @@ +\documentclass[12pt]{article} + +% Polices +\usepackage[utf8]{inputenc} +\usepackage{lmodern} +\usepackage{ae,aecompl} +\usepackage{fourier,bm} +\usepackage[T1]{fontenc} +\usepackage[french]{babel} + +\usepackage{xcolor} + +% Maths / Physique +\usepackage{amsfonts,amsmath,amssymb,amsthm,amscd} +\usepackage[ISO]{diffcoeff} +\usepackage{braket} +\usepackage{nicefrac} % \nicefrac{a}{b} --> "a/b" but nicer +\usepackage[e]{esvect} % \vv{arg} ou \vv*{arg}{indice} +\usepackage{siunitx} +\sisetup{locale=US,inter-unit-product=\ensuremath{{}ยท{}}} +\usepackage{physics-ng} + +\begin{document} +\texteuro, \eurologo, \aldineright, \decoone, \decotwo +\[ + \dd t \qquad \oiint_\Sigma \vect{B}\cdot\dd\vect{l} = \mu_0 \sum \alpha_i I_i +\] +$$ \e $$ + +\[ + \diff{f(t)}{t} +\] +\[ + a b c \delta \xi \gamma A B C \Delta \Xi \Gamma \textup{A} +\] +\[ + \dot{\vect{x}} = \diff{\vect{x}}{t} +\] +\[ + \dot{\vect{\varphi}} = \diff{\vect{\varphi}}{t} +\] +\[ + \dot{\vect{x}} = \mat{A}\vect{x} = \mathrm{A}\vv{x} +\] +\[ + \vecu{p} = -\frac{\hbar^2}{2m} \vecu{e}_r \qquad \vecui{a} = \frac{\vect{a}}{|\vect{a}|} +\] +\[ + \tensor{T} = (T_{ij}) +\] +\end{document} -- cgit v1.2.3