issue219:latex
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 | |||
issue219:latex [2025/07/30 07:12] – d52fr | issue219:latex [2025/07/30 09:24] (Version actuelle) – d52fr | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | **If you read the Latex column in FCM 218, you may remember I am going to try adding three more features to the book about Whitefoot the Wood Mouse: drop caps for the initial paragraph of each chapter, the geometry package, and illustrations. Before I do those three, I will change the size of the type to be a little friendlier to children’s eyes. When I finished last time, I had reset the font to Noto Serif but made no change to the type size. | + | **If you read the LaTeX column in FCM 218, you may remember I am going to try adding three more features to the book about Whitefoot the Wood Mouse: drop caps for the initial paragraph of each chapter, the geometry package, and illustrations. Before I do those three, I will change the size of the type to be a little friendlier to children’s eyes. When I finished last time, I had reset the font to Noto Serif but made no change to the type size. |
Note: For those who do not know, Noto is a shortened form of “No tofu”. It means this font has an extensive set of characters and supports Unicode. That means it can be used for many languages of the world without generating little blank boxes (“tofu” - □) as substitutes for missing characters. The various styles of the Noto font family are available for free from fonts.google.com, | Note: For those who do not know, Noto is a shortened form of “No tofu”. It means this font has an extensive set of characters and supports Unicode. That means it can be used for many languages of the world without generating little blank boxes (“tofu” - □) as substitutes for missing characters. The various styles of the Noto font family are available for free from fonts.google.com, | ||
- | Without a type size in the documentclass instruction, | + | Without a type size in the documentclass instruction, |
+ | |||
+ | Si vous avez lu la chronique LaTeX dans le FCM n° 218, vous vous souvenez peut-être que je vais essayer d' | ||
+ | |||
+ | Remarque : Pour ceux qui ne le savent pas, Noto est l' | ||
+ | |||
+ | Sans taille de police dans l' | ||
**During my scan of the pages, I noticed many of the epigraphs were occupying four lines of type, not two. In order to adjust most of them to two lines I increased the width of the epigraph area usually to to eight centimetres but to ten or twelve centimetres if necessary: \setlength{\epigraphwidth}{8cm} | **During my scan of the pages, I noticed many of the epigraphs were occupying four lines of type, not two. In order to adjust most of them to two lines I increased the width of the epigraph area usually to to eight centimetres but to ten or twelve centimetres if necessary: \setlength{\epigraphwidth}{8cm} | ||
Ligne 10: | Ligne 17: | ||
After several experiments and a few test prints, I decided to use the FourierNC package at 11pt. It generates New Century Schoolbook text. That seems appropriate to me since I first encountered Thornton W. Burgess in a grade school classroom. Using the default margins for the document class “book”, and using letter size paper, this choice generates 91 pages. ** | After several experiments and a few test prints, I decided to use the FourierNC package at 11pt. It generates New Century Schoolbook text. That seems appropriate to me since I first encountered Thornton W. Burgess in a grade school classroom. Using the default margins for the document class “book”, and using letter size paper, this choice generates 91 pages. ** | ||
+ | |||
+ | En parcourant les pages, j'ai remarqué que de nombreuses épigraphes occupaient quatre lignes, et non deux. Afin d' | ||
+ | |||
+ | En modifiant la taille par défaut du texte Noto à 11 pt dans la commande documentclass, | ||
+ | |||
+ | Après plusieurs essais et quelques impressions tests, j'ai décidé d' | ||
+ | |||
**As I scrolled through each variation in type size, I noticed some widows and orphans. These terms denote only the first line of a paragraph appearing at the bottom of a page (orphan), or only the last line of a paragraph appearing at the top of a page (widow). These problems and others can be identified in the error log in TexStudio using the widows-and-orphans package. Widows, and often orphans, can be eliminated using the nowidow package. Even if you use the nowidow package, I strongly recommend looking through the generated document carefully to find any orphans that appear in the TexStudio log. Almost always, the adjustments made by the nowidow package will also eliminate orphans. However, you may need to edit the text or introduce an artificial line break or page break in order to correct any orphaned line you find. | **As I scrolled through each variation in type size, I noticed some widows and orphans. These terms denote only the first line of a paragraph appearing at the bottom of a page (orphan), or only the last line of a paragraph appearing at the top of a page (widow). These problems and others can be identified in the error log in TexStudio using the widows-and-orphans package. Widows, and often orphans, can be eliminated using the nowidow package. Even if you use the nowidow package, I strongly recommend looking through the generated document carefully to find any orphans that appear in the TexStudio log. Almost always, the adjustments made by the nowidow package will also eliminate orphans. However, you may need to edit the text or introduce an artificial line break or page break in order to correct any orphaned line you find. | ||
Ligne 16: | Ligne 30: | ||
Setting up the drop caps has to be done for each chapter individually. For drop caps, I used the lettrine package. It has good documentation and three sample documents. I chose not to use any options, to have the first letter of the first word in a chapter use two lines, and the rest of the first word in small caps. (See the accompanying image in this issue.) This had to be done for each chapter separately, which was a little tedious to do for thirty-two chapters. However I am pleased with the result.** | Setting up the drop caps has to be done for each chapter individually. For drop caps, I used the lettrine package. It has good documentation and three sample documents. I chose not to use any options, to have the first letter of the first word in a chapter use two lines, and the rest of the first word in small caps. (See the accompanying image in this issue.) This had to be done for each chapter separately, which was a little tedious to do for thirty-two chapters. However I am pleased with the result.** | ||
+ | |||
+ | En parcourant chaque variation de taille de police, j'ai remarqué des veuves et des orphelins. Ces termes désignent uniquement la première ligne d'un paragraphe apparaissant en bas de page (orpheline), | ||
+ | |||
+ | Remarque : Effectuez la vérification finale des veuves et des orphelins après avoir effectué tous les autres ajustements affectant la quantité de texte sur une page. Sinon, vous risquez d' | ||
+ | |||
+ | La configuration des lettrines doit être effectuée pour chaque chapitre individuellement. Pour les lettrines, j'ai utilisé le paquet lettrine. Il dispose d'une bonne documentation et de trois exemples de documents. J'ai choisi de n' | ||
+ | |||
**To get the document ready for printing as a book, some margin adjustments are required. Books are printed on both sides of the sheet of paper. In order to bind the pages into a book, the right-hand side of the left pages and the left-hand side of the right pages must be set wide enough so there is extra paper which will be used in the binding process. In book printing terminology, | **To get the document ready for printing as a book, some margin adjustments are required. Books are printed on both sides of the sheet of paper. In order to bind the pages into a book, the right-hand side of the left pages and the left-hand side of the right pages must be set wide enough so there is extra paper which will be used in the binding process. In book printing terminology, | ||
Ligne 21: | Ligne 42: | ||
This is a children’s book and needs to be sized to fit a child’s hand. Standard letter paper is too large. After measuring some children’s books in my house I decided to set the page size to 230mm * 150mm (9in * 6in). Outside margins will be 25mm, inside margins will be the same. Contents will start 20mm from the top. The bottom margin will be 40mm, this includes the space for page numbers. These measurements need to be set in the options for the geometry package. You can see the code in the accompanying image.** | This is a children’s book and needs to be sized to fit a child’s hand. Standard letter paper is too large. After measuring some children’s books in my house I decided to set the page size to 230mm * 150mm (9in * 6in). Outside margins will be 25mm, inside margins will be the same. Contents will start 20mm from the top. The bottom margin will be 40mm, this includes the space for page numbers. These measurements need to be set in the options for the geometry package. You can see the code in the accompanying image.** | ||
- | **In an Internet search, I found only one illustration suitable to this particular book. I had expected to find several good images and some not-so-good images. I guess either the original book did not have many illustrations, | + | Pour préparer le document à l' |
+ | |||
+ | Ceci est un livre pour enfants et doit être dimensionné pour la main d'un enfant. Le papier standard au format letter est trop grand. Après avoir mesuré certains livres pour enfants chez moi, j'ai décidé de définir le format de page à 230 mm x 150 mm (9 pouces x 6 pouces). Les marges extérieures seront de 25 mm, les marges intérieures seront identiques. Le contenu commencera à 20 mm du haut. La marge inférieure sera de 40 mm, espace pour la numérotation des pages inclus. Ces mesures doivent être définies dans les options du paquet geometry. Le code est présenté page 27 en haut. | ||
+ | |||
+ | |||
+ | **In an Internet search, I found only one illustration suitable to this particular book. I had expected to find several good images and some not-so-good images. I guess either the original book did not have many illustrations, | ||
Code to insert an image is shown above. | Code to insert an image is shown above. | ||
Ligne 29: | Ligne 55: | ||
As I have said before, I intend to print the PDF and then bind it into a book. That means I need to print on two sides of each sheet of paper. Organizing the pages into the desired page layout and getting them to print in the correct order is called imposition. This is the last important task before printing. All of the publisher’s design choices must be finished before imposition.** | As I have said before, I intend to print the PDF and then bind it into a book. That means I need to print on two sides of each sheet of paper. Organizing the pages into the desired page layout and getting them to print in the correct order is called imposition. This is the last important task before printing. All of the publisher’s design choices must be finished before imposition.** | ||
- | **The pgfmorepages package seems to be a reasonable choice to use for imposition with Latex. It can reduce four pages of text to two pages (1 sheet) of paper or eight pages to four pages (2 sheets). This package presented two problems for me. It puts four pages into two by reducing the type by 50%. That means the text of page 5 for example remains on page 5 but it is difficult to read. Of course I can solve that by doubling the default size of the text before applying pgfmorepages. Adjusting the font can mean generating more widows, which will be corrected with the no-widows package. It also means a page-by-page review to look for orphans and for any unnecessary blank pages. Any linebreak or pagebreak commands would also have to be examined to find out if they are still appropriate. | + | Lors d'une recherche sur Internet, je n'ai trouvé qu'une seule illustration adaptée à ce livre. Je m' |
+ | |||
+ | Le code permettant d' | ||
+ | |||
+ | J'ai testé un paquet appelé zwpagelayout. Je pense qu'il pourrait remplacer utilement le paquet geometry. Il inclut certaines fonctionnalités que je souhaitais utiliser pour ce livre. Après avoir lu la documentation à plusieurs reprises, je n'ai pas réussi à comprendre comment activer ces fonctionnalités supplémentaires. Zwpagelayout n' | ||
+ | |||
+ | Comme je l'ai déjà dit, je compte imprimer le PDF et le relier pour en faire un livre. Cela signifie que je dois imprimer chaque feuille recto-verso. Organiser les pages selon la mise en page souhaitée et les imprimer dans le bon ordre s' | ||
+ | |||
+ | |||
+ | **The pgfmorepages package seems to be a reasonable choice to use for imposition with LaTeX. It can reduce four pages of text to two pages (1 sheet) of paper or eight pages to four pages (2 sheets). This package presented two problems for me. It puts four pages into two by reducing the type by 50%. That means the text of page 5 for example remains on page 5 but it is difficult to read. Of course I can solve that by doubling the default size of the text before applying pgfmorepages. Adjusting the font can mean generating more widows, which will be corrected with the no-widows package. It also means a page-by-page review to look for orphans and for any unnecessary blank pages. Any linebreak or pagebreak commands would also have to be examined to find out if they are still appropriate. | ||
The other is an issue for binding, not for printing. If I accept the eight pages into four pages then the first eight pages will print as a group. When this group is folded together they will make a two-sheet signature. I would prefer to work with sixteen-page or four-sheet signature when I come to bind this book. The documentation for pgfmorepages has a sample to help with defining a new layout. There are many comments. In the future, I may try to make a new layout which will be 16 text pages on eight physical pages (four sheets of paper), book format.** | The other is an issue for binding, not for printing. If I accept the eight pages into four pages then the first eight pages will print as a group. When this group is folded together they will make a two-sheet signature. I would prefer to work with sixteen-page or four-sheet signature when I come to bind this book. The documentation for pgfmorepages has a sample to help with defining a new layout. There are many comments. In the future, I may try to make a new layout which will be 16 text pages on eight physical pages (four sheets of paper), book format.** | ||
- | **Because of time pressure (not from FCM but from other things in my life), I decided to abandon the pgfmoreages package. My desire to bind Whitefoot the Wood Mouse is a personal one. I need to be able to use Latex to make a PDF with appropriate page sizes and crop marks for a children’s book. Generating that PDF can wait a little while. The final code for the preamble and the heading for the first chapter accompanies this text. | + | Le paquet pgfmorepages semble être un choix judicieux pour l' |
+ | |||
+ | L' | ||
+ | |||
+ | |||
+ | **Because of time pressure (not from FCM but from other things in my life), I decided to abandon the pgfmoreages package. My desire to bind Whitefoot the Wood Mouse is a personal one. I need to be able to use LaTeX to make a PDF with appropriate page sizes and crop marks for a children’s book. Generating that PDF can wait a little while. The final code for the preamble and the heading for the first chapter accompanies this text. | ||
+ | |||
+ | For now that is the end of our adventures with Whitefoot. Next issue, I will resume my perusal of some of the packages available at ctan.org. There are sixteen topics starting with I and seven starting with J. In those two groups, I will look for topics that might be of general interest. If you have any special requests for tasks you want to do in LaTeX, send me an email (rboardman@psmail.net). Talk to you again in the next issue.** | ||
+ | |||
+ | En raison de contraintes de temps (non pas liées au FCM, mais à d' | ||
- | For now that is the end of our adventures with Whitefoot. | + | Pour l' |
issue219/latex.txt · Dernière modification : 2025/07/30 09:24 de d52fr