texlive[46479] Master: aligned-overset (29jan18)

commits+karl at tug.org commits+karl at tug.org
Tue Jan 30 01:05:58 CET 2018


Revision: 46479
          http://tug.org/svn/texlive?view=revision&revision=46479
Author:   karl
Date:     2018-01-30 01:05:57 +0100 (Tue, 30 Jan 2018)
Log Message:
-----------
aligned-overset (29jan18)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/libexec/ctan2tds
    trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/aligned-overset/
    trunk/Master/texmf-dist/doc/latex/aligned-overset/README.md
    trunk/Master/texmf-dist/doc/latex/aligned-overset/aligned-overset.pdf
    trunk/Master/texmf-dist/source/latex/aligned-overset/
    trunk/Master/texmf-dist/source/latex/aligned-overset/aligned-overset.dtx
    trunk/Master/texmf-dist/tex/latex/aligned-overset/
    trunk/Master/texmf-dist/tex/latex/aligned-overset/aligned-overset.sty
    trunk/Master/tlpkg/tlpsrc/aligned-overset.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/aligned-overset/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/aligned-overset/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/aligned-overset/README.md	2018-01-30 00:05:57 UTC (rev 46479)
@@ -0,0 +1,4 @@
+This package allows the base character of `\underset` or `\overset` to be used as the alignment position for the amsmath aligned math environments.
+
+To install, you can run `tex align-overset.dtx` and copy the generated file `aligned-overset.sty` to a directory in the search path of your TeX installation.
+For quick evaluation, you can also rename `align-overset.dtx` to `align-overset.sty` and use that file directly.


Property changes on: trunk/Master/texmf-dist/doc/latex/aligned-overset/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/aligned-overset/aligned-overset.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/aligned-overset/aligned-overset.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/aligned-overset/aligned-overset.pdf	2018-01-30 00:03:51 UTC (rev 46478)
+++ trunk/Master/texmf-dist/doc/latex/aligned-overset/aligned-overset.pdf	2018-01-30 00:05:57 UTC (rev 46479)

