Menu
CTAN
Comprehensive TeX Archive Network
Cover Upload Browse Search

Direc­tory tex-archive/macros/generic/xint

    Source:  xint.dtx (v1.1, 2014/10/28)
    Author:  Jean-Francois Burnol
    Info:    Expandable operations on big integers, decimals, fractions
    License: LPPL 1.3c or later

This README is also available as README.pdf and README.html.

Change log is in CHANGES.pdf and CHANGES.html.



USAGE


With LaTeX

    \usepackage{xint}       % expandable arithmetic with big integers
    \usepackage{xintfrac}   % decimal numbers, fractions, floats
    \usepackage{xintexpr}   % expressions with infix operators

Further packages: xintbinhex, xintgcd, xintseries and xintcfrac. All
dependencies are handled automatically. For example xintexpr
automatically loads xintfrac which itself loads xint. Package xintcore
is the subset of xint providing only the five operations on big
integers: \xintiiAdd, \xintiiMul, ... There is also xinttools which is a
separate package providing, among others, expandable and non-expandable
loops such as \xintFor.


With TeX

One does for example:

    \input xintexpr.sty\relax

Again, all dependencies are handled automatically. The packages may be
loaded in any catcode context such that letters, digits, \ and % have
their standard catcodes.

xintcore.sty and xinttools.sty both import xintkernel.sty which has the
catcode handler and package identifier and defines a few utilities such
as \oodef or \xint_dothis/\xint_orthat.



INSTALLATION


Method A: using the package manager of your TeX distribution

xint is included in TeXLive (hence also MacTeX) and MikTeX.

There can be a few days of delay between apparition of a new version on
CTAN and availability via the distribution package manager.


Method B: manual installation using xint.tds.zip and unzip

Assumes a GNU/Linux-like system (or Mac OS X).

1.  obtain xint.tds.zip from CTAN:
    http://mirror.ctan.org/install/macros/generic/xint.tds.zip

2.  cd to the download repertory and issue:

        unzip xint.tds.zip -d <TEXMF>

    where <TEXMF> is a suitable TDS-compliant destination repertory. For
    example, with TeXLive:

    -   Linux, standard access rights, hence sudo is needed,
        installation into the "local" tree:

            sudo unzip xint.tds.zip -d /usr/local/texlive/texmf-local
            sudo texhash /usr/local/texlive/texmf-local

    -   Mac OS X, installation into user home folder (no sudo needed,
        and it is recommended to not have a ls-R file there, hence no
        texhash):

            unzip xint.tds.zip -d  ~/Library/texmf


Method C: manual installation using Makefile and xint.dtx

The Makefile automatizes rebuilding from xint.dtx all documentation
files as well as xint.tds.zip. It is for GNU/Linux-like (inc. Mac OS X)
systems, with a teTeX like installation such as TeXLive. Furthermore the
Pandoc software is required.

1.  obtain xint.dtx and Makefile from http://www.ctan.org/pkg/xint.

2.  put them in an otherwise empty working repertory, run make or
    equivalently make help for further instructions.


Method D: installation starting with only xint.dtx

Run "tex xint.dtx" or "etex xint.dtx" to extract from xint.dtx all
packages as well as these files:

README.md
    the current README with Markdown formatting.

CHANGES.md
    the changes across successive releases.

xint.tex

    used to generate xint.pdf via "latex xint.tex" (thrice) then
    "dvipdfmx xint.dvi". For successful compilation, packages newtxtt,
    newtxmath, etoc, mathastext are needed. Inclusion of the source code
    is off by default, but the toggle can be set in xint.tex.

    It is also possible to compile xint.tex with pdflatex.

    A third option is to generate xint.pdf via pdflatex xint.dtx. Source
    code is then included by default.

Makefile.mk
    this is for UNIX-like systems. Note: this file is only produced with
    "etex xint.dtx", not with "tex xint.dtx". Rename it to Makefile and
    run make on the command line for further help.

doHTMLs.sh and doPDFs.sh
    these are scripts (for UNIX-like systems) which can be used to
    convert the README.md and CHANGES.md to HTML and PDF formats. They
    require Pandoc.

