summaryrefslogtreecommitdiff
path: root/info
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-02-21 03:01:35 +0000
committerNorbert Preining <norbert@preining.info>2024-02-21 03:01:35 +0000
commit2f56d3421e4663856409792eb5b08a2c57b38a8c (patch)
treee06fab87f70b77ad8d8fef43cfc25293e20127f8 /info
parent203d8df9dde93676afcceb5ace315faeda77d016 (diff)
CTAN sync 202402210301
Diffstat (limited to 'info')
-rw-r--r--info/typstfun/README.txt3
-rw-r--r--info/typstfun/typstfun.pdfbin0 -> 62706 bytes
-rw-r--r--info/typstfun/typstfun.sty425
-rw-r--r--info/typstfun/typstfun.tex79
4 files changed, 507 insertions, 0 deletions
diff --git a/info/typstfun/README.txt b/info/typstfun/README.txt
new file mode 100644
index 0000000000..4bbdd6c893
--- /dev/null
+++ b/info/typstfun/README.txt
@@ -0,0 +1,3 @@
+Package: List of equivalent Typst function names for LaTeX commands
+Author: Jianrui Lyu <tolvjr@163.com>
+License: The LaTeX Project Public License 1.3c
diff --git a/info/typstfun/typstfun.pdf b/info/typstfun/typstfun.pdf
new file mode 100644
index 0000000000..be1e44d323
--- /dev/null
+++ b/info/typstfun/typstfun.pdf
Binary files differ
diff --git a/info/typstfun/typstfun.sty b/info/typstfun/typstfun.sty
new file mode 100644
index 0000000000..d46f9941e5
--- /dev/null
+++ b/info/typstfun/typstfun.sty
@@ -0,0 +1,425 @@
+% -*- coding: utf-8 -*-
+% ----------------------------------------------------------------------------
+% Author: Jianrui Lyu <tolvjr@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@typstfun@text@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@typstfun@text@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@typstfun@math@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@typstfun@math@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@typstfun@math@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@init{m}{
+ \propVarMapInline{\expName{c@typstfun@#1@prop}}{
+ \tlSet{\expName{l@typstfun@name@##1@tl}}{##2}
+ }
+}
+
+\typstfun@init{text@env}
+\typstfun@init{text@cmd}
+\typstfun@init{math@env}
+\typstfun@init{math@cmd}
+\typstfun@init{math@sym}
+
+\NewDocumentCommand\typstfun{m}{
+ \texttt{\expName{l@typstfun@name@#1@tl}}
+}
+
+\tlNew\l@typstfun@latex@type@tl
+\tlSet\l@typstfun@latex@type@tl{Command}
+
+\tlConst\c@typstfun@longtable@begin@tl{
+ \begingroup
+ \setlength\tabcolsep{0pt}
+ \begin{longtable}{*{4}{p{0.25\linewidth}}}
+ \toprule
+ LaTeX~\l@typstfun@latex@type@tl & Typst~Function &
+ LaTeX~\l@typstfun@latex@type@tl & Typst~Function \\
+ \midrule
+ \endhead
+ \bottomrule
+ \endfoot
+}
+
+\tlConst\c@typstfun@longtable@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@typstfun@longtable@begin@tl
+ \lTmpaTl
+ \c@typstfun@longtable@end@tl
+}
+
+\prgNewFunction\typstfunPrintEnv{m}{
+ \tlSet\l@typstfun@latex@type@tl{Environment}
+ \typstfunPrintTable{
+ \expName{c@typstfun@#1@env@prop}
+ }{
+ \texttt{##1}
+ }{
+ \texttt{##2}
+ }
+}
+
+\prgNewFunction\typstfunPrintCmd{m}{
+ \tlSet\l@typstfun@latex@type@tl{Command}
+ \typstfunPrintTable{
+ \expName{c@typstfun@#1@cmd@prop}
+ }{
+ \ExpandArgs{c}\fakeverb{##1}
+ }{
+ \texttt{##2}
+ }
+}
+
+\prgNewFunction\typstfunPrintSym{m}{
+ \tlSet\l@typstfun@latex@type@tl{Symbol}
+ \typstfunPrintTable{
+ \expName{c@typstfun@#1@sym@prop}
+ }{
+ \ExpandArgs{c}\fakeverb{##1}\hfill$\UseName{##1}$\hspace*{1em}
+ }{
+ \texttt{##2}
+ }
+}
+
+\IgnoreSpacesOff
diff --git a/info/typstfun/typstfun.tex b/info/typstfun/typstfun.tex
new file mode 100644
index 0000000000..d41066f45e
--- /dev/null
+++ b/info/typstfun/typstfun.tex
@@ -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@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}