Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédente | |||
1_generalites:erreurs_de_debutant [2023/07/18 12:38] – Suite. jejust | 1_generalites:erreurs_de_debutant [2023/07/18 21:01] (Version actuelle) – Suite et fin de l'article en anglais. jejust | ||
---|---|---|---|
Ligne 680: | Ligne 680: | ||
==== Tables, figures, and other floats ==== | ==== Tables, figures, and other floats ==== | ||
+ | |||
+ | The allowed number of floats, their positions on a page, | ||
+ | and the spacing around and between them is defined | ||
+ | by the document class. So if something doesn’t work | ||
+ | as you expect (hope for?), any potential helper will insist | ||
+ | on learning what document class is being used. | ||
+ | |||
+ | Input for a float must appear in the source file while there is | ||
+ | still enough space on the output page to fit it in. | ||
+ | In particular, on two-column pages, a '' | ||
+ | must occur in the source before anything else is set on the page. | ||
+ | LaTeX’s core float handling does not allow full-width floats to be placed | ||
+ | anywhere but at the top of a page; some packages extend this capability, | ||
+ | but those won’t be discussed here. | ||
+ | |||
+ | Here are the defaults for the basic article class: | ||
+ | * Total number of floats allowed on a page with text: 3. | ||
+ | * Number of floats allowed at top of page: 2. Percentage of page allowed for top-of-page floats: 70%. | ||
+ | * Number of floats allowed at bottom of page: 1. Percentage of page allowed for bottom-of-page floats: 30%. | ||
+ | * Minimum height of page required for text: 20%. | ||
+ | * Minimum height of float requiring a page by itself: 50%. | ||
+ | The reference height is \textheight. That is, the height of page headers and footers is excluded. | ||
+ | |||
+ | If an insertion is small, must be placed precisely and fits in that location, | ||
+ | don’t use a float. '' | ||
+ | structures should be used directly, often wrapped in '' | ||
+ | |||
+ | The [[ctanpkg> | ||
+ | the sides of a page or column. Refer to the documentation for details. | ||
+ | |||
+ | By tradition, captions are applied at the top of tables and the bottom | ||
+ | of figures. If an insertion is not a float, the usual '' | ||
+ | can’t be used. Instead, '' | ||
+ | |||
==== The document class and preamble ==== | ==== The document class and preamble ==== | ||
+ | |||
+ | When embarking on a new document, start by choosing the document class. | ||
+ | If the goal is publication in a | ||
+ | particular journal, check the publisher’s instructions | ||
+ | to see what is required. Many popular journal classes | ||
+ | are available from [[https:// | ||
+ | |||
+ | If the project is a thesis or dissertation, | ||
+ | out the special requirements, | ||
+ | provides a tailored class, obtain a copy. Try to | ||
+ | determine whether it is actively maintained, and | ||
+ | if there is local support. Read the documentation. | ||
+ | |||
+ | It is the responsibility of the document class to | ||
+ | define the essential structure of the intended document. | ||
+ | If the document you are preparing differs in essential ways from what is supported by the document class, the time to get help is now. | ||
+ | |||
+ | There will be features not natively supported by | ||
+ | the document class; for example, the choice of how | ||
+ | to prepare a bibliography may be left to the author. | ||
+ | This is why packages have been created. | ||
=== Organizing your document === | === Organizing your document === | ||
Ligne 714: | Ligne 769: | ||
==== Processing the job ==== | ==== Processing the job ==== | ||
+ | Once the file is created, it’s time to produce output. | ||
+ | There are several engines to choose from: pdfLaTeX, XeLaTeX, and LuaLaTeX. | ||
+ | These can be run interactively from the command line, or initiated from | ||
+ | an editor. Assuming there are no errors, how many | ||
+ | times a document must be processed to produce the | ||
+ | final output depends on what features it contains. | ||
+ | |||
+ | In particular, if any cross-references or '' | ||
+ | are present, this information is written out to an | ||
+ | '' | ||
+ | to a '' | ||
+ | The bibliography must be processed by a separate | ||
+ | program (and its log checked for errors) with the | ||
+ | reformatted bib data written out to yet another file. | ||
+ | Then LaTeX must be run (at least) twice more --- once | ||
+ | to read in the '' | ||
+ | the bibliography and resolved cross-references, | ||
+ | and the second time to resolve the correct page num- | ||
+ | bers (which will change when the TOC and similar | ||
+ | bits are added at the beginning). | ||
+ | |||
+ | All this assumes that there are no errors. Errors | ||
+ | will be recorded in the log file. Learn where the log | ||
+ | file is located, and make a habit of referring to it. | ||
+ | Warnings, such as those for missing characters, will | ||
+ | also be recorded there, but may not be shown online:\\ | ||
+ | '' | ||
+ | '' | ||
+ | |||
+ | In the log, some errors may appear with closely | ||
+ | grouped line numbers. If so, and the first is one | ||
+ | that interrupts the orderly processing of a scoped | ||
+ | environment, | ||
+ | fix the first error and try processing before trying to | ||
+ | understand the others; often, they may just go away. | ||
+ | |||
+ | Good luck. With practice comes understanding. | ||
+ | Oh... **Remember to read the documentation.** | ||
----- | ----- |