pandoctpl.latex
    a Pandoc template used by doPDFs.sh.

Finishing the installation in a TDS hierarchy:

-   move the style files to TDS:tex/generic/xint/

-   xint.dtx goes to TDS:source/generic/xint/

-   the documentation (xint.pdf, README.md,...) goes to
    TDS:doc/generic/xint/

Depending on the destination, it may then be necessary to refresh a
filename database.



LICENSE


Copyright (C) 2014 by Jean-Francois Burnol

This Work 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. This version of this license is in

  http://www.latex-project.org/lppl/lppl-1-3c.txt

and 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.

This Work has the LPPL maintenance status author-maintained.

The Author of this Work is Jean-Francois Burnol.

This Work consists of the source file xint.dtx and of its derived files:
xintkernel.sty, xintcore.sty, xint.sty, xintfrac.sty, xintexpr.sty,
xintbinhex.sty, xintgcd.sty, xintseries.sty, xintcfrac.sty,
xinttools.sty, xint.ins, xint.tex, README, README.md, README.html,
README.pdf, CHANGES.md, CHANGES.html, CHANGES.pdf, pandoctpl.latex,
doHTMLs.sh, doPDFs.sh, xint.dvi, xint.pdf, Makefile.mk.

Files

Name Size Date Notes
CHANGES.html 35962 2014-10-28 19:40
CHANGES.pdf 56756 2014-10-28 19:40
Makefile 460 2014-10-21 23:03
README 5464 2014-10-28 19:40
README.html 9575 2014-10-28 19:40
README.pdf 29228 2014-10-28 19:40
sourcexint.pdf 517705 2014-10-28 19:40
xint.dtx 1083051 2014-10-28 19:39
xint.ins 3029 2014-10-28 19:39
xint.pdf 654384 2014-10-28 19:40

Down­load the con­tents of this pack­age in one zip archive (1.4M).

xint – Ex­pand­able op­er­a­tions on long num­bers

The bun­dle pro­vides four pack­ages:

  • xint, which pro­vides ex­pand­able TeX macros that im­ple­ment the ba­sic arith­metic op­er­a­tions of ad­di­tion, sub­trac­tion, mul­ti­pli­ca­tion and di­vi­sion, as ap­plied to ar­bi­trar­ily long num­bers rep­re­sented as chains of dig­its with an op­tional mi­nus sign;
  • xint­tools is loaded by xint (hence by all other pack­ages of the bun­dle, too): it pro­vides util­i­ties of in­de­pen­dent in­ter­est such as ex­pand­able and non-ex­pand­able loops.
  • xint­frac, which com­putes frac­tions us­ing xint;
  • xin­t­expr, which ex­tends xint­frac with an ex­pand­able parser of ex­pres­sions in­volv­ing in­te­gers and a wide va­ri­ety of op­er­a­tors;
  • xint­bin­hex pro­vides con­ver­sions to and from bi­nary and hex­adec­i­mal bases;
  • xintseries, which pro­vides ba­sic func­tion­al­ity for com­put­ing par­tial sums us­ing xint;
  • xint­gcd, which pro­vides im­ple­men­ta­tions of the Eu­clidean al­go­rithm, and of its type­set­ting;
  • xintcfrac, which deals with the com­pu­ta­tion of con­tin­ued frac­tions,
All of the pack­ages’ com­pu­ta­tions are done in a way that they can op­er­ate in an ex­pand­ing en­vi­ron­ment.

The pack­ages may be used ei­ther with Plain TeX or LaTeX.

Pack­age De­tailsxint
Ver­sion1.1 2014-10-28
Li­censeThe LaTeX Project Public Li­cense 1.3
Copy­right2013-2014 Jean-François Burnol
Main­tainerJean-François Burnol
TDS archivexint.tds.zip
Con­tained inTeXlive as xint
MikTeX as xint
Topics per­form and type­set arith­metic prob­lems
per­form cal­cu­la­tions within TeX
Guest Book Sitemap Contact