CTAN Comprehensive TeX Archive Network

Querying the CTAN Database with XML – List of Packages

The list of packages can be obtained under the URL

http://www.ctan.org/xml/1.1/packages

The result is an XML file as in the following listing:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE packages SYSTEM 'http://www.ctan.org/xml/1.1/catalogue.dtd'>
<packages>
  <package key="a0poster" name="a0poster" caption="Support for designing posters on large paper" />
  <package key="a2ac" name="a2ac" caption="AFM to AFM plus Composites" />
  <package key="a2ping" name="a2ping" caption="Advanced PS, PDF, EPS converter" />
  <package key="a4" name="a4" caption="Support for A4 paper sizes" />
  <package key="a4wide" name="a4wide" caption=""Wide" a4 layout" />
  <package key="a5comb" name="a5comb" caption="Support for a5 paper sizes" />
  <package key="aaai" name="aaai" caption="AAAI style" />
  <package key="aaai-named" name="aaai-named" caption="BibTeX style for AAAI" />
  <package key="aastex" name="aastex" caption="Macros for Manuscript Preparation for AAS Journals" />
  …
</packages>  

The list has the outer tag <packages>. The packages contained in this list are ordered ascending on the key of the packages.

<package>

Each package is contained within the tag <package>. This tag has several attributes:

key
This attribute contains the key of the package. This attribute is mandatory.
name
This attribute contains the name of the package. This attribute is mandatory.
details
This attribute contains a short descriptive text about the content of the package.

Selecting

The list can be restricted to contain part of the packages only. The condition is that the key starts with a given string. This string is specified with the parameter key.

http://www.ctan.org/xml/1.1/packages?key=aaai

The following example extracts all packages for which the key starts with the letter n:

http://www.ctan.org/xml/1.1/packages?key=n

Omitting Or Enforcing the Doctype Declaration

The list of licenses may include a doctype declaration. This declaration can be suppressed with the URL parameter no-dtd which should be set to true as in

http://www.ctan.org/xml/1.1/licenses?no-dtd=true

A doctype declaration can be enforced with the URL parameter no-dtd which should be set to false in this case.

The default is no-dtd=false.

Omitting the XML Declaration

The list of licenses starts with an XML declaration. This declaration can be suppressed with the URL parameter no-xml which should be set to true as in

http://www.ctan.org/xml/1.1/licenses?no-xml=true
Guest Book Sitemap Contact Contact Author