Property changes on: trunk/Master/texmf-dist/doc/latex/aligned-overset/aligned-overset.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/aligned-overset/aligned-overset.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/aligned-overset/aligned-overset.dtx	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/aligned-overset/aligned-overset.dtx	2018-01-30 00:05:57 UTC (rev 46479)
@@ -0,0 +1,197 @@
+% \iffalse meta-comment
+%
+%% Copyright (C) 2018 by Marcel Krueger
+%%
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3c of this license or (at your option) any later
+%% version. The latest version of this license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+%
+%<*batch>
+%<*gobble>
+\ifx\jobname\relax\let\documentclass\undefined\fi
+\ifx\documentclass\undefined
+\csname fi\endcsname
+%</gobble>
+\input l3docstrip.tex
+\keepsilent
+\preamble
+\endpreamble
+\generate{\file{aligned-overset.sty}{\from{aligned-overset.dtx}{package}}}
+\endbatchfile
+%</batch>
+%<*gobble>
+\fi
+\expandafter\ifx\csname @currname\endcsname\empty
+\csname fi\endcsname
+%</gobble>
+%<*driver>
+\documentclass[full]{l3doc}
+\usepackage{aligned-overset}
+\begin{document}
+\DocInput{aligned-overset.dtx}
+\PrintIndex
+\PrintChanges
+\end{document}
+%</driver>
+%<*gobble>
+\fi
+%</gobble>
+% \fi
+%
+% \GetFileInfo{aligned-overset.dtx}
+% \title{The \pkg{aligned-overset} package\thanks{This document
+%        corresponds to \pkg{aligned-overset}~0.0.1, dated~2018/01/18.}}
+% \author{Marcel Kr\"uger \\ \href{mailto:tex at 2krueger.de}{tex at 2krueger.de}}
+% 
+% \maketitle
+%
+% \begin{documentation}
+% This package allows the base character of \cmd\underset{} or \cmd\overset{} to be used as the alignment position for the amsmath aligned math environments.
+%
+% \section{Example}
+% The naive way to align at an operator annotated by \cmd\overset{} would be
+% \begin{verbatim}
+% \begin{align*}
+%   f(x)&\overset{\text{Def}}=x+x\\
+%       &                    =2x
+% \end{align*}
+% \end{verbatim}
+% This results in
+% \begin{align*}
+%   f(x)&\overset{\text{Def}}=x+x\\
+%       &                    =2x
+% \end{align*}
+% But here, the two equal signes are not aligned.
+%
+% Using this package, this can be fixed by writing
+% \begin{verbatim}
+% \begin{align*}
+%   f(x)\overset{\text{Def}}&=x+x\\
+%                           &=2x
+% \end{align*}
+% \end{verbatim}
+% which result in correct alignment:
+% \begin{align*}
+%   f(x)\overset{\text{Def}}&=x+x\\
+%                           &=2x
+% \end{align*}
+% \section{Usage}
+% \begin{function}{\overset,\underset}
+% To add an alignment point at an \cmd\overset{} or \cmd\underset, add a |&| before the base symbol.
+% The |&| should not be enclosed in braces, even if the symbols are enclosed in braces.
+% For example you have to write |\overset{\approx}&{\ge}| instead of |\overset{\approx}{&\ge}|.
+% \end{function}
+% \end{documentation}
+% \begin{implementation}
+% \section{The implementation}
+%    \begin{macrocode}
+%<@@=alignedsets>
+%    \end{macrocode}
+% \iffalse
+%<*package>
+\NeedsTeXFormat{LaTeX2e}
+\RequirePackage{expl3}
+\ProvidesExplPackage
+  {aligned-overset}
+  {2018/01/18}
+  {0.0.1}
+  {aligned overset and underset}
+
+\RequirePackage{xparse,amsmath,mathtools}
+%</package>
+% \fi
+%    \begin{macrocode}
+\box_new:N\l__alignedsets_clap_box
+\box_new:N\l__alignedsets_full_box
+
+%    \end{macrocode}
+% \begin{macro}{\overset}
+%    \begin{macrocode}
+\let\__alignedsets_original_overset:nn\overset
+\cs_set:Npn\overset{
+  \group_align_safe_begin:
+  \__alignedsets_modified_overset:nwn
+}
+\NewExpandableDocumentCommand\__alignedsets_modified_overset:nwn{mt{&}m}{
+  \group_align_safe_end:
+  \IfBooleanTF{#2}{
+    \group_begin:
+    \hbox_set:Nn\l__alignedsets_clap_box{
+      $
+      \displaystyle
+      {}\__alignedsets_original_overset:nn{\mathclap{#1}}{#3}{}
+      $
+    }
+    \hbox_set:Nn\l__alignedsets_full_box{
+      $
+      \displaystyle
+      {}\__alignedsets_original_overset:nn{#1}{#3}{}
+      $
+    }
+    \hspace{
+      \dim_eval:n{(\box_wd:N\l__alignedsets_full_box-\box_wd:N\l__alignedsets_clap_box)/2}
+    }
+    \exp_args:NNNx
+        \group_end:
+        {&}
+        \hspace{
+          -\dim_eval:n{
+            (\box_wd:N\l__alignedsets_full_box-\box_wd:N\l__alignedsets_clap_box)/2
+          }
+        }
+    \__alignedsets_original_overset:nn{#1}{#3}
+  }{
+    \__alignedsets_original_overset:nn{#1}{#3}
+  }
+}
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\underset}
+%    \begin{macrocode}
+\let\__alignedsets_original_underset:nn\underset
+\cs_set:Npn\underset{
+  \group_align_safe_begin:
+  \__alignedsets_modified_underset:nwn
+}
+\NewExpandableDocumentCommand\__alignedsets_modified_underset:nwn{mt{&}m}{
+  \group_align_safe_end:
+  \group_end_ee:
+  \IfBooleanTF{#2}{
+    \group_begin:
+    \hbox_set:Nn\l__alignedsets_clap_box{
+      $
+      \displaystyle
+      {}\__alignedsets_original_underset:nn{\mathclap{#1}}{#3}{}
+      $
+    }
+    \hbox_set:Nn\l__alignedsets_full_box{
+      $
+      \displaystyle
+      {}\__alignedsets_original_underset:nn{#1}{#3}{}
+      $
+    }
+    \hspace{
+      \dim_eval:n{(\box_wd:N\l__alignedsets_full_box-\box_wd:N\l__alignedsets_clap_box)/2}
+    }
+    \exp_args:NNNx
+        \group_end:
+        {&}
+        \hspace{
+          -\dim_eval:n{
+            (\box_wd:N\l__alignedsets_full_box-\box_wd:N\l__alignedsets_clap_box)/2
+          }
+        }
+    \__alignedsets_original_underset:nn{#1}{#3}
+  }{
+    \__alignedsets_original_underset:nn{#1}{#3}
+  }
+}
+%    \end{macrocode}
+% \end{macro}
+% \end{implementation}


Property changes on: trunk/Master/texmf-dist/source/latex/aligned-overset/aligned-overset.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/aligned-overset/aligned-overset.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/aligned-overset/aligned-overset.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/aligned-overset/aligned-overset.sty	2018-01-30 00:05:57 UTC (rev 46479)
@@ -0,0 +1,109 @@
+%%
+%% This is file `aligned-overset.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% aligned-overset.dtx  (with options: `package')
+%% 
+%% Copyright (C) 2018 by Marcel Krueger
+%%
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3c of this license or (at your option) any later
+%% version. The latest version of this license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+\NeedsTeXFormat{LaTeX2e}
+\RequirePackage{expl3}
+\ProvidesExplPackage
+  {aligned-overset}
+  {2018/01/18}
+  {0.0.1}
+  {aligned overset and underset}
+
+\RequirePackage{xparse,amsmath,mathtools}
+\box_new:N\l__alignedsets_clap_box
+\box_new:N\l__alignedsets_full_box
+
+\let\__alignedsets_original_overset:nn\overset
+\cs_set:Npn\overset{
+  \group_align_safe_begin:
+  \__alignedsets_modified_overset:nwn
+}
+\NewExpandableDocumentCommand\__alignedsets_modified_overset:nwn{mt{&}m}{
+  \group_align_safe_end:
+  \IfBooleanTF{#2}{
+    \group_begin:
+    \hbox_set:Nn\l__alignedsets_clap_box{
+      $
+      \displaystyle
+      {}\__alignedsets_original_overset:nn{\mathclap{#1}}{#3}{}
+      $
+    }
+    \hbox_set:Nn\l__alignedsets_full_box{
+      $
+      \displaystyle
+      {}\__alignedsets_original_overset:nn{#1}{#3}{}
+      $
+    }
+    \hspace{
+      \dim_eval:n{(\box_wd:N\l__alignedsets_full_box-\box_wd:N\l__alignedsets_clap_box)/2}
+    }
+    \exp_args:NNNx
+        \group_end:
+        {&}
+        \hspace{
+          -\dim_eval:n{
+            (\box_wd:N\l__alignedsets_full_box-\box_wd:N\l__alignedsets_clap_box)/2
+          }
+        }
+    \__alignedsets_original_overset:nn{#1}{#3}
+  }{
+    \__alignedsets_original_overset:nn{#1}{#3}
+  }
+}
+\let\__alignedsets_original_underset:nn\underset
+\cs_set:Npn\underset{
+  \group_align_safe_begin:
+  \__alignedsets_modified_underset:nwn
+}
+\NewExpandableDocumentCommand\__alignedsets_modified_underset:nwn{mt{&}m}{
+  \group_align_safe_end:
+  \group_end_ee:
+  \IfBooleanTF{#2}{
+    \group_begin:
+    \hbox_set:Nn\l__alignedsets_clap_box{
+      $
+      \displaystyle
+      {}\__alignedsets_original_underset:nn{\mathclap{#1}}{#3}{}
+      $
+    }
+    \hbox_set:Nn\l__alignedsets_full_box{
+      $
+      \displaystyle
+      {}\__alignedsets_original_underset:nn{#1}{#3}{}
+      $
+    }
+    \hspace{
+      \dim_eval:n{(\box_wd:N\l__alignedsets_full_box-\box_wd:N\l__alignedsets_clap_box)/2}
+    }
+    \exp_args:NNNx
+        \group_end:
+        {&}
+        \hspace{
+          -\dim_eval:n{
+            (\box_wd:N\l__alignedsets_full_box-\box_wd:N\l__alignedsets_clap_box)/2
+          }
+        }
+    \__alignedsets_original_underset:nn{#1}{#3}
+  }{
+    \__alignedsets_original_underset:nn{#1}{#3}
+  }
+}
+\endinput
+%%
+%% End of file `aligned-overset.sty'.


Property changes on: trunk/Master/texmf-dist/tex/latex/aligned-overset/aligned-overset.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2018-01-30 00:03:51 UTC (rev 46478)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2018-01-30 00:05:57 UTC (rev 46479)
@@ -33,6 +33,7 @@
     ae aecc aeguill afparticle afthesis
     aguplus aiaa aichej ajl akktex akletter alegreya alertmessage
     alg algobox algolrevived algorithm2e algorithmicx algorithms
+    aligned-overset
     alkalami allrunes almfixed alnumsec alterqcm
     altfont ametsoc amiri amsaddr amscls amscls-doc amsfonts amslatex-primer
     amsldoc-it amsldoc-vn

Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2018-01-30 00:03:51 UTC (rev 46478)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2018-01-30 00:05:57 UTC (rev 46479)
@@ -2426,6 +2426,7 @@
 
 %specialinsrunner = (
  'actuarialsymbol' => 'pdflatex-preserve-pdf',# requires interaction
+ 'aligned-overset' => 'tex',
  'antomega'     => 'latex',  # requires interaction
  'apa6e'        => 'latex',  # requires interaction
  'asciilist'	=> 'latex',  # requires interaction

Added: trunk/Master/tlpkg/tlpsrc/aligned-overset.tlpsrc
===================================================================
Modified: trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc	2018-01-30 00:03:51 UTC (rev 46478)
+++ trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc	2018-01-30 00:05:57 UTC (rev 46479)
@@ -12,6 +12,7 @@
 depend algorithm2e
 depend algorithmicx
 depend algorithms
+depend aligned-overset
 depend amstex
 depend apxproof
 depend autobreak



More information about the tex-live-commits mailing list