texlive[70018] Master: typstfun (20feb24)

commits+karl at tug.org commits+karl at tug.org
Tue Feb 20 22:05:38 CET 2024


Revision: 70018
          https://tug.org/svn/texlive?view=revision&revision=70018
Author:   karl
Date:     2024-02-20 22:05:38 +0100 (Tue, 20 Feb 2024)
Log Message:
-----------
typstfun (20feb24)

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

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/typstfun/
    trunk/Master/texmf-dist/doc/latex/typstfun/README.txt
    trunk/Master/texmf-dist/doc/latex/typstfun/typstfun.pdf
    trunk/Master/texmf-dist/doc/latex/typstfun/typstfun.sty
    trunk/Master/texmf-dist/doc/latex/typstfun/typstfun.tex
    trunk/Master/tlpkg/tlpsrc/typstfun.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/typstfun/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/typstfun/README.txt	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/typstfun/README.txt	2024-02-20 21:05:38 UTC (rev 70018)
@@ -0,0 +1,3 @@
+Package: List of equivalent Typst function names for LaTeX commands
+Author:  Jianrui Lyu <tolvjr at 163.com>
+License: The LaTeX Project Public License 1.3c


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

Index: trunk/Master/texmf-dist/doc/latex/typstfun/typstfun.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/typstfun/typstfun.pdf	2024-02-20 21:04:13 UTC (rev 70017)
+++ trunk/Master/texmf-dist/doc/latex/typstfun/typstfun.pdf	2024-02-20 21:05:38 UTC (rev 70018)

