Outils pour utilisateurs

Outils du site


issue105:tutoriel3

Ceci est une ancienne révision du document !


Valentine's Day is coming, and I can't think of a better excuse to show a less serious side of LaTeX – while at the same time showing some of the fancy font formatting that we can do.

The advantage of creating your own card is that you can avoid going to the store and reading all kinds of cards that are a bit too mushy for your taste, and resorting to picking the best one from a bad lot that just is ¨not you¨. He/she would appreciate receiving something that you made the effort of making yourself. The card can also be used to create a card for any event or holiday.

Creating any kind of card is made easy with this template that makes use of the gcard.sty, which would be installed on your computer as part of the texlive-latex-extra file.

The preamble contains these commands to make things happen:

\usepackage{gcard} \usepackage{calligra} \usepackage{graphicx} \usepackage{color}

The package gcard is what formats the page, calligra gives us the handwriting font, graphicx gives us pictures, and color lets us change the colour of the font. You may notice the two spellings of the word colour. In LaTeX we have to do as the Americans do and use their spelling of color for colour. I refuse to capitulate in the rest of the column.

Within the document, we need the {\calligra } command when we want the handwriting font to appear. To change the font colour to red and change the size of the font:

{\LARGE \color{red} * }

Here is something that can trip you up and causes errors.

See the asterisk in the the code above? That is where your text goes, and it can be many paragraphs if you like. But that last “ } “ can get lost or deleted if you are not careful, especially when you add more text formatting code like:

{\calligra Happy …}

When we run it all together it looks like:

\LARGE \color{red} {\calligra Happy …}}

Notice the double }} at the end. If you forget to put those in, or one } gets deleted, your document will not compile properly.

My file for the Valentine's day card is shown above.

You will have four small pages on one side of the paper. You will have to fold it to make your card. Depending on font sizes and what kind of card you are making, you may have to adjust things with centering or no centering on the page.

That is how to make a greeting card in LaTeX.

issue105/tutoriel3.1454248911.txt.gz · Dernière modification : 2016/01/31 15:01 de andre_domenech