Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
composition:texte:document:utiliser_le_nom_de_fichier_dans_le_document [2018/06/03 13:15] – samcarter | 3_composition:document:utiliser_le_nom_de_fichier_dans_le_document [2022/10/10 13:40] (Version actuelle) – Usage de ⟨...⟩ dbitouze | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | --- | + | ====== Comment afficher le nom du fichier compilé? ====== |
- | title: What's the name of this file | + | |
- | category: usage | + | |
- | permalink: / | + | |
- | date: 2014-06-10 | + | |
- | --- | + | |
- | One might want this so as to automatically generate a page header or | + | Vous souhaitez générer automatiquement un en-tête ou un pied de page intégrant le fichier en cours de traitement ? |
- | footer recording what file is being processed. | + | Ce n'est pas toujours trivial, voici pourquoi... |
- | TeX retains what it considers the name of the _job_, only, in | + | < |
- | the primitive | + | Il s'agit en général du nom du fichier passé à < |
- | handed to TeX, stripped of its directory name and of any extension | + | et de toute extension |
- | (such as `tex`). | + | * si aucun fichier n'a été passé |
- | TeX interactively), `\jobname` has the value `texput` | + | * si vous avez utilisé l' |
- | (the name that's given to `log` files in this case). | + | |
- | This is fine, for the case of a small document, | + | Si votre document |
- | most significant | + | Mais les documents |
- | TeX makes no attempt to keep track of files input to the | + | < |
- | _job_. So the user has to keep track, himself& | + | L' |
- | is to patch the input commands and cause them to retain details of the | + | et à leur faire conserver les détails des noms de fichiers. |
- | file name. This is particularly difficult in the case of Plain TeX, | + | Cette opération est particulièrement difficile dans le cas de Plain < |
- | since the syntax of the `\input` command is so peculiar. | + | de la syntaxe particulière de la commande '' |
- | In the case of LaTeX, | + | Dans le cas de < |
- | syntax, and the simplest | + | et les [[2_programmation: |
- | used on them. (Note that LaTeX's `\input` command is itself a | + | Pour information, |
- | patch on top of the Plain TeX command. Our patches apply to the | + | Nos patchs s' |
- | LaTeX version | + | Ce type de manipulation reste cependant peu recommandé par rapport aux méthodes suivantes. |
- | It is possible to keep track of the name of the file currently being | + | ===== Avec l'extension “currfile” ===== |
- | processed, but it's surprisingly difficult (these FAQs offered | + | |
- | code, for a long time, that just didn't work in many cases). | + | |
- | The [`currfile`](https:// | + | L' |
- | track of the details of the current file (its name in | + | (son nom dans '' |
- | `\currfilename`, directory in `\currfiledir`, as well as the | + | sans extension |
- | file " | + | qui repère les opérations sur fichiers qui utilisent '' |
- | [`Currfile`](https:// | + | ainsi que les chargements d' |
- | [`filehook`](https:// | + | |
- | `\InputIfFileExists` and `\include`, as well as package and | + | |
- | class loading. | + | |
- | The [`FiNK`](https:// | + | ===== Avec l'extension |
- | file name and extension, in a macro `\finkfile`. | + | |
- | now deprecated, in favour of [`currfile`](https:// | + | |
- | for use in old documents. | + | |
- | The [`FiNK`](https:// | + | |
- | support under Emacs with AUC-TeX. | + | |
+ | :!: L’extension [[ctanpkg> | ||
+ | Ce qui suit est informatif. | ||
+ | |||
+ | L' | ||
+ | et de l' | ||
+ | mais reste disponible pour une utilisation dans les anciens documents. | ||
+ | En bonus, [[ctanpkg> | ||
+ | |||
+ | ----- | ||
+ | //Source:// [[faquk> | ||
+ | |||
+ | {{htmlmetatags> | ||
+ | metatag-og: | ||
+ | metatag-og: | ||
+ | }} | ||