Property changes on: trunk/Master/texmf-dist/doc/latex/typstfun/typstfun.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/typstfun/typstfun.sty
===================================================================
--- trunk/Master/texmf-dist/doc/latex/typstfun/typstfun.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/typstfun/typstfun.sty	2024-02-20 21:05:38 UTC (rev 70018)
@@ -0,0 +1,425 @@
+% -*- coding: utf-8 -*-
+% ----------------------------------------------------------------------------
+% Author:  Jianrui Lyu <tolvjr at 163.com>
+% License: The LaTeX Project Public License 1.3c
+% ----------------------------------------------------------------------------
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{typstfun}[2024-02-20 v2024A Print equivalent Typst function names]
+
+\RequirePackage{functional}
+\IgnoreSpacesOn
+
+\propConstFromKeyval\c at typstfun@text at env@prop{
+   description = terms
+  ,enumerate = enum
+  ,figure = figure
+  ,itemize = list
+  ,minipage = block
+  ,table = figure
+  ,tabular = table
+  ,tabularx = {table,grid}
+  ,thebibliography = bibliography
+  ,verbatim = raw
+}
+
+\propConstFromKeyval\c at typstfun@text at cmd@prop{
+   chapter = heading
+  ,cite = cite
+  ,documentclass = import
+  ,emph = emph
+  ,fbox = rect
+ %,foreach = for
+  ,href = link
+  ,hspace = h
+  ,include = include
+  ,includegraphics = image
+  ,label = label
+  ,lowercase = lower
+  ,medspace = medium
+  ,newcommand = let
+  ,newcounter = let
+  ,newenvironment = let
+  ,newlength = let
+  ,pagebreak = pagebreak
+  ,parbox = block
+  ,part = heading
+  ,qquad = wide
+  ,quad = quad
+  ,ref = ref
+  ,renewcommand = let
+  ,renewenvironment = let
+  ,section = heading
+  ,setcounter = let
+  ,setlength = let
+  ,subsection = heading
+  ,subsubsection = heading
+  ,textbf = strong
+  ,textit = text
+  ,textmd = text
+  ,textrm = text
+  ,textsc = text
+  ,textsf = text
+  ,textsl = text
+  ,texttt = text
+  ,thickspace = thick
+  ,thinspace = thin
+  ,underline = underline
+  ,uppercase = upper
+  ,url = link
+  ,usepackage = import
+  ,verb = raw
+  ,vspace = v
+}
+
+\propConstFromKeyval\c at typstfun@math at env@prop{
+   Bmatirx = mat
+  ,Vmatirx = mat
+  ,align = equation
+  ,array = mat
+  ,bmatirx = mat
+  ,cases = cases
+  ,displaymath = equation
+  ,equation = equation
+  ,math = math
+  ,matrix = mat
+  ,pmatirx = mat
+  ,vmatirx = mat
+}
+
+\propConstFromKeyval\c at typstfun@math at cmd@prop{
+   arccos = arccos
+  ,arcsin = arcsin
+  ,arctan = arctan
+  ,arg = arg
+  ,bar = macron
+  ,binom = binom
+  ,boldsymbol = bold
+  ,cos = cos
+  ,cosh = cosh
+  ,cot = cot
+  ,coth = coth
+  ,csc = csc
+  ,dbinom = binom
+  ,ddot = {diaer,dot.double}
+  ,deg = deg
+  ,det = det
+  ,dfrac = frac
+  ,dim = dim
+  ,dot = dot
+  ,exp = exp
+  ,frac = frac
+  ,gcd = gcd
+  ,hat = hat
+  ,hspace = h
+  ,inf = inf
+  ,ker = ker
+  ,left = lr
+  ,lg = lg
+  ,lim = lim
+  ,liminf = liminf
+  ,limsup = limsup
+  ,ln = ln
+  ,log = log
+  ,mathbb = bb
+  ,mathcal = cal
+  ,max = max
+  ,min = min
+  ,mod = mod
+  ,overbrace = overbrace
+  ,overline = overline
+  ,qquad = wide
+  ,quad = quad
+  ,right = lr
+  ,sec = sec
+  ,sin = sin
+  ,sinh = sinh
+  ,sqrt = {sqrt,root}
+  ,sup = sup
+  ,tan = tan
+  ,tanh = tanh
+  ,tbinom = binom
+  ,tfrac = frac
+  ,tilde = tilde
+  ,underbrace = underbrace
+  ,vec = arrow
+  ,widehat = hat
+}
+
+\propConstFromKeyval\c at typstfun@math at sym@prop{
+   Cap = sect.double
+  ,Cup = union.double
+  ,Delta = Delta
+  ,Gamma = Gamma
+  ,Join = join
+  ,Lambda = Lambda
+  ,Longrightarrow = arrow.double.not
+  ,Omega = Omega
+  ,Phi = Phi
+  ,Pi = Pi
+  ,Psi = Psi
+  ,Rightarrow = arrow.double
+  ,Sigma = Sigma
+  ,Theta = Theta
+  ,aleph = alef
+  ,alpha = alpha
+ %,amalg = product.co
+  ,angle = angle
+  ,approx = approx
+  ,approxeq = approx.eq
+  ,ast = ast
+  ,beta = beta
+  ,bigcap = sect.big
+  ,bigcirc = circle.big
+  ,bigcup = union.big
+  ,bigodot = dot.circle.big
+  ,bigoplus = plus.circle.big
+  ,bigotimes = times.circle.big
+  ,bigsqcup = union.sq.big
+  ,bigtriangledown = triangle.b
+  ,bigtriangleup = triangle.t
+  ,biguplus = union.plus.big
+  ,bigvee = or.big
+  ,bigwedge = and.big
+ %,bowtie = join
+  ,bullet = bullet
+  ,cap = sect
+  ,cdot = {dot.c,dot.op}
+  ,cdots = dots.c
+  ,checkmark = checkmark
+  ,chi = chi
+  ,circ = {circle.small,compose}
+  ,colon = colon
+  ,cong = tilde.equiv
+  ,coprod = product.co
+  ,cup = union
+  ,curlyvee = or.curly
+  ,curlywedge = and.curly
+  ,dagger = dagger
+  ,dashv = tack.l
+  ,ddagger = dagger.double
+  ,delta = delta
+  ,ddots = dots.down
+  ,diamond = diamond
+  ,div = div
+  ,divideontimes = times.div
+  ,dotplus = plus.dot
+  ,downarrow = arrow.b
+  ,ell = ell
+  ,emptyset = nothing
+  ,epsilon = epsilon.alt
+  ,equiv = equiv
+  ,eta = eta
+  ,exists = exists
+  ,forall = forall
+ %,frown = paren.t
+  ,gamma = gamma
+  ,ge = gt.eq
+  ,geq = gt.eq
+  ,geqslant = gt.eq.slant
+  ,gg = gt.double
+  ,hbar = planck.reduce
+  ,imath = dotless.i
+  ,iiiint = intgral.quad
+  ,iiint = integral.triple
+  ,iint = integral.double
+  ,in = in
+  ,int = integral
+  ,intercal = {top,tack.b}
+  ,iota = iota
+  ,jmath = dotless.j
+  ,kappa = kappa
+  ,lambda = lambda
+  ,langle = angle.l
+  ,lbrace = {brace,brace.l}
+  ,lbrack = {bracket,bracket.l}
+  ,ldots = {dots,dots.l}
+  ,le = lt.eq
+  ,leadsto = arrow.squiggly
+  ,leftarrow = arrow.l
+  ,leftthreetimes = times.three.l
+  ,leftrightarrow = arrow.l.r
+  ,leq = lt.eq
+  ,leqslant = lt.eq.slant
+  ,lhd = triangle.l
+  ,ll = lt.double
+  ,longmapsto = arrow.long.bar
+  ,longrightarrow = arrow.long
+  ,ltimes = times.l
+  ,mapsto = arrow.bar
+  ,measuredangle = angle.arc
+  ,mid = divides
+  ,models = models
+  ,mp = minus.plus
+  ,mu = mu
+  ,nRightarrow = arrow.double.not
+  ,nabla = nabla
+  ,ncong = tilde.nequiv
+  ,ne = eq.not
+  ,neg = not
+  ,neq = eq.not
+  ,nmid = divides.not
+  ,notin = in.not
+  ,nleftarrow = arrow.l.not
+  ,nrightarrow = arrow.not
+  ,nsim = tilde.not
+  ,nu = nu
+  ,odot = dot.circle
+  ,oint = integral.cont
+  ,omega = omega
+ %,omicron = omicron
+  ,ominus = minus.circle
+  ,oplus = plus.circle
+  ,otimes = times.circle
+  ,parallel = parallel
+  ,partial = diff
+  ,perp = perp
+  ,phi = phi.alt
+  ,pi = pi
+  ,pm = plus.minus
+  ,prec = prec
+  ,preceq = prec.eq
+  ,prime = prime
+  ,prod = product
+  ,propto = prop
+  ,psi = psi
+  ,rangle = angle.r
+  ,rbrace = brace.r
+  ,rbrack = bracket.r
+  ,rhd = triangle
+  ,rho = rho
+  ,rightarrow = arrow.r
+  ,rightthreetimes = times.three.r
+  ,rtimes = times.r
+  ,setminus = without
+  ,sigma = sigma
+  ,sim = tilde
+  ,simeq = tilde.eq
+ %,smile = paren.b
+  ,sqcap = sect.sq
+  ,sqcup = union.sq
+  ,star = star
+  ,subset = subset
+  ,subseteq = subset.eq
+  ,subsetneq = subset.neq
+  ,succ = succ
+  ,succeq = succ.eq
+  ,sum = sum
+  ,supset = supset
+  ,supseteq = supset.eq
+  ,supsetneq = supset.neq
+  ,tau = tau
+  ,theta = theta
+  ,times = times
+  ,to = arrow.r
+  ,triangle = triangle.t
+  ,triangleleft = triangle.l.small
+  ,triangleright = triangle.small
+  ,uparrow = arrow.t
+  ,updownarrow = arrow.t.b
+  ,upharpoonright = harpoon.tr
+  ,uplus = union.plus
+  ,upsilon = upsilon
+  ,varepsilon = epsilon
+  ,varphi = phi
+  ,varpi = pi.alt
+  ,varrho = rho.alt
+  ,varsigma = sigma.alt
+  ,vartheta = theta.alt
+  ,vdash = tack.r
+  ,vdots = dots.v
+  ,vee = or
+  ,wedge = and
+  ,wr = wreath
+  ,xi = xi
+  ,zeta = zeta
+}
+
+\prgNewFunction\typstfun at init{m}{
+  \propVarMapInline{\expName{c at typstfun@#1 at prop}}{
+    \tlSet{\expName{l at typstfun@name@##1 at tl}}{##2}
+  }
+}
+
+\typstfun at init{text at env}
+\typstfun at init{text at cmd}
+\typstfun at init{math at env}
+\typstfun at init{math at cmd}
+\typstfun at init{math at sym}
+
+\NewDocumentCommand\typstfun{m}{
+  \texttt{\expName{l at typstfun@name@#1 at tl}}
+}
+
+\tlNew\l at typstfun@latex at type@tl
+\tlSet\l at typstfun@latex at type@tl{Command}
+
+\tlConst\c at typstfun@longtable at begin@tl{
+  \begingroup
+  \setlength\tabcolsep{0pt}
+  \begin{longtable}{*{4}{p{0.25\linewidth}}}
+  \toprule
+  LaTeX~\l at typstfun@latex at type@tl & Typst~Function &
+  LaTeX~\l at typstfun@latex at type@tl & Typst~Function \\
+  \midrule
+  \endhead
+  \bottomrule
+  \endfoot
+}
+
+\tlConst\c at typstfun@longtable at end@tl{
+  \end{longtable}
+  \endgroup
+}
+
+\prgNewFunction\typstfunPrintTable{Mmm}{
+  \tlClear\lTmpaTl
+  \intZero\lTmpaInt
+  \propVarMapInline{#1}{
+    \tlPutRight\lTmpaTl{#2&#3}
+    \intIncr\lTmpaInt
+    \intIfOddTF{\lTmpaInt}{
+      \tlPutRight\lTmpaTl{&}
+    }{
+      \tlPutRight\lTmpaTl{\\}
+    }
+  }
+  \c at typstfun@longtable at begin@tl
+  \lTmpaTl
+  \c at typstfun@longtable at end@tl
+}
+
+\prgNewFunction\typstfunPrintEnv{m}{
+  \tlSet\l at typstfun@latex at type@tl{Environment}
+  \typstfunPrintTable{
+    \expName{c at typstfun@#1 at env@prop}
+  }{
+    \texttt{##1}
+  }{
+    \texttt{##2}
+  }
+}
+
+\prgNewFunction\typstfunPrintCmd{m}{
+  \tlSet\l at typstfun@latex at type@tl{Command}
+  \typstfunPrintTable{
+    \expName{c at typstfun@#1 at cmd@prop}
+  }{
+    \ExpandArgs{c}\fakeverb{##1}
+  }{
+    \texttt{##2}
+  }
+}
+
+\prgNewFunction\typstfunPrintSym{m}{
+  \tlSet\l at typstfun@latex at type@tl{Symbol}
+  \typstfunPrintTable{
+    \expName{c at typstfun@#1 at sym@prop}
+  }{
+    \ExpandArgs{c}\fakeverb{##1}\hfill$\UseName{##1}$\hspace*{1em}
+  }{
+    \texttt{##2}
+  }
+}
+
+\IgnoreSpacesOff


Property changes on: trunk/Master/texmf-dist/doc/latex/typstfun/typstfun.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/typstfun/typstfun.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/typstfun/typstfun.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/typstfun/typstfun.tex	2024-02-20 21:05:38 UTC (rev 70018)
@@ -0,0 +1,79 @@
+%  -*- coding: utf-8 -*-
+\documentclass[oneside,11pt]{article}
+\usepackage[a4paper,margin=2cm]{geometry}
+
+\newcommand*{\myversion}{2024A}
+\newcommand*{\mydate}{Version \myversion\ (\the\year-\mylpad\month-\mylpad\day)}
+\newcommand*{\mylpad}[1]{\ifnum#1<10 0\the#1\else\the#1\fi}
+
+\setlength{\parindent}{0pt}
+\setlength{\parskip}{4pt plus 1pt minus 1pt}
+
+\usepackage{typstfun}
+\usepackage{longtable}
+\usepackage{booktabs}
+\usepackage{amsmath,amssymb}
+\usepackage{ninecolors}
+\usepackage{codehigh}
+\usepackage{hyperref}
+\hypersetup{
+  colorlinks=true,
+  urlcolor=blue3,
+  linkcolor=green3,
+}
+
+\begin{document}
+
+\title{\textsf{\color{green3}Equivalent Typst Function Names of LaTeX Commands}}
+\author{Jianrui Lyu (tolvjr at 163.com)}
+\date{\mydate}
+\maketitle
+
+This documentation lists equivalent \href{https://typst.app}{Typst} function names for LaTeX commands.
+Only math symbols provided by LaTeX format or \texttt{amsmath} bundle are included.
+
+\tableofcontents
+
+\section{Text Environments}
+
+\typstfunPrintEnv{text}
+
+\section{Text Commands}
+
+\typstfunPrintCmd{text}
+
+\section{Math Environments}
+
+\typstfunPrintEnv{math}
+
+\section{Math Commands}
+
+\typstfunPrintCmd{math}
+
+\section{Math Symbols}
+
+\typstfunPrintSym{math}
+
+\begin{thebibliography}{9}
+
+\bibitem{Hefferon}
+  Jim Hefferon,
+  \textit{LaTeX Math for Undergrads},
+  \url{https://gitlab.com/jim.hefferon/undergradmath},
+  2020.
+
+\bibitem{Xie}
+  Johan Xie,
+  \textit{Typst Math for Undergrads},
+  \url{https://github.com/johanvx/typst-undergradmath},
+  2023.
+
+\bibitem{Pakin}
+  Scott Pakin,
+  \textit{The Comprehensive LaTeX Symbol List},
+  \url{https://ctan.org/pkg/comprehensive},
+  2024.
+
+\end{thebibliography}
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/typstfun/typstfun.tex
___________________________________________________________________
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	2024-02-20 21:04:13 UTC (rev 70017)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2024-02-20 21:05:38 UTC (rev 70018)
@@ -873,7 +873,7 @@
     twemoji-colr twemojis twoinone twoup
     txfonts txfontsb txgreeks txuprcal
     type1cm typed-checklist typeface typehtml typeoutfileinfo typewriter
-    typicons typoaid typogrid tzplot
+    typicons typoaid typogrid typstfun tzplot
   uaclasses uafthesis uantwerpendocs uassign ucalgmthesis
     ucharcat ucharclasses ucbthesis ucdavisthesis ucph-revy
     ucs ucsmonograph

Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2024-02-20 21:04:13 UTC (rev 70017)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2024-02-20 21:05:38 UTC (rev 70018)
@@ -2557,6 +2557,7 @@
  'tudscr',	'DDC.*|TUD.*|' . $standardtex,
  'tugboat-plain','\.cmn|' . $standardtex,
  'twemojis',	'all-twemojis\.pdf|' . $standardtex,
+ 'typstfun',	'NULL',			# doc pkg
  'ucs',		'data|' . $standardtex,
  'uestcthesis', '\.png|' . $standardtex,
  'udesoftec',   'udesoftec-cover|\.cls|\.def',

Modified: trunk/Master/tlpkg/tlpsrc/collection-langenglish.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-langenglish.tlpsrc	2024-02-20 21:04:13 UTC (rev 70017)
+++ trunk/Master/tlpkg/tlpsrc/collection-langenglish.tlpsrc	2024-02-20 21:05:38 UTC (rev 70018)
@@ -71,6 +71,7 @@
 depend tlc2
 depend tlc3-examples
 depend tlmgrbasics
+depend typstfun
 depend undergradmath
 depend visualfaq
 depend webguide

Added: trunk/Master/tlpkg/tlpsrc/typstfun.tlpsrc
===================================================================


More information about the tex-live-commits mailing list.