\documentclass{l3doc}
	\usepackage[T1]{fontenc}
	\usepackage{pdfpages}
	\usepackage{standalone}
	\usepackage{tensorstyles}
	% \usepackage{readprov}
	% 	\ReadPackageInfos{tensorstyles}
	\edef\tensorstylesVersion{v1.0.1.4} %{\fileversion}
	\edef\tensorstylesDate{2026-04-28} %{\filedate}

	\usepackage{parskip}
	\usepackage{setspace}
	\usepackage{xspace}
		\onehalfspacing

	\usepackage{xcolor}
		\definecolor{tPrim}{HTML}{00707F}   % Green-Blue
		\definecolor{tSec}{HTML}{5FA4B0}    % Green-Blue light
		\definecolor{tAccent}{HTML}{F07F3C} % Orange
		\definecolor{tGrey}{HTML}{E6E6E1}   % Grey-Beige

	% \usepackage{fancyvrb}
	\usepackage{listings}
		\lstset{
			language=[LaTeX]{TeX},
			basicstyle=\ttfamily,
			keywordstyle=\color{tPrim}\bfseries,
			commentstyle=\color{tSec},
			stringstyle=\color{tSec},
			backgroundcolor=\color{white},
			numbers=none,
			numberstyle=\tiny\ttfamily,
			stepnumber=2,
			showspaces=false,
			showstringspaces=false,
			showtabs=false,
			frame=none,
			framerule=1pt,
			tabsize=2,
			rulesep=5em,
			captionpos=b,
			breaklines=true,
			breakatwhitespace=false,
			framexleftmargin=0em,
			framexrightmargin=0em,
			xleftmargin=0em,
			xrightmargin=0em,
			aboveskip=1em,
			belowskip=1em,
			morekeywords={plain,tensorsset},
		}
		\lstMakeShortInline|

	\usepackage{hyperref}

		\setlength{\fboxsep}{0pt}%
	\usepackage{subcaption} % For subfigures
	\usepackage{cleveref} % for references

		\providecommand{\defopt}[1]{\underline{#1}}%{default: #1}%
		\NewDocumentEnvironment{DescribetensorstylesOption}{ o m m m }{
			% At beginning of the environment
			\DescribeOption{#2} % from l3doc
			\IfNoValueTF{#1}{
				% true => left empty intentionally
			}{
				%false
				\DescribeOption{
					% add extra info like added or updated dates to mimic 'function' env.
					\rule[2.5ex]{\linewidth}{0.3pt}
					\\[-3.5ex]
					{\scriptsize #1 \hfill\ }
				}
			}
			\begin{minipage}[t]{\textwidth}
				\textit{\textbf{\textcolor{tSec}{#3}}}\dotfill\,\defopt{#4}\par
				\begingroup
					\vspace{0.5em}
		}{
			% At environment's end
					\par
				\endgroup
			\end{minipage}
		}


%% =====================================================================
	\title{\textsc{tensorstyles}\\ A package to provide generic customizable displays of tensors (including vector, matrix, etc.) separating them from their forms.}
	\author{Romain NOEL \\ \url{romainoel@free.fr}}
	\date{\tensorstylesVersion~---~\tensorstylesDate}

	\providecommand{\pkgName}{\textbf{\textsc{tensorstyles}}\xspace}

%% =====================================================================


\begin{document}
\maketitle

\begin{abstract}
	They are different notation conventions for tensors.
	And according to the context (or the local rules) one would like to switch between conventions: keeping the meaning of each tensor, just changing the display.
	So, this package is here to print tensors according to their order yet independently from their meaning in a very customizable way.
\end{abstract}

\tableofcontents


%% ------------------------------------
\section{Introduction}
	\pkgName was created to solve a problem we regularly faced: switching from one tensor notation to another.
	Such an action should be trivial but mainstream tensors libraries do not separate content and form, and only offer one or two notations each.

	Therefore, if a user wants to switch from one convention to another (let's say when publish in several journals), they will need to manually change all the command related to tensor by hand without changing the content of their documents.

	This is why we propose \pkgName, a package that allows the representation of tensors in many notations, and to switch between them seamlessly.

%% ------------------------------------
\section{Getting started}
\subsection{Installing from CTAN}
	The latest stable version of \pkgName is available on
	\href{https://ctan.org/pkg/tensorstyles}{CTAN}
	and should now be part of the usual \TeX\ distributions (\TeX\ Live, Mac\TeX\ , Mik\TeX\ ), under the name
	\textit{\pkgName}.
	It means that if your distribution is kept up-to-date, the package should normally be already installed on your system.
	If this is not the case, consider updating the packages of your Tex distribution.

	For \TeX\ Live and Mac\TeX\ users, this usually means running
	\begin{lstlisting}
		tlmgr update --all
	\end{lstlisting}
	or if administrative privileges are required
	\begin{lstlisting}
		sudo tlmgr update --all
	\end{lstlisting}

	For Mik\TeX\ users, please refer to \href{https://miktex.org/howto/update-miktex}{the official Mik\TeX\ documentation}.


\subsection{Installing from Gitlab}
	If you want to use the cutting-edge development version of \pkgName, you can install it manually by following these steps:
	\begin{description}
		\item[Download the source] from
			\href{https://gitlab.com/RomainNOEL/tensorstyles}{\pkgName repository}
			using |git clone| or as a
			\href{https://gitlab.com/RomainNOEL/tensorstyles/-/archive/master/tensorstyles-master.zip}{zip archive}
			of the latest development version.
		\item[Compile the style files] by running |l3build unpack| inside the downloaded	directory.
			(Or run \LaTeX{} directly on |source/tensorstyles.ins|.)
		\item[Move the resulting |*.sty| files] to the folder containing your presentation.
			To use \pkgName with many presentations, run
			|l3build install| or move the |*.sty| files to a folder in your \TeX{} path instead.
		\item[Use the package] by declaring \lstinline|\usepackage{tensorstyles}| in the preamble of your document.
	\end{description}

	\pkgName uses the l3build system to offer the following installation options for advanced users:
	\begin{description}
		\item[|l3build unpack|] builds the theme style files.
		\item[|l3build doc|] builds this documentation manual and the examples.
		\item[|l3build check|] builds the theme and manual.
		\item[|l3build clean|] removes the files generated by |l3build|.
		\item[|l3build install|] installs the theme into your local texmf folder.
		\item[|l3build uninstall|] removes the theme from your local texmf folder.
	\end{description}


% \subsection{Overleaf}
% 	\pkgName is therefore automatically supported for new documents.
% 	If you want to switch older documents to use the \pkgName theme, you need to \href{https://www.overleaf.com/blog/new-feature-select-your-tex-live-compiler-version}{select
% 	TexLive 2021 or higher as your TeX Live version} (this may cause issues with other packages used in your presentation).

% 	In addition to that, a template project was created and is publicly available in the \href{https://www.overleaf.com/latex/templates/demopkg/wjyyzvdzqkgf}{Overleaf Gallery} to bootstrap your presentation.


%% ------------------------------------
\subsection{A minimal example}
	The following code shows a minimal example \pkgName usage
	% , and the output generated is given on \cref{fig-minimal}
	.

	\begin{lstlisting}
		\documentclass{article}
		\usepackage{tensorstyles}
		\begin{document}
			$\tensor[preset=einstein]{4}{A}$
		\end{document}
	\end{lstlisting}

	\begin{figure}[htp]
		\centering
		{$\tensor[preset=einstein]{4}{A}$}
		\caption{Result of a simple example.}
		\label{fig-minimal}
	\end{figure}


\subsection{Dependencies}
	\pkgName depends on the following standard packages:
	\begin{itemize}
		\item |expl3|
		\item |amsmath|
		\item |amssymb|
		\item |mathtools|
	\end{itemize}


\section{Creating and using commands}
\subsection{Creating a command}
	The \pkgName package does not only provide a macro to create tensors.
	The users can create their own.

	To do so the package provides a command that acts in a manner similar to a constructor in object-oriented programming; this command is \texttt{\textbackslash DeclaretensorstylesCmd}

	It takes two arguments, the first is the name of the macro to create, including the backslash, and the second, optional argument, is a list of options to customize the display.

	For example:
	\begin{lstlisting}
		\DeclareTensorsCmd{\myTensorCmd}[preset=einstein]
		\DeclareTensorsCmd{\myOtherTensorCmd}[preset=math, arrows=true]
		\DeclareTensorsCmd{\thatTensorCmd}[preset=einstein, default-indices=contra]
		\DeclareTensorsCmd{\anotherTensorCmd}[preset=full]
	\end{lstlisting}

	Afterward the newly created command can be used.


\subsection{Using a custom command}\label{sec:customCom}
	Once a command is created it can be used anywhere in the document afterward.
	All the commands take the same arguments.

	\begin{function}{\tensor[<option>]{<rank>}{<symbol>}[<indices>]_{sub}^{sup}}
		or |\myTensorCmd[<option>]{<rank>}{<symbol>}[<indices>]_{sub}^{sup}|
		\begin{arguments}
			\item |options|: an optional list of options to override for this call
			\item |rank|: the rank of the tensor
			\item |symbol|: the symbol that represents the tensor
			\item |indices|: an optional list of Einstein indices
			\item |sub| and |sup|: optional sub- and super-scripts to add after the tensor
		\end{arguments}
		The options argument accepts any and all of the options that can be defined during command creation.
		The options given will override the ones that were defined when the command was created, but only for this call.

		The rank can be a number or a letter.
		It is used for determining the font to use, which arrow type to add, and how many indices to write.
		For fonts and arrows, this is determined by a list, customizable via an option, that associates a given rank with a font and an arrow.
		For indices, unless they were manually given, the macro will add as many indices as the rank specified if it is a number, or if it is a letter the rank itself will be added instead.
		There is one exception to this: x and X.
		When used, the macro will calculate the rank based on the number of indices given, potentially 0.

		The symbol can be anything, including another tensor; it is the object to which the notations will be added.

		Indices are given with a specific syntax:
		\begin{itemize}
			\item First, write either \^{} for contravariant indices or \_ for covariant indices.
			\item Then any character that follows will be added as an index; for instance \^{}abc adds three contravariant indices a, b, and c.
			\item Any subsequent \^{} and \_ is used to switch between covariant and contravariant indices.
			\item If a group, \{...\}, is given it is treated as one index and it is expanded, allowing indices to be given with sub- and superscripts, or even passing a tensor as an index.
		\end{itemize}

		Every created command also has a star variant.
		This variant has another, fully customizable, set of options.
		This allows one to rapidly switch between two conventions.
	\end{function}


%% ------------------------------------
\section{Options}
	All the options have a star version used for the star variant of the command.
	They take the same arguments and have the same effects.
	Their name is the name of the regular options with a star added at the end.
	For example, \texttt{preset} and \texttt{preset*}.

	The default values of each option depend on the preset.


\subsection{Local vs. global options}
	The options given directly to the command (as described in the section \ref{sec:customCom}) are applied locally.
	So they will only affect the display of this particular command, not the following ones.

	For global setting that will last until the next modification, one can use
	\begin{function}{\tensorsseet{<command>}[<global options>]}
		\begin{arguments}
			\item |command| for which the options have to be set.
			\item |global options| that will be set.
		\end{arguments}
		This setting can be called at any moment within the document.
	\end{function}


\subsection{General options}
	\DescribeOption{preset}
	\begin{DescribetensorstylesOption}{}
	{empty, full, math, arrow, einstein, engineer, bra, ket}{full}
			Which preset to use.

			|\tensor[preset=empty]{2}{x}| gives $\tensor[preset=empty]{2}{x}$
			\\
			|\tensor[preset=full]{2}{x}| gives $\tensor[preset=full]{2}{x}$
			\\
			|\tensor[preset=math]{2}{x}| gives $\tensor[preset=math]{2}{x}$
			\\
			|\tensor[preset=arrow]{2}{x}| gives $\tensor[preset=arrow]{2}{x}$
			\\
			|\tensor[preset=einstein]{2}{x}| gives $\tensor[preset=einstein]{2}{x}$
			\\
			|\tensor[preset=engineer]{2}{x}| gives $\tensor[preset=engineer]{2}{x}$
			\\
			|\tensor[preset=bra]{2}{x}| gives $\tensor[preset=bra]{2}{x}$
			\\
			|\tensor[preset=ket]{2}{x}| gives $\tensor[preset=ket]{2}{x}$
		\vspace{2em}
	\end{DescribetensorstylesOption}

	\DescribeOption{switch-*}
	\begin{DescribetensorstylesOption}{}
	{true, false}{false}
		Option to invert the star switch and regular version.
		|\tensor*{2}{x}| is equivalent to |\tensor[switch-*=true]{2}{x}|.

		Every option has a star equivalent that controls the display of the star-versioned command.
		Therefore, one can use a combination of |preset| and |preset*| to switch easily between two displays.

		For example, with the global setup:	|\tensorsset{\tensor}[preset=math, preset*=einstein]|,
		the commands |$\tensor{2}{x}$|, |$\tensor[switch-*=true]{2}{x}$| and |$\tensor*{2}{x}$|
		yields : \tensorsset{\tensor}[preset=math, preset*=einstein] $\tensor{2}{x}$, $\tensor[switch-*=true]{2}{x}$ and $\tensor*{2}{x}$

		\vspace{2em}
	\end{DescribetensorstylesOption}

	% \DescribeOption{style-var}
	% \begin{DescribetensorstylesOption}{}
	% {math, einstein, ...}{}
	% 	This option is informative; it describes the convention being used.
	% 	\vspace{2em}
	% \end{DescribetensorstylesOption}


\subsection{Font options}
	\DescribeOption{font}
	\begin{DescribetensorstylesOption}{}
	{true, false}{true}
		Whether a special font should be applied to tensors.
		\vspace{2em}
	\end{DescribetensorstylesOption}

	\DescribeOption{font-cmd}
	\begin{DescribetensorstylesOption}{}
	{\{0=\textbackslash font, 1=\textbackslash font, ...\}}{}
		A list containing pairs \texttt{rank=font}.
		It contains the fonts that will be used for a tensor of a given rank.
		If the user tries to create a tensor with a rank not defined here and font is activated, the package will throw an error.

		For example,
		|font-cmd = {0={}, 1=\boldsymbol, 2=\MakeUppercase,| |3=\MakeUpperCal, 4=\MakeUpperBB, 5=\MakeBoldUppercase, n=\mathfrak}| is used for |preset=math|
		\vspace{2em}
	\end{DescribetensorstylesOption}


\subsection{Arrows options}
	\DescribeOption{arrows}
	\begin{DescribetensorstylesOption}{}
	{true, false}{true}
		Whether arrows should be added to tensors.
		\vspace{2em}
	\end{DescribetensorstylesOption}

	\DescribeOption{arrow-cmd}
	\begin{DescribetensorstylesOption}{}
	{\{0=\textbackslash macro, 1=\textbackslash macro, ...\}}{}
		A list containing pairs \texttt{rank=macro}.
		It contains the macro that will be used to add arrows for a tensor of a given rank.
		If the user tries to create a tensor with a rank not defined here and arrows are activated, the package will throw an error.

		For example, |arrow-cmd = {0={}, 1=\overrightarrow, 2=\overleftrightarrow,| |3=\overrightleftrightarrow, 4=\overdoubleleftrightarrow,| |5=\overrightdoubleleftrightarrow, n=\underleftrightarrow}| is used for |preset=arrow|
		\vspace{2em}
	\end{DescribetensorstylesOption}

	\DescribeOption{recursive-arrows}
  	\begin{DescribetensorstylesOption}{}
	{true, false}{false}
		Whether to add as many arrows as the rank.
		\vspace{2em}
	\end{DescribetensorstylesOption}

	\DescribeOption{recursive-arrows-cmd}
	\begin{DescribetensorstylesOption}{}
	{\textbackslash macro}{}
		The macro that will be used to add arrows recursively, for example |recursive-arrows-cmd=\underline| is use for |preset=engineer|.
		\vspace{2em}
	\end{DescribetensorstylesOption}


\subsection{Einstein options}
	\DescribeOption{contra-variant}
	\begin{DescribetensorstylesOption}{}
	{true, false}{true}
		Whether indices should be added to tensors.
		\vspace{2em}
	\end{DescribetensorstylesOption}

	\DescribeOption{default-indices}
	\begin{DescribetensorstylesOption}{}
	{contra, covariant}{covariant}
		Whether indices added automatically should be covariant or contravariant.

		For example: |\tensor[default-indices=contra]{2}{x}| gives
		$\tensor[default-indices=contra]{2}{x}$
		\vspace{2em}
	\end{DescribetensorstylesOption}

	\DescribeOption{contra-style}
	\begin{DescribetensorstylesOption}{}
	{greek, alph, arabic}{alph}
		The alphabet to use when adding contravariant indices automatically.
		Either Greek or Latin alphabets, or numbers.

		For example: |\tensor[contra-style=arabic,default-indices=contra]{2}{x}| gives
		$\tensor[contra-style=arabic,default-indices=contra]{2}{x}$
		\vspace{2em}
	\end{DescribetensorstylesOption}

	\DescribeOption{covariant-style}
	\begin{DescribetensorstylesOption}{}
	{greek, alph, arabic}{greek}
		The alphabet to use when adding covariant indices automatically. Either Greek or Latin alphabets, or numbers.

		For example: |\tensor[covariant-style=arabic]{2}{x}| gives
		$\tensor[covariant-style=arabic]{2}{x}$
		\vspace{2em}
	\end{DescribetensorstylesOption}

	\DescribeOption{specific-indices}
	\begin{DescribetensorstylesOption}{}
	{1,2,3,...}{}
		When adding indices automatically, which ones should not be added as \texttt{default-indices}.
		For instance, if default-indices is contra, which indices to add as covariant indices.

		For example: |\tensor[specific-indices=2]{3}{x}| gives
		$\tensor[specific-indices=2]{3}{x}$
		\vspace{2em}
	\end{DescribetensorstylesOption}

	\DescribeOption{collapsed-indices}
	\begin{DescribetensorstylesOption}{}
 	{true, false}{false}
 		Whether indices are spaced horizontally, \emph{i.e.} there will not be a covariant index under a contravariant index and vice versa, or not.

		For example: |\tensor[specific-indices=2,collapsed-indices=true]{3}{x}| gives
		$\tensor[specific-indices=2,collapsed-indices=true]{3}{x}$
 		\vspace{2em}
 	\end{DescribetensorstylesOption}

	\DescribeOption{index-marker}
	\begin{DescribetensorstylesOption}{}
	{\textbackslash\textvisiblespace, ., ;, ...}{\textbackslash\textvisiblespace}
		If indices are not collapsed, what symbol to use to fill in the blanks.

		For example: |\tensor[specific-indices=2,index-marker=.]{3}{x}| gives
		$\tensor[specific-indices=2,index-marker=.]{3}{x}$
		\vspace{2em}
	\end{DescribetensorstylesOption}


\subsection{Dirac options}
	\DescribeOption{bra-ket}
	\begin{DescribetensorstylesOption}{}
	{true, false}{true}
		Whether delimiters should be added to tensors.
		\vspace{2em}
	\end{DescribetensorstylesOption}

	\DescribeOption{scale-var}
	\begin{DescribetensorstylesOption}{}
	{auto, none, big, bigg, Big, Bigg}{auto}
		How the delimiters should scale with the tensor.
		\vspace{2em}
	\end{DescribetensorstylesOption}

	\DescribeOption{delims-var}
	\begin{DescribetensorstylesOption}{}
	{\textbackslash rvert\textbackslash lbrace, \textbackslash rbrace\textbackslash lvert, ...}{ \textbackslash lbrace\textbackslash rvert}
		Which delimiters to add. If scale-var is auto, the delimiters must be usable with \textbackslash left and \textbackslash right, else any symbol can be used.
		\vspace{2em}
	\end{DescribetensorstylesOption}

	\DescribeOption{mix-delims}
	\begin{DescribetensorstylesOption}{}
	{true, false}{true}
		If two tensors are following each other, and the delimiters between them are identical, whether to display one or two.

		For example: |\tensor[preset=bra]{1}{x}\tensor[preset=ket]{1}{y}| gives
		$\tensor[preset=bra]{1}{x}\tensor[preset=ket]{1}{y}$ while |\tensor[preset=bra, mix-delims=false]{1}{x}\tensor[preset=ket]{1}{y}| gives
		$\tensor[preset=bra, mix-delims=false]{1}{x}\tensor[preset=ket]{1}{y}$
		\vspace{2em}
	\end{DescribetensorstylesOption}
	% \begin{DescribetensorstylesOption}{format}
	% {regular, x}{regular}
	% 	A short description of the option.
	% \end{DescribetensorstylesOption}


%% ------------------------------------
% \section{Tips \& Tricks}
%    Here you can add some tips about your package.
\section{Using the package}
	In this section, we will take the example of a user trying to write an article in which they will need several tensor notations.

	Let's say that the user wants to represent tensors using an Einstein convention.
	More specifically they want to represent purely covariant and purely contravariant tensors with this convention.

	There are two ways to do that with \pkgName.
	The first is to define two new commands to represent tensors, one for covariant tensors and one for contravariant tensors.
	\begin{lstlisting}
		\DeclareTensorsCmd{\covariantTensor}[preset=einstein]
		\DeclareTensorsCmd{\contravariantTensor}[preset=einstein, default-indices=contra]
	\end{lstlisting}
	The second is to take advantage of the star variant of the commands and to define only one that does both.
	\begin{lstlisting}
		\DeclareTensorsCmd{\myTensor}[preset=einstein, preset*=einstein, default-indices*=contra]
	\end{lstlisting}
	We will take the second approach for this example.

	\DeclareTensorsCmd{\myTensor}[preset=einstein, preset*=einstein, default-indices*=contra]

	Now whenever they want to represent a tensor in their article, all they have to do is call this new command:
	\begin{center}
		\texttt{\textbackslash myTensor\{4\}\{e\}} $\rightarrow \myTensor{4}{e}$
		\texttt{\textbackslash myTensor*\{4\}\{e\}} $\rightarrow \myTensor*{4}{e}$
	\end{center}

	Unfortunately, the user now needs to represent a tensor with both covariant and contravariant indices, something they did not anticipate.
	Fortunately \pkgName offers two ways to do just that.
	First, the user could use an option to specify which indices should be contravariant or covariant:
	\begin{center}
		\texttt{\textbackslash myTensor\{4\}\{e\}[specific-indices=\{1,4\}]} $\rightarrow \myTensor[specific-indices={1,4}]{4}{e}$
		Which is equivalent to
		\texttt{\textbackslash myTensor*\{4\}\{e\}[specific-indices*=\{2,3\}]} $\rightarrow \myTensor*[specific-indices*={2,3}]{4}{e}$
	\end{center}
	Or they can use an optional argument of the command to pass the indices directly.
	\begin{center}
		\texttt{\textbackslash myTensor\{4\}\{e\}[\^{}a\_bc\^{}d]} $\rightarrow \myTensor{4}{e}[^a_bc^d]$
		Which is equivalent to
		\texttt{\textbackslash myTensor*\{4\}\{e\}[\^{}a\_bc\^{}d]} $\rightarrow \myTensor*{4}{e}[^a_bc^d]$
	\end{center}
	This is more powerful since the user will have full control over the positions of the indices and their values.
	This is especially useful to pass indices with sub- or superscripts or even an entire command as an index.
	For example
	\begin{center}
		\texttt{\textbackslash myTensor\{4\}\{e\}[\^{}\{a\_i\}\_bc\^{}\{\textbackslash myTensor\{2\}\{a\}\}]} $\rightarrow \myTensor{4}{e}[^{a_i}_bc^{\myTensor{2}{a}}]$
	\end{center}

	Our user is now quite far into their document, but now they want to represent a tensor with another convention, let's say an engineer notation with recursive underlines.
	Perhaps they want to present their document to students, and to show them that other notations exist.

	They can do this in two ways. First they can define a new command
	\begin{lstlisting}
		\DeclareTensorsCmd{\tensorEngineer}[preset=engineer]
	\end{lstlisting}

	This works quite well and it preserves the separation of content and form.
	But it adds a new command that will only be used once, and so it is not really optimal in terms of memory or computation.

	Alternatively they can change the behavior of their already existing command locally:
	\begin{center}
		\texttt{\textbackslash myTensor\{4\}\{e\}[preset=engineer]} $\rightarrow \myTensor[preset=engineer]{4}{e}$
	\end{center}
	This avoids the declaration of a new command but it partially links content and form, so our user may have to be careful if they want to change the notation of their document.

	For the last part of their document our user wants to use another convention entirely.
	Moreover it is a complex one: they want to use delimiters, like a Dirac convention, and to change the font of the tensor depending on the rank.
	Since they want this behavior for the rest of their document, redefining the display at each call is out of the question.
	So they have two options:

	They can define a new command for this convention, or, the approach we will follow, they can use the \texttt{\textbackslash tensorsset} command to override the options globally after its call.
	\begin{lstlisting}
		\myTensor{2}{a}

		\tensorsset{\myTensor}[preset=math, bra-ket=true, delims-var = \lbrace\rvert]

		\myTensor{4}{e} and \myTensor{2}{a}
	\end{lstlisting}
	Gives us:

	$\myTensor{2}{a}$

	% \tensorsset{\myTensor}[scale-var=auto]
	\tensorsset{\myTensor}[preset=math, bra-ket=true, delims-var = {\lbrace\rvert}]

	$\myTensor{4}{e}$ and $\myTensor{2}{a}$

	Now, let us say that users want to switch the notation convention within the whole document.
	Thanks to \pkgName this is trivial, all they need to do is go back to the function declaration and change the options at the beginning of the document they gave:
	\begin{lstlisting}
		\DeclareTensorsCmd{\myTensor}[preset=arrow, preset*=math]
	\end{lstlisting}
	Plus they also used an engineer preset once, which will not be changed either, but since this call was to explicitly show this notation there is no need for a change.
	However, if many different presets have been used through the document, the previous approach remains tedious.
	Therefore, another approach can be to redefine presets themselves.


\section{Sources of inspiration}
	Many packages have been used as sources of inspiration to build \pkgName{}:
	\begin{itemize}
		\item \url{https://gitlab.com/RomainNOEL/latex3_template_pkg} for LateX3 template.
		\item \href{https://ctan.org/pkg/mattens}{mattens} package from Danie Els for complex vector notations.
		\item \href{https://ctan.org/pkg/hhtensor}{hhtensor} package from Harald Harders to print tensors with arrow, bold, or uline.
		\item \href{https://ctan.org/pkg/tensor}{tensor} package from Philip G. Ratcliffe for Einstein tensor notation.
		\item \href{https://ctan.org/pkg/tensind}{tensind} package from Javier Bezos for Einstein tensor notation.
		\item \href{https://ctan.org/pkg/overarrows}{overarrows} package from Julien Labbé to draw arrows that stretch.
		\item \href{https://ctan.org/pkg/braket}{braket} package from Donald Arseneau  for Dirac bra-ket notation.
		\item \href{https://ctan.org/pkg/physics}{physics} package from Sergio C. de la Barrera for vec, braket and too many things.
	\end{itemize}


%% ------------------------------------
\section{Known issues}
	Some limitations have been faced.
	\begin{itemize}
		\item when using |\dots| with |collapsed-indices|,
			this is due to the tentative of context determination employed by |\dots| which interferes with the \pkgName.
			A simple workaround is to use |\ldots| instead.
		\item if you are mixing delimiters using two
			variables of different sizes with automatic scale, \emph{e.g.}
			|\tensor[preset=bra, mix-delims=true, scale-var=auto]{n}{\frac| |{1}{A}}\tensor*[preset*=ket, mix-delims*=true, scale-var*=auto]{n}{B}|, then the delimiters will not have the same size.
			A simple solution is to set the desired scale for the \textquote{wrong} delimiter.
	\end{itemize}


% \subsection{Other issues}
% 	\begin{itemize}
% 		\item |enumitem| is not working.
% 	\end{itemize}


% \subsection*{Todo}
% 	List of thing that could be improved (any volunteer welcome):
% 	\begin{itemize}
% 		\item add more options.
% 	\end{itemize}

\subsection{Contributors}
	\begin{itemize}
		\item Maelwen THOMAS
		\item Laurent NAVARRO
	\end{itemize}


\section{License}
	\pkgName is licensed under the terms of the
	% \href{https://creativecommons.org/licenses/by-sa/4.0/}{Creative Commons	Attribution-ShareAlike 4.0}
	\href{https://www.latex-project.org/lppl/lppl-1-3c/}{LaTeX project public license (LPPL) 1.3c}
	license.


\end{document}
% EoF


% \begin{documentation}
% 	\begin{macro|function|variable}{\nameMacro}
%  	\begin{syntax}
% 			\cs{nameMacro}\oarg{option1=value1, ...}\marg{tempkg}
% 			\textrm{where the options are (default marked as} \defopt{default}\textrm{):}
% 			\meta{footer template} = \oarg{\defopt{tempkg} \textbar ... }
% 		\end{syntax}
% 		Description of |nameMacro| which xxx.
% 	\end{macro|function|variable}
% \end{documentation}
%%%%
% \begin{implementation}
% 	\begin{macro|function|variable}[added= 2025-02-12, updated= 2025-02-12]{\nameMacro}
% 		\begin{arguments}
% 			\item |width| Name of the option to add, this name should also correspond to the name of the environment followed by the suffix 'env'.
% 		\end{arguments}
% 		Description
% 		\changes{v1.0.1}{2025-02-12}{original version}
% 		\UnitTested % NOT FOR VARIABLES NOR FUNCTIONS
% 		\TestFiles{tempkg-test-xxx} % NOT FOR VARIABLES
%    \begin{macrocode}
%% MY CODE
%    \end{macrocode}
% 	\end{macro|function|variable}
% \end{implementation}



% \begin{implementation}
% 	\begin{macro}[added= 2025-02-12, updated= 2025-02-12]{\nameMacro}
% 		\begin{arguments}
% 			\item |width| Name of the option to add, this name should also correspond to the name of the environment followed by the suffix 'env'.
% 		\end{arguments}
% 		Description
% 		\changes{v1.0.1}{2025-02-12}{original version}
% 		\UnitTested
% 		\TestFiles{tempkg-test-048}
%    \begin{macrocode}
%% MY CODE
%    \end{macrocode}
% 	\end{macro}
% \end{implementation}