issue212:tutoriel2
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue212:tutoriel2 [2024/12/27 17:43] – créée auntiee | issue212:tutoriel2 [2025/01/04 18:21] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | This time we will play with a few of the packages stored under the E topic. There are lots to choose from – with 27 topics. As usual I will skip the sets of packages designed for a specific language. This time the languages include English, Esperanto and Estonian. Even though Donald Knuth worked in English, and designed the first versions of Tex for English speakers, there are packages which are specific to the typographical needs for written English. My next column will be an introduction to using Latex with languages other than English. | + | **This time we will play with a few of the packages stored under the E topic. There are lots to choose from – with 27 topics. As usual I will skip the sets of packages designed for a specific language. This time the languages include English, Esperanto and Estonian. Even though Donald Knuth worked in English, and designed the first versions of Tex for English speakers, there are packages which are specific to the typographical needs for written English. My next column will be an introduction to using LaTeX with languages other than English. |
The first package for this column can be fun. It is called ‘epigraph’. The audience asks what is an epigraph? An epigraph is a short, usually pithy comment or quotation that often appears at the beginning of a document or chapter. You have probably seen epigraphs, but perhaps not thought about how to add them to your own work. The epigraph package provides commands for typesetting a single epigraph as well as environments for typesetting a list of epigraphs according to the documentation. | The first package for this column can be fun. It is called ‘epigraph’. The audience asks what is an epigraph? An epigraph is a short, usually pithy comment or quotation that often appears at the beginning of a document or chapter. You have probably seen epigraphs, but perhaps not thought about how to add them to your own work. The epigraph package provides commands for typesetting a single epigraph as well as environments for typesetting a list of epigraphs according to the documentation. | ||
- | Of course the command \usepackage{epigraph} must appear in the preamble to your Latex document, i.e. before the \begin{document} command, and after the \documentclass command. In the document, use the following syntax for one epigraph (see graphic): | + | Of course the command \usepackage{epigraph} must appear in the preamble to your LaTeX document, i.e. before the \begin{document} command, and after the \documentclass command. In the document, use the following syntax for one epigraph (see graphic): |
+ | |||
+ | \epigraph{text}{source}** | ||
+ | |||
+ | Cette fois-ci, nous allons jouer avec quelques-uns des paquets stockés sous la rubrique E. Il y a beaucoup de choix – avec 27 rubriques. Comme d’habitude, | ||
+ | |||
+ | Le premier paquet de cette chronique peut être amusant. Il s’appelle « epigraph ». Le public se demande-t-il ce qu’est une épigraphe ? Une épigraphe est un commentaire ou une citation courte, généralement concise, qui apparaît souvent au début d’un document ou d’un chapitre. Vous avez probablement déjà vu des épigraphes, | ||
+ | |||
+ | Bien entendu, la commande \usepackage{epigraph} doit apparaître dans le préambule de votre document LaTeX, c' | ||
\epigraph{text}{source} | \epigraph{text}{source} | ||
- | The text will be placed at the right side of the text block, the source is placed below and on the right side of the text. {text} refers to the quotation you wish to appear. I prefer epigraphs to be centred on the page. That can be done using the \epigraphflush{center} command. Other options include adjusting the width or thickness of the line that separates the text from the source, adjusting the type-size of the epigraph, adjusting the white space before and after the epigraph. There are more advanced settings described in the documentation. There are also some examples in the thirteen-page documentation. As I have said before, if you are interested in using a particular package that is new to you (epigraphs for example), take some time to read the documentation and to experiment with the various commands. | + | |
+ | **The text will be placed at the right side of the text block, the source is placed below and on the right side of the text. {text} refers to the quotation you wish to appear. I prefer epigraphs to be centred on the page. That can be done using the \epigraphflush{center} command. Other options include adjusting the width or thickness of the line that separates the text from the source, adjusting the type-size of the epigraph, adjusting the white space before and after the epigraph. There are more advanced settings described in the documentation. There are also some examples in the thirteen-page documentation. As I have said before, if you are interested in using a particular package that is new to you (epigraphs for example), take some time to read the documentation and to experiment with the various commands. | ||
Next I will look at a package that I wished I knew about when I was writing quizzes and exams for my college students. It is called ‘exercisebank’, | Next I will look at a package that I wished I knew about when I was writing quizzes and exams for my college students. It is called ‘exercisebank’, | ||
+ | \documentclass{article} | ||
+ | \usepackage[]{exercisebank} | ||
+ | \exercisebanksetup{exercise directory=exercises} | ||
+ | \makeset{myExerciseSet}{myexercises} | ||
+ | \begin{document} | ||
+ | \buildset{myExerciseSet} | ||
+ | \end{document}** | ||
+ | |||
+ | Le texte sera placé à droite du bloc de texte, la source est placée en dessous et à droite du texte. {text} fait référence à la citation que vous souhaitez voir apparaître. Je préfère que les épigraphes soient centrées sur la page. Cela peut être fait en utilisant la commande \epigraphflush{center}. D' | ||
+ | |||
+ | Je vais maintenant examiner un paquet que j' | ||
\documentclass{article} | \documentclass{article} | ||
\usepackage[]{exercisebank} | \usepackage[]{exercisebank} | ||
Ligne 18: | Ligne 38: | ||
\end{document} | \end{document} | ||
- | And this is the basic structure of a list of questions. | + | |
+ | **And this is the basic structure of a list of questions. | ||
\begin{intro} | \begin{intro} | ||
Ligne 33: | Ligne 54: | ||
\end{problem} | \end{problem} | ||
- | Of course if all that a question bank needs is statements, then there would be no need for a special package. I would simply type the statements or questions into a word processing file and ask the print shop to make however many copies I need. | + | Of course if all that a question bank needs is statements, then there would be no need for a special package. I would simply type the statements or questions into a word processing file and ask the print shop to make however many copies I need.** |
- | This package allows the knowledgeable user to pick which questions are used in any particular test, allows questions to be tagged (i.e. labelled) to indicate degree of difficulty, and allows questions to have different marks assigned to them. A user can build more than one question bank and draw questions for a test (or assignment) from more than one question bank. For example, the text has twenty chapters so I write twenty sets of questions. At mid-term I can give a test pulling selected questions from each of the first ten chapters. | + | Et voici la structure de base d'une liste de questions. |
+ | |||
+ | \begin{intro} | ||
+ | Voici notre problème. | ||
+ | \end{intro} | ||
+ | \begin{problem} | ||
+ | Ceci est la partie du problème 1. | ||
+ | \end{problem} | ||
+ | \begin{problem} | ||
+ | Ceci est la partie du problème 2. | ||
+ | \end{problem} | ||
+ | \begin{problem} | ||
+ | Ceci est le problème 3. | ||
+ | \end{problem} | ||
+ | |||
+ | Bien sûr, si une banque de questions n' | ||
+ | |||
+ | |||
+ | **This package allows the knowledgeable user to pick which questions are used in any particular test, allows questions to be tagged (i.e. labelled) to indicate degree of difficulty, and allows questions to have different marks assigned to them. A user can build more than one question bank and draw questions for a test (or assignment) from more than one question bank. For example, the text has twenty chapters so I write twenty sets of questions. At mid-term I can give a test pulling selected questions from each of the first ten chapters. | ||
Solutions to problems can be added directly to the question bank. By default, solutions do not display or print (do not appear in the PDF) unless the user requests them. For example: | Solutions to problems can be added directly to the question bank. By default, solutions do not display or print (do not appear in the PDF) unless the user requests them. For example: | ||
Ligne 46: | Ligne 85: | ||
\end{solution} | \end{solution} | ||
- | Graphics can be included in the problem sets (question banks). Graphics can be existing files or graphics generated using one of Latex’s image tools (chemfig and tikz in FCM 193, for example). | + | Graphics can be included in the problem sets (question banks). Graphics can be existing files or graphics generated using one of LaTeX’s image tools (chemfig and tikz in FCM 193, for example).** |
- | The first six pages of the 25-page documentation “cover the basics” as the author says. The rest of the documentation is an annotated list of commands in alphabetical order. If you download the package from ctan.org, you will also get a sample question bank with a problem with a graphic. | + | Ce paquet permet à l' |
- | This seems to me to be a very powerful complex package with many options. I would like to have several worked examples of typical instructor tasks and examples of different types of questions | + | Les solutions aux problèmes peuvent être ajoutées directement à la banque de questions. Par défaut, les solutions ne s' |
- | The next package this time is the ‘comment’ package, latest revision 2016 August. The author says the package allows the user to “selectively in/exclude pieces of text: the user can define new comment versions and each is controlled separately.” It works by setting up a comment environment. Any context within this environment is ignored when the document is compiled. See examples using comment and not using comment. Notice how the first paragraph is repeated when the comment code is removed from the source file. | + | \begin{problem} |
+ | Quel est le résultat de 2 * 6 ? | ||
+ | \end{problem} | ||
+ | \begin{solution} | ||
+ | 12 | ||
+ | \end{solution} | ||
+ | |||
+ | Des graphiques peuvent être inclus dans les séries de problèmes (banques de questions). Les graphiques peuvent être des fichiers existants ou des graphiques générés à l’aide de l’un des outils d’image de LaTeX (voir chemfig et tikz dans le FCM n° 193, par exemple). | ||
+ | |||
+ | |||
+ | **The first six pages of the 25-page documentation “cover the basics” as the author says. The rest of the documentation is an annotated list of commands in alphabetical order. If you download the package from ctan.org, you will also get a sample question bank with a problem with a graphic. | ||
+ | |||
+ | This seems to me to be a very powerful complex package with many options. I would like to have several worked examples of typical instructor tasks and examples of different types of questions (multiple choice, true / false, matching, etc). Searching through twenty pages of commands to find the few I need, while facing a production deadline for an assignment or test, is not my idea of fun. Having now written about more than twenty packages in these pages, and having examined at least twenty more, I think the documentation for complex packages is the weakest part of these packages. It is well-known that IT people are weak when it comes to documentation. I would like the package owners to think of their documentation as user manuals. Help users finish their first few projects with your package, otherwise they will not remain users for long.** | ||
+ | |||
+ | Les six premières pages de la documentation de 25 pages « couvrent les bases », comme le dit l’auteur. Le reste de la documentation est une liste annotée de commandes classées par ordre alphabétique. Si vous téléchargez le paquet depuis ctan.org, vous obtiendrez également un exemple de banque de questions avec un problème et un graphique. | ||
+ | |||
+ | Cela me semble être un paquet complexe très puissant avec de nombreuses options. J’aimerais avoir plusieurs exemples de tâches typiques d’un instructeur et des exemples de différents types de questions (choix multiple, vrai/faux, correspondance, | ||
+ | |||
+ | |||
+ | **The next package this time is the ‘comment’ package, latest revision 2016 August. The author says the package allows the user to “selectively in/exclude pieces of text: the user can define new comment versions and each is controlled separately.” It works by setting up a comment environment. Any context within this environment is ignored when the document is compiled. See examples using comment and not using comment. Notice how the first paragraph is repeated when the comment code is removed from the source file. | ||
\documentclass[letterpaper, | \documentclass[letterpaper, | ||
Ligne 65: | Ligne 123: | ||
\end{document} | \end{document} | ||
- | Comments can be made conditional. By default, once defined, the comment environment contents are global in the document. They can be made local using the begingroup / endgroup commands. Comment commands can be made special and be defined by the user. There are some other specialized commands available in the four page documentation. This looks like it could be quite useful when preparing various versions of a document, either for various readers or in order to record various revisions and potential edits. | + | Comments can be made conditional. By default, once defined, the comment environment contents are global in the document. They can be made local using the begingroup / endgroup commands. Comment commands can be made special and be defined by the user. There are some other specialized commands available in the four page documentation. This looks like it could be quite useful when preparing various versions of a document, either for various readers or in order to record various revisions and potential edits.** |
- | One more package before I finish looking at the packages in the “E” topic, an older one called ‘ulem’. Take a look at the image and the code below. | + | Le prochain paquet est cette fois le paquet « comment » (commentaire), |
+ | |||
+ | \documentclass[letterpaper, | ||
+ | \usepackage[]{comment} | ||
+ | \usepackage{lipsum} | ||
+ | \begin{document} | ||
+ | \lipsum[1-1] | ||
+ | %\begin{comment} | ||
+ | \lipsum[1-1] | ||
+ | %\end{comment} | ||
+ | \lipsum[2-2] | ||
+ | \end{document} | ||
+ | |||
+ | Les commentaires peuvent être rendus conditionnels. Par défaut, une fois défini, le contenu de l' | ||
+ | |||
+ | |||
+ | **One more package before I finish looking at the packages in the “E” topic, an older one called ‘ulem’. Take a look at the image and the code below. | ||
\documentclass[letterpaper, | \documentclass[letterpaper, | ||
Ligne 75: | Ligne 149: | ||
Copied from the documentation for the ulem package. | Copied from the documentation for the ulem package. | ||
- | The ulem package provides various types of underlining that can stretch between words and be broken across lines. Use it with Latex or plain Tex. | + | The ulem package provides various types of underlining that can stretch between words and be broken across lines. Use it with LaTeX or plain Tex. |
- | In Latex ulem normally replaces italics with underlining in text emphasized by \uline{emph}, | + | In LaTeX ulem normally replaces italics with underlining in text emphasized by \uline{emph}, |
+ | |||
+ | \end{document}** | ||
+ | |||
+ | Encore un paquet assez ancien, appelé « ulem » avant de finir de regarder les paquets dans la rubrique « E ». Jetez un coup d'œil à l' | ||
+ | |||
+ | \documentclass[letterpaper, | ||
+ | \usepackage[]{ulem} | ||
+ | \begin{document} | ||
+ | |||
+ | Copié depuis la documentation du paquet ulem. | ||
+ | |||
+ | Le paquet ulem fournit différents types de soulignement qui peuvent s' | ||
+ | |||
+ | Dans LaTeX, ulem remplace normalement l' | ||
\end{document} | \end{document} | ||
- | The ulem package also has sout, xout and dotuline commands: strikeout, mark each letter with an oblique line and underline with dots (see illustration). Other styles of underlining can be user defined. One small warning: because each underlined word is placed in a text box, automatic hyphenation for that word is disabled. The six pages of documentation are easy to understand and have enough examples so the user can experiment without problems. | ||
- | Next time, we will start an examination of the babel package hoping to learn how to use it to write text in various languages. I can write in only English, French, Latin, ancient Greek and Chinese. I hope that that will be enough choices so we can explore babel together. | + | **The ulem package also has sout, xout and dotuline commands: strikeout, mark each letter with an oblique line and underline with dots (see illustration). Other styles of underlining can be user defined. One small warning: because each underlined word is placed in a text box, automatic hyphenation for that word is disabled. The six pages of documentation are easy to understand and have enough examples so the user can experiment without problems. |
+ | |||
+ | Next time, we will start an examination of the babel package hoping to learn how to use it to write text in various languages. I can write in only English, French, Latin, ancient Greek and Chinese. I hope that that will be enough choices so we can explore babel together.** | ||
+ | |||
+ | Le paquet ulem contient également les commandes sout, xout et dotuline : barrer, marquer chaque lettre avec une ligne oblique et souligner avec des points (voir illustration). D' | ||
+ | |||
+ | La prochaine fois, nous commencerons un examen du paquet babel dans l' | ||
issue212/tutoriel2.1735317785.txt.gz · Dernière modification : 2024/12/27 17:43 de auntiee