Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente Prochaine révision Les deux révisions suivantes | ||
2_programmation:macros:que_sont_les_environnements [2018/05/24 10:41] joseph.wright |
2_programmation:macros:que_sont_les_environnements [2018/06/03 16:24] joseph.wright |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
--- | --- | ||
- | title: What are LaTeX ''environments'' | + | title: What are LaTeX "environments" |
- | section: Bits and pieces of (La)TeX | + | category: concepts |
- | date: 2014-06-10 | + | permalink: /FAQ-whatenv |
--- | --- | ||
While TeX makes direct provision for commands, LaTeX adds a | While TeX makes direct provision for commands, LaTeX adds a | ||
- | concept of ''environment''; environments perform an action on a block | + | concept of "environment"; environments perform an action on a block |
(of something or other) rather than than just doing something at one | (of something or other) rather than than just doing something at one | ||
place in your document. | place in your document. | ||
Ligne 28: | Ligne 28: | ||
environment is introduced by `\begin{document}`; it looks | environment is introduced by `\begin{document}`; it looks | ||
simple, but needs all sorts of special TeX code to make it work | simple, but needs all sorts of special TeX code to make it work | ||
- | ''transparently''; most environments are more elaborate than | + | "transparently"; most environments are more elaborate than |
`monoblock` and _much_ simpler than | `monoblock` and _much_ simpler than | ||
`document`. | `document`. | ||
An environment puts its content inside a TeX _group_, so that | An environment puts its content inside a TeX _group_, so that | ||
- | commands used inside the environment don't ''leak out'' — the | + | commands used inside the environment don't "leak out" — the |
`monoblock` environment, above, restricts its effect to | `monoblock` environment, above, restricts its effect to | ||
its own contents (the stuff between the `\begin{monoblock}` | its own contents (the stuff between the `\begin{monoblock}` | ||
Ligne 39: | Ligne 39: | ||
sort of thing. | sort of thing. | ||
- | So that's ''simple'' environments; the `monoblock`, above | + | So that's "simple" environments; the `monoblock`, above |
doesn't actually gain us much over | doesn't actually gain us much over | ||
```latex | ```latex |