Difference between revisions of "Latex Packages"
m (Text replacement - "<cmd>" to "{{cmd|") |
(updates, re-ordering) |
||
Line 1: | Line 1: | ||
− | |||
==== afterpage ==== | ==== afterpage ==== | ||
− | Implements a command that causes the commands specified in its argument to be expanded after the current page is output. | + | 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}} |
<texcode> | <texcode> | ||
Line 19: | Line 18: | ||
\starttext \dorecurse{4}{\input tufte \page} \stoptext | \starttext \dorecurse{4}{\input tufte \page} \stoptext | ||
</texcode> | </texcode> | ||
+ | |||
+ | ==== amsmath ==== | ||
+ | This is the most popular package for typesetting mathematics in LaTeX. All relevant features of amsmath are in ConTeXt-core. | ||
==== array ==== | ==== array ==== | ||
− | This is a | + | This is a LaTeX specific package. ConTeXt has built-in support for math arrays. |
==== calc ==== | ==== 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. | ||
− | + | 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}} | |
==== fileerr ==== | ==== fileerr ==== | ||
− | Provides files to be used in subverting the response to | + | 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 ==== | ==== fontsmpl ==== | ||
Line 45: | Line 50: | ||
==== 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. | ||
+ | |||
+ | (Don’t know, never tried.) | ||
+ | |||
+ | ==== glossaries ==== | ||
+ | |||
+ | This is the most popular package for typesetting glossaries. Similar features are available using {{cmd|definesynonyms}} in ConTeXt. | ||
==== hhline ==== | ==== hhline ==== | ||
− | This is a | + | This is a LaTeX table specific command for double horizontal lines. |
+ | |||
+ | [[TABLE]]s can have lines in different styles (color, thickness), no double lines per default, but you can use [[MetaPost]]. | ||
==== indentfirst ==== | ==== indentfirst ==== | ||
− | In | + | In ConTeXt you can achieve the same effect by |
<texcode> | <texcode> | ||
Line 57: | Line 70: | ||
==== layout ==== | ==== layout ==== | ||
− | + | ConTeXt’s {{cmd|showlayout}} command has a similar function. | |
==== longtable ==== | ==== longtable ==== | ||
− | Longtable allows you to write tables that continue to the next page. | + | 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>. | ||
+ | ==== minted ==== | ||
+ | ConTeXt’s {{cmd|starttyping}} has syntax highlighting options. See [[Verbatim_text]] for more details. The `vim` and `scite` [[Modules]] provide even more options. | ||
==== multicol ==== | ==== 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. | ||
==== rawfonts ==== | ==== rawfonts ==== | ||
− | This | + | This makes no sense in ConTeXt (and not even in LaTeX). |
==== showkeys ==== | ==== 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, | + | 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 ==== | ||
− | + | LaTeX specific package trickery, makes no sense in ConTeXt. | |
==== theorem ==== | ==== theorem ==== | ||
− | This is not a recommended | + | 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. | ||
− | + | ConTeXt has several <tt>\show…</tt> commands as well as [[Trackers]] and directives. | |
− | |||
==== varioref ==== | ==== varioref ==== | ||
+ | ConTeXt provides similar functionality using {{cmd|somewhere}}. | ||
− | + | ==== verbatim ==== | |
+ | This is a reimplementation of LaTeX’s verbatim environment. | ||
− | + | ConTeXt has {{cmd|starttyping}} which is more powerful than LaTeX’s verbatim environment. 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 | ||
+ | |||
+ | See [[References#References_to_an_external_file]] | ||
==== xspace ==== | ==== 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. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
[[Category:From LaTeX]] | [[Category:From LaTeX]] |
Revision as of 18:37, 24 April 2024
Contents
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.
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.
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.
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.