issue76:c_c
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue76:c_c [2013/09/01 16:41] – créée andre_domenech | issue76:c_c [2014/01/26 12:19] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | ==== à relire ===== | ||
+ | |||
+ | |||
+ | ** | ||
Over the last couple of issues, I asked for input from the readers on commands that they find useful, and a short description of what they do. Now, I have nearly three A4 pages of commands in the Google Doc I created for this. To anyone who contributed – thank you! There were a surprising number of commands (or variations) that I hadn't ever come across before. If anyone would like recognition on the title page of the PDF, you can either email me at lswest34+cli-cookbook@gmail.com, | Over the last couple of issues, I asked for input from the readers on commands that they find useful, and a short description of what they do. Now, I have nearly three A4 pages of commands in the Google Doc I created for this. To anyone who contributed – thank you! There were a surprising number of commands (or variations) that I hadn't ever come across before. If anyone would like recognition on the title page of the PDF, you can either email me at lswest34+cli-cookbook@gmail.com, | ||
+ | ** | ||
+ | Au cours des deux derniers numéros, j'ai demandé aux lecteurs de partager les commandes qu'ils trouvent utiles et une brève description de ce qu' | ||
+ | |||
+ | |||
+ | |||
+ | ** | ||
First off, the Cookbook is now located on GitHub, here: https:// | First off, the Cookbook is now located on GitHub, here: https:// | ||
It's a public repository, so anyone who wants to contribute needs only to fork the repository, make those changes, and then send me a pull request. I will reserve the right to veto the inclusion of any commands if they seem to me to be either unnecessary duplicates of existing commands, or else are purely malicious (by this I mean commands that will result in loss of data, without any feasible security usage). For those of you not comfortable with git (or LaTeX), and without the inclination to learn, you can suggest changes and updates using the issue tracker on the repository. | It's a public repository, so anyone who wants to contribute needs only to fork the repository, make those changes, and then send me a pull request. I will reserve the right to veto the inclusion of any commands if they seem to me to be either unnecessary duplicates of existing commands, or else are purely malicious (by this I mean commands that will result in loss of data, without any feasible security usage). For those of you not comfortable with git (or LaTeX), and without the inclination to learn, you can suggest changes and updates using the issue tracker on the repository. | ||
+ | ** | ||
+ | Tout d' | ||
+ | |||
+ | C'est un dépôt public, donc quiconque veut contribuer a seulement besoin de dupliquer le référentiel, | ||
+ | |||
+ | |||
+ | ** | ||
Installing LaTeX | Installing LaTeX | ||
Ligne 13: | Ligne 30: | ||
or | or | ||
- | sudo apt-get install texlive-full | + | sudo apt-get install texlive-full«» |
Installing the IDE | Installing the IDE | ||
Ligne 19: | Ligne 36: | ||
I recommend using an IDE when working with LaTeX for the first time, though you can, of course, compile .tex documents using the command-line. However, the IDE makes figuring out shortcuts and commands much easier. | I recommend using an IDE when working with LaTeX for the first time, though you can, of course, compile .tex documents using the command-line. However, the IDE makes figuring out shortcuts and commands much easier. | ||
+ | ** | ||
+ | |||
+ | Installation de LaTeX | ||
+ | |||
+ | L' | ||
+ | |||
+ | sudo apt-get install texlive | ||
+ | |||
+ | ou | ||
+ | |||
+ | sudo apt-get install texlive-full | ||
+ | |||
+ | |||
+ | Installer l'EDI | ||
+ | |||
+ | Je recommande d' | ||
+ | |||
+ | ** | ||
My preferred IDE is Texmaker, which can be found in the official repository. You can install it with | My preferred IDE is Texmaker, which can be found in the official repository. You can install it with | ||
Ligne 27: | Ligne 62: | ||
Install extra packages | Install extra packages | ||
I used a few extra packages to fancy up the Cookbook (with links and code formatting). The extra packages are: fancyvrb and hyperref. Everything else should be included in a typical LaTeX installation. These packages are contained in texlive-latex-recommended and texlive-latex-base. If you installed just texlive instead of the full installation, | I used a few extra packages to fancy up the Cookbook (with links and code formatting). The extra packages are: fancyvrb and hyperref. Everything else should be included in a typical LaTeX installation. These packages are contained in texlive-latex-recommended and texlive-latex-base. If you installed just texlive instead of the full installation, | ||
+ | ** | ||
+ | |||
+ | Mon EDI préféré est Texmaker, qui se trouve dans le dépôt officiel. Vous pouvez l' | ||
+ | |||
+ | sudo apt-get install texmaker | ||
+ | |||
+ | Si votre version d' | ||
+ | |||
+ | Installer des paquets supplémentaires | ||
+ | |||
+ | J'ai utilisé quelques paquets supplémentaires pour rendre le Cookbook plus sympa (avec des liens et la mise en forme du code). Les paquets supplémentaires sont : fancyvrb et hyperref. Tout le reste devrait être inclus dans une installation typique de LaTeX. Ces paquets sont contenus dans texlive-latex-recommanded et texlive-latex-base. Si vous n'avez installé que texlive au lieu de l' | ||
+ | |||
+ | ** | ||
Fork the GitHub repository | Fork the GitHub repository | ||
Ligne 37: | Ligne 85: | ||
This will create a folder called cli-cookbook and fill it with the files you need. Once that's done, open up the .tex file in Texmaker. | This will create a folder called cli-cookbook and fill it with the files you need. Once that's done, open up the .tex file in Texmaker. | ||
+ | ** | ||
+ | Dupliquer le dépôt sur GitHub | ||
+ | |||
+ | Pour faire cela, vous aurez besoin d'un compte github et git doit être installé. Sur mon dépôt, vous devriez voir un bouton « fork ». En cliquant sur celui-ci vous créez un dépôt sur votre compte qui est une copie du mien. La deuxième étape consiste à cloner l' | ||
+ | |||
+ | git clone https:// | ||
+ | |||
+ | Remplacez username par votre nom d' | ||
+ | |||
+ | Cela créera un dossier nommé cli-cookbook et le remplira avec les fichiers dont vous avez besoin. Une fois cela fait, ouvrez le fichier .tex avec Texmaker. | ||
+ | |||
+ | ** | ||
Editing the file | Editing the file | ||
Ligne 61: | Ligne 121: | ||
[...] | [...] | ||
+ | ** | ||
+ | Modification du fichier | ||
+ | |||
+ | Habituellement lors de la création d'un fichier, vous devrez créer le préambule (\usepackage, | ||
+ | |||
+ | Si vous souhaitez ajouter une nouvelle section (disons, par exemple, que vous souhaitez ajouter une section pour les commandes d' | ||
+ | |||
+ | \section{Name} | ||
+ | |||
+ | Le Name sera l' | ||
+ | |||
+ | [...] | ||
+ | |||
+ | \section{Photo Editing} | ||
+ | |||
+ | \subsection{Using Photon to create albums} | ||
+ | |||
+ | \label{photon} | ||
+ | |||
+ | \subsection{Organizing Albums} | ||
+ | |||
+ | As seen in \hyperref[photon]{\ref*{photon}} | ||
+ | |||
+ | [...] | ||
+ | |||
+ | |||
+ | ** | ||
This will create a section called Photo Editing, and two subsections called Using Photon to create albums, and Organizing Albums. The \hyperref statement will replace that section of code with the section number of the Photon subsection (i.e. 13.1). Clicking on the link will take you to the page where that section appears. | This will create a section called Photo Editing, and two subsections called Using Photon to create albums, and Organizing Albums. The \hyperref statement will replace that section of code with the section number of the Photon subsection (i.e. 13.1). Clicking on the link will take you to the page where that section appears. | ||
Ligne 68: | Ligne 155: | ||
I made this step slightly more complicated than it needs to be, in order to get the best result. You need to encompass your code like so: | I made this step slightly more complicated than it needs to be, in order to get the best result. You need to encompass your code like so: | ||
- | \begin{Verbatim}[commandchars=\\\{\}] | + | < |
// Code goes here | // Code goes here | ||
- | \end{Verbatim} | + | \end{Verbatim}</ |
The Verbatim environment won't wrap text, so you'll need to manually keep an eye on the length of the code once the PDF is compiled. If you have multiple commands after each other, I place a blank line between each step. If you stick to my formatting system, you'll also want to mark the unchanging parts of a command with a red color. Any user input I leave black. So it would look like this: | The Verbatim environment won't wrap text, so you'll need to manually keep an eye on the length of the code once the PDF is compiled. If you have multiple commands after each other, I place a blank line between each step. If you stick to my formatting system, you'll also want to mark the unchanging parts of a command with a red color. Any user input I leave black. So it would look like this: | ||
- | \begin{Verbatim}[commandchars=\\\{\}] | + | < |
\codeHighlight{// | \codeHighlight{// | ||
- | \end{Verbatim} | + | \end{Verbatim}</ |
- | As you can imagine, this will result in // | + | As you can imagine, this will result in < |
+ | ** | ||
+ | Cela créera une section appelée Photo Editing et deux sous-sections appelées Using Photon to create albums (L' | ||
+ | |||
+ | L' | ||
+ | |||
+ | J'ai fait en sorte que cette étape soit un peu plus compliquée que nécessaire, | ||
+ | |||
+ | < | ||
+ | |||
+ | // Mettez le code ici : | ||
+ | |||
+ | \end{Verbatim}</</ | ||
+ | |||
+ | L' | ||
+ | |||
+ | < | ||
+ | |||
+ | \codeHighlight{// | ||
+ | |||
+ | \end{Verbatim}</ | ||
+ | |||
+ | Comme vous pouvez le supposer, le résultat sera < | ||
+ | |||
+ | ** | ||
Compiling the PDF | Compiling the PDF | ||
Ligne 95: | Ligne 206: | ||
First, open a terminal and change directory to your local copy of the repository. | First, open a terminal and change directory to your local copy of the repository. | ||
+ | |||
+ | cd ~/ | ||
+ | ** | ||
+ | |||
+ | Compiler le PDF | ||
+ | |||
+ | Une fois les modifications faites et que vous voulez compiler le PDF, appuyez sur la flèche bleue à côté de « Quick Build » dans la barre du haut de Texmaker. Si vous voulez le faire à la main, vous pouvez exécuter cette commande : | ||
+ | |||
+ | pdflatex cli-cookbook.tex | ||
+ | |||
+ | Si des notifications d' | ||
+ | |||
+ | Le renvoi des modification au dépôt d' | ||
+ | |||
+ | Ouvrez un terminal et changez de répertoire pour celui votre copie locale du dépôt. | ||
cd ~/ | cd ~/ | ||
+ | ** | ||
Now, you need to add the newly added/ | Now, you need to add the newly added/ | ||
Ligne 111: | Ligne 238: | ||
This pushes the changes back to your copy of my repository. If you rename the branches, you'll need to know what you've changed the origin and master names to. By default, this command should work. | This pushes the changes back to your copy of my repository. If you rename the branches, you'll need to know what you've changed the origin and master names to. By default, this command should work. | ||
+ | ** | ||
+ | Il faut maintenant ajouter les fichiers qui sont nouveaux/ | ||
+ | |||
+ | git add -A | ||
+ | |||
+ | Puis il faut valider les modifications : | ||
+ | |||
+ | git commit -m " | ||
+ | |||
+ | Remplacez la section « Update message » avec un court résumé de ce que vous avez ajouté. Avec les guillemets autour de votre message ! | ||
+ | |||
+ | git push origin master | ||
+ | |||
+ | Cela renvoie les modifications vers votre copie de mon référentiel. Si vous renommez les branches, vous aurez besoin de savoir les noms de l' | ||
+ | |||
+ | |||
+ | ** | ||
Now to actually send a pull request to the original repository: | Now to actually send a pull request to the original repository: | ||
Ligne 131: | Ligne 275: | ||
If this article has whetted your appetite on LaTeX, let me know and I will return to this topic another time. Same with git and github – if you want more on that, let me know! Any other questions, comments or suggestions can be addressed to me at lswest34+fcm@gmail.com. | If this article has whetted your appetite on LaTeX, let me know and I will return to this topic another time. Same with git and github – if you want more on that, let me know! Any other questions, comments or suggestions can be addressed to me at lswest34+fcm@gmail.com. | ||
+ | ** | ||
+ | |||
+ | Envoyez une requête pull véritable au référentiel original : | ||
+ | |||
+ | * Allez voir votre dépôt sur la page github. | ||
+ | |||
+ | * Cliquez sur « compare and review » (l' | ||
+ | |||
+ | * Sélectionnez les bons dépôt et branche (par exemple, lswest: | ||
+ | |||
+ | * Relisez vos modifications. | ||
+ | |||
+ | * Cliquez sur « Click to create a pull request for this comparison ». | ||
+ | |||
+ | * Tapez un titre et une description. | ||
+ | |||
+ | * Cliquez sur « Send pull request ». | ||
+ | |||
+ | À ce stade là, la balle est dans mon camp et je dois relire la modification proposée et la fusionner ou la fermer. | ||
+ | |||
+ | Si vous voulez en savoir davantage sur LaTeX grâce à cet article, faites-le moi savoir et je reviendrai à ce sujet une autre fois. Même chose pour git et github, si vous voulez plus de renseignements à leur sujet, dites-le moi ! Vous pouvez m' | ||
+ | |||
+ |
issue76/c_c.1378046463.txt.gz · Dernière modification : 2013/09/01 16:41 de andre_domenech