Difference between revisions of "Latex Packages"

From Wiki
Jump to navigation Jump to search
m (→‎fontsmpl: showfont and showfontstrip provide this function)
(add makeindex)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== The LaTeX standard tools bundle ==
+
=== afterpage ===
==== afterpage ====
+
Implements a command that causes the commands specified in its argument to be expanded after the current page is output. ConTeXt gives finer control using {{cmd|startpostponing}}
Implements a command that causes the commands specified in its argument to be expanded after the current page is output. Context gives finer control using <cmd>startpostponing</cmd>
 
  
 
<texcode>
 
<texcode>
Line 20: Line 19:
 
</texcode>
 
</texcode>
  
==== array ====
+
=== amsmath ===
This is a latex specific package.
+
This is the most popular package for typesetting mathematics in LaTeX. All relevant features of amsmath are in ConTeXt-core.
  
==== calc ====
+
=== array ===
I think that with etex, these things are trivial in context. I am not sure of the details. --[[User:Adityam|Aditya]]
+
This is a LaTeX specific package. ConTeXt has built-in support for math arrays.
 +
 
 +
=== babel ===
 +
ConTeXt is multilingual by default; see {{cmd|mainlanguage}}, {{cmd|language}}, {{cmd|setuplanguage}}.
 +
 
 +
=== calc ===
 +
Calculations are possible with {{cmd|numexpr}} or {{cmd|dimexpr}}, also in arguments to counters.
 +
 
 +
=== dcolumn ===
  
==== dcolumn ====
 
 
The dcolumn package makes use of the array package to define a "D" column format for use in tabular environments.
 
The dcolumn package makes use of the array package to define a "D" column format for use in tabular environments.
  
