summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-06-26 03:00:46 +0000
committerNorbert Preining <norbert@preining.info>2022-06-26 03:00:46 +0000
commit49d5e8cc281cf2335112eb5488cd83afd96eeb04 (patch)
tree90391c61b53045517a94752d7db0e63586d22fdc /macros
parent7539b7b5d1fc836a31110d086fb5b9783033f327 (diff)
CTAN sync 202206260300
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/cprotectinside/README26
-rw-r--r--macros/latex/contrib/cprotectinside/cprotectinside.pdfbin0 -> 296928 bytes
-rw-r--r--macros/latex/contrib/cprotectinside/cprotectinside.sty78
-rw-r--r--macros/latex/contrib/cprotectinside/cprotectinside.tex167
-rw-r--r--macros/latex/contrib/fgruler/fgruler.dtx739
-rw-r--r--macros/latex/contrib/fgruler/fgruler.pdfbin491910 -> 486281 bytes
-rw-r--r--macros/latex/contrib/multiple-choice/README22
-rw-r--r--macros/latex/contrib/multiple-choice/doc/multiple-choice-doc.pdfbin0 -> 132611 bytes
-rw-r--r--macros/latex/contrib/multiple-choice/doc/multiple-choice-doc.tex96
-rw-r--r--macros/latex/contrib/multiple-choice/tex/multiple-choice.sty99
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix-french.pdfbin504127 -> 504636 bytes
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix-french.tex76
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix.dtx1145
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix.pdfbin1526205 -> 1541634 bytes
14 files changed, 1573 insertions, 875 deletions
diff --git a/macros/latex/contrib/cprotectinside/README b/macros/latex/contrib/cprotectinside/README
new file mode 100644
index 0000000000..236b225e84
--- /dev/null
+++ b/macros/latex/contrib/cprotectinside/README
@@ -0,0 +1,26 @@
+cprotectinside -- Use cprotect arbitrarily deeply nested
+ Extends on `cprotect` package to allow users to use verbatim-like commands inside arbitrary
+ parameters.
+
+
+Released under the LaTeX Project Public License v1.3c or later
+See http://www.latex-project.org/lppl.txt
+
+Report bugs at https://github.com/user202729/TeXlib
+
+========
+
+Copyright 2022 user202729
+
+This work may be distributed and/or modified under the conditions of the
+LaTeX Project Public License (LPPL), either version 1.3c of this license or
+(at your option) any later version. The latest version of this license is in
+the file:
+
+ http://www.latex-project.org/lppl.txt
+
+This work has the LPPL maintenance status `maintained'.
+
+The Current Maintainer of this work is user202729.
+
+This work consists of the files cprotectinside.sty.
diff --git a/macros/latex/contrib/cprotectinside/cprotectinside.pdf b/macros/latex/contrib/cprotectinside/cprotectinside.pdf
new file mode 100644
index 0000000000..c2ef590860
--- /dev/null
+++ b/macros/latex/contrib/cprotectinside/cprotectinside.pdf
Binary files differ
diff --git a/macros/latex/contrib/cprotectinside/cprotectinside.sty b/macros/latex/contrib/cprotectinside/cprotectinside.sty
new file mode 100644
index 0000000000..53afd0beb1
--- /dev/null
+++ b/macros/latex/contrib/cprotectinside/cprotectinside.sty
@@ -0,0 +1,78 @@
+% File: cprotectinside.sty
+% Copyright 2022 user202729
+%
+% This work may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this license or
+% (at your option) any later version. The latest version of this license is in
+% the file:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is user202729.
+
+\ProvidesExplPackage{cprotectinside}{2022/06/25}{0.0.0}{Use cprotect arbitrarily deeply nested}
+
+% '__' ↔ '_cpi_'
+
+\msg_new:nnn {cprotectinside} {delimiter-not-match} {Delimiters~does~not~match!}
+
+\int_new:N \_cpi_used
+
+\edef \cprotectinsideAppend { \c_backslash_str empty }
+% 12 is other catcode
+
+\cs_generate_variant:Nn \tl_replace_all:Nnn {Nnx}
+
+% #1: single character for the delimiter e.g. '+'
+% #2: the body
+
+
+\NewDocumentCommand\cprotectinside{v +v}{
+
+ %\seq_set_split_keep_spaces:Nnn \_cpi_entries {#1} {#2}
+ % cannot do this in old version
+
+ \tl_set:Nn \_cpi_entries {#2}
+ \tl_replace_all:Nnx \_cpi_entries {~} { \char_generate:nn {`\ } {12} } % replace space <space> with other <space>
+ \seq_set_split:NnV \_cpi_entries {#1} \_cpi_entries % so that they're not lost here. Support older versions without \seq_set_split_keep_spaces
+
+ \int_if_even:nT {\seq_count:N \_cpi_entries} {
+ \msg_error:nn {cprotectinside} {delimiter-not-match}
+ }
+ \tl_build_gbegin:N \_cpi_result
+ \seq_map_indexed_inline:Nn \_cpi_entries {
+ % ##1 is index, ##2 is item
+ \int_if_even:nTF {##1} {
+ % index 2, 4, 6...: content to be cprotect-ed
+ \int_incr:N \_cpi_used
+ \exp_args:NV \_cpi_aux:nn \cprotectinsideAppend {##2}
+ \tl_build_gput_right:Nx \_cpi_result { \c_backslash_str cpiContentA \romannumeral \_cpi_used / }
+
+ } {
+ % index 1, 3, 5...: normal text
+ \tl_build_gput_right:Nn \_cpi_result {##2}
+ }
+ }
+ %\tl_build_gput_right:Nn \_cpi_result {##2}
+ \tl_build_gend:N \_cpi_result
+ \begingroup
+ \newlinechar=13~ % have to setup like this because +v collect newline as char 13
+ \exp_args:NNNV \expandafter \endgroup \scantokens \_cpi_result
+}
+
+\def \_cpi_aux:nn #1 #2 {
+ \protected \cs_set_protected:cpn {cpiContentA \romannumeral \_cpi_used} / {\cprotectinsideReexec{#2 #1}}
+}
+
+\def \cprotectinsideReexec #1 {
+ \begingroup
+ \newlinechar=13~
+ \expandafter % expand the \scantokens once when newlinechar=13
+ \endgroup
+ \scantokens {#1} % then execute the code with original newlinechar value
+}
+
+\cs_generate_variant:Nn \_cpi_aux:n {V}
+\cs_generate_variant:Nn \tl_gset_rescan:Nnn {NnV}
diff --git a/macros/latex/contrib/cprotectinside/cprotectinside.tex b/macros/latex/contrib/cprotectinside/cprotectinside.tex
new file mode 100644
index 0000000000..976d067ec7
--- /dev/null
+++ b/macros/latex/contrib/cprotectinside/cprotectinside.tex
@@ -0,0 +1,167 @@
+%%! TEX program = lualatex
+\ProvidesFile{cprotectinside.tex} [2022/06/25 v0.0.0 Use cprotect arbitrarily deeply nested]
+\documentclass{l3doc}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\usepackage{hyperref}
+\usepackage{csquotes}
+%\MakeOuterQuote{"}
+\begin{document}
+\GetFileInfo{\jobname.tex}
+
+\title{\textsf{cprotectinside} --- Use cprotect arbitrarily deeply nested
+\thanks{This file describes version \fileversion, last revised \filedate.}
+}
+\author{user202729%
+%\thanks{E-mail: (not set)}
+}
+\date{Released \filedate}
+
+\maketitle
+
+\changes{v0.0.0}{2022/05/18}{First public release}
+
+\let\backtick=`
+\MakeShortVerb{`}
+
+\begin{abstract}
+ Extends on `cprotect` package to allow users to use verbatim-like commands inside arbitrary
+ parameters.
+
+\end{abstract}
+
+\section{Usage}
+
+
+\subsection{Main function}
+\begin{function}{\cprotectinside}
+ \begin{syntax}
+ \cs{cprotectinside} \meta{delimiter} \meta{content} \\
+ \end{syntax}
+ Execute \meta{content} that possibly contains verbatim content.
+
+ This is a bit hard to explain. To give an example:
+
+ Take an example from \url{https://tex.stackexchange.com/q/24574},
+ you want to write \verb+\textbf{using \verb|-i| as}+. Unfortunately, `\textbf` does not accept
+ `\verb` %` %workaround for syntax highlighter
+ in input.
+
+ Then you need to
+
+ \begin{itemize}
+ \item Wrap the whole code inside `\cprotectinside{!}{ ... }`
+ \item Wrap each `\verb` %`
+ command (and its arguments) inside `!...!`.
+ \end{itemize}
+
+The resulting code would be:
+
+ \begin{verbatim}
+ \cprotectinside{!}{\textbf{\using !\verb|-i|! as}}}
+ \end{verbatim}
+
+The first argument `!` is the delimiter, it can be changed as long as it's changed correspondingly in the \meta{content} part.
+
+In this simple case, it's possible to simply use `cprotect`. Nevertheless this package is useful in some cases, for example...
+
+\begin{itemize}
+ \item Value of keyval argument:
+
+ \begin{verbatim}
+ \cprotectinside{*}{
+ \begin{lstlisting}[language=Perl,
+ caption={text *\verb+myverb+* some more text}]
+ code code
+ code code
+ \end{lstlisting}
+ }
+ \end{verbatim}
+
+ \item Pseudo-environments (contrived example):
+
+ \begin{verbatim}
+ \cprotectinside{*}{
+ \begin{align}
+ 1 &= 2+\text{text *\verb+text+* text}
+ \end{align}
+ }
+ \end{verbatim}
+\end{itemize}
+
+
+
+\end{function}
+
+
+\subsection{Common issues}
+
+\begin{itemize}
+
+ \item If you get the error message
+
+ \begin{quote}
+ LaTeX cmd Error: Verbatim-like command \backtick `\cprotectinside`' illegal in argument.
+ \end{quote}
+
+ You can't use a literal TAB character inside \meta{content}
+ because of a known bug: \url{https://tex.stackexchange.com/q/508001}
+
+ (when the tab character is at the begin of a line -- which is the most common case, it will give no error message but they will be removed from the code. Which might matter for `verbatim` environments, for example.)
+
+ \item Note that the following code will not work as desired
+ \begin{verbatim}
+ \cprotectinside{!}{
+ some content
+ %}
+ some other content
+ }
+ \end{verbatim}
+ because of the unbalanced brace in the comment. It's possible to use characters different from braces to delimit the second argument
+ \begin{verbatim}
+ \cprotectinside{!}|
+ some content
+ %}
+ some other content
+ |
+ \end{verbatim}
+ or use the workarounds described in the documentation of \texttt{cprotect} package.
+
+ \item Contents that is intended to be passed as
+ \enquote{text}
+ to the outer command must not be `cprotect`ed.
+
+ As a general rule of thumb, if the content inside can be replaced with a `\includegraphics` with no compilation error,
+ it can be `cprotect`ed.
+
+
+\end{itemize}
+
+\subsection{Implementation note}
+
+The working of the code is similar to how \texttt{cprotect} package works. Described in more details
+in \url{https://tex.stackexchange.com/q/622512} (post by the package author).
+
+In particular, given the code
+\verb+\textbf{using \verb|-i| as}+
+the command might transform it to become
+\verb+\textbf{using \cpiContentAi/ as}+
+then execute the resulting code.
+Where `\cpiContentAi/` is defined to be something similar to `\input{inner.tex}`, with the (imaginary) file
+`inner.tex` has the content `\verb|-i|\empty`.
+
+The string to be appended inside each inner chunk defaults to `\empty`, used to remove the space generated at the
+end of each file (similar in purpose to `^^E^^L` used by `cprotect` package), but it can be configured:
+
+\begin{variable}{\cprotectinsideAppend}
+ The content to be appended to every inner macro. Should already be detokenized. Defaults to the detokenized string \texttt{\textbackslash empty}.
+\end{variable}
+
+
+\StopEventually{%
+ \PrintChanges
+ \PrintIndex
+}
+\Finale
+\end{document}
diff --git a/macros/latex/contrib/fgruler/fgruler.dtx b/macros/latex/contrib/fgruler/fgruler.dtx
index 1cebbe6671..e49d112cef 100644
--- a/macros/latex/contrib/fgruler/fgruler.dtx
+++ b/macros/latex/contrib/fgruler/fgruler.dtx
@@ -21,21 +21,18 @@
\ProvidesFile{fgruler.dtx}
%</driver>
%<package>\NeedsTeXFormat{LaTeX2e}[2020/10/01]
-%<package>\ProvidesPackage{fgruler}[2022/06/19 v1.4 Package for drawing rulers on the foreground or in the text]
+%<package>\ProvidesPackage{fgruler}[2022/06/25 v1.5 Package for drawing rulers on the foreground or in the text]
%
%<*driver>
\documentclass{ltxdoc}
\OnlyDescription
-\usepackage[a4paper,margin=25mm,marginparwidth=19mm,marginparsep=5mm,headsep=5mm,headheight=4mm,footskip=10mm]{geometry}
-\usepackage[pdfstartview=FitH,colorlinks,allcolors=black,bookmarksnumbered,hyperfootnotes=false]{hyperref}
+\AddToHook{begindocument/before}[doc/hyperref]{\hypersetup{pdfstartview=FitH,allcolors=black}}% see in doc.sty and hypdoc.sty
+\usepackage[a4paper,margin=25mm,marginparwidth=15mm,marginparsep=5mm,headsep=5mm,headheight=4mm,footskip=10mm]{geometry}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[english]{babel}
-\usepackage{listings,fontawesome,fancyvrb}
-\usepackage[type=none,color=red!80!black]{fgruler}
-
-\flushbottom
-\VerbatimFootnotes
+\usepackage{listings,fontawesome}
+\usepackage[type=none]{fgruler}
\setlength{\labelsep}{0pt}
@@ -43,12 +40,13 @@
gobble=2,
belowskip=\bigskipamount,
basicstyle=\ttfamily,
-backgroundcolor=\color{black!10},
+backgroundcolor=\color{blue!10},
+framerule=0pt,
frame=trbl,
-framesep=3pt,
+framesep=5pt,
columns=fullflexible,
-xleftmargin=3.4pt,
-xrightmargin=3.4pt,
+xleftmargin=5pt,
+xrightmargin=5pt,
keepspaces}}{}
\newcommand{\commandinline}{\lstinline[
@@ -65,124 +63,127 @@ keepspaces]}
% \fi
%
% \GetFileInfo{fgruler.sty}
-%
-% \title{The {\bfseries\sffamily fgruler} package\\{\large v1.4 (2022/06/19)}}
-% \author{Tibor T\'{o}m\'{a}cs\\{\normalsize\url{tomacs.tibor@uni-eszterhazy.hu}}}
+%
+% \title{The \texorpdfstring{{\bfseries\sffamily fgruler} package\\{\large v1.5 (2022/06/25)}}{fgruler package}}
+% \author{\texorpdfstring{Tibor T\'{o}m\'{a}cs\\{\normalsize\url{tomacs.tibor@uni-eszterhazy.hu}}}{Tibor T\'{o}m\'{a}cs}}
% \date{}
% \maketitle
%
-% \fgruler{upperleft}{0cm}{0cm}
-% \noindent
-% {\rulerparams{}{\scriptsize\sffamily\color{teal}}{blue}{}{}
-% {\fgrulerdefnum{}\fgrulercaptioncm{}\ruler{rightdown}{\textwidth}}\\[2pt]
-% \ruler{rightup}{\textwidth}}
+% \fgruler*[color=red!80!black]{upperleft}
+% \noindent{\rulerparams{}{\scriptsize\sffamily\color{teal}}{blue}{}{}\ruler{taperight}{\textwidth}}
%
% \section{Introduction}
-% The \texttt{fgruler} is an abbreviation for the \emph{foreground ruler}.
-% This package draws horizontal and vertical rulers on the foreground of every (or a given) page at absolute position.
+% The |fgruler| package draws horizontal and vertical rulers on the foreground of every (or the current) page at absolute position.
% In this way, you can check the page layout dimensions.
+% You can also draw various rulers in the text.
%
% \medskip\noindent
-% Besides, you can draw various rulers in the text, too.
-%
-% \medskip\noindent
-% The \texttt{fgruler} package requires the services of the following packages: \texttt{kvoptions}, \texttt{etoolbox}, \texttt{xcolor}, \texttt{graphicx}, \texttt{eso-pic}.
+% The |fgruler| package requires the services of the following packages: |kvoptions|, |etoolbox|, |xcolor|, |graphicx|, |eso-pic|.
%
% \section{Loading package}
% Load the package with
% \begin{flushleft}
-% \commandinline|\usepackage[!<options>!]{fgruler}|
+% \commandinline|\usepackage[!<package options>!]{fgruler}|
% \end{flushleft}
% or
% \begin{flushleft}
% \commandinline|\usepackage{fgruler}|\\
-% \commandinline|\setfgruler{!<options>!}|
+% \commandinline|\setfgruler{!<package options>!}|
% \end{flushleft}
-% The \verb|\setfgruler| command is usable in the \texttt{document} environment, too.
+% The |\setfgruler| command is usable in the document body, too.
%
-% \section{Options}\label{sec:options}
-% By default, the \texttt{fgruler} package draws a square ruler on the foreground of every page. The following package options set the parameters of these rulers.
+% \section{Package options}\label{sec:options}
+% By default, the |fgruler| package draws a square ruler on the foreground of every page.
+% The following package options set the parameters of these rulers.
% \begin{description}
% \item\commandinline|unit=!<unit>!|\\
-% Ruler unit. The \commandinline|!<unit>!| legal values:
+% Ruler unit. Possible \commandinline|!<unit>!| values:
% \begin{description}
% \item\commandinline|cm| Metric ruler (centimeter). Default value.
% \item\commandinline|in| English ruler (inch).
% \end{description}
%
% \item\commandinline|type=!<type name>!|\\
-% Origin, directions and lengths of the ruler. The \commandinline|!<type name>!| legal values:
+% It determines the origin, directions, and lengths of the ruler. Possible \commandinline|!<type name>!| values:
% \begin{description}
-% \item\commandinline|upperleft| Default value. Origin: upper left corner of the paper. Directions: down and right. Lengths: paper sizes. See \ref{example:upperleft} example.
-% \item\commandinline|upperright| Origin: upper right corner of the paper. Directions: down and left. Lengths: paper sizes. See \ref{example:upperright} example.
-% \item\commandinline|lowerleft| Origin: lower left corner of the paper. Directions: up and right. Lengths: paper sizes. See \ref{example:lowerleft} example.
-% \item\commandinline|lowerright| Origin: lower right corner of the paper. Directions: up and left. Lengths: paper sizes. See \ref{example:lowerright} example.
-% \item\commandinline|upperleftT| Origin: upper left corner of the text area. Directions: down and right. Lengths: text area sizes. See \ref{example:upperleftT} example.
-% \item\commandinline|upperrightT| Origin: upper right corner of the text area. Directions: down and left. Lengths: text area sizes. See \ref{example:upperrightT} example.
-% \item\commandinline|lowerleftT| Origin: lower left corner of the text area. Directions: up and right. Lengths: text area sizes. See \ref{example:lowerleftT} example.
-% \item\commandinline|lowerrightT| Origin: lower right corner of the text area. Directions: up and left. Lengths: text area sizes. See \ref{example:lowerrightT} example.
+% \item\commandinline|upperleft| Default value. Square ruler (origin: upper left corner of the paper; directions: down and right; lengths: paper sizes). See Example \ref{example:upperleft}.
+% \item\commandinline|upperright| Square ruler (origin: upper right corner of the paper; directions: down and left; lengths: paper sizes). See Example \ref{example:upperright}.
+% \item\commandinline|lowerleft| Square ruler (origin: lower left corner of the paper; directions: up and right; lengths: paper sizes). See Example \ref{example:lowerleft}.
+% \item\commandinline|lowerright| Square ruler (origin: lower right corner of the paper; directions: up and left; lengths: paper sizes). See Example \ref{example:lowerright}.
+% \item\commandinline|upperleftT| Square ruler (origin: upper left corner of the text area; directions: down and right; lengths: text area sizes). See Example \ref{example:upperleftT}.
+% \item\commandinline|upperrightT| Square ruler (origin: upper right corner of the text area; directions: down and left; lengths: text area sizes). See Example \ref{example:upperrightT}.
+% \item\commandinline|lowerleftT| Square ruler (origin: lower left corner of the text area; directions: up and right; lengths: text area sizes). See Example \ref{example:lowerleftT}.
+% \item\commandinline|lowerrightT| Square ruler (origin: lower right corner of the text area; directions: up and left; lengths: text area sizes). See Example \ref{example:lowerrightT}.
% \item\commandinline|alledges| There are rulers on all edges of the paper.
% Top ruler origin: upper left corner of the paper (direction: right).
% Bottom ruler origin: lower left corner of the paper (direction: right).
% Left ruler origin: upper left corner of the paper (direction: down).
-% Right ruler origin: upper right corner of the paper (direction: down). Lengths: paper sizes. See \ref{example:alledges} example.
-% \item\commandinline|alledges*| It is similar to \verb|alledges| option, but bottom ruler origin is lower right corner of the paper (direction: left),
+% Right ruler origin: upper right corner of the paper (direction: down). Lengths: paper sizes. See Example \ref{example:alledges}.
+% \item\commandinline|alledges*| It is similar to |alledges| option, but bottom ruler origin is lower right corner of the paper (direction: left),
% and left ruler origin is lower left corner of the paper (direction: up).
-% See \ref{example:alledges*} example.
-% \item\commandinline|alledgesT| It is similar to \verb|alledges| option, but on the edges of the text area. See \ref{example:alledgesT} example.
-% \item\commandinline|alledgesT*| It is similar to \verb|alledges*| option, but on the edges of the text area. See \ref{example:alledgesT*} example.
-% \item\commandinline|none| Not drawing ruler.
+% See Example \ref{example:alledges*}.
+% \item\commandinline|alledgesT| It is similar to |alledges| option, but on the edges of the text area. See Example \ref{example:alledgesT}.
+% \item\commandinline|alledgesT*| It is similar to |alledges*| option, but on the edges of the text area. See Example \ref{example:alledgesT*}.
% \item\commandinline|user| Each \commandinline|!<unit>!|--\commandinline|!<type name>!| pair activates an \commandinline|\fgrulertype{!<unit>!}{!<type name>!}| command.
-% After \commandinline|\fgrulerdefuser!<unit>!{!<code>!}| the expansion of \commandinline|\fgrulertype{!<unit>!}{user}| is \commandinline|!<code>!|,
-% which determines the effect of this option.
-% See \ref{example:user-first}--\ref{example:user-last} examples.
+% So the expansion of \commandinline|\fgrulertype{!<unit>!}{user}| determines the effect of this option.
+% It will be \commandinline|!<code>!| after using the \commandinline|\fgrulerdefuser{!<code>!}| command,
+% where in the \commandinline|!<code>!| you have to referrence the unit as \commandinline|\fgrulerunit|.
+% For example, after\\ |\fgrulerdefuser{\fgrulertype{\fgrulerunit}{alledges}}|\\ the |type=user| option will be equivalent to the |type=alledges|.
+% See also Examples \ref{example:user-first}--\ref{example:user-last}.
+% \item\commandinline|none| No ruler drawn.
% \end{description}
+%
+% \item\commandinline|type={!<type name list>!}|\\
+% The \commandinline|!<type name list>!| is a list of valid type names separated by commas.
+% These types will be combined.
+% For example |type={alledges,alledgesT}|.
+% See the result in Example \ref{example:combining}.
%
% \item\commandinline|hshift=!<length>!|\\
-% Horizontal shift of the ruler, if the \commandinline|!<type name>!| is \verb|upperleft|, \verb|lowerleft|, \verb|upperright|, or \verb|lowerright|.
-% The shift direction is right, if the \commandinline|!<type name>!| is \verb|upperleft| or \verb|lowerleft|.
-% The shift direction is left, if the \commandinline|!<type name>!| is \verb|upperright| or \verb|lowerright|.
-% Default: \verb|hshift=0cm|.
-% See \ref{example:shift-first}--\ref{example:shift-last} examples.
+% Horizontal shift of the ruler, if the \commandinline|!<type name>!| is |upperleft|, |lowerleft|, |upperright|, or |lowerright|.
+% The shift direction is right, if the \commandinline|!<type name>!| is |upperleft| or |lowerleft|.
+% The shift direction is left, if the \commandinline|!<type name>!| is |upperright| or |lowerright|.
+% Default: |hshift=0cm|.
+% See Examples \ref{example:shift-first}--\ref{example:shift-last}.
%
% \item\commandinline|vshift=!<length>!|\\
-% Vertical shift of the ruler, if the \commandinline|!<type name>!| is \verb|upperleft|, \verb|lowerleft|, \verb|upperright|, or \verb|lowerright|.
-% The shift direction is down, if the \commandinline|!<type name>!| is \verb|upperleft| or \verb|upperright|.
-% The shift direction is up, if the \commandinline|!<type name>!| is \verb|lowerleft| or \verb|lowerright|.
-% Default: \verb|vshift=0cm|.
-% See \ref{example:shift-first}--\ref{example:shift-last} examples.
+% Vertical shift of the ruler, if the \commandinline|!<type name>!| is |upperleft|, |lowerleft|, |upperright|, or |lowerright|.
+% The shift direction is down, if the \commandinline|!<type name>!| is |upperleft| or |upperright|.
+% The shift direction is up, if the \commandinline|!<type name>!| is |lowerleft| or |lowerright|.
+% Default: |vshift=0cm|.
+% See Examples \ref{example:shift-first}--\ref{example:shift-last}.
%
% \item\commandinline|color=!<color name>!|\\
-% Ruler color (see \texttt{xcolor} package). Default: \verb|color=black|.
-% See \ref{example:showframe-color} example.
+% Ruler color (see |xcolor| package). Default: |color=black|.
+% See Example \ref{example:showframe-color}.
%
% \item\commandinline|numsep=!<length>!|\\
-% Separation between number and ruler. Default: \verb|numsep=3pt|.
+% Separation between number and ruler. Default: |numsep=3pt|.
%
% \item\commandinline|markthick=!<length>!|\\
-% Mark thickness. Default: \verb|markthick=0.4pt|.
+% Mark thickness. Default: |markthick=0.4pt|.
%
% \item\commandinline|marklength=!<length>!|\\
% Mark length at integer units (see the red marks):
% {\fgrulernoborderline\fgrulercaptioncm{}\fgrulerthickcm{}{}{1pt}\fgrulercolorcm{}{}{red}\ruler{rightup}{3cm}}
-% Default: \verb|marklength=2mm|. See the length of the other marks in Section \ref{sec:additional}.
+% Default: |marklength=2mm|. See the length of the other marks in Section \ref{sec:additional}.
%
% \item\commandinline|numfont=!<font type>!|\\
-% Number font type. Default: \verb|numfont=\scriptsize\sffamily|. You can use this option only in \verb|\setfgruler| command.
+% Number font type. Default: |numfont=\scriptsize\sffamily|. You can use this option only in |\setfgruler| and |\fgruler*| (see Section \ref{sec:currentpage}) commands.
%
% \item\commandinline|showframe| or \commandinline|showframe=true|\\
% It draws visible frames for the text and margin area, and lines for the head and foot.
-% Their color and thickness are determined by the \texttt{color} and the \texttt{markthick} options.
-% See \ref{example:showframe-color} example.
+% Their color and thickness are determined by the |color| and the |markthick| options.
+% See Example \ref{example:showframe-color}.
%
% \item\commandinline|showframe=false|\\
-% It deactivates the \texttt{showframe} option.
+% It deactivates the |showframe| option.
%
% \item\commandinline|nonefgrulers|\\
-% It kills all of the rulers on the foreground, including also those, which are generated by \verb|\fgruler| (see Section \ref{sec:givenpage}).
-% But the rulers, which were drawn by \verb|\ruler| and \verb|\squareruler| (see Section \ref{sec:intext}), do not disappear.
-% Furthermore it deactivates the \texttt{showframe} option, too.
-% In this case the \texttt{fgruler} package does not load the \texttt{eso-pic} package.
+% It kills all of the rulers on the foreground, including also those, which are generated by |\fgruler| or |\fgruler*| (see Section \ref{sec:currentpage}).
+% But the rulers, which were drawn by |\ruler| and |\squareruler| (see Section \ref{sec:intext}), do not disappear.
+% Furthermore it deactivates the |showframe| option, too.
+% In this case the |fgruler| package does not load the |eso-pic| package.
% This option works only in preamble.
%
% It is recommended to use in two cases:
@@ -191,46 +192,63 @@ keepspaces]}
% \item To halt the checking function temporarily.
% \end{itemize}
%
-% The \texttt{type=none} is not identical with \texttt{nonefgrulers} option. The differences:
+% The |type=none| is not identical with |nonefgrulers| option. The differences:
% \begin{itemize}
-% \item \texttt{type=none} does not kill the \verb|\fgruler| command and the \texttt{showframe} option.
-% \item \texttt{type=none} is alterable in any point of the document.
-% \item \texttt{type=none} works in document environment, too.
-% \item The \texttt{fgruler} package loads the \texttt{eso-pic} package, if you use the \texttt{type=none} option without \texttt{nonefgrulers}.
+% \item |type=none| does not kill the |\fgruler| and |\fgruler*| commands and the |showframe| option.
+% \item |type=none| is alterable in any point of the document.
+% \item The |fgruler| package loads the |eso-pic| package, if you use the |type=none| option without |nonefgrulers|.
% \end{itemize}
% \end{description}
%
-% \section{Drawing square rulers on the foreground of a given page}\label{sec:givenpage}
+% \section{Drawing rulers on the foreground of the current page}\label{sec:currentpage}
% \begin{description}
% \item\commandinline|\fgruler[!<unit!>]{!<type name>!}{!<hshift>!}{!<vshift>!}|\\
% It draws a square ruler on the foreground of that page, where this command is expanded.
-% You can use more \verb|\fgruler| commands in the same page.
+% You can use more |\fgruler| commands in the same page.
%
-% The package options (see Section \ref{sec:options}) also work on this command, except for \texttt{unit}, \texttt{type}, \texttt{hshift} and \texttt{vshift}, since these are the parameters of the \verb|\fgruler|.
+% The package options (see Section \ref{sec:options}) also work on this command, except for |type|, |hshift|, and |vshift|.
%
-% If you use \texttt{nonefgrulers} option in preamble, then this command is effectless.
+% This command is effectless, if you use the |nonefgrulers| package option in the preamble.
% \begin{description}
-% \item\commandinline|!<unit!>| options:\\
-% \commandinline|cm| Metric ruler (centimeter). Default option.\\
-% \commandinline|in| English ruler (inch).
+% \item\commandinline|!<unit!>| options:
+% \commandinline|cm|, \commandinline|in| (see Section \ref{sec:options}).
+% Its default value is the same as the value specified by the |unit=|\commandinline|!<unit!>| package option.
%
-% \item\commandinline|!<type name!>| parameters:\\
-% \commandinline|upperleft | Origin: upper left corner. Directions: down and right.\\
-% \commandinline|upperright| Origin: upper right corner. Directions: down and left.\\
-% \commandinline|lowerleft | Origin: lower left corner. Directions: up and right.\\
-% \commandinline|lowerright| Origin: lower right corner. Directions: up and left.
+% \item\commandinline|!<type name!>| parameters:
+% \commandinline|upperleft|, \commandinline|upperright|, \commandinline|lowerleft|, \commandinline|lowerright| (see Section \ref{sec:options}).
%
% \item\commandinline|!<hshift>!|
% Horizontal shift.
-% The shift direction is right, if the \commandinline|!<type name>!| is \verb|upperleft| or \verb|lowerleft|, otherwise it is left.
+% The shift direction is right, if the \commandinline|!<type name>!| is |upperleft| or |lowerleft|, otherwise left.
%
% \item\commandinline|!<vshift>!|
% Vertical shift.
-% The shift direction is down, if the \commandinline|!<type name>!| is \verb|upperleft| or \verb|upperright|, otherwise it is up.
+% The shift direction is down, if the \commandinline|!<type name>!| is |upperleft| or |upperright|, otherwise up.
+% \end{description}
%
-% \item Example:
-% \verb|\fgruler[in]{upperright}{1in}{2.5in}|
+% Example: |\fgruler[in]{upperright}{1in}{2.5in}|
% \end{description}
+% \begin{description}
+% \item\commandinline|\fgruler*[!<package options!>]{!<type name>!}|\\
+% It draws a ruler on the foreground of that page, where this command is expanded.
+% You can use more |\fgruler*| commands in the same page.
+%
+% The package options (see Section \ref{sec:options}) also work on this command, except for |type|.
+%
+% This command is effectless, if you use the |nonefgrulers| package option in the preamble.
+% \begin{description}
+% \item\commandinline|!<package options!>|
+% All options from Section \ref{sec:options}, except for |type|, |showframe|, and |nonefgrulers|.
+%
+% \item\commandinline|!<type name!>|
+% All possible values of the |type| option from Section \ref{sec:options}, except for the |none| value.
+% \end{description}
+%
+% Example: |\fgruler*[color=red,type=in]{alledges}|
+%
+% Note that the following two commands are equivalent:\\
+% |\fgruler*[unit=in,hshift=1in,vshift=2.5in]{upperright}|\\
+% |\fgruler[in]{upperright}{1in}{2.5in}|
% \end{description}
%
% \section{Drawing rulers in the text}\label{sec:intext}
@@ -252,22 +270,22 @@ keepspaces]}
% \commandinline|rightdown | Direction: right. The numbers are on the down side.\\
% \commandinline|rightup | Direction: right. The numbers are on the up side.\\
% \commandinline|leftdown | Direction: left. The numbers are on the down side.\\
-% \commandinline|leftup | Direction: left. The numbers are on the up side.
+% \commandinline|leftup | Direction: left. The numbers are on the up side.\\
+% \commandinline|taperight | Tape measure (direction: right). See Example \ref{example:tape}.\\
+% \commandinline|tapeleft | Tape measure (direction: left). See Example \ref{example:tape}.
%
% \item\commandinline|!<length>!|
% Ruler length.
-%
-% \item Example:
-% \verb|\ruler{rightdown}{5cm}|
-% \ruler{rightdown}{5cm}
% \end{description}
%
+% Example: |\ruler{rightdown}{5cm}| \ruler{rightdown}{5cm}
+%
% \item\commandinline|\ruler*[!<unit!>]{!<type name>!}{!<length>!}|\\
-% It works like \verb|\ruler|, but the top of the ruler is aligned to the baseline of the surrounding text.
+% It works like |\ruler|, but the top of the ruler is aligned to the baseline of the surrounding text.
%
% Example:
-% \verb|\ruler*{rightdown}{5cm}|
-% \ruler*{rightdown}{5cm}
+% |\ruler*{taperight}{5cm}|
+% \ruler*{taperight}{5cm}
%
% \item\commandinline|\squareruler[!<unit!>]{!<type name>!}{!<width>!}{!<height>!}|\\
% It draws a square ruler.
@@ -289,92 +307,93 @@ keepspaces]}
%
% \item\commandinline|!<height>!|
% Square ruler height.
+% \end{description}
%
-% \item Example:
-% \verb|\squareruler{upperleft}{5cm}{1cm}|
+% Example:
+% |\squareruler{upperleft}{5cm}{1cm}|
% \squareruler{upperleft}{5cm}{1cm}
-% \end{description}
%
% \item\commandinline|\squareruler*[!<unit!>]{!<type name>!}{!<width>!}{!<height>!}|\\
-% It works like \verb|\squareruler|, but the top of the square ruler is aligned to the baseline of the surrounding text.
+% It works like |\squareruler|, but the top of the square ruler is aligned to the baseline of the surrounding text.
%
% Example:
-% \verb|\squareruler*{upperleft}{5cm}{1cm}|
+% |\squareruler*{upperleft}{5cm}{1cm}|
% \squareruler*{upperleft}{5cm}{1cm}
%
% \item\commandinline|\rulerparams{!<markthick>!}{!<numfont>!}{!<color>!}{!<marklength>!}{!<numsep>!}|\\
-% It sets the parameters of the rulers, which are drawn by \verb|\ruler| or \verb|\squareruler|.
+% It sets the parameters of the rulers, which are drawn by |\ruler| or |\squareruler|.
% If an argument is empty, then that parameter will not be changed.
% \begin{description}
-% \item\commandinline|!<markthick>!| Mark thickness. Default: \verb|0.4pt|
-% \item\commandinline|!<numfont>!| Number font type. Default: \verb|\scriptsize\sffamily|
-% \item\commandinline|!<color>!| Ruler line color. Default: \verb|black|
-% \item\commandinline|!<marklength>!| Mark length at integer units. Default: \verb|2mm|
-% \item\commandinline|!<numsep>!| Separation between number and ruler. Default: \verb|3pt|
-% \item For example, \verb|\rulerparams{}{}{red}{}{}| changes the ruler color to red.
+% \item\commandinline|!<markthick>!| Mark thickness. Default: |0.4pt|
+% \item\commandinline|!<numfont>!| Number font type. Default: |\scriptsize\sffamily|
+% \item\commandinline|!<color>!| Ruler line color. Default: |black|
+% \item\commandinline|!<marklength>!| Mark length at integer units. Default: |2mm|
+% \item\commandinline|!<numsep>!| Separation between number and ruler. Default: |3pt|
% \end{description}
+%
+% For example, |\rulerparams{}{}{red}{}{}| changes the ruler color to red.
%
% \item\commandinline|\rulerparamsfromfg|\\
-% It sets the ruler parameters from the actual foreground ruler parameters.
+% It sets the ruler parameters from the current foreground ruler parameters.
%
% \item\commandinline|\rulernorotatenum|\\
-% By default, the numbers of the vertical rulers (which were generated by \verb|\ruler| or \verb|\squareruler|) are rotated by 90$^\circ$.
+% By default, the numbers of the vertical rulers (which were generated by |\ruler| or |\squareruler|) are rotated by 90$^\circ$.
% It kills this action.
-% This command is usable only in \texttt{document} environment.
+% This command can only be expanded in the document body.
%
-% Example: \verb|{\rulernorotatenum\ruler{upright}{1cm}}| {\rulernorotatenum\ruler{upright}{1cm}}
+% Example: |{\rulernorotatenum\ruler{upright}{1cm}}| {\rulernorotatenum\ruler{upright}{1cm}}
%
% \item\commandinline|\rulerrotatenum|\\
-% After \verb|\rulernorotatenum|, it reactivates the number rotating.
-% This command is usable only in \texttt{document} environment.
+% After |\rulernorotatenum|, it reactivates the number rotating.
+% This command can only be expanded in the document body.
% \end{description}
%
% \section{Additional setting commands}\label{sec:additional}
-% The following commands can work on all of the rulers, which are drawn by \texttt{fgruler} package.
+% The following commands can work on all of the rulers, which are drawn by |fgruler| package.
% \begin{description}
% \item\commandinline|\fgrulerstartnum{!<num>!}|\\
% The \commandinline|!<num>!| is a nonnegative integer, which will be the starting number on the horizontal and vertical rulers.
-% Default: \verb|\fgrulerstartnum{0}|
+% Default: |\fgrulerstartnum{0}|
%
-% Example: \verb|{\fgrulerstartnum{5}\squareruler{lowerleft}{3cm}{1cm}}| {\fgrulerstartnum{5}\squareruler{lowerleft}{3cm}{1cm}}
+% Example: |{\fgrulerstartnum{5}\squareruler{lowerleft}{3cm}{1cm}}| {\fgrulerstartnum{5}\squareruler{lowerleft}{3cm}{1cm}}
%
% \item\commandinline|\fgrulerstartnumh{!<num>!}|\\
% The \commandinline|!<num>!| is a nonnegative integer, which will be the starting number on the horizontal rulers.
-% Default: \verb|\fgrulerstartnumh{0}|
+% Default: |\fgrulerstartnumh{0}|
%
-% Example: \verb|{\fgrulerstartnumh{5}\squareruler{lowerleft}{3cm}{1cm}}| {\fgrulerstartnumh{5}\squareruler{lowerleft}{3cm}{1cm}}
+% Example: |{\fgrulerstartnumh{5}\squareruler{lowerleft}{3cm}{1cm}}| {\fgrulerstartnumh{5}\squareruler{lowerleft}{3cm}{1cm}}
%
% \item\commandinline|\fgrulerstartnumv{!<num>!}|\\
% The \commandinline|!<num>!| is a nonnegative integer, which will be the starting number on the vertical rulers.
-% Default: \verb|\fgrulerstartnumv{0}|
+% Default: |\fgrulerstartnumv{0}|
%
-% Example: \verb|{\fgrulerstartnumv{5}\squareruler{lowerleft}{3cm}{1cm}}| {\fgrulerstartnumv{5}\squareruler{lowerleft}{3cm}{1cm}}
+% Example: |{\fgrulerstartnumv{5}\squareruler{lowerleft}{3cm}{1cm}}| {\fgrulerstartnumv{5}\squareruler{lowerleft}{3cm}{1cm}}
%
% \item\commandinline|\fgrulernoborderline|\\
% By default, there is a borderline on one side of the ruler.
% It disappears by this command.
%
-% Example: \verb|{\fgrulernoborderline\ruler{rightup}{3cm}}| {\fgrulernoborderline\ruler{rightup}{3cm}}
+% Example: |{\fgrulernoborderline\ruler{rightup}{3cm}}| {\fgrulernoborderline\ruler{rightup}{3cm}}
%
% \item\commandinline|\fgrulerborderline|\\
-% After \verb|\fgrulernoborderline|, it reactivates the previous default effect.
+% After |\fgrulernoborderline|, it reactivates the previous default effect.
%
% \item\commandinline|\fgrulercaptioncm{!<caption>!}|\\
% Unit caption in metric ruler.
-% Default: \verb|\fgrulercaptioncm{cm}|
+% Default: |\fgrulercaptioncm{cm}|
%
-% Example: \verb|{\fgrulercaptioncm{}\ruler{rightup}{3cm}}| {\fgrulercaptioncm{}\ruler{rightup}{3cm}}
+% Example: |{\fgrulercaptioncm{}\ruler{rightup}{3cm}}| {\fgrulercaptioncm{}\ruler{rightup}{3cm}}
%
% \item\commandinline|\fgrulercaptionin{!<caption>!}|\\
% Unit caption in English ruler.
-% Default: \verb|\fgrulercaptionin{inch}|
+% Default: |\fgrulercaptionin{inch}|
%
% \item\commandinline|\fgrulerdefnum{!<definition>!}|\\
% The ruler numbers are determined by the \commandinline|fgrulernum| counter.
% Its current value is printed by the \commandinline|\thefgrulernum|.
-% Its default definition is \verb|\def\thefgrulernum{\arabic{fgrulernum}}|, which is equivalent to \verb|\fgrulerdefnum{\arabic{fgrulernum}}|.
+% Its default definition is |\def\thefgrulernum{\arabic{fgrulernum}}|, which is equivalent to |\fgrulerdefnum{\arabic{fgrulernum}}|.
%
-% Example: \verb|{\fgrulerdefnum{}\fgrulercaptioncm{}\ruler{rightdown}{2cm}}| {\fgrulerdefnum{}\fgrulercaptioncm{}\ruler{rightdown}{2cm}}
+% Example: |{\fgrulerdefnum{}\fgrulercaptioncm{}\ruler{rightdown}{2cm}}| {\fgrulerdefnum{}\fgrulercaptioncm{}\ruler{rightdown}{2cm}}
%
% \item\commandinline|\fgrulerratiocm{!<ratio1>!}{!<ratio2>!}|\\
% Mark length ratios in metric rulers.
@@ -388,10 +407,10 @@ keepspaces]}
% \item\commandinline|!<ratio2>!|
% Mark length ratio at $k/2$\,cm, where $k$ is positive odd integer.\\
% {\fgrulerthickcm{}{1pt}{}\fgrulercolorcm{}{red}{}\ruler{rightup}{3cm}}
-%
-% \item Default: \verb|\fgrulerratiocm{0.5}{0.75}|
% \end{description}
%
+% Default: |\fgrulerratiocm{0.5}{0.75}|
+%
% \item\commandinline|\fgrulerratioin{!<ratio1>!}{!<ratio2>!}{!<ratio3>!}{!<ratio4>!}|\\
% Mark length ratios in English rulers.
% If an argument is empty, then that parameter will not be changed.
@@ -411,10 +430,10 @@ keepspaces]}
% \item\commandinline|!<ratio4>!|
% Mark length ratio at $k/2$\,inch, where $k$ is positive odd integer.\\
% {\fgrulerthickin{}{}{}{1pt}{}\fgrulercolorin{}{}{}{red}{}\ruler[in]{rightup}{2in}}
-%
-% \item Default: \verb|\fgrulerratioin{0.25}{0.375}{0.625}{0.75}|
% \end{description}
%
+% Default: |\fgrulerratioin{0.25}{0.375}{0.625}{0.75}|
+%
% \item\commandinline|\fgrulerthickcm{!<thick1>!}{!<thick2>!}{!<thick3>!}|\\
% Mark thicknesses in metric rulers.
% If an argument is empty, then that parameter will not be changed.
@@ -427,19 +446,19 @@ keepspaces]}
%
% \item\commandinline|!<thick3>!|
% Mark thickness at integer units.
+% \end{description}
%
-% \item The default values are given by \commandinline|!<markthick>!| of \verb|\rulerparams|, respectively by \texttt{markthick} option.
+% The default values are given by \commandinline|!<markthick>!| of |\rulerparams|, respectively by |markthick| option.
%
-% \item Example:\\
-% \verb|{\fgrulerthickcm{}{}{2pt}|\\
-% \verb|\rulerparams{}{}{}{5mm}{}|\\
-% \verb|\fgrulernoborderline|\\
-% \verb|\ruler{rightdown}{3cm}}|\\[2mm]
+% Example:\\
+% |{\fgrulerthickcm{}{}{2pt}|\\
+% |\rulerparams{}{}{}{5mm}{}|\\
+% |\fgrulernoborderline|\\
+% |\ruler{rightdown}{3cm}}|\\[2mm]
% {\fgrulerthickcm{}{}{2pt}
% \rulerparams{}{}{}{5mm}{}
% \fgrulernoborderline
% \ruler{rightdown}{3cm}}
-% \end{description}
%
% \item\commandinline|\fgrulerthickin{!<thick1>!}{!<thick2>!}{!<thick3>!}{!<thick4>!}{!<thick5>!}|\\
% Mark thicknesses in English rulers.
@@ -459,19 +478,19 @@ keepspaces]}
%
% \item\commandinline|!<thick5>!|
% Mark thickness at integer units.
+% \end{description}
%
-% \item The default values are given by \commandinline|!<markthick>!| of \verb|\rulerparams|, respectively by \texttt{markthick} option.
+% The default values are given by \commandinline|!<markthick>!| of |\rulerparams|, respectively by |markthick| option.
%
-% \item Example:\\
-% \verb|{\fgrulerthickin{}{}{}{}{2pt}|\\
-% \verb|\rulerparams{}{}{}{5mm}{}|\\
-% \verb|\fgrulernoborderline|\\
-% \verb|\ruler[in]{rightdown}{3in}}|\\[2mm]
+% Example:\\
+% |{\fgrulerthickin{}{}{}{}{2pt}|\\
+% |\rulerparams{}{}{}{5mm}{}|\\
+% |\fgrulernoborderline|\\
+% |\ruler[in]{rightdown}{3in}}|\\[2mm]
% {\fgrulerthickin{}{}{}{}{2pt}
% \rulerparams{}{}{}{5mm}{}
% \fgrulernoborderline
% \ruler[in]{rightdown}{3in}}
-% \end{description}
%
% \item\commandinline|\fgrulercolorcm{!<color1>!}{!<color2>!}{!<color3>!}|\\
% Mark colors in metric rulers.
@@ -485,19 +504,19 @@ keepspaces]}
%
% \item\commandinline|!<color3>!|
% Mark color at integer units.
+% \end{description}
%
-% \item The default values are given by \commandinline|!<color>!| of \verb|\rulerparams|, respectively by \texttt{color} option.
+% The default values are given by \commandinline|!<color>!| of |\rulerparams|, respectively by |color| option.
%
-% \item Example:\\
-% \verb|{\fgrulercolorcm{green}{blue}{red}|\\
-% \verb|\rulerparams{1pt}{}{}{5mm}{}|\\
-% \verb|\fgrulernoborderline|\\
-% \verb|\ruler{rightdown}{3cm}}|\\[2mm]
+% Example:\\
+% |{\fgrulercolorcm{green}{blue}{red}|\\
+% |\rulerparams{1pt}{}{}{5mm}{}|\\
+% |\fgrulernoborderline|\\
+% |\ruler{rightdown}{3cm}}|\\[2mm]
% {\fgrulernoborderline
% \fgrulercolorcm{green}{blue}{red}
% \rulerparams{1pt}{}{}{5mm}{}
% \ruler{rightdown}{3cm}}
-% \end{description}
%
% \item\commandinline|\fgrulercolorin{!<color1>!}{!<color2>!}{!<color3>!}{!<color4>!}{!<color5>!}|\\
% Mark color in English rulers.
@@ -517,32 +536,32 @@ keepspaces]}
%
% \item\commandinline|!<color5>!|
% Mark color at integer units.
+% \end{description}
%
-% \item The default values are given by \commandinline|!<color>!| of \verb|\rulerparams|, respectively by \texttt{color} option.
+% The default values are given by \commandinline|!<color>!| of |\rulerparams|, respectively by |color| option.
%
-% \item Example:\\
-% \verb|{\fgrulercolorin{yellow}{orange}{green}{blue}{red}|\\
-% \verb|\rulerparams{1pt}{}{}{5mm}{}|\\
-% \verb|\fgrulernoborderline|\\
-% \verb|\ruler[in]{rightdown}{3in}}|\\[2mm]
+% Example:\\
+% |{\fgrulercolorin{yellow}{orange}{green}{blue}{red}|\\
+% |\rulerparams{1pt}{}{}{5mm}{}|\\
+% |\fgrulernoborderline|\\
+% |\ruler[in]{rightdown}{3in}}|\\[2mm]
% {\fgrulernoborderline
% \fgrulercolorin{yellow}{orange}{green}{blue}{red}
% \rulerparams{1pt}{}{}{5mm}{}
% \ruler[in]{rightdown}{3in}}
-% \end{description}
%
% \item\commandinline|\fgrulerreset|\\
% It sets all options and parameters to default values.
-% This command is usable only in \texttt{document} environment.
+% This command can only be expanded in the document body.
% \end{description}
%
-% \medskip\noindent\textcolor{red}{\faWarning}
-% All setting commands obey the normal scoping rules, i.e.\ if you use them inside a group, then the changing of the parameters is not valid outside the group.
+% \medskip\noindent
+% \colorbox{red!10}{\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\textcolor{red}{\faWarning}
+% \itshape All setting commands obey the normal scoping rules, i.e.~if you use them inside a group, then the changing of the parameters is not valid outside the group.}}
%
% \newpage\fgrulerreset
% \section{Examples}
% \subsection{Deafult case}\label{example:upperleft}
-% The output of the following example is the ruler in this page. It is the default case.
% \begin{examplelst}
% \documentclass{article}
% \usepackage{fgruler}
@@ -726,50 +745,30 @@ keepspaces]}
% ...
% \end{document}
% \end{examplelst}
-%
+%
% \newpage\fgrulerreset
-% \subsection{Setting the \texttt{type=user} option}\label{example:user-first}
-% In the next example the \texttt{type=user} option activates \texttt{type=upperright} or \texttt{type=upperleft}, depending on the page number is odd or even.
-% \setfgruler{type=none}
+% \subsection{Combining type names}\label{example:combining}
+% \setfgruler{type={alledges,alledgesT}}
+% \fgrulerdefusercm{\fgrulertype{cm}{alledges}\fgrulertype{cm}{alledgesT}}
% \begin{examplelst}
% \documentclass{article}
-% \usepackage[type=user]{fgruler}
-% \fgrulerdefusercm{%
-% \ifodd\value{page}\fgrulertype{cm}{upperright}%
-% \else\fgrulertype{cm}{upperleft}\fi}
-% \fgrulerdefuserin{%
-% \ifodd\value{page}\fgrulertype{in}{upperright}%
-% \else\fgrulertype{in}{upperleft}\fi}
+% \usepackage[type={alledges,alledgesT}]{fgruler}
% \begin{document}
% ...
% \end{document}
% \end{examplelst}
%
% \newpage\fgrulerreset
-% \subsection{Setting the \texttt{type=user} option}
-% In the next example the \texttt{type=user} option combines the effect of \texttt{type=upperleft} and \texttt{type=upperleftT}.
-% \setfgruler{type=user}
-% \fgrulerdefusercm{\fgrulertype{cm}{upperleft}\fgrulertype{cm}{upperleftT}}
-% \begin{examplelst}
-% \documentclass{article}
-% \usepackage[type=user]{fgruler}
-% \fgrulerdefusercm{\fgrulertype{cm}{upperleft}\fgrulertype{cm}{upperleftT}}
-% \fgrulerdefuserin{\fgrulertype{in}{upperleft}\fgrulertype{in}{upperleftT}}
-% \begin{document}
-% ...
-% \end{document}
-% \end{examplelst}
-%
-% \newpage\fgrulerreset
-% \subsection{Setting the \texttt{type=user} option}
-% In this example the \texttt{type=user} option combines the effect of \texttt{type=alledges} and \texttt{type=alledgesT}.
-% \setfgruler{type=user}
-% \fgrulerdefusercm{\fgrulertype{cm}{alledges}\fgrulertype{cm}{alledgesT}}
+% \subsection{Setting the \texttt{type=user} option}\label{example:user-first}
+% In the next example the |type=user| option activates |type=upperright| or |type=upperleft|, depending on the page number is odd or even.
+% \setfgruler{type=none}
% \begin{examplelst}
% \documentclass{article}
% \usepackage[type=user]{fgruler}
-% \fgrulerdefusercm{\fgrulertype{cm}{alledges}\fgrulertype{cm}{alledgesT}}
-% \fgrulerdefuserin{\fgrulertype{in}{alledges}\fgrulertype{in}{alledgesT}}
+% \fgrulerdefuser{
+% \ifodd\value{page}\fgrulertype{\fgrulerunit}{upperright}
+% \else\fgrulertype{\fgrulerunit}{upperleft}\fi
+% }
% \begin{document}
% ...
% \end{document}
@@ -777,20 +776,18 @@ keepspaces]}
%
% \newpage\fgrulerreset
% \subsection{Setting the \texttt{type=user} option}
-% In the next example the \texttt{type=user} option places a vertical ruler at the left border of the text area.
+% In the next example the |type=user| option places a vertical ruler at the left border of the text area.
% \setfgruler{type=user}
-%\fgrulerdefusercm{\AtTextLowerLeft{\ignorespaces\rulerparamsfromfg\llap{\ruler{downleft}{\textheight}}}}
+%\fgrulerdefuser{\AtTextLowerLeft{\ignorespaces\rulerparamsfromfg\llap{\ruler[\fgrulerunit]{downleft}{\textheight}}}}
% \begin{examplelst}
% \documentclass{article}
% \usepackage[type=user]{fgruler}
-% \newcommand{\fgruleruser}[1]{%
+% \fgrulerdefuser{
% \AtTextLowerLeft{% See eso-pic package!
-% \rulerparamsfromfg%
-% \llap{\ruler[#1]{downleft}{\textheight}}%
-% }%
+% \rulerparamsfromfg
+% \llap{\ruler[\fgrulerunit]{downleft}{\textheight}}
+% }
% }
-% \fgrulerdefusercm{\fgruleruser{cm}}
-% \fgrulerdefuserin{\fgruleruser{in}}
% \begin{document}
% ...
% \end{document}
@@ -798,22 +795,20 @@ keepspaces]}
%
% \newpage\fgrulerreset
% \subsection{Setting the \texttt{type=user} option}
-% In the next example the \texttt{type=user} option places rulers at the right and bottom borders of the text area.
+% In the next example the |type=user| option places rulers at the right and bottom borders of the text area.
% \setfgruler{type=user}
-%\fgrulerdefusercm{\AtTextLowerLeft{\ignorespaces\rulerparamsfromfg\rulernorotatenum\llap{\ruler{downleft}{\textheight}}\ruler*{rightdown}{\textwidth}}}
+%\fgrulerdefuser{\AtTextLowerLeft{\ignorespaces\rulerparamsfromfg\rulernorotatenum\llap{\ruler[\fgrulerunit]{downleft}{\textheight}}\ruler*[\fgrulerunit]{rightdown}{\textwidth}}}
% \begin{examplelst}
% \documentclass{article}
% \usepackage[type=user]{fgruler}
-% \newcommand{\fgruleruser}[1]{%
+% \fgrulerdefuser{
% \AtTextLowerLeft{% See eso-pic package!
-% \rulerparamsfromfg%
-% \rulernorotatenum%
-% \llap{\ruler[#1]{downleft}{\textheight}}%
-% \ruler*[#1]{rightdown}{\textwidth}%
-% }%
+% \rulerparamsfromfg
+% \rulernorotatenum
+% \llap{\ruler[\fgrulerunit]{downleft}{\textheight}}%
+% \ruler*[\fgrulerunit]{rightdown}{\textwidth}
+% }
% }
-% \fgrulerdefusercm{\fgruleruser{cm}}
-% \fgrulerdefuserin{\fgruleruser{in}}
% \begin{document}
% ...
% \end{document}
@@ -821,33 +816,32 @@ keepspaces]}
%
% \newpage\fgrulerreset
% \subsection{Setting the \texttt{type=user} option}\label{example:user-last}
-% In the next example the \texttt{type=user} option places rulers at the right and top borders of the text area.
+% In the next example the |type=user| option places rulers at the right and top borders of the text area.
% \setfgruler{type=user}
-%\fgrulerdefusercm{\AtTextUpperLeft{\ignorespaces%
-%\rulerparamsfromfg\ruler{rightup}{\textwidth}\ignorespaces%
-%\rulernorotatenum\fgrulercaptioncm{}\ignorespaces\ruler*{downright}{\textheight}}}
+%\fgrulerdefuser{\AtTextUpperLeft{\ignorespaces%
+%\rulerparamsfromfg\ruler[\fgrulerunit]{rightup}{\textwidth}\ignorespaces%
+%\rulernorotatenum\fgrulercaptioncm{}\ignorespaces\ruler*[\fgrulerunit]{downright}{\textheight}}}
% \begin{examplelst}
% \documentclass{article}
% \usepackage[type=user]{fgruler}
-% \newcommand{\fgruleruser}[1]{%
+% \fgrulerdefuser{
% \AtTextUpperLeft{% See eso-pic package!
-% \rulerparamsfromfg%
-% \ruler[#1]{rightup}{\textwidth}%
-% \rulernorotatenum\fgrulercaptioncm{}\fgrulercaptionin{}%
-% \ruler*[#1]{downright}{\textheight}%
-% }%
+% \rulerparamsfromfg
+% \ruler[\fgrulerunit]{rightup}{\textwidth}%
+% \rulernorotatenum
+% \csname fgrulercaption\fgrulerunit\endcsname{}%
+% \ruler*[\fgrulerunit]{downright}{\textheight}
+% }
% }
-% \fgrulerdefusercm{\fgruleruser{cm}}
-% \fgrulerdefuserin{\fgruleruser{in}}
% \begin{document}
% ...
% \end{document}
% \end{examplelst}
%
% \newpage\fgrulerreset
-% \subsection{Rulers on the foreground of a given page, and in text}
+% \subsection{Rulers on the foreground of the current page and in the text}
% \setfgruler{color=blue}
-% \fgruler{upperleft}{1cm}{1.5cm}
+% \fgruler{upperleft}{1cm}{1.5cm}\fgruler*[color=red,unit=in]{lowerrightT}
% \noindent
% text
% \rulerparams{}{\color{red}\tiny\ttfamily}{green}{}{}
@@ -863,6 +857,7 @@ keepspaces]}
% \usepackage[color=blue]{fgruler}
% \begin{document}
% \fgruler{upperleft}{1cm}{1.5cm}
+% \fgruler*[color=red,unit=in]{lowerrightT}
% \noindent
% text
% \rulerparams{}{\color{red}\tiny\ttfamily}{green}{}{}
@@ -876,10 +871,10 @@ keepspaces]}
% \end{examplelst}
%
% \newpage\fgrulerreset
-% \subsection{Ruler types in text}
+% \subsection{Ruler types in the text}
% \setfgruler{type=none}
% \noindent
-% \rulerparams{}{}{red}{}{1pt}
+% \rulerparams{}{}{red}{}{3pt}
% \ruler{rightdown}{3cm}
% \hfill
% \ruler{rightup}{3cm}
@@ -908,15 +903,16 @@ keepspaces]}
% \hfill
% \squareruler{upperright}{2cm}{3cm}
% \hfill
-% {\rulerparams{}{\footnotesize\bfseries\color{red}}{}{5mm}{-8pt}\squareruler[in]{lowerleft}{2in}{3cm}}
+% {\rulerparams{}{\footnotesize\bfseries\color{red}}{}{5mm}{}\squareruler[in]{lowerleft}{2in}{3cm}}
%
% \bigskip
% \begin{examplelst}
% \documentclass{article}
+% \usepackage[a4paper,margin=25mm]{geometry}
% \usepackage[nonefgrulers]{fgruler}
% \begin{document}
% \noindent
-% \rulerparams{}{}{red}{}{1pt}
+% \rulerparams{}{}{red}{}{3pt}
% \ruler{rightdown}{3cm}
% \hfill
% \ruler{rightup}{3cm}
@@ -945,12 +941,43 @@ keepspaces]}
% \hfill
% \squareruler{upperright}{2cm}{3cm}
% \hfill
-% {\rulerparams{}{\footnotesize\bfseries\color{red}}{}{5mm}{-8pt}
+% {\rulerparams{}{\footnotesize\bfseries\color{red}}{}{5mm}{}
% \squareruler[in]{lowerleft}{2in}{3cm}}
% \end{document}
% \end{examplelst}
%
% \newpage\fgrulerreset
+% \subsection{Measuring tapes}\label{example:tape}
+% \setfgruler{type=none}
+%
+%\noindent\ignorespaces\ruler{taperight}{\textwidth}\\[2pt]\rotatebox[origin=br]{-90}{\ruler{tapeleft}{3cm}}~\ruler{taperight}{10cm}
+%\par\medskip\noindent{\fgrulerdefnum{}\ruler{taperight}{\textwidth}}
+%\par\medskip\noindent{\fgrulerdefnum{}\fgrulercaptioncm{}\rulerparams{}{}{red}{}{0pt}\ruler{taperight}{\textwidth}}
+%
+% \bigskip
+% \begin{examplelst}
+% \documentclass{article}
+% \usepackage[a4paper,margin=25mm]{geometry}
+% \usepackage[nonefgrulers]{fgruler}
+% \begin{document}
+% \noindent
+% \ruler{taperight}{\textwidth}\\[2pt]
+% \rotatebox[origin=br]{-90}{\ruler{tapeleft}{3cm}}
+% \ruler{taperight}{10cm}
+%
+% \medskip\noindent
+% {\fgrulerdefnum{}
+% \ruler{taperight}{\textwidth}}
+%
+% \medskip\noindent
+% {\fgrulerdefnum{}
+% \fgrulercaptioncm{}
+% \rulerparams{}{}{red}{}{0pt}
+% \ruler{taperight}{\textwidth}}
+% \end{document}
+% \end{examplelst}
+%
+% \newpage\fgrulerreset
% \subsection{Mark length and rotating}
% \setfgruler{type=none}
% \noindent
@@ -990,6 +1017,7 @@ keepspaces]}
% \bigskip
% \begin{examplelst}
% \documentclass{article}
+% \usepackage[a4paper,margin=25mm]{geometry}
% \usepackage[nonefgrulers]{fgruler}
% \begin{document}
% \noindent
@@ -1001,36 +1029,6 @@ keepspaces]}
% \squareruler{lowerleft}{13cm}{6cm}
% \end{document}
% \end{examplelst}
-%
-% \newpage\fgrulerreset
-% \subsection{Tape measure}
-% \setfgruler{type=none}
-%
-% \newcommand{\tapemeasure}[1]{%
-% \parbox{#1}{%
-% {\fgrulerdefnum{}\fgrulercaptioncm{}\ruler{rightdown}{#1}}\\[2pt]
-% \ruler{rightup}{#1}}}
-% \noindent\ignorespaces
-% \tapemeasure{\textwidth}\\[2pt]
-% \rotatebox[origin=br]{-90}{\tapemeasure{3cm}}
-% \tapemeasure{10cm}
-%
-% \bigskip
-% \begin{examplelst}
-% \documentclass{article}
-% \usepackage[a4paper,margin=25mm]{geometry}
-% \usepackage[nonefgrulers]{fgruler}
-% \newcommand{\tapemeasure}[1]{%
-% \parbox{#1}{%
-% {\fgrulerdefnum{}\fgrulercaptioncm{}\ruler{rightdown}{#1}}\\[2pt]
-% \ruler{rightup}{#1}}}
-% \begin{document}
-% \noindent
-% \tapemeasure{\textwidth}\\[2pt]
-% \rotatebox[origin=br]{-90}{\tapemeasure{3cm}}
-% \tapemeasure{10cm}
-% \end{document}
-% \end{examplelst}
%
% \newpage\fgrulerreset
% \subsection{A new square ruler type}
@@ -1085,9 +1083,17 @@ keepspaces]}
\setlength{\fgruler@sep}{#5}%
\def\fgruler@font@{\normalfont\normalsize\fgruler@font}%
\addtolength{\fgruler@sep}{\fgruler@marklth}%
-\ifx\thefgrulernum\@empty\setlength{\fgruler@width}{\fgruler@marklth}\else%
-\settoheight{\fgruler@width}{\fgruler@font@\thefgrulernum}%
-\addtolength{\fgruler@width}{\fgruler@sep}\fi}
+\ifx\thefgrulernum\@empty%
+ \expandafter\ifx\csname fgruler@caption@\fgruler@unit\endcsname\@empty%
+ \setlength{\fgruler@width}{\fgruler@marklth}%
+ \else
+ \settoheight{\fgruler@width}{\fgruler@font@\csname fgruler@caption@\fgruler@unit\endcsname}%
+ \addtolength{\fgruler@width}{\fgruler@sep}%
+ \fi
+\else
+ \settoheight{\fgruler@width}{\fgruler@font@\thefgrulernum}%
+ \addtolength{\fgruler@width}{\fgruler@sep}%
+\fi}
\def\rulerparams#1#2#3#4#5{%
\ifx#1\@empty\else\def\fgruler@markthick@{#1}\fi%
@@ -1109,31 +1115,35 @@ keepspaces]}
\fgruler@set{\fgruler@markthick@}{\fgruler@numfont@}{\fgruler@color@}{\fgruler@marklength@}{\fgruler@numsep@}}
\def\fgruler@activate@type{%
+\def\fgruler@output{}%
\def\fgruler@check{cm}\ifx\fgruler@unit\fgruler@check\else%
\def\fgruler@check{in}\ifx\fgruler@unit\fgruler@check\else%
\PackageError{fgruler}{\fgruler@unit\space is invalid unit}{Valid units: cm, in}%
\fi\fi%
-\def\fgruler@check{upperleft}\ifx\fgruler@type\fgruler@check\else%
-\def\fgruler@check{upperright}\ifx\fgruler@type\fgruler@check\else%
-\def\fgruler@check{lowerleft}\ifx\fgruler@type\fgruler@check\else%
-\def\fgruler@check{lowerright}\ifx\fgruler@type\fgruler@check\else%
-\def\fgruler@check{upperleftT}\ifx\fgruler@type\fgruler@check\else%
-\def\fgruler@check{upperrightT}\ifx\fgruler@type\fgruler@check\else%
-\def\fgruler@check{lowerleftT}\ifx\fgruler@type\fgruler@check\else%
-\def\fgruler@check{lowerrightT}\ifx\fgruler@type\fgruler@check\else%
-\def\fgruler@check{alledges}\ifx\fgruler@type\fgruler@check\else%
-\def\fgruler@check{alledges*}\ifx\fgruler@type\fgruler@check\else%
-\def\fgruler@check{alledgesT}\ifx\fgruler@type\fgruler@check\else%
-\def\fgruler@check{alledgesT*}\ifx\fgruler@type\fgruler@check\else%
-\def\fgruler@check{none}\ifx\fgruler@type\fgruler@check\else%
-\def\fgruler@check{user}\ifx\fgruler@type\fgruler@check\else%
-\PackageError{fgruler}{\fgruler@type\space is invalid type}%
+\def\do##1{%
+\expandafter\def\expandafter\fgruler@type@item\expandafter{##1}%
+\def\fgruler@check{upperleft}\ifx\fgruler@type@item\fgruler@check\else%
+\def\fgruler@check{upperright}\ifx\fgruler@type@item\fgruler@check\else%
+\def\fgruler@check{lowerleft}\ifx\fgruler@type@item\fgruler@check\else%
+\def\fgruler@check{lowerright}\ifx\fgruler@type@item\fgruler@check\else%
+\def\fgruler@check{upperleftT}\ifx\fgruler@type@item\fgruler@check\else%
+\def\fgruler@check{upperrightT}\ifx\fgruler@type@item\fgruler@check\else%
+\def\fgruler@check{lowerleftT}\ifx\fgruler@type@item\fgruler@check\else%
+\def\fgruler@check{lowerrightT}\ifx\fgruler@type@item\fgruler@check\else%
+\def\fgruler@check{alledges}\ifx\fgruler@type@item\fgruler@check\else%
+\def\fgruler@check{alledges*}\ifx\fgruler@type@item\fgruler@check\else%
+\def\fgruler@check{alledgesT}\ifx\fgruler@type@item\fgruler@check\else%
+\def\fgruler@check{alledgesT*}\ifx\fgruler@type@item\fgruler@check\else%
+\def\fgruler@check{none}\ifx\fgruler@type@item\fgruler@check\else%
+\def\fgruler@check{user}\ifx\fgruler@type@item\fgruler@check\else%
+\PackageError{fgruler}{\fgruler@type@item\space is invalid type}%
{Valid types:\MessageBreak
upperleft, upperright, lowerleft, lowerright,\MessageBreak
upperleftT, upperrightT, lowerleftT, lowerrightT,\MessageBreak
alledges, alledges*, alledgesT, alledgesT*, user, none}%
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
-\def\fgruler@output{\csname fgruler@\fgruler@unit @\fgruler@type @fg\endcsname}}
+\g@addto@macro\fgruler@output{\csname fgruler@\fgruler@unit @##1@fg\endcsname}}%
+\expandafter\docsvlist\expandafter{\fgruler@type}}
\def\fgrulerratiocm#1#2{%
\ifx#1\@empty\else\def\fgruler@cm@ratio@i{#1}\fi%
@@ -1210,12 +1220,12 @@ alledges, alledges*, alledgesT, alledgesT*, user, none}%
\@tempcnta\fgruler@tempdima\advance\@tempcnta\@ne}
\def\fgruler@check@param#1#2{%
-\def\fgruler@param{#1}%
+\expandafter\def\expandafter\fgruler@param\expandafter{#1}%
\def\fgruler@check{cm}\ifx\fgruler@param\fgruler@check\else%
\def\fgruler@check{in}\ifx\fgruler@param\fgruler@check\else%
\PackageError{fgruler}{\fgruler@param\space is invalid parameter}{Valid parameters: cm, in}%
\fi\fi%
-\def\fgruler@param{#2}%
+\expandafter\def\expandafter\fgruler@param\expandafter{#2}%
\def\fgruler@check{rightdown}\ifx\fgruler@param\fgruler@check\else%
\def\fgruler@check{rightup}\ifx\fgruler@param\fgruler@check\else%
\def\fgruler@check{leftdown}\ifx\fgruler@param\fgruler@check\else%
@@ -1224,19 +1234,21 @@ alledges, alledges*, alledgesT, alledgesT*, user, none}%
\def\fgruler@check{downleft}\ifx\fgruler@param\fgruler@check\else%
\def\fgruler@check{upright}\ifx\fgruler@param\fgruler@check\else%
\def\fgruler@check{upleft}\ifx\fgruler@param\fgruler@check\else%
+\def\fgruler@check{taperight}\ifx\fgruler@param\fgruler@check\else%
+\def\fgruler@check{tapeleft}\ifx\fgruler@param\fgruler@check\else%
\PackageError{fgruler}{\fgruler@param\space is invalid parameter}%
{Valid parameters:\MessageBreak
rightdown, rightup, leftdown, leftup,\MessageBreak
-downright, downleft, upright, upleft}%
-\fi\fi\fi\fi\fi\fi\fi\fi}
+downright, downleft, upright, upleft, taperight, tapeleft}%
+\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
\def\fgruler@check@param@#1#2{%
-\def\fgruler@param{#1}%
+\expandafter\def\expandafter\fgruler@param\expandafter{#1}%
\def\fgruler@check{cm}\ifx\fgruler@param\fgruler@check\else%
\def\fgruler@check{in}\ifx\fgruler@param\fgruler@check\else%
\PackageError{fgruler}{\fgruler@param\space is invalid parameter}{Valid parameters: cm, in}%
\fi\fi%
-\def\fgruler@param{#2}%
+\expandafter\def\expandafter\fgruler@param\expandafter{#2}%
\def\fgruler@check{upperleft}\ifx\fgruler@param\fgruler@check\else%
\def\fgruler@check{upperright}\ifx\fgruler@param\fgruler@check\else%
\def\fgruler@check{lowerleft}\ifx\fgruler@param\fgruler@check\else%
@@ -1246,6 +1258,33 @@ downright, downleft, upright, upleft}%
upperleft, upperright, lowerleft, lowerright}%
\fi\fi\fi\fi}
+\def\fgruler@check@param@@#1#2{%
+\expandafter\def\expandafter\fgruler@param\expandafter{#1}%
+\def\fgruler@check{cm}\ifx\fgruler@param\fgruler@check\else%
+\def\fgruler@check{in}\ifx\fgruler@param\fgruler@check\else%
+\PackageError{fgruler}{\fgruler@param\space is invalid parameter}{Valid parameters: cm, in}%
+\fi\fi%
+\expandafter\def\expandafter\fgruler@param\expandafter{#2}%
+\def\fgruler@check{upperleft}\ifx\fgruler@param\fgruler@check\else%
+\def\fgruler@check{upperright}\ifx\fgruler@param\fgruler@check\else%
+\def\fgruler@check{lowerleft}\ifx\fgruler@param\fgruler@check\else%
+\def\fgruler@check{lowerright}\ifx\fgruler@param\fgruler@check\else%
+\def\fgruler@check{upperleftT}\ifx\fgruler@param\fgruler@check\else%
+\def\fgruler@check{upperrightT}\ifx\fgruler@param\fgruler@check\else%
+\def\fgruler@check{lowerleftT}\ifx\fgruler@param\fgruler@check\else%
+\def\fgruler@check{lowerrightT}\ifx\fgruler@param\fgruler@check\else%
+\def\fgruler@check{alledges}\ifx\fgruler@param\fgruler@check\else%
+\def\fgruler@check{alledges*}\ifx\fgruler@param\fgruler@check\else%
+\def\fgruler@check{alledgesT}\ifx\fgruler@param\fgruler@check\else%
+\def\fgruler@check{alledgesT*}\ifx\fgruler@param\fgruler@check\else%
+\def\fgruler@check{user}\ifx\fgruler@param\fgruler@check\else%
+\PackageError{fgruler}{\fgruler@param\space is invalid type}%
+{Valid types:\MessageBreak
+upperleft, upperright, lowerleft, lowerright,\MessageBreak
+upperleftT, upperrightT, lowerleftT, lowerrightT,\MessageBreak
+alledges, alledges*, alledgesT, alledgesT*, user}%
+\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
+
\newcommand{\fgruler@ruler}[3][cm]{\fgruler@check@param{#1}{#2}\fgruler@intextsetting\csname fgruler@#1@#2@\endcsname{#3}}
\newcommand{\fgruler@ruler@}[3][cm]{\fgruler@check@param{#1}{#2}\fgruler@intextsetting\csname fgruler@#1@#2@@\endcsname{#3}}
\def\ruler{\@ifstar{\fgruler@ruler@}{\fgruler@ruler}}
@@ -1254,7 +1293,9 @@ upperleft, upperright, lowerleft, lowerright}%
\newcommand{\fgruler@squareruler@}[4][cm]{\fgruler@check@param@{#1}{#2}\fgruler@intextsetting\csname fgruler@#1@#2@@\endcsname{#3}{#4}}
\def\squareruler{\@ifstar{\fgruler@squareruler@}{\fgruler@squareruler}}
-\newcommand{\fgruler}[4][cm]{\fgruler@check@param@{#1}{#2}\g@addto@macro\fgruler@output@{\csname fgruler@#1@#2@fg@\endcsname{#3}{#4}}}
+\newcommand{\fgruler@fgruler}[4][\fgruler@unit]{\fgruler@check@param@{#1}{#2}\g@addto@macro\fgruler@output@{\csname fgruler@#1@#2@fg@\endcsname{#3}{#4}}}
+\newcommand{\fgruler@fgruler@}[2][]{\g@addto@macro\fgruler@output@{{\setkeys{fgruler}{#1}\fgruler@check@param@@{\fgruler@unit}{#2}\csname fgruler@\fgruler@unit @#2@fg\endcsname}}}
+\def\fgruler{\@ifstar{\fgruler@fgruler@}{\fgruler@fgruler}}
\def\fgrulercaptioncm#1{\def\fgruler@caption@cm{#1}\ignorespaces}
\def\fgruler@caption@cm{cm}
@@ -1345,6 +1386,7 @@ upperleft, upperright, lowerleft, lowerright}%
\def\fgruler@startnumv{0}%
\fgruler@borderlinetrue%
\fgruler@showframefalse%
+\def\fgruler@output{\csname fgruler@\fgruler@unit @\fgruler@type @fg\endcsname}%
\else\PackageError{fgruler}{Don't use \protect\fgrulerreset\space in preamble!}{}\fi%
\ignorespaces}
@@ -1357,7 +1399,8 @@ upperleft, upperright, lowerleft, lowerright}%
\iffgruler@nonefgrulers
-\renewcommand{\fgruler}[4][]{}
+\renewcommand{\fgruler@fgruler}[4][]{}
+\renewcommand{\fgruler@fgruler@}[2][]{}
\else
@@ -1431,7 +1474,7 @@ upperleft, upperright, lowerleft, lowerright}%
\multiput(0,0)(5,0){\@tempcnta}{\fgruler@ifodd{\fgruler@cm@thick@ii\fgruler@cm@color@ii\line(0,-1){\fgruler@cm@ratio@ii\fgruler@marklth}}}%
\fgruler@div{#1}{10}%
\multiput(0,0)(10,0){\@tempcnta}{\fgruler@cm@thick@iii\fgruler@cm@color@iii\line(0,-1){\fgruler@marklth}}%
-\iffgruler@borderline\put(0,0){\line(1,0){#1}}\fi%
+\iffgruler@borderline\put(-\@halfwidth,0){\line(1,0){#1+\@wholewidth}}\fi% \@wholewidth is current line thickness and \@halfwidth = 0.5\@wholewidth (see in latex.ltx)
\setcounter{fgrulernum}{\fgruler@startnumh}\stepcounter{fgrulernum}%
\multiput(10,-\fgruler@sep)(10,0){\fgruler@tempdima}{\makebox(0,0)[t]{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}
@@ -1464,7 +1507,7 @@ upperleft, upperright, lowerleft, lowerright}%
\multiput(0,0)(8,0){\@tempcnta}{\fgruler@ifodd{\fgruler@in@thick@iv\fgruler@in@color@iv\line(0,-1){\fgruler@in@ratio@iv\fgruler@marklth}}}%
\fgruler@div{#1}{16}%
\multiput(0,0)(16,0){\@tempcnta}{\fgruler@in@thick@v\fgruler@in@color@v\line(0,-1){\fgruler@marklth}}%
-\iffgruler@borderline\put(0,0){\line(1,0){#1}}\fi%
+\iffgruler@borderline\put(-\@halfwidth,0){\line(1,0){#1+\@wholewidth}}\fi%
\setcounter{fgrulernum}{\fgruler@startnumh}\stepcounter{fgrulernum}%
\multiput(16,-\fgruler@sep)(16,0){\fgruler@tempdima}{\makebox(0,0)[t]{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}
@@ -1491,7 +1534,7 @@ upperleft, upperright, lowerleft, lowerright}%
\multiput(0,0)(5,0){\@tempcnta}{\fgruler@ifodd{\fgruler@cm@thick@ii\fgruler@cm@color@ii\line(0,1){\fgruler@cm@ratio@ii\fgruler@marklth}}}%
\fgruler@div{#1}{10}%
\multiput(0,0)(10,0){\@tempcnta}{\fgruler@cm@thick@iii\fgruler@cm@color@iii\line(0,1){\fgruler@marklth}}%
-\iffgruler@borderline\put(0,0){\line(1,0){#1}}\fi%
+\iffgruler@borderline\put(-\@halfwidth,0){\line(1,0){#1+\@wholewidth}}\fi%
\setcounter{fgrulernum}{\fgruler@startnumh}\stepcounter{fgrulernum}%
\multiput(10,\fgruler@sep)(10,0){\fgruler@tempdima}{\makebox(0,0)[b]{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}
@@ -1524,7 +1567,7 @@ upperleft, upperright, lowerleft, lowerright}%
\multiput(0,0)(8,0){\@tempcnta}{\fgruler@ifodd{\fgruler@in@thick@iv\fgruler@in@color@iv\line(0,1){\fgruler@in@ratio@iv\fgruler@marklth}}}%
\fgruler@div{#1}{16}%
\multiput(0,0)(16,0){\@tempcnta}{\fgruler@in@thick@v\fgruler@in@color@v\line(0,1){\fgruler@marklth}}%
-\iffgruler@borderline\put(0,0){\line(1,0){#1}}\fi%
+\iffgruler@borderline\put(-\@halfwidth,0){\line(1,0){#1+\@wholewidth}}\fi%
\setcounter{fgrulernum}{\fgruler@startnumh}\stepcounter{fgrulernum}%
\multiput(16,\fgruler@sep)(16,0){\fgruler@tempdima}{\makebox(0,0)[b]{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}
@@ -1551,7 +1594,7 @@ upperleft, upperright, lowerleft, lowerright}%
\multiput(0,0)(-5,0){\@tempcnta}{\fgruler@ifodd{\fgruler@cm@thick@ii\fgruler@cm@color@ii\line(0,-1){\fgruler@cm@ratio@ii\fgruler@marklth}}}%
\fgruler@div{#1}{10}%
\multiput(0,0)(-10,0){\@tempcnta}{\fgruler@cm@thick@iii\fgruler@cm@color@iii\line(0,-1){\fgruler@marklth}}%
-\iffgruler@borderline\put(0,0){\line(-1,0){#1}}\fi%
+\iffgruler@borderline\put(\@halfwidth,0){\line(-1,0){#1+\@wholewidth}}\fi%
\setcounter{fgrulernum}{\fgruler@startnumh}\stepcounter{fgrulernum}%
\multiput(-10,-\fgruler@sep)(-10,0){\fgruler@tempdima}{\makebox(0,0)[t]{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}
@@ -1584,7 +1627,7 @@ upperleft, upperright, lowerleft, lowerright}%
\multiput(0,0)(-8,0){\@tempcnta}{\fgruler@ifodd{\fgruler@in@thick@iv\fgruler@in@color@iv\line(0,-1){\fgruler@in@ratio@iv\fgruler@marklth}}}%
\fgruler@div{#1}{16}%
\multiput(0,0)(-16,0){\@tempcnta}{\fgruler@in@thick@v\fgruler@in@color@v\line(0,-1){\fgruler@marklth}}%
-\iffgruler@borderline\put(0,0){\line(-1,0){#1}}\fi%
+\iffgruler@borderline\put(\@halfwidth,0){\line(-1,0){#1+\@wholewidth}}\fi%
\setcounter{fgrulernum}{\fgruler@startnumh}\stepcounter{fgrulernum}%
\multiput(-16,-\fgruler@sep)(-16,0){\fgruler@tempdima}{\makebox(0,0)[t]{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}
@@ -1611,7 +1654,7 @@ upperleft, upperright, lowerleft, lowerright}%
\multiput(0,0)(-5,0){\@tempcnta}{\fgruler@ifodd{\fgruler@cm@thick@ii\fgruler@cm@color@ii\line(0,1){\fgruler@cm@ratio@ii\fgruler@marklth}}}%
\fgruler@div{#1}{10}%
\multiput(0,0)(-10,0){\@tempcnta}{\fgruler@cm@thick@iii\fgruler@cm@color@iii\line(0,1){\fgruler@marklth}}%
-\iffgruler@borderline\put(0,0){\line(-1,0){#1}}\fi%
+\iffgruler@borderline\put(\@halfwidth,0){\line(-1,0){#1+\@wholewidth}}\fi%
\setcounter{fgrulernum}{\fgruler@startnumh}\stepcounter{fgrulernum}%
\multiput(-10,\fgruler@sep)(-10,0){\fgruler@tempdima}{\makebox(0,0)[b]{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}
@@ -1644,7 +1687,7 @@ upperleft, upperright, lowerleft, lowerright}%
\multiput(0,0)(-8,0){\@tempcnta}{\fgruler@ifodd{\fgruler@in@thick@iv\fgruler@in@color@iv\line(0,1){\fgruler@in@ratio@iv\fgruler@marklth}}}%
\fgruler@div{#1}{16}%
\multiput(0,0)(-16,0){\@tempcnta}{\fgruler@in@thick@v\fgruler@in@color@v\line(0,1){\fgruler@marklth}}%
-\iffgruler@borderline\put(0,0){\line(-1,0){#1}}\fi%
+\iffgruler@borderline\put(\@halfwidth,0){\line(-1,0){#1+\@wholewidth}}\fi%
\setcounter{fgrulernum}{\fgruler@startnumh}\stepcounter{fgrulernum}%
\multiput(-16,\fgruler@sep)(-16,0){\fgruler@tempdima}{\makebox(0,0)[b]{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}
@@ -1671,7 +1714,7 @@ upperleft, upperright, lowerleft, lowerright}%
\multiput(0,0)(0,-5){\@tempcnta}{\fgruler@ifodd{\fgruler@cm@thick@ii\fgruler@cm@color@ii\line(1,0){\fgruler@cm@ratio@ii\fgruler@marklth}}}%
\fgruler@div{#1}{10}%
\multiput(0,0)(0,-10){\@tempcnta}{\fgruler@cm@thick@iii\fgruler@cm@color@iii\line(1,0){\fgruler@marklth}}%
-\iffgruler@borderline\put(0,0){\line(0,-1){#1}}\fi%
+\iffgruler@borderline\put(0,\@halfwidth){\line(0,-1){#1+\@wholewidth}}\fi%
\setcounter{fgrulernum}{\fgruler@startnumv}\stepcounter{fgrulernum}%
\multiput(\fgruler@sep,-10)(0,-10){\fgruler@tempdima}{\makebox(0,0)[l]{\fgruler@rotatebox{90}{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}}
@@ -1704,7 +1747,7 @@ upperleft, upperright, lowerleft, lowerright}%
\multiput(0,0)(0,-8){\@tempcnta}{\fgruler@ifodd{\fgruler@in@thick@iv\fgruler@in@color@iv\line(1,0){\fgruler@in@ratio@iv\fgruler@marklth}}}%
\fgruler@div{#1}{16}%
\multiput(0,0)(0,-16){\@tempcnta}{\fgruler@in@thick@v\fgruler@in@color@v\line(1,0){\fgruler@marklth}}%
-\iffgruler@borderline\put(0,0){\line(0,-1){#1}}\fi%
+\iffgruler@borderline\put(0,\@halfwidth){\line(0,-1){#1+\@wholewidth}}\fi%
\setcounter{fgrulernum}{\fgruler@startnumv}\stepcounter{fgrulernum}%
\multiput(\fgruler@sep,-16)(0,-16){\fgruler@tempdima}{\makebox(0,0)[l]{\fgruler@rotatebox{90}{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}}
@@ -1731,7 +1774,7 @@ upperleft, upperright, lowerleft, lowerright}%
\multiput(0,0)(0,-5){\@tempcnta}{\fgruler@ifodd{\fgruler@cm@thick@ii\fgruler@cm@color@ii\line(-1,0){\fgruler@cm@ratio@ii\fgruler@marklth}}}%
\fgruler@div{#1}{10}%
\multiput(0,0)(0,-10){\@tempcnta}{\fgruler@cm@thick@iii\fgruler@cm@color@iii\line(-1,0){\fgruler@marklth}}%
-\iffgruler@borderline\put(0,0){\line(0,-1){#1}}\fi%
+\iffgruler@borderline\put(0,\@halfwidth){\line(0,-1){#1+\@wholewidth}}\fi%
\setcounter{fgrulernum}{\fgruler@startnumv}\stepcounter{fgrulernum}%
\multiput(-\fgruler@sep,-10)(0,-10){\fgruler@tempdima}{\makebox(0,0)[r]{\fgruler@rotatebox{-90}{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}}
@@ -1764,7 +1807,7 @@ upperleft, upperright, lowerleft, lowerright}%
\multiput(0,0)(0,-8){\@tempcnta}{\fgruler@ifodd{\fgruler@in@thick@iv\fgruler@in@color@iv\line(-1,0){\fgruler@in@ratio@iv\fgruler@marklth}}}%
\fgruler@div{#1}{16}%
\multiput(0,0)(0,-16){\@tempcnta}{\fgruler@in@thick@v\fgruler@in@color@v\line(-1,0){\fgruler@marklth}}%
-\iffgruler@borderline\put(0,0){\line(0,-1){#1}}\fi%
+\iffgruler@borderline\put(0,\@halfwidth){\line(0,-1){#1+\@wholewidth}}\fi%
\setcounter{fgrulernum}{\fgruler@startnumv}\stepcounter{fgrulernum}%
\multiput(-\fgruler@sep,-16)(0,-16){\fgruler@tempdima}{\makebox(0,0)[r]{\fgruler@rotatebox{-90}{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}}
@@ -1791,7 +1834,7 @@ upperleft, upperright, lowerleft, lowerright}%
\multiput(0,0)(0,5){\@tempcnta}{\fgruler@ifodd{\fgruler@cm@thick@ii\fgruler@cm@color@ii\line(1,0){\fgruler@cm@ratio@ii\fgruler@marklth}}}%
\fgruler@div{#1}{10}%
\multiput(0,0)(0,10){\@tempcnta}{\fgruler@cm@thick@iii\fgruler@cm@color@iii\line(1,0){\fgruler@marklth}}%
-\iffgruler@borderline\put(0,0){\line(0,1){#1}}\fi%
+\iffgruler@borderline\put(0,-\@halfwidth){\line(0,1){#1+\@wholewidth}}\fi%
\setcounter{fgrulernum}{\fgruler@startnumv}\stepcounter{fgrulernum}%
\multiput(\fgruler@sep,10)(0,10){\fgruler@tempdima}{\makebox(0,0)[l]{\fgruler@rotatebox{90}{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}}
@@ -1824,7 +1867,7 @@ upperleft, upperright, lowerleft, lowerright}%
\multiput(0,0)(0,8){\@tempcnta}{\fgruler@ifodd{\fgruler@in@thick@iv\fgruler@in@color@iv\line(1,0){\fgruler@in@ratio@iv\fgruler@marklth}}}%
\fgruler@div{#1}{16}%
\multiput(0,0)(0,16){\@tempcnta}{\fgruler@in@thick@v\fgruler@in@color@v\line(1,0){\fgruler@marklth}}%
-\iffgruler@borderline\put(0,0){\line(0,1){#1}}\fi%
+\iffgruler@borderline\put(0,-\@halfwidth){\line(0,1){#1+\@wholewidth}}\fi%
\setcounter{fgrulernum}{\fgruler@startnumv}\stepcounter{fgrulernum}%
\multiput(\fgruler@sep,16)(0,16){\fgruler@tempdima}{\makebox(0,0)[l]{\fgruler@rotatebox{90}{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}}
@@ -1851,7 +1894,7 @@ upperleft, upperright, lowerleft, lowerright}%
\multiput(0,0)(0,5){\@tempcnta}{\fgruler@ifodd{\fgruler@cm@thick@ii\fgruler@cm@color@ii\line(-1,0){\fgruler@cm@ratio@ii\fgruler@marklth}}}%
\fgruler@div{#1}{10}%
\multiput(0,0)(0,10){\@tempcnta}{\fgruler@cm@thick@iii\fgruler@cm@color@iii\line(-1,0){\fgruler@marklth}}%
-\iffgruler@borderline\put(0,0){\line(0,1){#1}}\fi%
+\iffgruler@borderline\put(0,-\@halfwidth){\line(0,1){#1+\@wholewidth}}\fi%
\setcounter{fgrulernum}{\fgruler@startnumv}\stepcounter{fgrulernum}%
\multiput(-\fgruler@sep,10)(0,10){\fgruler@tempdima}{\makebox(0,0)[r]{\fgruler@rotatebox{-90}{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}}
@@ -1884,7 +1927,7 @@ upperleft, upperright, lowerleft, lowerright}%
\multiput(0,0)(0,8){\@tempcnta}{\fgruler@ifodd{\fgruler@in@thick@iv\fgruler@in@color@iv\line(-1,0){\fgruler@in@ratio@iv\fgruler@marklth}}}%
\fgruler@div{#1}{16}%
\multiput(0,0)(0,16){\@tempcnta}{\fgruler@in@thick@v\fgruler@in@color@v\line(-1,0){\fgruler@marklth}}%
-\iffgruler@borderline\put(0,0){\line(0,1){#1}}\fi%
+\iffgruler@borderline\put(0,-\@halfwidth){\line(0,1){#1+\@wholewidth}}\fi%
\setcounter{fgrulernum}{\fgruler@startnumv}\stepcounter{fgrulernum}%
\multiput(-\fgruler@sep,16)(0,16){\fgruler@tempdima}{\makebox(0,0)[r]{\fgruler@rotatebox{-90}{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}}
@@ -1899,6 +1942,66 @@ upperleft, upperright, lowerleft, lowerright}%
\def\fgruler@in@upleft@@#1{\leavevmode\hbox{}\lower#1\hbox{\fgruler@in@upleft@{#1}}}
+%% TAPERIGHT CM
+\def\fgruler@cm@taperight@#1{%
+\setlength{\unitlength}{1mm}%
+\begin{picture}(#1,\fgruler@width+\fgruler@sep)%
+\fgruler@cm@rightup{#1}%
+\setcounter{fgrulernum}{\fgruler@startnumh}%
+\put(0,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\thefgrulernum}}%
+\ifdim#1>.5cm\put(5,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\fgruler@caption@cm}}\fi%
+\def\thefgrulernum{}%
+\put(0,\fgruler@width+\fgruler@sep){\fgruler@cm@rightdown{#1}}%
+\end{picture}}
+
+\def\fgruler@cm@taperight@@#1{\leavevmode\hbox{}\lower\dimexpr
+\fgruler@width+\fgruler@sep\relax\hbox{\fgruler@cm@taperight@{#1}}}
+
+%% TAPERIGHT IN
+\def\fgruler@in@taperight@#1{%
+\setlength{\unitlength}{.0625in}%
+\begin{picture}(#1,\fgruler@width+\fgruler@sep)%
+\fgruler@in@rightup{#1}%
+\setcounter{fgrulernum}{\fgruler@startnumh}%
+\put(0,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\thefgrulernum}}%
+\ifdim#1>.5in\put(8,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\fgruler@caption@in}}\fi%
+\def\thefgrulernum{}%
+\put(0,\fgruler@width+\fgruler@sep){\fgruler@in@rightdown{#1}}%
+\end{picture}}
+
+\def\fgruler@in@taperight@@#1{\leavevmode\hbox{}\lower\dimexpr
+\fgruler@width+\fgruler@sep\relax\hbox{\fgruler@in@taperight@{#1}}}
+
+%% TAPELEFT CM
+\def\fgruler@cm@tapeleft@#1{%
+\setlength{\unitlength}{1mm}%
+\begin{picture}(#1,\fgruler@width+\fgruler@sep)(-#1,0)%
+\fgruler@cm@leftup{#1}%
+\setcounter{fgrulernum}{\fgruler@startnumh}%
+\put(0,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\thefgrulernum}}%
+\ifdim#1>.5cm\put(-5,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\fgruler@caption@cm}}\fi%
+\def\thefgrulernum{}%
+\put(0,\fgruler@width+\fgruler@sep){\fgruler@cm@leftdown{#1}}%
+\end{picture}}
+
+\def\fgruler@cm@tapeleft@@#1{\leavevmode\hbox{}\lower\dimexpr
+\fgruler@width+\fgruler@sep\relax\hbox{\fgruler@cm@tapeleft@{#1}}}
+
+%% TAPELEFT IN
+\def\fgruler@in@tapeleft@#1{%
+\setlength{\unitlength}{.0625in}%
+\begin{picture}(#1,\fgruler@width+\fgruler@sep)(-#1,0)%
+\fgruler@in@leftup{#1}%
+\setcounter{fgrulernum}{\fgruler@startnumh}%
+\put(0,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\thefgrulernum}}%
+\ifdim#1>.5in\put(-8,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\fgruler@caption@in}}\fi%
+\def\thefgrulernum{}%
+\put(0,\fgruler@width+\fgruler@sep){\fgruler@in@leftdown{#1}}%
+\end{picture}}
+
+\def\fgruler@in@tapeleft@@#1{\leavevmode\hbox{}\lower\dimexpr
+\fgruler@width+\fgruler@sep\relax\hbox{\fgruler@in@tapeleft@{#1}}}
+
%% UPPERLEFT CM
\def\fgruler@cm@upperleft@#1#2{%
\setlength{\unitlength}{1mm}%
@@ -2292,7 +2395,7 @@ upperleft, upperright, lowerleft, lowerright}%
\fgruler@in@downleft{\textheight}%
\put(0,-\textheight){\fgruler@in@rightdown{\textwidth}}
\put(\textwidth,0){\fgruler@in@downright{\textheight}}
-\put(5,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\fgruler@caption@in}}%
+\put(8,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\fgruler@caption@in}}%
\setcounter{fgrulernum}{\fgruler@startnumh}%
\put(0,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\thefgrulernum}}%
\put(0,-\textheight-\fgruler@sep){\makebox(0,0)[t]{\fgruler@font@\thefgrulernum}}%
@@ -2343,8 +2446,14 @@ upperleft, upperright, lowerleft, lowerright}%
\def\fgruler@cm@user@fg{}
\def\fgruler@in@user@fg{}
\def\fgrulertype#1#2{\csname fgruler@#1@#2@fg\endcsname}
-\def\fgrulerdefusercm#1{\def\fgruler@cm@user@fg{#1}}
-\def\fgrulerdefuserin#1{\def\fgruler@in@user@fg{#1}}
+
+\def\fgrulerdefusercm#1{\def\fgruler@cm@user@fg{#1}} % for old versions
+\def\fgrulerdefuserin#1{\def\fgruler@in@user@fg{#1}} % for old versions
+
+\def\fgrulerdefuser#1{%
+\expandafter\def\expandafter\fgrulerunit\expandafter{\fgruler@unit}%
+\@namedef{fgruler@\fgruler@unit @user@fg}{#1}}
+
% \end{macrocode}
% \Finale
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/fgruler/fgruler.pdf b/macros/latex/contrib/fgruler/fgruler.pdf
index d8ab5d9e48..89e49aac7b 100644
--- a/macros/latex/contrib/fgruler/fgruler.pdf
+++ b/macros/latex/contrib/fgruler/fgruler.pdf
Binary files differ
diff --git a/macros/latex/contrib/multiple-choice/README b/macros/latex/contrib/multiple-choice/README
new file mode 100644
index 0000000000..76c8da7292
--- /dev/null
+++ b/macros/latex/contrib/multiple-choice/README
@@ -0,0 +1,22 @@
+_____________________
+The multiple-choice package
+v0.2
+
+This package adjusts the choices of the multiple-choice question automatically.
+
+It has been wholly inspired by the work of Enrico Gregorio
+and improved by Vafa Khalighi and I've just packed and
+redistributed it under the name of the `multiple-choice` package.
+
+Current version release date: 2022/06/24
+___________________
+Seiied-Mohammad-Javad Razvian
+javadr at gmail dot com
+
+Copyright © 2022
+It may be distributed and/or modified under the LaTeX Project Public License,
+version 1.3c or higher (your choice). The latest version of
+this license is at: http://www.latex-project.org/lppl.txt
+
+This work is “author-maintained” (as per LPPL maintenance status)
+by Seiied-Mohammad-Javad Razavian.
diff --git a/macros/latex/contrib/multiple-choice/doc/multiple-choice-doc.pdf b/macros/latex/contrib/multiple-choice/doc/multiple-choice-doc.pdf
new file mode 100644
index 0000000000..8264bcecb5
--- /dev/null
+++ b/macros/latex/contrib/multiple-choice/doc/multiple-choice-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/multiple-choice/doc/multiple-choice-doc.tex b/macros/latex/contrib/multiple-choice/doc/multiple-choice-doc.tex
new file mode 100644
index 0000000000..f640cabd1a
--- /dev/null
+++ b/macros/latex/contrib/multiple-choice/doc/multiple-choice-doc.tex
@@ -0,0 +1,96 @@
+\documentclass{ltxdoc}
+
+\usepackage{fullpage}
+\usepackage{url}
+\usepackage{holtxdoc}
+\usepackage{listings}
+\usepackage{xcolor}
+\usepackage{multicol}
+\usepackage{multiple-choice}
+
+\lstdefinestyle{BashInputStyle}{
+ basicstyle=\footnotesize\sffamily,
+ frame=tb,
+ columns=fullflexible,
+ backgroundcolor=\color{gray!10},
+}
+\lstset{basicstyle=\ttfamily}
+
+\title{The \xpackage{multiple-choice} Package}
+\author{Seiied Mohammad Javad Razavian}
+
+\date{\choicesdate,\space version \choicesversion}
+
+ \parindent=0pt
+
+\thispagestyle{empty}
+
+\begin{document}
+\maketitle{
+\centerline{\large\bfseries Abstract}
+\bigskip
+\begin{multicols}{2}
+The \xpackage{multiple-choice} package adjusts the choices of the multiple-choice question automatically.
+It has been wholly inspired by the work of Enrico Gregorio\footnote{\url{https://tex.stackexchange.com/questions/140923}}
+and improved by Vafa Khalighi. I've just packed and redistributed it. It works with \XeLaTeX, \pdfLaTeX, and \LuaLaTeX.
+Please, report any issues including bugs, typos in the documentation
+or feature requests on \url{https://github.com/javadr/multiple-choice.sty/issues}.
+\end{multicols}
+ }
+
+ \section{Loading Package}
+The package can be loaded in the ordinary way
+\cs{usepackage{multiple-choice}}.
+
+\section{Typesetting the multiple-choice question}
+ The package defines the \texttt{choices} environment with the \cs{choice} macro for the choices of the multiple-chocie question.
+
+\begin{lstlisting}[style=BashInputStyle, escapechar={|},]
+\begin{choices}
+ \choice The first choice.
+ \choice The second choice.
+ \choice The third choice.
+ \choice The fourth choice.
+\end{choices}
+\end{lstlisting}
+
+ \section{Sample}
+\begin{enumerate}
+
+\item First question?
+\begin{choices}
+ \choice The first choice.
+ \choice The second choice.
+ \choice The third choice.
+ \choice The fourth choice.
+\end{choices}
+
+\item Second question?
+\begin{choices}
+ \choice The first choice.
+ \choice The second choice.
+ \choice The third choice.
+ \choice The fourth choice.
+ \choice The fifth choice.
+ \choice The sixth choice.
+\end{choices}
+
+\item Third question?
+\begin{choices}
+ \choice The very very very first choice.
+ \choice The second choice.
+ \choice The third choice.
+ \choice The fourth choice.
+\end{choices}
+
+\item Fourth question?
+\begin{choices}
+ \choice The very very very very very very very very very first choice.
+ \choice The second choice.
+ \choice The third choice.
+ \choice The fourth choice.
+\end{choices}
+
+\end{enumerate}
+
+\end{document}
diff --git a/macros/latex/contrib/multiple-choice/tex/multiple-choice.sty b/macros/latex/contrib/multiple-choice/tex/multiple-choice.sty
new file mode 100644
index 0000000000..e672e5dd54
--- /dev/null
+++ b/macros/latex/contrib/multiple-choice/tex/multiple-choice.sty
@@ -0,0 +1,99 @@
+%%
+%% This is file `multiple-choice.sty'.
+%%
+%% LaTeX package for multiple-choice questions
+%%
+%% Copyright © 2022
+%% ------------------------------------------------------------------
+%% Author: Seiied-Mohammad-Javad Razavian <javadr at gmail dot com>
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the Latex Project Public License, either
+%% version 1.3 of this license or (at your option) any
+%% later version.
+%% The latest version of the license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2003/06/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%% This work is “author-maintained” (as per LPPL maintenance status).
+%% The Current Maintainer of this work is Seiied-Mohammad-Javad Razavian.
+%% ------------------------------------------------------------------
+%%
+\NeedsTeXFormat{LaTeX2e}
+\def\choicesdate{2022/06/24}
+\def\choicesversion{0.2}
+\ProvidesPackage{multiple-choice}[\choicesdate\space v\choicesversion^^JMultiple-choice question with automatic adjustment of the choices based on their widths]
+\RequirePackage{biditools}
+\newdimen\mc@ChoiceLabelWidth
+\newdimen\mc@ChoiceLabelSep
+\mc@ChoiceLabelWidth=1.5em
+\mc@ChoiceLabelSep=0.5em
+\newcounter{mc@MultChoiceCount}
+\newcommand{\mc@InitialChoice}{%
+ \ifnum\value{mc@MultChoiceCount}>\z@
+ \cr
+ \fi
+ \stepcounter{mc@MultChoiceCount}%
+ \hbox to \mc@ChoiceLabelWidth{\hss(\Alph{mc@MultChoiceCount})}%
+ \kern\mc@ChoiceLabelSep
+}%
+\newcommand{\mc@FinalChoice}{%
+ \ifnum\value{mc@MultChoiceCount}>\z@
+ \egroup
+ \egroup
+ \fi
+ \stepcounter{mc@MultChoiceCount}%
+ \hspace{0pt plus 1pt}%
+ \hbox\bgroup
+ \hbox to \mc@ChoiceLabelWidth{\hss(\Alph{mc@MultChoiceCount})}%
+ \kern\mc@ChoiceLabelSep
+ \vtop\bgroup
+ \hsize\mc@MultChoicesWidth
+ \advance\hsize-\mc@ChoiceLabelWidth
+ \advance\hsize-\mc@ChoiceLabelSep
+}%
+\newbox\mc@MultChoicesBox
+\newdimen\mc@MultChoicesWidth
+\newcommand{\mc@ComputeMultChoicesWidth}[1]{%
+ \setbox\mc@MultChoicesBox\hbox{%
+ \vbox{%
+ \halign{%
+ ##\hfil\cr
+ #1\crcr
+ }%
+ }%
+ }%
+}%
+% MultipltChoices Environment.
+\newenvironment{choices}{%
+ \setcounter{mc@MultChoiceCount}{0}%
+ \let\choice\mc@InitialChoice
+ \bidi@collect@long@body\mc@ComputeMultChoicesWidth
+}{%
+ \mc@MultChoicesWidth-\fontcharwd\font`
+ \advance\mc@MultChoicesWidth\wd\mc@MultChoicesBox
+ \ifdim\mc@MultChoicesWidth>0.5\linewidth
+ \mc@MultChoicesWidth=\linewidth
+ \else
+ \ifdim\mc@MultChoicesWidth>0.25\linewidth
+ \mc@MultChoicesWidth=0.5\linewidth
+ \else
+ \mc@MultChoicesWidth=0.25\linewidth
+ \fi
+ \fi
+ \setcounter{mc@MultChoiceCount}{0}%
+ \let\choice\mc@FinalChoice
+ \parindent\z@
+ \ifvmode
+ \else
+ \par
+ \fi
+ \the\@bidi@envbody
+ \egroup
+ \egroup
+}%
+%%
+%%
+%% End of file `multiple-choice.sty'.
diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.pdf b/macros/latex/contrib/nicematrix/nicematrix-french.pdf
index 00a0f24a25..1350f7ab39 100644
--- a/macros/latex/contrib/nicematrix/nicematrix-french.pdf
+++ b/macros/latex/contrib/nicematrix/nicematrix-french.pdf
Binary files differ
diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.tex b/macros/latex/contrib/nicematrix/nicematrix-french.tex
index 78e53f1346..232ab4e8f2 100644
--- a/macros/latex/contrib/nicematrix/nicematrix-french.tex
+++ b/macros/latex/contrib/nicematrix/nicematrix-french.tex
@@ -136,10 +136,6 @@ Cette extension nécessite et charge les extensions \pkg{l3keys2e}, \pkg{array},
chargée). L'utilisateur final n'a qu'à charger l'extension \pkg{nicematrix} avec
l'instruction habituelle : |\usepackage{nicematrix}|.
-\medskip
-Si vous utilisez une distribution TeX~Live, sachez que TeX~Live 2020 au minimum
-est requis pour faire fonctionner \pkg{nicematrix}.
-
\medskip
L'idée de \pkg{nicematrix} est de créer des nœuds \textsc{pgf} derrière les
@@ -544,9 +540,8 @@ applicables à un chemin de Tikz). Pour des exemples d'utilisation de cette clé
|tikz|, voir p.~\pageref{tikz-key-examples} ;
\item la clé |name| donne un nom au nœud Tikz rectangulaire correspondant au
bloc ; on peut utiliser ce nom avec Tikz dans le |\CodeAfter| (cf.~p.~\pageref{code-after});
-\item \colorbox{yellow!50}{\textbf{Nouveau 6.5}}\enskip la clé
-|respect-arraystretch| évite la remise à $1$ de |\arraystretch| en début de
-bloc (qui a lieu par défaut) ;
+\item la clé |respect-arraystretch| évite la remise à $1$ de |\arraystretch| en
+début de bloc (qui a lieu par défaut) ;
\item la clé |borders| permet de ne tracer que certaines des bordures du bloc :
cette clé prend comme valeur une liste d'éléments parmi les suivants : |left|,
|right|, |top| et |bottom| ; \newline
@@ -1173,12 +1168,11 @@ Cette commande |\diagbox| peut aussi être utilisée dans un |\Block|.
\subsection{Commandes pour filets personnalisés}
\label{custom-line}
-\colorbox{yellow!50}{\textbf{Nouveau 6.5}}\enskip Il est possible de définir des
-commandes et des lettres pour des filets personnalisés avec la clé
-|custom-line|, utilisable dans |\NiceMatrixOptions| ou bien dans un
-environnement. Cette clé prend en argument une liste de paires de la forme
-\textsl{clé=valeur}. Il y a d'abord deux clés pour spécifier les outils qui
-permettront d'utiliser ce nouveau type de filet.
+Il est possible de définir des commandes et des lettres pour des filets
+personnalisés avec la clé |custom-line|, utilisable dans |\NiceMatrixOptions| ou
+bien dans un environnement. Cette clé prend en argument une liste de paires de
+la forme \textsl{clé=valeur}. Il y a d'abord deux clés pour spécifier les outils
+qui permettront d'utiliser ce nouveau type de filet.
\begin{itemize}
\item la clé |command| indique le nom (sans la contre-oblique) d'une commande
@@ -1258,9 +1252,9 @@ Tikz.
Par défaut aucune réservation de place n'est faite par défaut pour le filet qui
sera tracé avec Tikz. On peut demander une réservation (horizontale pour un
-filet vertical et verticale pour un filet horizontal) avec la clé |width| qui
+filet vertical et verticale pour un filet horizontal) avec la clé |total-width| qui
est donc en quelque sorte la largeur du filet qui sera tracé (cette largeur
-n'est pas déduite des caractéristiques fournies par la clé |tikz|).
+n'est pas calculée à partir des caractéristiques fournies par la clé |tikz|).
\bigskip
Voici ce que l'on obtient avec la clé |dotted| de Tikz.
@@ -1272,7 +1266,7 @@ Voici ce que l'on obtient avec la clé |dotted| de Tikz.
{
letter = I ,
~emphase#tikz = dotted @ ,
- ~emphase#width = \pgflinewidth@
+ ~emphase#total-width = \pgflinewidth@
}
}
@@ -1290,7 +1284,7 @@ sept & huit & neuf
{
letter = I ,
tikz = dotted ,
- width = \pgflinewidth
+ total-width = \pgflinewidth
}
}
\begin{NiceTabular}{cIcIc}
@@ -1307,10 +1301,12 @@ sept & huit & neuf
Comme on le voit dans l'exemple précédent, les pointillés tracés par la clé
|dotted| de Tikz ne sont pas ronds. C'est pourquoi l'extension \pkg{nicematrix}
propose dans la clé |custom-line| une clé |dotted| qui va tracer des pointillés
-ronds. La valeur de la clé |width| est, dans ce cas-là, déjà réglée sur le
-diamètre des points. Ces pointillés ronds sont aussi utilisés par
-\pkg{nicematrix} pour des lignes en pointillées continues créées entre deux
-composantes de la matrice par |\Cdots|, |\Vdots|, etc (voir p.~\pageref{Cdots}).
+ronds. La valeur initiale de la clé |total-width| est, dans ce cas-là, égale au
+diamètre des points (l'utilisateur peut quand même utiliser la clé |total-width|
+pour en changer la valeur). Ces pointillés ronds sont aussi utilisés par
+\pkg{nicematrix} pour des lignes en pointillés continues créées entre deux
+composantes de la matrice par |\Cdots|, |\Vdots|, etc. (voir
+p.~\pageref{Cdots}).
\medskip
L'extension \pkg{nicematrix} prédéfinit en fait la commande |\hdottedline| et la
@@ -2711,8 +2707,7 @@ points de suspension, on peut souhaiter utiliser les lignes pointillées de
|renew-matrix|.\footnote{Comme toutes les autres options, les options
|renew-dots|, |renew-matrix| peuvent être fixées avec la commande
|\NiceMatrixOptions|, mais elles peuvent aussi être passées en option du
- |\usepackage|. Remarquons que la clé |transparent| est un alias, considéré
- comme obsolète, pour la conjonction des clés |renew-dots| et |renew-matrix|.}
+ |\usepackage|.}
\smallskip
@@ -2791,7 +2786,7 @@ par les options suivantes (que l'on met entre crochets après la commande) :
\begin{itemize}
\item |color| ;
\item |radius| ;
-\item |shorten| ;
+\item |shorten-start|, |shorten-end| et |shorten| ;
\item |inter| ;
\item |line-style|.
\end{itemize}
@@ -2804,7 +2799,7 @@ de |\CodeAfter|, ou bien au niveau d'un environnement mais elles doivent alors
\begin{itemize}
\item |xdots/color| ;
\item |xdots/radius| ;
-\item |xdots/shorten| ;
+\item |xdots/shorten-start|, |xdots/shorten-end| et |xdots/shorten| ;
\item |inter| ;
\item |xdots/line-style|.
\end{itemize}
@@ -2832,12 +2827,15 @@ valeur initiale est $0.53$~pt.
\textbf{L'option xdots/shorten}\par\nobreak
\smallskip
-L'option |xdots/shorten| indique la marge qui est laissée aux deux extrémités de
-la ligne. Le nom s'inspire des options «|shorten >|» et «|shorten <|» de Tikz,
-mais il faut remarquer que \pkg{nicematrix} ne propose que |xdots/shorten|. La
-valeur initiale de ce paramètre est de $0.3$~em (il est conseillé d'utiliser une
+Les clés |xdots/shorten-start| et |xdots/shorten-end| indiquent la marge qui est
+laissée aux deux extrémités de la ligne. La clé |xdots/shorten| fixe les deux
+clés simultanément. La valeur initiale de $0.3$~em (il est conseillé d'utiliser une
unité de mesure dépendante de la fonte courante).
+\smallskip
+\colorbox{yellow!50}{\textbf{Nouveau 6.10}}\enskip Les clés
+|xdots/shorten-start| et |xdots/shorten-end| ont été introduites dans la
+version~6.10. Les versions précédentes ne proposaient que |xdots/shorten|.
\medskip
\colorbox{yellow!50}{\textbf{Nouveau 6.9}}\enskip \textbf{L'option xdots/inter}\par\nobreak
@@ -2962,9 +2960,15 @@ ces commandes.
\label{line-in-code-after}
La commande |\line| permet de tracer directement des lignes en pointillés entre
-les cases. Elle prend deux arguments correspondant aux deux cases à relier,
-chacun de la forme $i$-$j$ où $i$ est le numéro de ligne et $j$ est le numéro de
-colonne. Les options disponibles pour personnaliser les lignes pointillées créées par
+les cases. Elle prend deux arguments correspondant aux cases ou blocs à relier.
+Chacun de ces deux arguments peut être :
+\begin{itemize}
+\item une spécification de case de la forme $i$-$j$ où $i$ est le numéro de
+ligne et $j$ est le numéro de colonne ;
+\item \colorbox{yellow!50}{\textbf{Nouveau 6.10}}\enskip le nom d'un bloc (créé
+avec la commande |\Block| en utilisant la clé |name| de cette commande).
+\end{itemize}
+ Les options disponibles pour personnaliser les lignes pointillées créées par
|\Cdots|, |\Vdots|, etc. peuvent aussi être passées à cette commande (cf.
p.~\pageref{customization}).
@@ -3355,7 +3359,7 @@ Nom & Prénom & Date de naissance \\
\midrule
Achard~emphase#\tabularnote{La famille Achard est une très ancienne famille du Poitou.}!
& Jacques & 5 juin 1962 \\
-Lefèbvre~emphase#\tabularnote{Le patronyme Lefèbvre est une altération de Lefébure.}!
+Lefebvre~emphase#\tabularnote{Le patronyme Lefebvre est une altération de Lefébure.}!
& Mathilde & 23 mai 1988 \\
Vanesse & Stéphanie & 30 octobre 1994 \\
Dupont & Chantal & 15 janvier 1998 \\
@@ -3656,11 +3660,11 @@ suivant (avec une version de LaTeX postérieure à 2020/10/01).
\subsection{Commande \textbackslash ShowCellNames}
\colorbox{yellow!50}{\textbf{Nouveau 6.9}} La commande |\ShowCellNames|,
-utilisable dans le |\CodeBefore| et dans le |\CodeAfter| affiche le nom (sous la
+utilisable dans le |\CodeBefore| et le |\CodeAfter| affiche le nom (sous la
forme $i$-$j$) de chaque case.
-
+\medskip
\begin{BVerbatim}[baseline=c,boxwidth=10.6cm]
\begin{NiceTabular}{ccc}[hvlines,cell-space-limits=3pt]
\CodeBefore
@@ -5422,7 +5426,7 @@ Bien sûr, ce tableau ne pourra pas être coupé par un saut de page.
\end{scope}
\medskip
-Dans ce tableau, les instructions |\SubMatrix| sont exécutés après la
+Dans ce tableau, les instructions |\SubMatrix| sont exécutées après la
composition du tableau et les traits verticaux sont donc tracés sans espacer les
colonnes.
diff --git a/macros/latex/contrib/nicematrix/nicematrix.dtx b/macros/latex/contrib/nicematrix/nicematrix.dtx
index a0776552ee..6a73a5d7fd 100644
--- a/macros/latex/contrib/nicematrix/nicematrix.dtx
+++ b/macros/latex/contrib/nicematrix/nicematrix.dtx
@@ -15,8 +15,8 @@
%
% \fi
% \iffalse
-\def\myfileversion{6.9}
-\def\myfiledate{2022/05/25}
+\def\myfileversion{6.10}
+\def\myfiledate{2022/06/25}
%
%
%<*batchfile>
@@ -181,13 +181,10 @@ version 2005/12/01 or later.
% \medskip
% This package requires and \textbf{loads} the packages \pkg{l3keys2e},
% \pkg{array}, \pkg{amsmath}, \pkg{pgfcore} and the module \pkg{shapes} of
-% \textsc{pgf} (\pkg{tikz}, which is a layer over \textsc{pgf} is \emph{not}
+% \textsc{pgf} (\pkg{tikz}, which is a layer over \textsc{pgf}, is \emph{not}
% loaded). The final user only has to load the package with
% |\usepackage{nicematrix}|.
%
-% \medskip
-% If you use TeX~Live as TeX distribution, you should note that TeX~Live 2020 at
-% least is required by \pkg{nicematrix}.
%
% \medskip
% The idea of \pkg{nicematrix} is to create \textsc{pgf} nodes under the cells
@@ -586,9 +583,8 @@ version 2005/12/01 or later.
% \item the key |name| provides a name to the rectangular Tikz node
% corresponding to the block; it's possible to use that name with Tikz in the
% |\CodeAfter| of the environment (cf.~p.~\pageref{code-after});
-% \item \colorbox{yellow!50}{\textbf{New 6.5}}\enskip the key
-% |respect-arraystretch| prevents the setting of |\arraystretch| to $1$ at the
-% beginning of the block (which is the behaviour by default) ;
+% \item the key |respect-arraystretch| prevents the setting of |\arraystretch|
+% to $1$ at the beginning of the block (which is the behaviour by default) ;
% \item the key |borders| provides the ability to draw only some borders of the
% blocks; the value of that key is a (comma-separated) list of elements covered
% by |left|, |right|, |top| and |bottom|;\newline
@@ -1188,11 +1184,11 @@ version 2005/12/01 or later.
% \subsection{Commands for customized rules}
% \label{custom-line}
%
-% \colorbox{yellow!50}{\textbf{New 6.5}}\enskip It's also possible to define commands
-% and letters for customized rules with the key |custom-line| available in
-% |\NiceMatrixOptions| and in the options of individual environments. That key
-% takes in as argument a list of \textsl{key=value} pairs. First, there is two
-% keys to define the tools which will be used to use that new type of rule.
+% It's also possible to define commands and letters for customized rules with
+% the key |custom-line| available in |\NiceMatrixOptions| and in the options of
+% individual environments. That key takes in as argument a list of
+% \textsl{key=value} pairs. First, there is two keys to define the tools which
+% will be used to use that new type of rule.
%
% \begin{itemize}
% \item the key |command| is the name (without the backslahs) of a command that
@@ -1256,10 +1252,10 @@ version 2005/12/01 or later.
%
% By default, no space is reserved for the rule that will be drawn with Tikz. It
% is possible to specify a reservation (horizontal for a vertical rule and
-% vertical for an horizontal one) with the key |width|. That value of that key,
-% is, in some ways, the width of the rule that will be drawn (\pkg{nicematrix}
-% does not compute that width from the characteristics of the rule specified in
-% |tikz|).
+% vertical for an horizontal one) with the key |total-width|. That value of that
+% key, is, in some ways, the width of the rule that will be drawn
+% (\pkg{nicematrix} does not compute that width from the characteristics of the
+% rule specified in |tikz|).
%
%
% \begin{center}
@@ -1285,7 +1281,7 @@ version 2005/12/01 or later.
% {
% letter = I ,
% ~emphase#tikz = dotted@ ,
-% ~emphase#width = \pgflinewidth@
+% ~emphase#total-width = \pgflinewidth@
% }
% }
%
@@ -1302,7 +1298,7 @@ version 2005/12/01 or later.
% {
% letter = I ,
% tikz = dotted ,
-% width = \pgflinewidth
+% total-width = \pgflinewidth
% }
% }
% \begin{NiceTabular}{cIcIc}
@@ -1318,8 +1314,9 @@ version 2005/12/01 or later.
%
% As one can see, the dots of a dotted line of Tikz have the shape of a square,
% and not a circle. That's why the extension \pkg{nicematrix} provides in the
-% key |custom-line| a key |dotted| which will draw rounded dots. The value of
-% the key |width| is, in this case, preset to the diameter of the dots. Those
+% key |custom-line| a key |dotted| which will draw rounded dots. The initial
+% value of the key |total-width| is, in this case, equal to the diameter of the dots
+% (but the user may change the value with the key |total-width| if needed). Those
% dotted rules are also used by \pkg{nicematrix} to draw continuous dotted rules
% between cells of the matrix with |\Cdots|, |\Vdots|, etc. (cf. p.~\pageref{Cdots}).
%
@@ -1880,7 +1877,7 @@ version 2005/12/01 or later.
% preamble of the array).
% \end{itemize}
%
-% \medskip
+% \smallskip
% \begin{Verbatim}
% \NewDocumentCommand { \Blue } { } { ~emphase#\columncolor{blue!15}@ }
% \begin{NiceTabular}[colortbl-like]{>{\Blue}c>{\Blue}cc}
@@ -1937,7 +1934,7 @@ version 2005/12/01 or later.
% columns of type |p|, |b|, |m| and |X| (which start in
% vertical mode).}
% \item The key |bold| enforces
-% bold characters for the cells of the row, both in math mode and text mode.
+% bold characters for the cells of the row, both in math and text mode.
% \end{itemize}
%
% \medskip
@@ -2683,9 +2680,7 @@ version 2005/12/01 or later.
% |renew-dots| and |renew-matrix|.\footnote{The options |renew-dots|,
% |renew-matrix| can be fixed with the command
% |\NiceMatrixOptions| like the other options. However, they can also be fixed
-% as options of the command |\usepackage|. There is also a key |transparent|
-% which is an alias for the conjonction of |renew-dots| and |renew-matrix| but it
-% must be considered as obsolete.}
+% as options of the command |\usepackage|.}
%
% \smallskip
%
@@ -2759,7 +2754,7 @@ version 2005/12/01 or later.
% \begin{itemize}
% \item |color|;
% \item |radius|;
-% \item |shorten|;
+% \item |shorten-start|, |shorten-end| and |shorten|;
% \item |inter|;
% \item |line-style|.
% \end{itemize}
@@ -2771,7 +2766,7 @@ version 2005/12/01 or later.
% \begin{itemize}
% \item |xdots/color|;
% \item |xdots/radius|;
-% \item |xdots/shorten|;
+% \item |xdots/shorten-start|, |xdots/shorten-end| and |xdots/shorten|;
% \item |xdots/inter|;
% \item |xdots/line-style|.
% \end{itemize}
@@ -2796,11 +2791,15 @@ version 2005/12/01 or later.
% \textbf{The option xdots/shorten}\par\nobreak
%
% \smallskip
-% The option |xdots/shorten| fixes the margin of both extremities of the line.
-% The name is derived from the options ``|shorten >|'' and ``|shorten <|'' of
-% Tikz but one should notice that \pkg{nicematrix} only provides
-% |xdots/shorten|. The initial value of this parameter is 0.3~em (it is
-% recommanded to use a unit of length dependent of the current font).
+% The keys |xdots/shorten-start| and |xdots/shorten-end| fix the margin at the
+% extremities of the line. The key |xdots/shorten| fixes both parameters.
+% The initial value is 0.3~em (it is recommanded to use a unit of length
+% dependent of the current font).
+%
+% \smallskip
+% \colorbox{yellow!50}{\textbf{New 6.10}}\enskip The keys |xdots/shorten-start|
+% and |xdots/shorten-end| have been introduced in version 6.10. In the previous
+% versions, there was only |xdots/shorten|.
%
% \bigskip
% \colorbox{yellow!50}{\textbf{New 6.9}}\enskip
@@ -2926,11 +2925,17 @@ version 2005/12/01 or later.
% \subsection{The command \textbackslash line in the \textbackslash CodeAfter}
%
% \label{line-in-code-after}
-% The command |\line| draws directly dotted lines between nodes. It takes in two
-% arguments for the two cells to link, both of the form $i$-$j$ where is the
-% number of the row and $j$ is the number of the column. The options available
-% for the customisation of the dotted lines created by |\Cdots|, |\Vdots|, etc.
-% are also available for this command (cf. p.~\pageref{customisation}).
+% The command |\line| draws directly dotted lines between cells or blocks. It takes in two
+% arguments for the cells or blocks to link. Both argument may be:
+% \begin{itemize}
+% \item a specification of cell of the form $i$-$j$ where is the
+% number of the row and $j$ is the number of the column;
+% \item \colorbox{yellow!50}{\textbf{New 6.10}}\enskip the name of a block
+% (created by the command |\Block| with the key |name| of that command).
+% \end{itemize}
+% The options available for the customisation of the dotted lines created by
+% |\Cdots|, |\Vdots|, etc. are also available for this command (cf.
+% p.~\pageref{customisation}).
%
% \bigskip
% This command may be used, for example, to draw a dotted line between two
@@ -5750,7 +5755,21 @@ version 2005/12/01 or later.
\cs_new_protected:Npn \@@_fatal:n { \msg_fatal:nn { nicematrix } }
\cs_new_protected:Npn \@@_fatal:nn { \msg_fatal:nnn { nicematrix } }
\cs_new_protected:Npn \@@_msg_new:nn { \msg_new:nnn { nicematrix } }
-\cs_new_protected:Npn \@@_msg_new:nnn { \msg_new:nnnn { nicematrix } }
+% \end{macrocode}
+%
+% With Overleaf, a document is compiled in non-stop mode. When there is an
+% error, there is no way to the user to use the key H in order to have more
+% information. That's why we decide to put that piece of information (for the
+% messages with such information) in the main part of the message when the key
+% |messages-for-Overleaf| is used (at load-time).
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_msg_new:nnn #1 #2 #3
+ {
+ \bool_if:NTF \c_@@_messages_for_Overleaf_bool
+ { \msg_new:nnn { nicematrix } { #1 } { #2 \\ #3 } }
+ { \msg_new:nnnn { nicematrix } { #1 } { #2 } { #3 } }
+ }
+
% \end{macrocode}
%
% \begin{macrocode}
@@ -5758,7 +5777,7 @@ version 2005/12/01 or later.
{ \msg_redirect_name:nnn { nicematrix } }
% \end{macrocode}
%
-%
+%
% \bigskip
% \subsection*{Technical definitions}
%
@@ -6212,6 +6231,13 @@ version 2005/12/01 or later.
\int_new:N \g_@@_row_total_int
\int_new:N \g_@@_col_total_int
% \end{macrocode}
+%
+% \bigskip
+% The following parameter will be used by |\@@_create_row_node:| to avoid to
+% create the same row-node twice (at the end of the array).
+% \begin{macrocode}
+\int_new:N \g_@@_last_row_node_int
+% \end{macrocode}
%
% \bigskip
% The following counter corresponds to the key |nb-rows| of the command
@@ -6301,6 +6327,13 @@ version 2005/12/01 or later.
% \begin{macrocode}
\dim_new:N \l_@@_tabular_width_dim
% \end{macrocode}
+%
+% \bigskip
+% The following dimension will be used for the total width of composite rules
+% (\emph{total} means that the spaces on both sides are included).
+% \begin{macrocode}
+\dim_new:N \l_@@_rule_width_dim
+% \end{macrocode}
%
% \bigskip
% If the user uses an environment without preamble, we will raise the following
@@ -6598,8 +6631,7 @@ version 2005/12/01 or later.
%
%
% \medskip
-% If the user has used the key |corners| (or the key |hvlines-except-corners|,
-% even though that key is deprecated), all the cells which are in an (empty)
+% If the user has used the key |corners|, all the cells which are in an (empty)
% corner will be stored in the following sequence.
% \begin{macrocode}
\seq_new:N \l_@@_corners_cells_seq
@@ -6646,7 +6678,7 @@ version 2005/12/01 or later.
% \medskip
% The following sequence will be used when the command |\SubMatrix| is used in
% the |\CodeBefore| (and not in the |\CodeAfter|). It will contain the position of
-% all the sub-matrices specified in the |code-before|. Each sub-matrix is
+% all the sub-matrices specified in the |\CodeBefore|. Each sub-matrix is
% represented by an ``object'' of the forme |{|$i$|}{|$j$|}{|$k$|}{|$l$|}|
% where $i$ and $j$ are the number of row and column of the upper-left cell and
% $k$ and $l$ the number of row and column of the lower-right cell.
@@ -7171,7 +7203,7 @@ version 2005/12/01 or later.
% \bigskip
% By default, the behaviour of |\cline| is changed in the environments of
% \pkg{nicematrix}: a |\cline| spreads the array by an amount equal to
-% |\arrayrulewidht|. It's possible to disable this feature with the key
+% |\arrayrulewidth|. It's possible to disable this feature with the key
% |\l_@@_standard_line_bool|.
% \begin{macrocode}
\bool_new:N \l_@@_standard_cline_bool
@@ -7203,9 +7235,13 @@ version 2005/12/01 or later.
% definition, a dotted line is not a continuous line and, therefore, this
% distance may vary a little).
% \begin{macrocode}
-\dim_new:N \l_@@_xdots_shorten_dim
+\dim_new:N \l_@@_xdots_shorten_start_dim
+\dim_new:N \l_@@_xdots_shorten_end_dim
\hook_gput_code:nnn { begindocument } { . }
- { \dim_set:Nn \l_@@_xdots_shorten_dim { 0.3 em } }
+ {
+ \dim_set:Nn \l_@@_xdots_shorten_start_dim { 0.3 em }
+ \dim_set:Nn \l_@@_xdots_shorten_end_dim { 0.3 em }
+ }
% \end{macrocode}
% We use a hook only by security in case \cls{revtex4-1} is used (even though it
% is obsolete).
@@ -7419,12 +7455,23 @@ version 2005/12/01 or later.
color .value_required:n = true ,
shorten .code:n =
\hook_gput_code:nnn { begindocument } { . }
- { \dim_set:Nn \l_@@_xdots_shorten_dim { #1 } } ,
+ {
+ \dim_set:Nn \l_@@_xdots_shorten_start_dim { #1 }
+ \dim_set:Nn \l_@@_xdots_shorten_end_dim { #1 }
+ } ,
+ shorten-start .code:n =
+ \hook_gput_code:nnn { begindocument } { . }
+ { \dim_set:Nn \l_@@_xdots_shorten_start_dim { #1 } } ,
+ shorten-end .code:n =
+ \hook_gput_code:nnn { begindocument } { . }
+ { \dim_set:Nn \l_@@_xdots_shorten_end_dim { #1 } } ,
% \end{macrocode}
% We use a hook only by security in case \cls{revtex4-1}
% is used (even though it is obsolete). Idem for the following keys.
% \begin{macrocode}
shorten .value_required:n = true ,
+ shorten-start .value_required:n = true ,
+ shorten-end .value_required:n = true ,
radius .code:n =
\hook_gput_code:nnn { begindocument } { . }
{ \dim_set:Nn \l_@@_xdots_radius_dim { #1 } } ,
@@ -7566,17 +7613,7 @@ version 2005/12/01 or later.
% The key |hvlines-except-corners| is now deprecated (use |hvlines| and
% |corners| instead).
% \begin{macrocode}
- hvlines-except-corners .code:n =
- {
- \@@_error:n { hvlines-except-corners }
- \group_begin:
- \globaldefs = 1
- \@@_msg_redirect_name:nn { hvlines-except-corners } { none }
- \group_end:
- \clist_set:Nn \l_@@_corners_clist { #1 }
- \clist_set:Nn \l_@@_vlines_clist { all }
- \clist_set:Nn \l_@@_hlines_clist { all }
- } ,
+ hvlines-except-corners .code:n = \@@_fatal:n { hvlines-except-corners } ,
hvlines-except-corners .default:n = { NW , SW , NE , SE } ,
corners .clist_set:N = \l_@@_corners_clist ,
corners .default:n = { NW , SW , NE , SE } ,
@@ -7783,24 +7820,6 @@ version 2005/12/01 or later.
allow-duplicate-names .code:n =
\@@_msg_redirect_name:nn { Duplicate~name } { none } ,
allow-duplicate-names .value_forbidden:n = true ,
-% \end{macrocode}
-%
-% \bigskip
-% The key |letter-for-dotted-lines| is now obsolete. You will delete it in a
-% future version.
-% \begin{macrocode}
- letter-for-dotted-lines .code:n =
- {
- \@@_error:n { letter-for-dotted-lines }
- \group_begin:
- \globaldefs = 1
- \@@_msg_redirect_name:nn { letter-for-dotted-lines } { none }
- \group_end:
- \tl_if_single_token:nTF { #1 }
- { \str_set:Nx \l_@@_letter_for_dotted_lines_str { #1 } }
- { \@@_error:n { One~letter~allowed } }
- } ,
- letter-for-dotted-lines .value_required:n = true ,
notes .code:n = \keys_set:nn { NiceMatrix / notes } { #1 } ,
notes .value_required:n = true ,
sub-matrix .code:n =
@@ -7811,11 +7830,6 @@ version 2005/12/01 or later.
% \end{macrocode}
%
%
-% The following string will initially be empty. It will be set by the key
-% 'letter-for-dotted-lines'.
-% \begin{macrocode}
-\str_new:N \l_@@_letter_for_dotted_lines_str
-% \end{macrocode}
%
% \bigskip
% |\NiceMatrixOptions| is the command of the \pkg{nicematrix} package to fix
@@ -7947,7 +7961,7 @@ version 2005/12/01 or later.
\tl_gclear:N \g_@@_post_action_cell_tl
% \end{macrocode}
% At the beginning of the cell, we link |\CodeAfter| to a command which do
-% begins with |\\| (whereas the standard version of |\CodeAfter| begins does
+% begins with |\\| (whereas the standard version of |\CodeAfter| does
% not).
% \begin{macrocode}
\cs_set_eq:NN \CodeAfter \@@_CodeAfter_i:
@@ -8353,6 +8367,17 @@ version 2005/12/01 or later.
% \begin{macrocode}
\cs_new_protected:Npn \@@_create_row_node:
{
+ \int_compare:nNnT \c@iRow > \g_@@_last_row_node_int
+ {
+ \int_gset_eq:NN \g_@@_last_row_node_int \c@iRow
+ \@@_create_row_node_i:
+ }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_create_row_node_i:
+ {
% \end{macrocode}
% The |\hbox:n| (or |\hbox|) is mandatory.
% \begin{macrocode}
@@ -8786,6 +8811,16 @@ version 2005/12/01 or later.
\seq_gclear_new:N \g_@@_multicolumn_sizes_seq
% \end{macrocode}
%
+% \bigskip
+% The command |\create_row_node:| will create a row-node (and not a row of
+% nodes!). However, at the end of the array we construct a ``false row'' (for
+% the the col-nodes) and it interfers with the construction of the last row-node
+% of the array. We don't want to create such row-node twice (to avaid warnings
+% or, maybe, errors). That's why the command |\@@_create_row_node:| will use the
+% following counter to avoid such construction.
+% \begin{macrocode}
+ \int_gset:Nn \g_@@_last_row_node_int { -1 }
+% \end{macrocode}
%
% \interitem
% The code in |\@@_pre_array_ii:| is used only here.
@@ -8850,10 +8885,10 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \bigskip
-% The following command |\@@_pre_array_i:w| will be used when the keyword
+% The following command |\@@_CodeBefore_Body:w| will be used when the keyword
% |\CodeBefore| is present at the beginning of the environment.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_pre_array_i:w #1 \Body
+\cs_new_protected_nopar:Npn \@@_CodeBefore_Body:w #1 \Body
{
\tl_put_right:Nn \l_@@_code_before_tl { #1 }
\bool_set_true:N \l_@@_code_before_bool
@@ -8970,7 +9005,7 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% We compose the |\CodeBefore| in math mode in order to nullify the spaces put
-% by the user between instructions in the |code-before|.
+% by the user between instructions in the |\CodeBefore|.
% \begin{macrocode}
\bool_if:NT \l_@@_NiceTabular_bool \c_math_toggle_token
% \end{macrocode}
@@ -9291,10 +9326,10 @@ version 2005/12/01 or later.
% |\CodeBefore| at the beginning of the body of the environment. If that keyword
% is present, we have now to extract all the content between that keyword
% |\CodeBefore| and the (other) keyword |\Body|. It's the job that will do the
-% command |\@@_pre_array_i:w|. After that job, the command |\@@_pre_array_i:w|
+% command |\@@_CodeBefore_Body:w|. After that job, the command |\@@_CodeBefore_Body:w|
% will go on with |\@@_pre_array:|.
% \begin{macrocode}
- \IfBooleanTF { #6 } \@@_pre_array_i:w \@@_pre_array:
+ \IfBooleanTF { #6 } \@@_CodeBefore_Body:w \@@_pre_array:
}
% \end{macrocode}
%
@@ -9789,18 +9824,13 @@ version 2005/12/01 or later.
\q_stop { }
}
{
- \str_case_e:nnF { #1 }
- {
- \l_@@_letter_for_dotted_lines_str
- { \@@_patch_preamble_xii:n #1 }
- \l_@@_letter_vlism_tl
- {
- \seq_gput_right:Nx \g_@@_cols_vlism_seq
- { \int_eval:n { \c@jCol + 1 } }
- \tl_gput_right:Nx \g_@@_preamble_tl
- { \exp_not:N ! { \skip_horizontal:N \arrayrulewidth } }
- \@@_patch_preamble:n
- }
+ \str_if_eq:nVTF { #1 } \l_@@_letter_vlism_tl
+ {
+ \seq_gput_right:Nx \g_@@_cols_vlism_seq
+ { \int_eval:n { \c@jCol + 1 } }
+ \tl_gput_right:Nx \g_@@_preamble_tl
+ { \exp_not:N ! { \skip_horizontal:N \arrayrulewidth } }
+ \@@_patch_preamble:n
}
% \end{macrocode}
% Now the case of a letter set by the final user for a customized rule. Such
@@ -9814,9 +9844,11 @@ version 2005/12/01 or later.
% will use, instead, letters in the preamble of its array).
% \begin{macrocode}
{
- \keys_set_known:nnN { NiceMatrix / ColumnTypes } { #1 } \l_tmpa_tl
- \tl_if_empty:NTF \l_tmpa_tl
- \@@_patch_preamble:n
+ \keys_if_exist:nnTF { NiceMatrix / ColumnTypes } { #1 }
+ {
+ \keys_set:nn { NiceMatrix / ColumnTypes } { #1 }
+ \@@_patch_preamble:n
+ }
{ \@@_fatal:nn { unknown~column~type } { #1 } }
}
}
@@ -10485,21 +10517,6 @@ version 2005/12/01 or later.
}
% \end{macrocode}
%
-% \bigskip
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_patch_preamble_xii:n #1
- {
- \tl_gput_right:Nn \g_@@_preamble_tl
- { ! { \skip_horizontal:N 2\l_@@_xdots_radius_dim } }
-% \end{macrocode}
-% The command |\@@_vdottedline:n| is protected, and, therefore, won't be
-% expanded before writing on |\g_@@_internal_code_after_tl|.
-% \begin{macrocode}
- \tl_gput_right:Nx \g_@@_internal_code_after_tl
- { \@@_vdottedline:n { \int_use:N \c@jCol } }
- \@@_patch_preamble:n
- }
-% \end{macrocode}
%
% \bigskip
% After a specifier of column, we have to test whether there is one or several
@@ -10908,8 +10925,14 @@ version 2005/12/01 or later.
\@@_create_extra_nodes:
\seq_if_empty:NF \g_@@_blocks_seq \@@_draw_blocks:
}
+% \end{macrocode}
+% We don't do the following test with |\c@tabularnote| because the value of that
+% counter is not reliable when the command |\ttabbox| of \pkg{floatrow} is used
+% (because |\ttabbox| de-activate |\stepcounter| because if compiles several
+% twice its tabular).
+% \begin{macrocode}
\bool_lazy_or:nnT
- { \int_compare_p:nNn \c@tabularnote > 0 }
+ { ! \seq_if_empty_p:N \g_@@_tabularnotes_seq }
{ ! \tl_if_empty_p:V \l_@@_tabularnote_tl }
\@@_insert_tabularnotes:
\end { minipage }
@@ -11881,7 +11904,7 @@ version 2005/12/01 or later.
\seq_gset_from_clist:Nn \exp_not:N \g_@@_pos_of_blocks_seq
{ \seq_use:Nnnn \g_@@_pos_of_blocks_seq , , , }
}
- }
+ }
\seq_if_empty:NF \g_@@_multicolumn_cells_seq
{
\tl_gput_right:Nx \g_@@_aux_tl
@@ -11981,10 +12004,14 @@ version 2005/12/01 or later.
\dim_set:Nn \l_@@_xdots_radius_dim { 0.7 \l_@@_xdots_radius_dim }
\dim_set:Nn \l_@@_xdots_inter_dim { 0.55 \l_@@_xdots_inter_dim }
% \end{macrocode}
-% The dimension |\l_@@_xdots_shorten_dim| corresponds to the option
-% |xdots/shorten| available to the user.
+% The dimensions |\l_@@_xdots_shorten_start_dim| and
+% |\l_@@_xdots_shorten_start_dim| correspond to the options
+% |xdots/shorten-start| and |xdots/shorten-end| available to the user.
% \begin{macrocode}
- \dim_set:Nn \l_@@_xdots_shorten_dim { 0.6 \l_@@_xdots_shorten_dim }
+ \dim_set:Nn \l_@@_xdots_shorten_start_dim
+ { 0.6 \l_@@_xdots_shorten_start_dim }
+ \dim_set:Nn \l_@@_xdots_shorten_end_dim
+ { 0.6 \l_@@_xdots_shorten_end_dim }
}
% \end{macrocode}
%
@@ -13217,8 +13244,8 @@ version 2005/12/01 or later.
\draw
[
#1 ,
- shorten~> = \l_@@_xdots_shorten_dim ,
- shorten~< = \l_@@_xdots_shorten_dim ,
+ shorten~> = \l_@@_xdots_shorten_end_dim ,
+ shorten~< = \l_@@_xdots_shorten_start_dim ,
]
( \l_@@_x_initial_dim , \l_@@_y_initial_dim )
% \end{macrocode}
@@ -13338,7 +13365,7 @@ version 2005/12/01 or later.
\int_set:Nn \l_tmpa_int
{
\dim_ratio:nn
- { \l_@@_l_dim - \l_@@_xdots_shorten_dim }
+ { \l_@@_l_dim - \l_@@_xdots_shorten_start_dim }
\l_@@_xdots_inter_dim
}
}
@@ -13349,7 +13376,7 @@ version 2005/12/01 or later.
\int_set:Nn \l_tmpa_int
{
\dim_ratio:nn
- { \l_@@_l_dim - \l_@@_xdots_shorten_dim }
+ { \l_@@_l_dim - \l_@@_xdots_shorten_end_dim }
\l_@@_xdots_inter_dim
}
}
@@ -13357,7 +13384,10 @@ version 2005/12/01 or later.
\int_set:Nn \l_tmpa_int
{
\dim_ratio:nn
- { \l_@@_l_dim - 2 \l_@@_xdots_shorten_dim }
+ {
+ \l_@@_l_dim
+ - \l_@@_xdots_shorten_start_dim - \l_@@_xdots_shorten_end_dim
+ }
\l_@@_xdots_inter_dim
}
}
@@ -13380,19 +13410,6 @@ version 2005/12/01 or later.
}
% \end{macrocode}
%
-% The length $\ell$ is the length of the dotted line. We note $\Delta$ the
-% length between two dots and $n$ the number of intervals between dots. We note
-% $\delta = \frac12(\ell - n \Delta)$. The distance between the initial
-% extremity of the line and the first dot will be equal to $k\cdot\delta$ where
-% $k=0$, $1$ or $2$. We first compute this number $k$ in |\l_tmpb_int|.
-% \begin{macrocode}
- \int_set:Nn \l_tmpb_int
- {
- \bool_if:NTF \l_@@_initial_open_bool
- { \bool_if:NTF \l_@@_final_open_bool 1 0 }
- { \bool_if:NTF \l_@@_final_open_bool 2 1 }
- }
-% \end{macrocode}
% In the loop over the dots, the dimensions |\l_@@_x_initial_dim| and
% |\l_@@_y_initial_dim| will be used for the coordinates of the dots. But,
% before the loop, we must move until the first dot.
@@ -13402,17 +13419,21 @@ version 2005/12/01 or later.
{
( \l_@@_x_final_dim - \l_@@_x_initial_dim ) *
\dim_ratio:nn
- { \l_@@_l_dim - \l_@@_xdots_inter_dim * \l_tmpa_int }
+ {
+ \l_@@_l_dim - \l_@@_xdots_inter_dim * \l_tmpa_int
+ + \l_@@_xdots_shorten_start_dim - \l_@@_xdots_shorten_end_dim
+ }
{ 2 \l_@@_l_dim }
- * \l_tmpb_int
}
\dim_gadd:Nn \l_@@_y_initial_dim
{
( \l_@@_y_final_dim - \l_@@_y_initial_dim ) *
\dim_ratio:nn
- { \l_@@_l_dim - \l_@@_xdots_inter_dim * \l_tmpa_int }
+ {
+ \l_@@_l_dim - \l_@@_xdots_inter_dim * \l_tmpa_int
+ + \l_@@_xdots_shorten_start_dim - \l_@@_xdots_shorten_end_dim
+ }
{ 2 \l_@@_l_dim }
- * \l_tmpb_int
}
\pgf@relevantforpicturesizefalse
\int_step_inline:nnn 0 \l_tmpa_int
@@ -13856,13 +13877,25 @@ version 2005/12/01 or later.
% array (in the format $i$-$j$) and draws a dotted line between these cells.
%
% \medskip
-% First, we write a command with an argument of the format $i$-$j$ and applies
-% the command |\int_eval:n| to $i$ and~$j$ ; this must \emph{not} be protected
-% (and is, of course fully expandable).\footnote{Indeed, we want that the user
-% may use the command |\line| in |\CodeAfter| with LaTeX counters in the
-% arguments --- with the command |\value|.}
+% First, we write a command with the following behaviour:
+% \begin{itemize}
+% \item If the argument is of the format $i$-$j$, our command applies
+% the command |\int_eval:n| to $i$ and~$j$ ;
+% \item If not (that is to say, when it's a name of a |\Block|), the argument is
+% left unchanged.
+% \end{itemize}
+% This must \emph{not} be protected (and is, of course fully
+% expandable).\footnote{Indeed, we want that the user may use the command
+% |\line| in |\CodeAfter| with LaTeX counters in the arguments --- with the
+% command |\value|.}
% \begin{macrocode}
\cs_new:Npn \@@_double_int_eval:n #1-#2 \q_stop
+ {
+ \tl_if_empty:nTF { #2 }
+ { #1 }
+ { \@@_double_int_eval_i:n #1-#2 \q_stop }
+ }
+\cs_new:Npn \@@_double_int_eval_i:n #1-#2- \q_stop
{ \int_eval:n { #1 } - \int_eval:n { #2 } }
% \end{macrocode}
%
@@ -13885,8 +13918,8 @@ version 2005/12/01 or later.
\use:e
{
\@@_line_i:nn
- { \@@_double_int_eval:n #2 \q_stop }
- { \@@_double_int_eval:n #3 \q_stop }
+ { \@@_double_int_eval:n #2 - \q_stop }
+ { \@@_double_int_eval:n #3 - \q_stop }
}
\group_end:
}
@@ -14762,13 +14795,6 @@ version 2005/12/01 or later.
start .int_set:N = \l_@@_start_int ,
start .initial:n = 1 ,
end .int_set:N = \l_@@_end_int ,
-% \end{macrocode}
-% The following keys are no-op because there are keys which may be inherited
-% from a list of pairs \textsl{key=value} of a definition of a customized rule
-% (with the key |custom-line| of |\NiceMatrixOptions|).
-% \begin{macrocode}
- % letter .code:n = \prg_do_nothing: ,
- % command .code:n = \prg_do_nothing:
}
% \end{macrocode}
%
@@ -14800,8 +14826,9 @@ version 2005/12/01 or later.
tikz .tl_set:N = \l_@@_tikz_rule_tl ,
tikz .value_required:n = true ,
tikz .initial:n = ,
- width .dim_set:N = \l_@@_rule_width_dim ,
- width .value_required:n = true
+ total-width .dim_set:N = \l_@@_rule_width_dim ,
+ total-width .value_required:n = true ,
+ width .meta:n = { total-width = #1 }
}
% \end{macrocode}
%
@@ -14919,13 +14946,8 @@ version 2005/12/01 or later.
% \begin{macrocode}
\cs_new_protected:Npn \@@_vline_ii:
{
- \bool_set_false:N \l_@@_dotted_boo
-% \end{macrocode}
-% We use |\keys_set_known:nV| and not |\keys_set:nV| because there may be the
-% keys |letter| and |command| in the list (these keys are present if the rule
-% comes from a customized line (created by |custom-line|).
-% \begin{macrocode}
- \keys_set_known:nV { NiceMatrix / RulesBis } \l_@@_other_keys_tl
+ \bool_set_false:N \l_@@_dotted_bool
+ \keys_set:nV { NiceMatrix / RulesBis } \l_@@_other_keys_tl
\bool_if:NTF \l_@@_dotted_bool
\@@_vline_iv:
{
@@ -14937,8 +14959,8 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \bigskip
-% First the case of a standard rule, that is to say a rule which is not dotted
-% (and the user has not used the key |tikz|).
+% First the case of a standard rule: the user has not used the key |dotted| nor
+% the key |tikz|.
% \begin{macrocode}
\cs_new_protected:Npn \@@_vline_iii:
{
@@ -14948,7 +14970,14 @@ version 2005/12/01 or later.
\@@_qpoint:n { row - \int_use:N \l_@@_local_start_int }
\dim_set_eq:NN \l_tmpa_dim \pgf@y
\@@_qpoint:n { col - \int_use:N \l_@@_position_int }
- \dim_set_eq:NN \l_tmpb_dim \pgf@x
+ \dim_set:Nn \l_tmpb_dim
+ {
+ \pgf@x
+ - 0.5 \l_@@_rule_width_dim
+ +
+ ( \arrayrulewidth * \l_@@_multiplicity_int
+ + \doublerulesep * ( \l_@@_multiplicity_int - 1 ) ) / 2
+ }
\@@_qpoint:n { row - \int_eval:n { \l_@@_local_end_int + 1 } }
\dim_set_eq:NN \l_@@_tmpc_dim \pgf@y
\bool_lazy_all:nT
@@ -15001,8 +15030,8 @@ version 2005/12/01 or later.
\pgfrememberpicturepositiononpagetrue
\pgf@relevantforpicturesizefalse
\@@_qpoint:n { col - \int_use:N \l_@@_position_int }
- \dim_set_eq:NN \l_@@_x_initial_dim \pgf@x
- \dim_set_eq:NN \l_@@_x_final_dim \pgf@x
+ \dim_set:Nn \l_@@_x_initial_dim { \pgf@x - 0.5 \l_@@_rule_width_dim }
+ \dim_set_eq:NN \l_@@_x_final_dim \l_@@_x_initial_dim
\@@_qpoint:n { row - \int_use:N \l_@@_local_start_int }
\dim_set_eq:NN \l_@@_y_initial_dim \pgf@y
\@@_qpoint:n { row - \int_eval:n { \l_@@_local_end_int + 1 } }
@@ -15057,7 +15086,7 @@ version 2005/12/01 or later.
{
\tl_if_eq:NnF \l_@@_vlines_clist { all }
{ \clist_if_in:NnT \l_@@_vlines_clist { ##1 } }
- { \@@_vline:n { position = ##1 } }
+ { \@@_vline:n { position = ##1 , total-width = \arrayrulewidth } }
}
}
% \end{macrocode}
@@ -15174,12 +15203,7 @@ version 2005/12/01 or later.
\cs_new_protected:Npn \@@_hline_ii:
{
\bool_set_false:N \l_@@_dotted_bool
-% \end{macrocode}
-% We use |\keys_set_known:nV| and not |\keys_set:nV| because there may be the
-% keys |letter| and |command| in the list (these keys are present if the rule
-% comes from a customized line (created by |custom-line|).
-% \begin{macrocode}
- \keys_set_known:nV { NiceMatrix / RulesBis } \l_@@_other_keys_tl
+ \keys_set:nV { NiceMatrix / RulesBis } \l_@@_other_keys_tl
\bool_if:NTF \l_@@_dotted_bool
\@@_hline_iv:
{
@@ -15191,7 +15215,7 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \bigskip
-% First the case of a standard rule, that is to say a rule which is not dotted.
+% First the case of a standard rule (without the keys |dotted| and |tikz|).
% \begin{macrocode}
\cs_new_protected:Npn \@@_hline_iii:
{
@@ -15201,7 +15225,14 @@ version 2005/12/01 or later.
\@@_qpoint:n { col - \int_use:N \l_@@_local_start_int }
\dim_set_eq:NN \l_tmpa_dim \pgf@x
\@@_qpoint:n { row - \int_use:N \l_@@_position_int }
- \dim_set_eq:NN \l_tmpb_dim \pgf@y
+ \dim_set:Nn \l_tmpb_dim
+ {
+ \pgf@y
+ - 0.5 \l_@@_rule_width_dim
+ +
+ ( \arrayrulewidth * \l_@@_multiplicity_int
+ + \doublerulesep * ( \l_@@_multiplicity_int - 1 ) ) / 2
+ }
\@@_qpoint:n { col - \int_eval:n { \l_@@_local_end_int + 1 } }
\dim_set_eq:NN \l_@@_tmpc_dim \pgf@x
\bool_lazy_all:nT
@@ -15294,8 +15325,8 @@ version 2005/12/01 or later.
\pgfrememberpicturepositiononpagetrue
\pgf@relevantforpicturesizefalse
\@@_qpoint:n { row - \int_use:N \l_@@_position_int }
- \dim_set_eq:NN \l_@@_y_initial_dim \pgf@y
- \dim_set_eq:NN \l_@@_y_final_dim \pgf@y
+ \dim_set:Nn \l_@@_y_initial_dim { \pgf@y - 0.5 \l_@@_rule_width_dim }
+ \dim_set_eq:NN \l_@@_y_final_dim \l_@@_y_initial_dim
\@@_qpoint:n { col - \int_use:N \l_@@_local_start_int }
\dim_set_eq:NN \l_@@_x_initial_dim \pgf@x
\int_compare:nNnT \l_@@_local_start_int = 1
@@ -15371,7 +15402,7 @@ version 2005/12/01 or later.
{
\tl_if_eq:NnF \l_@@_hlines_clist { all }
{ \clist_if_in:NnT \l_@@_hlines_clist { ##1 } }
- { \@@_hline:n { position = ##1 } }
+ { \@@_hline:n { position = ##1 , total-width = \arrayrulewidth } }
}
}
% \end{macrocode}
@@ -15452,21 +15483,52 @@ version 2005/12/01 or later.
{
\str_clear_new:N \l_@@_command_str
\str_clear_new:N \l_@@_letter_str
- \dim_zero_new:N \l_@@_rule_width_dim
+ \keys_set_known:nnN { NiceMatrix / custom-line } { #1 } \l_@@_other_keys_tl
% \end{macrocode}
-% The token list |\l_tmpa_tl| is for the key |color|.
+% If the final user only wants to draw horizontal rules, he does not need to
+% specify a letter (for the vertical rules in the preamble of the array). On the
+% other hand, if he only wants to draw vertical rules, he does not need to
+% define a command (which is the tool to draw horizontal rules in the array). Of
+% course, a definition of custom lines with no letter and no command would be point-less.
+%
% \begin{macrocode}
- \tl_clear:N \l_tmpa_tl
+ \bool_lazy_and:nnTF
+ { \str_if_empty_p:N \l_@@_letter_str }
+ { \str_if_empty_p:N \l_@@_command_str }
+ { \@@_error:n { No~letter~and~no~command } }
+ { \exp_args:NV \@@_custom_line_i:n \l_@@_other_keys_tl }
+ }
% \end{macrocode}
-% The flag |\l_tmpa_bool| will indicate whether the key |tikz| is present.
+%
+%
+%
% \begin{macrocode}
- \bool_set_false:N \l_tmpa_bool
+\keys_define:nn { NiceMatrix / custom-line }
+ {
+ % here, we will use change in the future to use .str_set:N
+ letter .code:n = \str_set:Nn \l_@@_letter_str { #1 } ,
+ letter .value_required:n = true ,
+ % here, we will use change in the future to use .str_set:N
+ command .code:n = \str_set:Nn \l_@@_command_str { #1 } ,
+ command .value_required:n = true ,
+ }
% \end{macrocode}
-% The flag |\l_tmpb_bool| will indicate whether the key |width| is present.
+%
+% \bigskip
% \begin{macrocode}
- \bool_set_false:N \l_tmpb_bool
- \keys_set_known:nn { NiceMatrix / Custom-Line } { #1 }
- \bool_if:NT \l_tmpa_bool
+\cs_new_protected:Npn \@@_custom_line_i:n #1
+ {
+% \end{macrocode}
+% The following flags will be raised when the keys |tikz|, |dotted| and |color|
+% are used (in the |custom-line|).
+% \begin{macrocode}
+ \bool_set_false:N \l_@@_tikz_rule_bool
+ \bool_set_false:N \l_@@_dotted_rule_bool
+ \bool_set_false:N \l_@@_color_bool
+% \end{macrocode}
+% \begin{macrocode}
+ \keys_set:nn { NiceMatrix / custom-line-bis } { #1 }
+ \bool_if:NT \l_@@_tikz_rule_bool
{
% \end{macrocode}
% We can't use |\c_@@_tikz_loaded_bool| to test whether \pkg{tikz} is loaded
@@ -15474,118 +15536,108 @@ version 2005/12/01 or later.
% \begin{macrocode}
\cs_if_exist:NF \tikzpicture
{ \@@_error:n { tikz~in~custom-line~without~tikz } }
- \tl_if_empty:NF \l_tmpa_tl
+ \bool_if:NT \l_@@_color_bool
{ \@@_error:n { color~in~custom-line~with~tikz } }
}
- \bool_if:NT \l_tmpb_bool
+ \bool_if:nT
{
- \bool_if:NF \l_tmpa_bool
- { \@@_error:n { key~width~without~key~tikz } }
+ \int_compare_p:nNn \l_@@_multiplicity_int > 1
+ && \l_@@_dotted_rule_bool
}
-% \end{macrocode}
-% If the final user only wants to draw horizontal rules, he does not need to
-% specify a letter (for the vertical rules in the preamble of the array). On the
-% other hand, if he only wants to draw vertical rules, he does not need to
-% define a command (which is the tool to draw horizontal rules in the array). Of
-% course, a definition of custom lines with no letter and no command would be point-less.
-%
-% \begin{macrocode}
- \bool_lazy_and:nnTF
- { \str_if_empty_p:N \l_@@_letter_str }
- { \str_if_empty_p:N \l_@@_command_str }
- { \@@_error:n { No~letter~and~no~command } }
+ { \@@_error:n { key~multiplicity~with~dotted } }
+ \str_if_empty:NF \l_@@_letter_str
{
- \str_if_empty:NF \l_@@_letter_str
+ \int_compare:nTF { \str_count:N \l_@@_letter_str != 1 }
+ { \@@_error:n { Several~letters } }
{
- \int_compare:nNnTF { \str_count:N \l_@@_letter_str } = 1
- {
- \exp_args:NnV \tl_if_in:NnTF
- \c_@@_forbidden_letters_str \l_@@_letter_str
- { \@@_error:n { Forbidden~letter } }
- {
+ \exp_args:NnV \tl_if_in:NnTF
+ \c_@@_forbidden_letters_str \l_@@_letter_str
+ { \@@_error:n { Forbidden~letter } }
+ {
% \end{macrocode}
% The final user can, locally, redefine a letter of column type. That's
% compatible with the use of |\keys_define:nn|: the definition is local and may
% overwrite a previous definition.
% \begin{macrocode}
- \keys_define:nx { NiceMatrix / ColumnTypes }
- {
- \l_@@_letter_str .code:n =
- { \@@_custom_line_i:n { \exp_not:n { #1 } } }
- }
- }
- }
- { \@@_error:n { Several~letters } }
- }
- \str_if_empty:NF \l_@@_command_str
- {
-% \end{macrocode}
-% The flag |\l_tmpa_bool| means that the key 'tikz' have been used. When the key
-% 'tikz' has not been used, the width of the rule is computed with the
-% multiplicity of the rule.
-% \begin{macrocode}
- \bool_if:NF \l_tmpa_bool
- {
- \dim_set:Nn \l_@@_rule_width_dim
- {
- \arrayrulewidth * \l_@@_tmpc_int
- + \doublerulesep * ( \l_@@_tmpc_int - 1 )
- }
- }
- \@@_define_h_custom_line:nV { #1 } \l_@@_rule_width_dim
- }
- }
- }
+ \keys_define:nx { NiceMatrix / ColumnTypes }
+ {
+ \l_@@_letter_str .code:n =
+ { \@@_v_custom_line:n { \exp_not:n { #1 } } }
+ }
+ }
+ }
+ }
+ \str_if_empty:NF \l_@@_command_str { \@@_h_custom_line:n { #1 } }
+ }
% \end{macrocode}
%
+%
% \begin{macrocode}
\str_const:Nn \c_@@_forbidden_letters_str { lcrpmbVX|()[]!@<> }
% \end{macrocode}
%
% \medskip
-% The previous command |\@@_custom_line:n| uses the following set of keys.
+% The previous command |\@@_custom_line_i:n| uses the following set of keys.
% However, the whole definition of the customized lines (as provided by the
% final user as argument of |custom-line|) will also be used further with
% other sets of keys (for instance |{NiceMatrix/Rules}|). That's why the
-% following set of keys has only entries for a few keys.
+% following set of keys has some keys which are no-op.
% \begin{macrocode}
-\keys_define:nn { NiceMatrix / Custom-Line }
+\keys_define:nn { NiceMatrix / custom-line-bis }
{
- % here, we will use change in the future to use .tl_set:N
- letter .code:n = \str_set:Nn \l_@@_letter_str { #1 } ,
- letter .value_required:n = true ,
- % here, we will use change in the future to use .tl_set:N
- command .code:n = \str_set:Nn \l_@@_command_str { #1 } ,
- command .value_required:n = true ,
- multiplicity .int_set:N = \l_@@_tmpc_int ,
+ multiplicity .int_set:N = \l_@@_multiplicity_int ,
multiplicity .initial:n = 1 ,
multiplicity .value_required:n = true ,
- color .tl_set:N = \l_tmpa_tl ,
- color .value_required:n = true ,
+ color .code:n = \bool_set_true:N \l_@@_color_bool ,
+ color .value_required:n = true ,
+ tikz .code:n = \bool_set_true:N \l_@@_tikz_rule_bool ,
+ tikz .value_required:n = true ,
+ dotted .code:n = \bool_set_true:N \l_@@_dotted_rule_bool ,
+ dotted .value_forbidden:n = true ,
+ total-width .code:n = { } ,
+ total-width .value_required:n = true ,
+ width .code:n = { } ,
+ width .value_required:n = true ,
+ sep-color .code:n = { } ,
+ sep-color .value_required:n = true ,
+ unknown .code:n = \@@_error:n { Unknown~key~for~custom-line }
+ }
% \end{macrocode}
-% When the key |tikz| is used, the rule will be drawn with Tikz by using the set
-% of keys specified in the value of that key |tikz|.
+%
+% The following keys will indicate whether the keys |dotted|, |tikz| and |color|
+% are used in the use of a |custom-line|.
% \begin{macrocode}
- tikz .code:n = \bool_set_true:N \l_tmpa_bool ,
+\bool_new:N \l_@@_dotted_rule_bool
+\bool_new:N \l_@@_tikz_rule_bool
+\bool_new:N \l_@@_color_bool
% \end{macrocode}
-% The key |width| must be used only when the key |tikz| is used. When used, the
-% key |width| specifies the width of the rule: it will be used to reserve space
-% (in the preamble of the array or in the command for the horizontal rules).
+%
+% \bigskip
+% The following keys are used to determine the total width of the line
+% (including the spaces on both sides of the line). The key |width| is
+% deprecated and has been replaced by the key |total-width|.
+%
% \begin{macrocode}
- width .code:n = \dim_set:Nn \l_@@_rule_width_dim { #1 }
- \bool_set_true:N \l_tmpb_bool ,
- width .value_required:n = true ,
- unknown .code:n = \@@_error:n { Unknown~key~for~custom-line }
+\keys_define:nn { NiceMatrix / custom-line-width }
+ {
+ multiplicity .int_set:N = \l_@@_multiplicity_int ,
+ multiplicity .initial:n = 1 ,
+ multiplicity .value_required:n = true ,
+ tikz .code:n = \bool_set_true:N \l_@@_tikz_rule_bool ,
+ total-width .code:n = \dim_set:Nn \l_@@_rule_width_dim { #1 }
+ \bool_set_true:N \l_@@_total_width_bool ,
+ total-width .value_required:n = true ,
+ width .meta:n = { total-width = #1 } ,
+ dotted .code:n = \bool_set_true:N \l_@@_dotted_rule_bool ,
}
% \end{macrocode}
%
% \bigskip
% The following command will create the command that the final user will use in
-% its array to draw a horizontal rule (hence the `|h|` in the name). |#1| is the
-% whole set of keys to pass to |\@@_line:n| and |#2| is the widht of the whole
-% rule.
+% its array to draw an horizontal rule (hence the `|h|` in the name). |#1| is the
+% whole set of keys to pass to |\@@_line:n|.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_define_h_custom_line:nn #1 #2
+\cs_new_protected:Npn \@@_h_custom_line:n #1
{
% \end{macrocode}
% We use |\cs_set:cpn| and not |\cs_new:cpn| because we want a local definition.
@@ -15595,37 +15647,68 @@ version 2005/12/01 or later.
{
\noalign
{
- \skip_vertical:n { #2 }
+ \@@_compute_rule_width:n { #1 }
+ \skip_vertical:n { \l_@@_rule_width_dim }
\tl_gput_right:Nx \g_@@_internal_code_after_tl
- { \@@_hline:n { #1 , position = \int_eval:n { \c@iRow + 1 } } }
+ {
+ \@@_hline:n
+ {
+ #1 ,
+ position = \int_eval:n { \c@iRow + 1 } ,
+ total-width = \dim_use:N \l_@@_rule_width_dim
+ }
+ }
}
}
\seq_put_left:NV \l_@@_custom_line_commands_seq \l_@@_command_str
}
-\cs_generate_variant:Nn \@@_define_h_custom_line:nn { n V }
+\cs_generate_variant:Nn \@@_h_custom_line:nn { n V }
% \end{macrocode}
%
-% The flag |\l_tmpa_bool| means that the key 'tikz' have been used. When the key
-% 'tikz' has not been used, the width of the rule is computed with the
-% multiplicity of the rule.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_custom_line_i:n #1
+\cs_new_protected:Npn \@@_compute_rule_width:n #1
{
- \bool_if:NF \l_tmpa_bool
- {
- \dim_set:Nn \l_@@_rule_width_dim
- {
- \arrayrulewidth * \l_@@_tmpc_int
- + \doublerulesep * ( \l_@@_tmpc_int - 1)
- }
+ \bool_set_false:N \l_@@_tikz_rule_bool
+ \bool_set_false:N \l_@@_total_width_bool
+ \bool_set_false:N \l_@@_dotted_rule_bool
+ \keys_set_known:nn { NiceMatrix / custom-line-width } { #1 }
+ \bool_if:NF \l_@@_total_width_bool
+ {
+ \bool_if:NTF \l_@@_dotted_rule_bool
+ { \dim_set:Nn \l_@@_rule_width_dim { 2 \l_@@_xdots_radius_dim } }
+ {
+ \bool_if:NF \l_@@_tikz_rule_bool
+ {
+ \dim_set:Nn \l_@@_rule_width_dim
+ {
+ \arrayrulewidth * \l_@@_multiplicity_int
+ + \doublerulesep * ( \l_@@_multiplicity_int - 1 )
+ }
+ }
+ }
}
+ }
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_v_custom_line:n #1
+ {
+ \@@_compute_rule_width:n { #1 }
+% \end{macrocode}
+% In the following line, the |\dim_use:N| is mandatory since we do an expansion.
+% \begin{macrocode}
\tl_gput_right:Nx \g_@@_preamble_tl
+ { \exp_not:N ! { \skip_horizontal:n { \dim_use:N \l_@@_rule_width_dim } } }
+ \tl_gput_right:Nx \g_@@_internal_code_after_tl
{
- \exp_not:N !
- { \skip_horizontal:n { \dim_use:N \l_@@_rule_width_dim } }
+ \@@_vline:n
+ {
+ #1 ,
+ position = \int_eval:n { \c@jCol + 1 } ,
+ total-width = \dim_use:N \l_@@_rule_width_dim
+ }
}
- \tl_gput_right:Nx \g_@@_internal_code_after_tl
- { \@@_vline:n { #1 , position = \int_eval:n { \c@jCol + 1 } } }
}
% \end{macrocode}
%
@@ -15641,7 +15724,7 @@ version 2005/12/01 or later.
% |#1|, |#2|, |#3| and |#4|. If this rule would be in the block (it must not be
% drawn), the boolean |\l_tmpa_bool| is set to |false|.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_test_hline_in_block:nnnnn #1 #2 #3 #4
+\cs_new_protected:Npn \@@_test_hline_in_block:nnnnn #1 #2 #3 #4 #5
{
\bool_lazy_all:nT
{
@@ -15656,7 +15739,7 @@ version 2005/12/01 or later.
%
% The same for vertical rules.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_test_vline_in_block:nnnnn #1 #2 #3 #4
+\cs_new_protected:Npn \@@_test_vline_in_block:nnnnn #1 #2 #3 #4 #5
{
\bool_lazy_all:nT
{
@@ -15884,62 +15967,7 @@ version 2005/12/01 or later.
}
% \end{macrocode}
%
-%
-% \bigskip
-% \subsection*{The commands to draw dotted lines to separate columns and rows}
-%
-% These commands don't use the normal nodes, the medium nor the large nodes.
-% They only use the |col| nodes and the |row| nodes.
-%
-% \textbf{Horizontal dotted lines}\par\nobreak
-%
-% \medskip
-% The following command must \emph{not} be protected because it's meant to be
-% expanded in a |\noalign|.
-% \begin{macrocode}
-\cs_new:Npn \@@_hdottedline:
- {
- \noalign { \skip_vertical:N 2\l_@@_xdots_radius_dim }
- \@@_hdottedline_i:
- }
-% \end{macrocode}
-%
-% \medskip
-% On the other side, the following command should be protected.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_hdottedline_i:
- {
-% \end{macrocode}
-% We write in the internal |\CodeAfter| the instruction that will actually draw
-% the dotted line. It's not possible to draw this dotted line now because we
-% don't know the length of the line (we don't even know the number of columns).
-% \begin{macrocode}
- \tl_gput_right:Nx \g_@@_internal_code_after_tl
- { \@@_hdottedline:n { \int_use:N \c@iRow } }
- }
-% \end{macrocode}
-%
-%
-% \medskip
-% The command |\@@_hdottedline:n| is the command written in the internal
-% |\CodeAfter| that will actually draw the dotted line. Its argument is the
-% number of the row \emph{before} which we will draw the row.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_hdottedline:n #1
- { \@@_hline:n { position = #1 , end = \int_use:N \c@jCol , dotted } }
-% \end{macrocode}
-%
%
-%
-% \bigskip
-% \textbf{Vertical dotted lines}\par\nobreak
-%
-% \medskip
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_vdottedline:n #1
- { \@@_vline:n { position = \int_eval:n { #1 + 1 } , dotted } }
-% \end{macrocode}
-%
% \bigskip
% \subsection*{The environment \{NiceMatrixBlock\}}
%
@@ -16935,7 +16963,7 @@ version 2005/12/01 or later.
% |\multicolumn| and the |\diagbox| in that sequence).
% \begin{macrocode}
\seq_gput_left:Nx \g_@@_pos_of_blocks_seq
- { { #1 } { #2 } { #3 } { #4 } { \l_@@_block_name_str } }
+ { { #1 } { #2 } { #3 } { #4 } { \l_@@_block_name_str } }
}
% \end{macrocode}
%
@@ -17441,7 +17469,8 @@ version 2005/12/01 or later.
{
position = ##1 ,
start = \l_@@_tmpd_tl ,
- end = \int_eval:n { \l_tmpb_tl - 1 }
+ end = \int_eval:n { \l_tmpb_tl - 1 } ,
+ total-width = \arrayrulewidth
}
}
}
@@ -18096,7 +18125,7 @@ version 2005/12/01 or later.
hvlines .value_forbidden:n = true ,
name .code:n =
\tl_if_empty:nTF { #1 }
- { \@@_error:n { Invalid~name~format } }
+ { \@@_error:n { Invalid~name } }
{
\regex_match:nnTF { \A[A-Za-z][A-Za-z0-9]*\Z } { #1 }
{
@@ -18107,7 +18136,7 @@ version 2005/12/01 or later.
\seq_gput_right:Nn \g_@@_submatrix_names_seq { #1 }
}
}
- { \@@_error:n { Invalid~name~format } }
+ { \@@_error:n { Invalid~name } }
} ,
rules .code:n = \keys_set:nn { NiceMatrix / rules } { #1 } ,
rules .value_required:n = true ,
@@ -18240,10 +18269,10 @@ version 2005/12/01 or later.
}
}
\dim_compare:nNnTF \l_@@_x_initial_dim = \c_max_dim
- { \@@_error:nn { impossible~delimiter } { left } }
+ { \@@_error:nn { Impossible~delimiter } { left } }
{
\dim_compare:nNnTF \l_@@_x_final_dim = { - \c_max_dim }
- { \@@_error:nn { impossible~delimiter } { right } }
+ { \@@_error:nn { Impossible~delimiter } { right } }
{ \@@_sub_matrix_i:nnnn { #1 } { #4 } { #6 } { #7 } }
}
\endpgfpicture
@@ -18826,39 +18855,47 @@ version 2005/12/01 or later.
% \begin{macrocode}
\NewDocumentCommand \@@_ShowCellNames { }
{
+ \dim_zero_new:N \g_@@_tmpc_dim
+ \dim_zero_new:N \g_@@_tmpd_dim
+ \dim_zero_new:N \g_@@_tmpe_dim
\int_step_inline:nn \c@iRow
{
- \begin { tikzpicture }
+ \begin { pgfpicture }
\@@_qpoint:n { row - ##1 }
\dim_set_eq:NN \l_tmpa_dim \pgf@y
\@@_qpoint:n { row - \int_eval:n { ##1 + 1 } }
\dim_gset:Nn \g_tmpa_dim { ( \l_tmpa_dim + \pgf@y ) / 2 }
\dim_gset:Nn \g_tmpb_dim { \l_tmpa_dim - \pgf@y }
- \end { tikzpicture }
+ \end { pgfpicture }
\int_step_inline:nn \c@jCol
{
\hbox_set:Nn \l_tmpa_box
{ \normalfont \Large \color { red ! 50 } ##1 - ####1 }
- \begin { tikzpicture }
+ \begin { pgfpicture }
\@@_qpoint:n { col - ####1 }
- \dim_set_eq:NN \l_@@_tmpc_dim \pgf@x
+ \dim_gset_eq:NN \g_@@_tmpc_dim \pgf@x
\@@_qpoint:n { col - \int_eval:n { ####1 + 1 } }
- \dim_set:Nn \l_tmpa_dim { \pgf@x - \l_@@_tmpc_dim }
+ \dim_gset:Nn \g_@@_tmpd_dim { \pgf@x - \g_@@_tmpc_dim }
+ \dim_gset_eq:NN \g_@@_tmpe_dim \pgf@x
+ \end { pgfpicture }
\fp_set:Nn \l_tmpa_fp
{
\fp_min:nn
{
\fp_min:nn
- { \dim_ratio:nn { \l_tmpa_dim } { \box_wd:N \l_tmpa_box } }
+ { \dim_ratio:nn { \g_@@_tmpd_dim } { \box_wd:N \l_tmpa_box } }
{ \dim_ratio:nn { \g_tmpb_dim } { \box_ht_plus_dp:N \l_tmpa_box } }
}
{ 1.0 }
}
\box_scale:Nnn \l_tmpa_box { \fp_use:N \l_tmpa_fp } { \fp_use:N \l_tmpa_fp }
+ \pgfpicture
+ \pgfrememberpicturepositiononpagetrue
+ \pgf@relevantforpicturesizefalse
\pgftransformshift
{
\pgfpoint
- { 0.5 * ( \l_@@_tmpc_dim + \pgf@x ) }
+ { 0.5 * ( \g_@@_tmpc_dim + \g_@@_tmpe_dim ) }
{ \dim_use:N \g_tmpa_dim }
}
\pgfnode
@@ -18867,7 +18904,7 @@ version 2005/12/01 or later.
{ \box_use:N \l_tmpa_box }
{ }
{ }
- \end { tikzpicture }
+ \endpgfpicture
}
}
}
@@ -18889,6 +18926,13 @@ version 2005/12/01 or later.
% instruction is executed.
%
% \medskip
+% The boolean |\c_@@_messages_for_Overleaf_bool| corresponds to the key
+% |messages-for-Overleaf|.
+% \begin{macrocode}
+\bool_new:N \c_@@_messages_for_Overleaf_bool
+% \end{macrocode}
+%
+% \medskip
% The boolean |\g_@@_footnotehyper_bool| will indicate if the option
% |footnotehyper| is used.
% \begin{macrocode}
@@ -18904,17 +18948,17 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \begin{macrocode}
-\@@_msg_new:nnn { Unknown~key~for~package }
+\msg_new:nnnn { nicematrix } { Unknown~key~for~package }
{
The~key~'\l_keys_key_str'~is~unknown. \\
- If~you~go~on,~it~will~be~ignored. \\
+ That~key~will~be~ignored. \\
For~a~list~of~the~available~keys,~type~H~<return>.
}
{
The~available~keys~are~(in~alphabetic~order):~
- allow-letter-for-dotted-lines,~
footnote,~
footnotehyper,~
+ messages-for-Overleaf,~
renew-dots,~and
renew-matrix.
}
@@ -18928,18 +18972,9 @@ version 2005/12/01 or later.
renew-dots .value_forbidden:n = true ,
renew-matrix .code:n = \@@_renew_matrix: ,
renew-matrix .value_forbidden:n = true ,
- transparent .code:n = \@@_fatal:n { Key~transparent } ,
- transparent .value_forbidden:n = true,
+ messages-for-Overleaf .bool_set:N = \c_@@_messages_for_Overleaf_bool ,
footnote .bool_set:N = \c_@@_footnote_bool ,
footnotehyper .bool_set:N = \c_@@_footnotehyper_bool ,
- allow-letter-for-dotted-lines .code:n =
- {
- \group_begin:
- \globaldefs = 1
- \@@_msg_redirect_name:nn { letter-for-dotted-lines } { none }
- \group_end:
- } ,
- allow-letter-for-dotted-lines .value_forbidden:n = true ,
unknown .code:n = \@@_error:n { Unknown~key~for~package }
}
\ProcessKeysOptions { NiceMatrix / Package }
@@ -18954,7 +18989,7 @@ version 2005/12/01 or later.
If~you~want,~you~can~use~the~option~'footnotehyper'~and~the~footnotes~
within~the~environments~of~nicematrix~will~be~extracted~with~the~tools~
of~the~package~footnotehyper.\\
- If~you~go~on,~the~package~footnote~won't~be~loaded.
+ The~package~footnote~won't~be~loaded.
}
% \end{macrocode}
%
@@ -18966,7 +19001,7 @@ version 2005/12/01 or later.
If~you~want,~you~can~use~the~option~'footnote'~and~the~footnotes~
within~the~environments~of~nicematrix~will~be~extracted~with~the~tools~
of~the~package~footnote.\\
- If~you~go~on,~the~package~footnotehyper~won't~be~loaded.
+ The~package~footnotehyper~won't~be~loaded.
}
% \end{macrocode}
%
@@ -19013,8 +19048,15 @@ version 2005/12/01 or later.
% \bigskip
% \subsection*{Error messages of the package}
%
+% \begin{macrocode}
+\bool_if:NTF \c_@@_messages_for_Overleaf_bool
+ { \str_const:Nn \c_@@_available_keys_str { } }
+ {
+ \str_const:Nn \c_@@_available_keys_str
+ { For~a~list~of~the~available~keys,~type~H~<return>. }
+ }
+% \end{macrocode}
%
-%
% \begin{macrocode}
\seq_new:N \g_@@_types_of_matrix_seq
\seq_gset_from_clist:Nn \g_@@_types_of_matrix_seq
@@ -19028,10 +19070,10 @@ version 2005/12/01 or later.
%
% \bigskip
% If the user uses too much columns, the command |\@@_error_too_much_cols:| is
-% executed. This command raises an error but try to give the best information to
-% the user in the error message. The command |\seq_if_in:NVTF| is not expandable
-% and that's why we can't put it in the error message itself. We have to do the
-% test before the |\@@_fatal:n|.
+% triggered. This command raises an error but also tries to give the best
+% information to the user in the error message. The command |\seq_if_in:NVTF| is
+% not expandable and that's why we can't put it in the error message itself. We
+% have to do the test before the |\@@_fatal:n|.
% \begin{macrocode}
\cs_new_protected:Npn \@@_error_too_much_cols:
{
@@ -19060,18 +19102,31 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nn { negative~weight }
{
+ Negative~weight.\\
The~weight~of~the~'X'~columns~must~be~positive~and~you~have~used~
- the~value~'#1'.~If~you~go~on,~the~absolute~value~will~be~used.
+ the~value~'#1'.\\
+ The~absolute~value~will~be~used.
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\@@_msg_new:nn { last~col~not~used }
+ {
+ Column~not~used.\\
+ The~key~'last-col'~is~in~force~but~you~have~not~used~that~last~column~
+ in~your~\@@_full_name_env:.~However,~you~can~go~on.
}
% \end{macrocode}
%
% \begin{macrocode}
\@@_msg_new:nn { too~much~cols~for~matrix~with~last~col }
{
- You~try~to~use~more~columns~than~allowed~by~your~
- \@@_full_name_env:.\@@_message_hdotsfor:\ The~maximal~number~of~
- columns~is~\int_eval:n { \l_@@_last_col_int - 1 }~(plus~the~
- exterior~columns).~This~error~is~fatal.
+ Too~much~columns.\\
+ In~the~row~\int_eval:n { \c@jCol - 1 },~
+ you~try~to~use~more~columns~
+ than~allowed~by~your~\@@_full_name_env:.\@@_message_hdotsfor:\
+ The~maximal~number~of~columns~is~\int_eval:n { \l_@@_last_col_int - 1 }~
+ (plus~the~exterior~columns).~This~error~is~fatal.
}
% \end{macrocode}
%
@@ -19079,7 +19134,9 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nn { too~much~cols~for~matrix }
{
- You~try~to~use~more~columns~than~allowed~by~your~
+ Too~much~columns.\\
+ In~the~row~\int_eval:n { \c@jCol - 1 },~
+ you~try~to~use~more~columns~than~allowed~by~your~
\@@_full_name_env:.\@@_message_hdotsfor:\ Recall~that~the~maximal~
number~of~columns~for~a~matrix~is~fixed~by~the~LaTeX~counter~
'MaxMatrixCols'.~Its~actual~value~is~\int_use:N \c@MaxMatrixCols.~
@@ -19094,7 +19151,9 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nn { too~much~cols~for~array }
{
- You~try~to~use~more~columns~than~allowed~by~your~
+ Too~much~columns.\\
+ In~the~row~\int_eval:n { \c@jCol - 1 },~
+ ~you~try~to~use~more~columns~than~allowed~by~your~
\@@_full_name_env:.\@@_message_hdotsfor:\ The~maximal~number~of~columns~is~
\int_use:N \g_@@_static_num_of_col_int\
~(plus~the~potential~exterior~ones).~
@@ -19105,27 +19164,21 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nn { hvlines-except-corners }
{
+ Obsolete~key.\\
The~key~'hvlines-except-corners'~is~now~obsolete.~You~should~instead~use~the~
keys~'hvlines'~and~'corners'.\\
- However,~you~can~go~on~for~this~time.~This~message~won't~be~shown~anymore~
- in~this~document.
+ This~error~is~fatal.
}
% \end{macrocode}
%
-% \begin{macrocode}
-\@@_msg_new:nn { last~col~not~used }
- {
- The~key~'last-col'~is~in~force~but~you~have~not~used~that~last~column~
- in~your~\@@_full_name_env:.~However,~you~can~go~on.
- }
-% \end{macrocode}
%
% \begin{macrocode}
\@@_msg_new:nn { columns~not~used }
{
+ Columns~not~used.\\
The~preamble~of~your~\@@_full_name_env:\ announces~\int_use:N
\g_@@_static_num_of_col_int\ columns~but~you~use~only~\int_use:N \c@jCol.\\
- You~can~go~on~but~the~columns~you~did~not~used~won't~be~created.
+ The~columns~you~did~not~used~won't~be~created.
}
% \end{macrocode}
%
@@ -19133,24 +19186,27 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nn { in~first~col }
{
+ Erroneous~use.\\
You~can't~use~the~command~#1 in~the~first~column~(number~0)~of~the~array.\\
- If~you~go~on,~this~command~will~be~ignored.
+ That~command~will~be~ignored.
}
% \end{macrocode}
%
% \begin{macrocode}
\@@_msg_new:nn { in~last~col }
{
+ Erroneous~use.\\
You~can't~use~the~command~#1 in~the~last~column~(exterior)~of~the~array.\\
- If~you~go~on,~this~command~will~be~ignored.
+ That~command~will~be~ignored.
}
% \end{macrocode}
%
% \begin{macrocode}
\@@_msg_new:nn { in~first~row }
{
+ Erroneous~use.\\
You~can't~use~the~command~#1 in~the~first~row~(number~0)~of~the~array.\\
- If~you~go~on,~this~command~will~be~ignored.
+ That~command~will~be~ignored.
}
% \end{macrocode}
%
@@ -19158,13 +19214,14 @@ version 2005/12/01 or later.
\@@_msg_new:nn { in~last~row }
{
You~can't~use~the~command~#1 in~the~last~row~(exterior)~of~the~array.\\
- If~you~go~on,~this~command~will~be~ignored.
+ That~command~will~be~ignored.
}
% \end{macrocode}
%
% \begin{macrocode}
\@@_msg_new:nn { double~closing~delimiter }
{
+ Double~delimiter.\\
You~can't~put~a~second~closing~delimiter~"#1"~just~after~a~first~closing~
delimiter.~This~delimiter~will~be~ignored.
}
@@ -19173,25 +19230,28 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nn { delimiter~after~opening }
{
+ Double~delimiter.\\
You~can't~put~a~second~delimiter~"#1"~just~after~a~first~opening~
- delimiter.~This~delimiter~will~be~ignored.
+ delimiter.~That~delimiter~will~be~ignored.
}
% \end{macrocode}
%
% \begin{macrocode}
\@@_msg_new:nn { bad~option~for~line-style }
{
+ Bad~line~style.\\
Since~you~haven't~loaded~Tikz,~the~only~value~you~can~give~to~'line-style'~
- is~'standard'.~If~you~go~on,~this~key~will~be~ignored.
+ is~'standard'.~That~key~will~be~ignored.
}
% \end{macrocode}
%
% \begin{macrocode}
-\@@_msg_new:nnn { Unknown~key~for~custom-line }
+\@@_msg_new:nnn { Unknown~key~for~custom-line }
{
+ Unknown~key.\\
The~key~'\l_keys_key_str'~is~unknown~in~a~'custom-line'.~
- If~you~go~on,~it~will~be~ignored. \\
- For~a~list~of~the~available~keys,~type~H~<return>.
+ It~will~be~ignored. \\
+ \c_@@_available_keys_str
}
{
The~available~keys~are~(in~alphabetic~order):~
@@ -19201,17 +19261,18 @@ version 2005/12/01 or later.
letter,~
multiplicity,~
sep-color,~
- tikz,~and~width.
+ tikz,~and~tota-width.
}
% \end{macrocode}
%
% \begin{macrocode}
\@@_msg_new:nn { Unknown~key~for~xdots }
{
+ Unknown~key.\\
As~for~now,~there~is~only~five~keys~available~here:~'color',~'inter',~
'line-style',~'radius',~
and~'shorten'~(and~you~try~to~use~'\l_keys_key_str').~
- If~you~go~on,~this~key~will~be~ignored.
+ That~key~will~be~ignored.
}
% \end{macrocode}
%
@@ -19219,106 +19280,122 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nn { Unknown~key~for~rowcolors }
{
+ Unknown~key.\\
As~for~now,~there~is~only~two~keys~available~here:~'cols'~and~'respect-blocks'~
- (and~you~try~to~use~'\l_keys_key_str').~If~you~go~on,~
- this~key~will~be~ignored.
+ (and~you~try~to~use~'\l_keys_key_str')\\
+ That~key~will~be~ignored.
}
% \end{macrocode}
%
%
% \begin{macrocode}
-\@@_msg_new:nn { ampersand~in~light-syntax }
+\@@_msg_new:nn { Construct~too~large }
{
- You~can't~use~an~ampersand~(\token_to_str:N &)~to~separate~columns~because~
- ~you~have~used~the~key~'light-syntax'.~This~error~is~fatal.
+ Construct~too~large.\\
+ Your~command~\token_to_str:N #1
+ can't~be~drawn~because~your~matrix~is~too~small.\\
+ That~command~will~be~ignored.
}
% \end{macrocode}
%
% \begin{macrocode}
-\@@_msg_new:nn { Construct~too~large }
+\@@_msg_new:nn { ampersand~in~light-syntax }
{
- Your~command~\token_to_str:N #1
- can't~be~drawn~because~your~matrix~is~too~small.\\
- If~you~go~on,~this~command~will~be~ignored.
+ Ampersand~forbidden.\\
+ You~can't~use~an~ampersand~(\token_to_str:N &)~to~separate~columns~because~
+ ~the~key~'light-syntax'~is~in~force.~This~error~is~fatal.
}
% \end{macrocode}
%
-%
% \begin{macrocode}
\@@_msg_new:nn { double-backslash~in~light-syntax }
{
- You~can't~use~\token_to_str:N \\~to~separate~rows~because~you~have~used~
- the~key~'light-syntax'.~You~must~use~the~character~'\l_@@_end_of_row_tl'~
+ Double~backslash~forbidden.\\
+ You~can't~use~\token_to_str:N
+ \\~to~separate~rows~because~the~key~'light-syntax'~
+ is~in~force.~You~must~use~the~character~'\l_@@_end_of_row_tl'~
(set~by~the~key~'end-of-row').~This~error~is~fatal.
}
% \end{macrocode}
%
-% \begin{macrocode}
-\@@_msg_new:nn { standard-cline~in~document }
- {
- The~key~'standard-cline'~is~available~only~in~the~preamble.\\
- If~you~go~on~this~command~will~be~ignored.
- }
-% \end{macrocode}
-%
%
% \begin{macrocode}
\@@_msg_new:nn { bad~value~for~baseline }
{
+ Bad~value~for~baseline.\\
The~value~given~to~'baseline'~(\int_use:N \l_tmpa_int)~is~not~
valid.~The~value~must~be~between~\int_use:N \l_@@_first_row_int\ and~
- \int_use:N \g_@@_row_total_int\ or~equal~to~'t',~'c'~or~'b'.\\
- If~you~go~on,~a~value~of~1~will~be~used.
+ \int_use:N \g_@@_row_total_int\ or~equal~to~'t',~'c'~or~'b'~or~of~
+ the~form~'line-i'.\\
+ A~value~of~1~will~be~used.
}
% \end{macrocode}
%
% \begin{macrocode}
-\@@_msg_new:nn { Invalid~name~format }
+\@@_msg_new:nn { Invalid~name }
{
+ Invalid~name.\\
You~can't~give~the~name~'\l_keys_value_tl'~to~a~\token_to_str:N
- \SubMatrix.\\
+ \SubMatrix\ of~your~\@@_full_name_env:.\\
A~name~must~be~accepted~by~the~regular~expression~[A-Za-z][A-Za-z0-9]*.\\
- If~you~go~on,~this~key~will~be~ignored.
+ This~key~will~be~ignored.
}
% \end{macrocode}
%
% \begin{macrocode}
\@@_msg_new:nn { Wrong~line~in~SubMatrix }
{
+ Wrong~line.\\
You~try~to~draw~a~#1~line~of~number~'#2'~in~a~
\token_to_str:N \SubMatrix\ of~your~\@@_full_name_env:\ but~that~
- number~is~not~valid.~If~you~go~on,~it~will~be~ignored.
+ number~is~not~valid.~It~will~be~ignored.
}
% \end{macrocode}
%
% \begin{macrocode}
-\@@_msg_new:nn { impossible~delimiter }
+\@@_msg_new:nn { Impossible~delimiter }
{
+ Impossible~delimiter.\\
It's~impossible~to~draw~the~#1~delimiter~of~your~
\token_to_str:N \SubMatrix\ because~all~the~cells~are~empty~
in~that~column.
\bool_if:NT \l_@@_submatrix_slim_bool
{ ~Maybe~you~should~try~without~the~key~'slim'. } \\
- If~you~go~on,~this~\token_to_str:N \SubMatrix\ will~be~ignored.
+ This~\token_to_str:N \SubMatrix\ will~be~ignored.
}
% \end{macrocode}
%
% \begin{macrocode}
\@@_msg_new:nn { width~without~X~columns }
{
+ No~X~column.\\
You~have~used~the~key~'width'~but~you~have~put~no~'X'~column. \\
- If~you~go~on,~that~key~will~be~ignored.
+ That~key~will~be~ignored.
}
% \end{macrocode}
%
% \begin{macrocode}
+\@@_msg_new:nn { key~multiplicity~with~dotted }
+ {
+ Incompatible~keys. \\
+ You~have~used~the~key~'multiplicity'~with~the~key~'dotted'~
+ in~a~'custom-line'.~They~are~incompatible. \\
+ The~key~'multiplicity'~will~be~discarded.
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
\@@_msg_new:nn { empty~environment }
- { Your~\@@_full_name_env:\ is~empty.~This~error~is~fatal. }
+ {
+ Empty~environment.\\
+ Your~\@@_full_name_env:\ is~empty.~This~error~is~fatal.
+ }
% \end{macrocode}
%
% \begin{macrocode}
\@@_msg_new:nn { Wrong~use~of~v-center }
{
+ Wrong~use~of~v-center.\\
You~should~not~use~the~key~'v-center'~here~because~your~block~is~not~
mono-row.~However,~you~can~go~on.
}
@@ -19327,6 +19404,7 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nn { No~letter~and~no~command }
{
+ Erroneous~use.\\
Your~use~of~'custom-line'~is~no-op~since~you~don't~have~used~the~
key~'letter'~(for~a~letter~for~vertical~rules)~nor~the~key~'command'~
(to~draw~horizontal~rules).\\
@@ -19335,45 +19413,28 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \begin{macrocode}
-\@@_msg_new:nn { letter-for-dotted-lines }
- {
- The~key~'letter-for-dotted-lines'~is~now~obsolete~(you~should~
- use~'custom-line'~instead).~However,~you~can~go~on~for~this~time.~
- If~you~don't~want~to~see~that~message~again,~you~should~
- load~'nicematrix'~with~the~key~'allow-letter-for-dotted-lines'.~
- However,~'letter-for-dotted-lines'~will~be~deleted~in~a~future~
- version~of~'nicematrix'.
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
\@@_msg_new:nn { Forbidden~letter }
{
+ Forbidden~letter.\\
You~can't~use~the~letter~'\l_@@_letter_str'~for~a~customized~line.\\
- If~you~go~on,~it~will~be~ignored.
+ It~will~be~ignored.
}
% \end{macrocode}
%
% \begin{macrocode}
-\@@_msg_new:nn { key~width~without~key~tikz }
- {
- In~'custom-line',~you~have~used~'width'~without~'tikz'.~That's~not~correct.~
- If~you~go~on,~that~key~'width'~will~be~discarded.
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
\@@_msg_new:nn { Several~letters }
{
- You~must~use~only~one~letter~as~value~for~the~key~'letter'~(and~
+ Wrong~name.\\
+ You~must~use~only~one~letter~as~value~for~the~key~'letter'~(and~you~
have~used~'\l_@@_letter_str').\\
- If~you~go~on,~it~will~be~ignored.
+ It~will~be~ignored.
}
% \end{macrocode}
%
% \begin{macrocode}
\@@_msg_new:nn { Delimiter~with~small }
{
+ Delimiter~forbidden.\\
You~can't~put~a~delimiter~in~the~preamble~of~your~\@@_full_name_env:\
because~the~key~'small'~is~in~force.\\
This~error~is~fatal.
@@ -19383,9 +19444,11 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nn { unknown~cell~for~line~in~CodeAfter }
{
- Your~command~\token_to_str:N\line\{#1\}\{#2\}~in~the~'code-after'~
+ Unknown~cell.\\
+ Your~command~\token_to_str:N\line\{#1\}\{#2\}~in~
+ the~\token_to_str:N \CodeAfter\ of~your~\@@_full_name_env:\
can't~be~executed~because~a~cell~doesn't~exist.\\
- If~you~go~on~this~command~will~be~ignored.
+ This~command~\token_to_str:N \line\ will~be~ignored.
}
% \end{macrocode}
%
@@ -19393,10 +19456,12 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nnn { Duplicate~name~for~SubMatrix }
{
+ Duplicate~name.\\
The~name~'#1'~is~already~used~for~a~\token_to_str:N \SubMatrix\
in~this~\@@_full_name_env:.\\
- If~you~go~on,~this~key~will~be~ignored.\\
- For~a~list~of~the~names~already~used,~type~H~<return>.
+ This~key~will~be~ignored.\\
+ \bool_if:NF \c_@@_messages_for_Overleaf_bool
+ { For~a~list~of~the~names~already~used,~type~H~<return>. }
}
{
The~names~already~defined~in~this~\@@_full_name_env:\ are:~
@@ -19407,16 +19472,18 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nn { r~or~l~with~preamble }
{
+ Erroneous~use.\\
You~can't~use~the~key~'\l_keys_key_str'~in~your~\@@_full_name_env:.~
You~must~specify~the~alignment~of~your~columns~with~the~preamble~of~
your~\@@_full_name_env:.\\
- If~you~go~on,~this~key~will~be~ignored.
+ This~key~will~be~ignored.
}
% \end{macrocode}
%
% \begin{macrocode}
\@@_msg_new:nn { Hdotsfor~in~col~0 }
{
+ Erroneous~use.\\
You~can't~use~\token_to_str:N \Hdotsfor\ in~an~exterior~column~of~
the~array.~This~error~is~fatal.
}
@@ -19425,38 +19492,41 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nn { bad~corner }
{
- #1~is~an~incorrect~specification~for~a~corner~(in~the~keys~
- 'corners'~and~'except-corners').~The~available~
- values~are:~NW,~SW,~NE~and~SE.\\
- If~you~go~on,~this~specification~of~corner~will~be~ignored.
+ Bad~corner.\\
+ #1~is~an~incorrect~specification~for~a~corner~(in~the~key~
+ 'corners').~The~available~values~are:~NW,~SW,~NE~and~SE.\\
+ This~specification~of~corner~will~be~ignored.
}
% \end{macrocode}
%
% \begin{macrocode}
\@@_msg_new:nn { bad~border }
{
+ Bad~border.\\
\l_keys_key_str\space~is~an~incorrect~specification~for~a~border~
(in~the~key~'borders'~of~the~command~\token_to_str:N \Block).~
The~available~values~are:~left,~right,~top~and~bottom~(and~you~can~
also~use~the~key~'tikz'
\bool_if:nF \c_@@_tikz_loaded_bool
{~if~you~load~the~LaTeX~package~'tikz'}).\\
- If~you~go~on,~this~specification~of~border~will~be~ignored.
+ This~specification~of~border~will~be~ignored.
}
% \end{macrocode}
%
% \begin{macrocode}
\@@_msg_new:nn { tikz~key~without~tikz }
{
+ Tikz~not~loaded.\\
You~can't~use~the~key~'tikz'~for~the~command~'\token_to_str:N
\Block'~because~you~have~not~loaded~Tikz.~
- If~you~go~on,~this~key~will~be~ignored.
+ This~key~will~be~ignored.
}
% \end{macrocode}
%
% \begin{macrocode}
\@@_msg_new:nn { last-col~non~empty~for~NiceArray }
{
+ Erroneous~use.\\
In~the~\@@_full_name_env:,~you~must~use~the~key~
'last-col'~without~value.\\
However,~you~can~go~on~for~this~time~
@@ -19468,6 +19538,7 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nn { last-col~non~empty~for~NiceMatrixOptions }
{
+ Erroneous~use.\\
In~\NiceMatrixoptions,~you~must~use~the~key~
'last-col'~without~value.\\
However,~you~can~go~on~for~this~time~
@@ -19479,6 +19550,7 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nn { Block~too~large~1 }
{
+ Block~too~large.\\
You~try~to~draw~a~block~in~the~cell~#1-#2~of~your~matrix~but~the~matrix~is~
too~small~for~that~block. \\
}
@@ -19487,13 +19559,14 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nn { Block~too~large~2 }
{
+ Block~too~large.\\
The~preamble~of~your~\@@_full_name_env:\ announces~\int_use:N
\g_@@_static_num_of_col_int\
columns~but~you~use~only~\int_use:N \c@jCol\ and~that's~why~a~block~
specified~in~the~cell~#1-#2~can't~be~drawn.~You~should~add~some~ampersands~
(&)~at~the~end~of~the~first~row~of~your~
\@@_full_name_env:.\\
- If~you~go~on,this~block~and~maybe~others~will~be~ignored.
+ This~block~and~maybe~others~will~be~ignored.
}
% \end{macrocode}
%
@@ -19501,6 +19574,7 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nn { unknown~column~type }
{
+ Bad~column~type.\\
The~column~type~'#1'~in~your~\@@_full_name_env:\
is~unknown. \\
This~error~is~fatal.
@@ -19508,57 +19582,51 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \begin{macrocode}
-\@@_msg_new:nn { colon~without~arydshln }
- {
- The~column~type~':'~in~your~\@@_full_name_env:\
- is~unknown.~If~you~want~to~use~':'~of~'arydshln',~you~should~
- load~that~package.~If~you~want~a~dotted~line~of~'nicematrix',~you~
- should~use~'\l_@@_letter_for_dotted_lines_str'.\\
- This~error~is~fatal.
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
\@@_msg_new:nn { tabularnote~forbidden }
{
+ Forbidden~command.\\
You~can't~use~the~command~\token_to_str:N\tabularnote\
~in~a~\@@_full_name_env:.~This~command~is~available~only~in~
\{NiceTabular\},~\{NiceArray\}~and~\{NiceMatrix\}. \\
- If~you~go~on,~this~command~will~be~ignored.
+ This~command~will~be~ignored.
}
% \end{macrocode}
%
% \begin{macrocode}
\@@_msg_new:nn { borders~forbidden }
{
+ Forbidden~key.\\
You~can't~use~the~key~'borders'~of~the~command~\token_to_str:N \Block\
because~the~option~'rounded-corners'~
is~in~force~with~a~non-zero~value.\\
- If~you~go~on,~this~key~will~be~ignored.
+ This~key~will~be~ignored.
}
% \end{macrocode}
%
% \begin{macrocode}
\@@_msg_new:nn { bottomrule~without~booktabs }
{
+ booktabs~not~loaded.\\
You~can't~use~the~key~'tabular/bottomrule'~because~you~haven't~
loaded~'booktabs'.\\
- If~you~go~on,~this~key~will~be~ignored.
+ This~key~will~be~ignored.
}
% \end{macrocode}
%
% \begin{macrocode}
\@@_msg_new:nn { enumitem~not~loaded }
{
+ enumitem~not~loaded.\\
You~can't~use~the~command~\token_to_str:N\tabularnote\
~because~you~haven't~loaded~'enumitem'.\\
- If~you~go~on,~this~command~will~be~ignored.
+ This~command~will~be~ignored.
}
% \end{macrocode}
%
% \begin{macrocode}
-\@@_msg_new:nn { tikz~in~custom-line~without~tikz }
+\@@_msg_new:nn { tikz~in~custom-line~without~tikz }
{
+ Tikz~not~loaded.\\
You~have~used~the~key~'tikz'~in~the~definition~of~a~
customized~line~(with~'custom-line')~but~Tikz~is~not~loaded.~
You~can~go~on~but~you~will~have~another~error~if~you~actually~
@@ -19569,24 +19637,27 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nn { tikz~in~borders~without~tikz }
{
+ Tikz~not~loaded.\\
You~have~used~the~key~'tikz'~in~a~key~'borders'~(of~a~
command~'\token_to_str:N\Block')~but~Tikz~is~not~loaded.~
- If~you~go~on,~that~key~will~be~ignored.
+ That~key~will~be~ignored.
}
% \end{macrocode}
%
% \begin{macrocode}
\@@_msg_new:nn { color~in~custom-line~with~tikz }
{
+ Erroneous~use.\\
In~a~'custom-line',~you~have~used~both~'tikz'~and~'color',~
which~is~forbidden~(you~should~use~'color'~inside~the~key~'tikz').~
- If~you~go~on,~the~key~'color'~will~be~discarded.
+ The~key~'color'~will~be~discarded.
}
% \end{macrocode}
%
% \begin{macrocode}
\@@_msg_new:nn { Wrong~last~row }
{
+ Wrong~number.\\
You~have~used~'last-row=\int_use:N \l_@@_last_row_int'~but~your~
\@@_full_name_env:\ seems~to~have~\int_use:N \c@iRow \ rows.~
If~you~go~on,~the~value~of~\int_use:N \c@iRow \ will~be~used~for~
@@ -19598,12 +19669,17 @@ version 2005/12/01 or later.
%
% \begin{macrocode}
\@@_msg_new:nn { Yet~in~env }
- { Environments~of~nicematrix~can't~be~nested.\\ This~error~is~fatal. }
+ {
+ Nested~environments.\\
+ Environments~of~nicematrix~can't~be~nested.\\
+ This~error~is~fatal.
+ }
% \end{macrocode}
%
% \begin{macrocode}
\@@_msg_new:nn { Outside~math~mode }
{
+ Outside~math~mode.\\
The~\@@_full_name_env:\ can~be~used~only~in~math~mode~
(and~not~in~\token_to_str:N \vcenter).\\
This~error~is~fatal.
@@ -19613,26 +19689,29 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nn { One~letter~allowed }
{
+ Bad~name.\\
The~value~of~key~'\l_keys_key_str'~must~be~of~length~1.\\
- If~you~go~on,~it~will~be~ignored.
+ It~will~be~ignored.
}
% \end{macrocode}
%
% \begin{macrocode}
\@@_msg_new:nn { varwidth~not~loaded }
{
+ varwidth~not~loaded.\\
You~can't~use~the~column~type~'V'~because~'varwidth'~is~not~
loaded.\\
- If~you~go~on,~your~column~will~behave~like~'p'.
+ Your~column~will~behave~like~'p'.
}
% \end{macrocode}
%
% \begin{macrocode}
\@@_msg_new:nnn { Unknown~key~for~Block }
{
+ Unknown~key.\\
The~key~'\l_keys_key_str'~is~unknown~for~the~command~\token_to_str:N
- \Block.\\ If~you~go~on,~it~will~be~ignored. \\
- For~a~list~of~the~available~keys,~type~H~<return>.
+ \Block.\\ It~will~be~ignored. \\
+ \c_@@_available_keys_str
}
{
The~available~keys~are~(in~alphabetic~order):~b,~borders,~c,~draw,~fill,~
@@ -19644,6 +19723,7 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nn { Version~of~siunitx~too~old }
{
+ siunitx~too~old.\\
You~can't~use~'S'~columns~because~your~version~of~'siunitx'~
is~too~old.~You~need~at~least~v~3.0.\\
This~error~is~fatal.
@@ -19654,10 +19734,11 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nnn { Unknown~key~for~Brace }
{
+ Unknown~key.\\
The~key~'\l_keys_key_str'~is~unknown~for~the~commands~\token_to_str:N
\UnderBrace\ and~\token_to_str:N \OverBrace.\\
- If~you~go~on,~it~will~be~ignored. \\
- For~a~list~of~the~available~keys,~type~H~<return>.
+ It~will~be~ignored. \\
+ \c_@@_available_keys_str
}
{
The~available~keys~are~(in~alphabetic~order):~color,~left-shorten,~
@@ -19669,10 +19750,10 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nnn { Unknown~key~for~CodeAfter }
{
+ Unknown~key.\\
The~key~'\l_keys_key_str'~is~unknown.\\
- If~you~go~on,~it~will~be~ignored. \\
- For~a~list~of~the~available~keys~in~\token_to_str:N
- \CodeAfter,~type~H~<return>.
+ It~will~be~ignored. \\
+ \c_@@_available_keys_str
}
{
The~available~keys~are~(in~alphabetic~order):~
@@ -19687,10 +19768,10 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nnn { Unknown~key~for~SubMatrix }
{
+ Unknown~key.\\
The~key~'\l_keys_key_str'~is~unknown.\\
- If~you~go~on,~this~key~will~be~ignored. \\
- For~a~list~of~the~available~keys~in~\token_to_str:N
- \SubMatrix,~type~H~<return>.
+ That~key~will~be~ignored. \\
+ \c_@@_available_keys_str
}
{
The~available~keys~are~(in~alphabetic~order):~
@@ -19711,9 +19792,10 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nnn { Unknown~key~for~notes }
{
+ Unknown~key.\\
The~key~'\l_keys_key_str'~is~unknown.\\
- If~you~go~on,~it~will~be~ignored. \\
- For~a~list~of~the~available~keys~about~notes,~type~H~<return>.
+ That~key~will~be~ignored. \\
+ \c_@@_available_keys_str
}
{
The~available~keys~are~(in~alphabetic~order):~
@@ -19733,10 +19815,11 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nnn { Unknown~key~for~RowStyle }
{
+ Unknown~key.\\
The~key~'\l_keys_key_str'~is~unknown~for~the~command~
\token_to_str:N \RowStyle. \\
- If~you~go~on,~it~will~be~ignored. \\
- For~a~list~of~the~available~keys,~type~H~<return>.
+ That~key~will~be~ignored. \\
+ \c_@@_available_keys_str
}
{
The~available~keys~are~(in~alphabetic~order):~
@@ -19753,10 +19836,11 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nnn { Unknown~key~for~NiceMatrixOptions }
{
+ Unknown~key.\\
The~key~'\l_keys_key_str'~is~unknown~for~the~command~
\token_to_str:N \NiceMatrixOptions. \\
- If~you~go~on,~it~will~be~ignored. \\
- For~a~list~of~the~*principal*~available~keys,~type~H~<return>.
+ That~key~will~be~ignored. \\
+ \c_@@_available_keys_str
}
{
The~available~keys~are~(in~alphabetic~order):~
@@ -19800,10 +19884,11 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nnn { Unknown~key~for~NiceArray }
{
+ Unknown~key.\\
The~key~'\l_keys_key_str'~is~unknown~for~the~environment~
\{NiceArray\}. \\
- If~you~go~on,~it~will~be~ignored. \\
- For~a~list~of~the~*principal*~available~keys,~type~H~<return>.
+ That~key~will~be~ignored. \\
+ \c_@@_available_keys_str
}
{
The~available~keys~are~(in~alphabetic~order):~
@@ -19848,6 +19933,8 @@ version 2005/12/01 or later.
tabularnote,~
vlines,~
xdots/color,~
+ xdots/shorten-start,~
+ xdots/shorten-end,~
xdots/shorten~and~
xdots/line-style.
}
@@ -19860,10 +19947,11 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nnn { Unknown~key~for~NiceMatrix }
{
+ Unknown~key.\\
The~key~'\l_keys_key_str'~is~unknown~for~the~
\@@_full_name_env:. \\
- If~you~go~on,~it~will~be~ignored. \\
- For~a~list~of~the~*principal*~available~keys,~type~H~<return>.
+ That~key~will~be~ignored. \\
+ \c_@@_available_keys_str
}
{
The~available~keys~are~(in~alphabetic~order):~
@@ -19907,6 +19995,8 @@ version 2005/12/01 or later.
t,~
vlines,~
xdots/color,~
+ xdots/shorten-start,~
+ xdots/shorten-end,~
xdots/shorten~and~
xdots/line-style.
}
@@ -19915,10 +20005,11 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nnn { Unknown~key~for~NiceTabular }
{
+ Unknown~key.\\
The~key~'\l_keys_key_str'~is~unknown~for~the~environment~
\{NiceTabular\}. \\
- If~you~go~on,~it~will~be~ignored. \\
- For~a~list~of~the~*principal*~available~keys,~type~H~<return>.
+ That~key~will~be~ignored. \\
+ \c_@@_available_keys_str
}
{
The~available~keys~are~(in~alphabetic~order):~
@@ -19962,6 +20053,8 @@ version 2005/12/01 or later.
tabularnote,~
vlines,~
xdots/color,~
+ xdots/shorten-start,~
+ xdots/shorten-end,~
xdots/shorten~and~
xdots/line-style.
}
@@ -19971,13 +20064,14 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nnn { Duplicate~name }
{
+ Duplicate~name.\\
The~name~'\l_keys_value_tl'~is~already~used~and~you~shouldn't~use~
the~same~environment~name~twice.~You~can~go~on,~but,~
maybe,~you~will~have~incorrect~results~especially~
if~you~use~'columns-width=auto'.~If~you~don't~want~to~see~this~
message~again,~use~the~key~'allow-duplicate-names'~in~
'\token_to_str:N \NiceMatrixOptions'.\\
- For~a~list~of~the~names~already~used,~type~H~<return>. \\
+ \c_@@_available_keys_str
}
{
The~names~already~defined~in~this~document~are:~
@@ -19988,8 +20082,9 @@ version 2005/12/01 or later.
% \begin{macrocode}
\@@_msg_new:nn { Option~auto~for~columns-width }
{
+ Erroneous~use.\\
You~can't~give~the~value~'auto'~to~the~key~'columns-width'~here.~
- If~you~go~on,~the~key~will~be~ignored.
+ That~key~will~be~ignored.
}
% \end{macrocode}
%
@@ -20167,9 +20262,6 @@ version 2005/12/01 or later.
%
% The option |columns-width=auto| doesn't need any more a second compilation.
%
-% The options |renew-dots|, |renew-matrix| and |transparent| are now available
-% as package options (as said in the documentation).
-%
% The previous version of \pkg{nicematrix} was incompatible with a recent
% version of \pkg{expl3} (released 2019/09/30). This version is compatible.
%
@@ -20416,9 +20508,6 @@ version 2005/12/01 or later.
%
% It's possible to provide options (between brackets) to the keyword |\CodeAfter|.
%
-% A (non fatal) error is raised when the key |transparent|, which is
-% deprecated, is used.
-%
% \subsection*{Changes between versions 5.10 and 5.11}
%
% It's now possible, in the |code-before| and in the |\CodeAfter|, to use the
@@ -20575,6 +20664,14 @@ version 2005/12/01 or later.
%
% New command |\ShowCellNames| available in the |\CodeBefore| and in the |\CodeAfter|.
%
+% \subsection*{Changes between version 6.9 and 6.10}
+%
+% New keys |xdots/shorten-start| and |xdots/shorten-end|.
+%
+% It's possible to use |\line| in the |\CodeAfter| between two blocks (and not
+% only two cells).
+%
+%
% \PrintIndex
%
% \tableofcontents
diff --git a/macros/latex/contrib/nicematrix/nicematrix.pdf b/macros/latex/contrib/nicematrix/nicematrix.pdf
index e6d692f83f..933ab640b6 100644
--- a/macros/latex/contrib/nicematrix/nicematrix.pdf
+++ b/macros/latex/contrib/nicematrix/nicematrix.pdf
Binary files differ