Skip to content
This repository has been archived by the owner on Sep 28, 2023. It is now read-only.

Commit

Permalink
Merge pull request #58 from leftaroundabout/master
Browse files Browse the repository at this point in the history
Some utility for primitive calculus operations
  • Loading branch information
Daniel-Diaz committed May 9, 2015
2 parents f159e32 + 2baf8ec commit 8b0ad91
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions Text/LaTeX/Packages/AMSMath.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ module Text.LaTeX.Packages.AMSMath
, tsqrt
-- ** Custom function symbols
, operatorname
-- ** Sum/Integral symbols
-- ** Summation \/ integration \/ differentiation
, tsum , sumFromTo
, prod , prodFromTo
, integral , integralFromTo
, partial, totald, partialOf, totaldOf
-- ** Operator symbols
-- *** Arithmetic
, cdot , times , div_
Expand Down Expand Up @@ -443,7 +444,23 @@ integralFromTo :: LaTeXC l
=> l -- ^ Lower limit of integration.
-> l -- ^ Upper limit of integration.
-> l
integralFromTo x y = commS "int" !: x ^: y
integralFromTo x y = commS "int" <> commS "limits" !: x ^: y

-- | Partial-differentiation symbol ∂
partial :: LaTeXC l => l
partial = comm0 "partial"

-- | Total-differentiation (or integration-variable) symbol d (non-italic!)
totald :: LaTeXC l => l
totald = mathrm "d"

-- | Partial-differentiation of variable, e.g. /∂x/.
partialOf :: LaTeXC l => l -> l
partialOf v = comm0 "partial" <> v

-- | Total-differentiation of variable, or integration over variable, e.g. d/x/.
totaldOf :: LaTeXC l => l -> l
totaldOf v = mathrm "d" <> v

---- Operator symbols

Expand Down

0 comments on commit 8b0ad91

Please sign in to comment.