Context has support for such features, however, I need to look up the details. --[[User:Adityam|Aditya]]
+
In ConTeXt, you can define the alignment character for the different tables. In [[Tabulate]], you use a <tt>cg(.)</tt> column, in [[TABLE#Using_character_alignment TABLE]] you use <tt>alignmentcharacter={.},aligncharacter=yes</tt>.
 +
 
 +
=== enumerate ===
  
==== enumerate ====
+
ConTeXt has builtin support for all the functionality of the enumerate package. Look at the documentation of {{cmd|setupitemize}}
  
Context has builting support for all the functionality of enumerate package. Look at the documentation of <cmd>setupitemize</cmd>
+
=== fileerr ===
 +
Provides files to be used in subverting the response to TeX’s "file not found" errors, when running LaTeX.
  
==== fileerr ====
+
ConTeXt LMTX never stops to ask for a file name, either it breaks or there’s just a warning in the log (for modules, images, fonts etc.).
Provides files to be used in subverting the response to TeX's "file not found" errors, when running LaTeX.
 
  
==== fontsmpl ====
+
=== fontsmpl ===
 
Provides a package which defines a command \fontsample (which will print a sample of the current font), and a document which prompts for a font family name (such as "cmr") and prints a sampler of the whole family.  
 
Provides a package which defines a command \fontsample (which will print a sample of the current font), and a document which prompts for a font family name (such as "cmr") and prints a sampler of the whole family.  
  
In ConTeXt, you can see the details of a font by <cmd>showfontstrip</cmd> which shows a summary of the current font, and <cmd>showfont</cmd> which shows the current font, and can also show an arbitrary font.
+
In ConTeXt, you can see the details of a font by {{cmd|showfontstrip}} which shows a summary of the current font, and {{cmd|showfont}} which shows the current font, and can also show an arbitrary font.
  
==== ftnright ====
+
=== ftnright ===
 
Assembles footnotes on two-column pages at the bottom of the right hand column.
 
Assembles footnotes on two-column pages at the bottom of the right hand column.
  
==== hhline ====
+
(Don’t know, never tried.)
This is a latex table specefic command.
+
 
 +
=== glossaries ===
 +
 
 +
This is the most popular package for typesetting glossaries. Similar features are available using {{cmd|definesynonyms}} in ConTeXt.
 +
 
 +
=== hhline ===
 +
This is a LaTeX table specific command for double horizontal lines.
  
==== indentfirst ====
+
[[TABLE]]s can have lines in different styles (color, thickness), no double lines per default, but you can use [[MetaPost]].
In context you can achieve the same effect by
+
 
 +
=== indentfirst ===
 +
In ConTeXt you can achieve the same effect by
  
 
<texcode>
 
<texcode>
Line 56: Line 72:
 
</texcode>
 
</texcode>
  
==== layout ====
+
=== layout ===
Context has an inbuilt <cmd>showlayout</cmd> command, but that does not give a ''visual'' output like the layout package.
+
ConTeXt’s {{cmd|showlayout}} command has a similar function.
  
==== longtable ====
+
=== longtable ===
Longtable allows you to write tables that continue to the next page. Context has support for this, but I do know too much about it. Perhaps someone else can elaborate on this. --[[User:Adityam|Aditya]] 04:10, 25 August 2006 (CEST)
+
Longtable allows you to write tables that continue to the next page.
  
 +
[[Tabulate]] can break over pages. For [[TABLE]] floats, you can set <tt>split=yes</tt>.
  
==== multicol ====
+
=== makeindex ===
Context has <cmd>startcolumns</cmd> and columnsets that support the features of multicol.
+
ConTeXt has builtin (multi-)index support.
  
==== rawfonts ====
+
=== minted ===
This is a latex font specific package
+
ConTeXt’s {{cmd|starttyping}} has syntax highlighting options. See [[Verbatim_text]] for more details. The `vim` and `scite` [[Modules]] provide even more options.
  
==== showkeys ====
+
=== multicol ===
 +
See [[Columns]].
 +
 
 +
=== noindentafter ===
 +
 
 +
This package provides macros <code>\NoIndentAfterEnv</code> and <code>\NoIndentAfterCmd</code> to disable indentation even if there is empty line after an environment. In ConTeXt, similar functionality is achieved by `indentnext=no` setting of the environment. For single cases, use {{cmd|indentation}} or {{cmd|noindentation}}.
 +
 
 +
=== pdfdraftcopy ===
 +
This package allows one to place a word "Draft" on the page background. In ConTeXt the same result can be achieved using [[Layers]]. See [[Alternating backgrounds and repeating layers]] for an example.
 +
 
 +
=== polyglossia ===
 +
ConTeXt is multilingual by default; see {{cmd|mainlanguage}}, {{cmd|language}}, {{cmd|setuplanguage}}.
 +
 
 +
=== rawfonts ===
 +
This makes no sense in ConTeXt (and not even in LaTeX).
 +
 
 +
=== showkeys ===
 
The showkeys package modifies the \label, \ref, \pageref, \cite and \bibitem commands so that the "internal" key is printed, without affecting the appearance of the rest of the text, so far as is possible (the keys typically appear in the margin).
 
The showkeys package modifies the \label, \ref, \pageref, \cite and \bibitem commands so that the "internal" key is printed, without affecting the appearance of the rest of the text, so far as is possible (the keys typically appear in the margin).
  
AFAIK, Context does not have this functionality. A partial solution is using <cmd>version[temporary]</cmd> which gives a list of refernces used on the current page.
+
AFAIK, ConTeXt does not have this functionality. A partial solution is using {{cmd|version[temporary]}} which gives a list of references used on the current page.
  
==== somedefs ====
+
=== somedefs ===
This is a latex specific package.
+
LaTeX specific package trickery, makes no sense in ConTeXt.
  
==== theorem ====
+
=== theorem ===
This is not a recommended latex package. Context's <cmd>startenumeration</cmd> has a lot of the functionality of theorems.
+
This is not a recommended LaTeX package. See {{cmd|startenumeration}} how to setup theorems.
  
==== tabularx ====
+
=== tabularx ===
 +
Unfortunately, none of ConTeXt’s table modes has columns that “take the rest width”; with [[TABLE]]s, you can set <tt>option=stretch</tt> to spread the remaining space over all columns.
  
 +
=== trace ===
 +
This is a LaTeX specific package for debugging.
  
==== trace ====
+
ConTeXt has several <tt>\show…</tt> commands as well as [[Trackers]] and directives.
This is a latex specific package for debugging.
 
  
==== varioref ====
+
=== varioref ===
 +
ConTeXt provides similar functionality using {{cmd|somewhere}}.
  
Context provides similar functionality using <cmd>somewhere</cmd>
+
=== verbatim ===
 +
This is a reimplementation of LaTeX’s verbatim environment.
  
==== verbatim ====
+
ConTeXt has {{cmd|starttyping}} which is more powerful than LaTeX’s verbatim environment. See [[Verbatim_text]] for more details.
This is a reimplementation of Latex's verbatim environment. Context has <cmd>starttyping</cmd> which is equivalent to verbatim environment in Latex. See [[Verbatim_text]] for more details
 
  
==== xr ====
+
=== xr ===
 
The package provides a means of creating references to labels in another file
 
The package provides a means of creating references to labels in another file
  
==== xspace ====
+
See [[References#References_to_an_external_file]]
Context has <cmd>autoinsertnextspace</cmd> which is equivalent. However, this is (and will) remain undocumented and unsupported, since Hans does not like this kind of behaviour.
+
 
 +
=== xspace ===
 +
ConTeXt has {{cmd|autoinsertnextspace}} which is equivalent. However, this is (and will) remain undocumented and unsupported, since Hans does not like this kind of behaviour.
  
== Other Packages ==
 
==== pdfdraftcopy ====
 
This package allows one to place a word "Draft" on the page background. In Context the same result can be achieved using Layers. See [[Alternating backgrounds and repeating layers]] for an example.
 
  
 
[[Category:From LaTeX]]
 
[[Category:From LaTeX]]

Latest revision as of 18:47, 24 April 2024

afterpage

Implements a command that causes the commands specified in its argument to be expanded after the current page is output. ConTeXt gives finer control using \startpostponing

 \startpostponing [pagenumber] [+pageoffset]
  \startpostponing[2]
   PAGE 2 \blank
 \stoppostponing
 
 \startpostponing[+1]
    PAGE +1 \blank
 \stoppostponing
 
 \startpostponing[+2]
    PAGE +2 \blank
 \stoppostponing
 
\starttext \dorecurse{4}{\input tufte \page} \stoptext

amsmath

This is the most popular package for typesetting mathematics in LaTeX. All relevant features of amsmath are in ConTeXt-core.

array

This is a LaTeX specific package. ConTeXt has built-in support for math arrays.

babel

ConTeXt is multilingual by default; see \mainlanguage, \language, \setuplanguage.

calc

Calculations are possible with \numexpr or \dimexpr, also in arguments to counters.

dcolumn

The dcolumn package makes use of the array package to define a "D" column format for use in tabular environments.

In ConTeXt, you can define the alignment character for the different tables. In Tabulate, you use a cg(.) column, in TABLE#Using_character_alignment TABLE you use alignmentcharacter={.},aligncharacter=yes.

enumerate

ConTeXt has builtin support for all the functionality of the enumerate package. Look at the documentation of \setupitemize

fileerr

Provides files to be used in subverting the response to TeX’s "file not found" errors, when running LaTeX.

ConTeXt LMTX never stops to ask for a file name, either it breaks or there’s just a warning in the log (for modules, images, fonts etc.).

fontsmpl

Provides a package which defines a command \fontsample (which will print a sample of the current font), and a document which prompts for a font family name (such as "cmr") and prints a sampler of the whole family.

In ConTeXt, you can see the details of a font by \showfontstrip which shows a summary of the current font, and \showfont which shows the current font, and can also show an arbitrary font.

ftnright

Assembles footnotes on two-column pages at the bottom of the right hand column.

(Don’t know, never tried.)

glossaries

This is the most popular package for typesetting glossaries. Similar features are available using \definesynonyms in ConTeXt.

hhline

This is a LaTeX table specific command for double horizontal lines.

TABLEs can have lines in different styles (color, thickness), no double lines per default, but you can use MetaPost.

indentfirst

In ConTeXt you can achieve the same effect by

 \setupheads[indentnext=yes]

layout

ConTeXt’s \showlayout command has a similar function.

longtable

Longtable allows you to write tables that continue to the next page.

Tabulate can break over pages. For TABLE floats, you can set split=yes.

makeindex

ConTeXt has builtin (multi-)index support.

minted

ConTeXt’s \starttyping has syntax highlighting options. See Verbatim_text for more details. The vim and scite Modules provide even more options.

multicol

See Columns.

noindentafter

This package provides macros \NoIndentAfterEnv and \NoIndentAfterCmd to disable indentation even if there is empty line after an environment. In ConTeXt, similar functionality is achieved by indentnext=no setting of the environment. For single cases, use \indentation or \noindentation.

pdfdraftcopy

This package allows one to place a word "Draft" on the page background. In ConTeXt the same result can be achieved using Layers. See Alternating backgrounds and repeating layers for an example.

polyglossia

ConTeXt is multilingual by default; see \mainlanguage, \language, \setuplanguage.

rawfonts

This makes no sense in ConTeXt (and not even in LaTeX).

showkeys

The showkeys package modifies the \label, \ref, \pageref, \cite and \bibitem commands so that the "internal" key is printed, without affecting the appearance of the rest of the text, so far as is possible (the keys typically appear in the margin).

AFAIK, ConTeXt does not have this functionality. A partial solution is using [[Command/version[temporary]|\version[temporary]]] which gives a list of references used on the current page.

somedefs

LaTeX specific package trickery, makes no sense in ConTeXt.

theorem

This is not a recommended LaTeX package. See \startenumeration how to setup theorems.

tabularx

Unfortunately, none of ConTeXt’s table modes has columns that “take the rest width”; with TABLEs, you can set option=stretch to spread the remaining space over all columns.

trace

This is a LaTeX specific package for debugging.

ConTeXt has several \show… commands as well as Trackers and directives.

varioref

ConTeXt provides similar functionality using \somewhere.

verbatim

This is a reimplementation of LaTeX’s verbatim environment.

ConTeXt has \starttyping which is more powerful than LaTeX’s verbatim environment. See Verbatim_text for more details.

xr

The package provides a means of creating references to labels in another file

See References#References_to_an_external_file

xspace

ConTeXt has \autoinsertnextspace which is equivalent. However, this is (and will) remain undocumented and unsupported, since Hans does not like this kind of behaviour.