issue76:c_c
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 | ||
issue76:c_c [2014/01/19 20:35] – fredphil91 | 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: | ||
[...] | [...] | ||
+ | ** | ||
- | This will create | + | 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{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}} | ||
+ | |||
+ | [...] | ||
- | ===== à relire ===== | ||
** | ** | ||
+ | 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. | ||
+ | |||
Adding code | Adding code | ||
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 < |
** | ** | ||
- | Ajout de code | + | Cela créera une section appelée Photo Editing et deux sous-sections appelées Using Photon to create albums (L' |
- | J'ai complexifié cette étape plus qu' | + | L'ajout de code |
- | \begin{Verbatim}[commandchars=\\\{\}] | + | J'ai fait en sorte que cette étape soit un peu plus compliquée que nécessaire, |
- | // Mettre ici le code | + | < |
- | \end{Verbatim} | + | // Mettez le code ici : |
- | L' | + | \end{Verbatim}</</ |
- | \begin{Verbatim}[commandchars=\\\{\}] | + | L' |
- | \codeHighlight{//code inchangé} //entrée utilisateur | + | < |
- | \end{Verbatim} | + | \codeHighlight{// |
- | Comme vous pouvez | + | \end{Verbatim}</ |
+ | |||
+ | Comme vous pouvez | ||
** | ** | ||
Ligne 116: | Ligne 202: | ||
If any errors crop up, you'll need to read the error information to find the correct section of the file and see what could be wrong. I find the most common issue is a lack/ | If any errors crop up, you'll need to read the error information to find the correct section of the file and see what could be wrong. I find the most common issue is a lack/ | ||
+ | |||
+ | Return the changes to original repository | ||
+ | |||
+ | First, open a terminal and change directory to your local copy of the repository. | ||
+ | |||
+ | cd ~/ | ||
** | ** | ||
- | Compilation du PDF | + | Compiler le PDF |
- | Une fois que vous avez fait vos modifications et êtes prêt à compiler le fichier | + | Une fois les modifications faites et que vous voulez |
pdflatex cli-cookbook.tex | pdflatex cli-cookbook.tex | ||
- | Si des erreurs surviennent, vous devrez | + | Si des notifications d' |
+ | Le renvoi des modification au dépôt d' | ||
- | ** | + | Ouvrez un terminal |
- | Return the changes to original repository | + | |
- | + | ||
- | First, open a terminal | + | |
cd ~/ | cd ~/ | ||
+ | ** | ||
Now, you need to add the newly added/ | Now, you need to add the newly added/ | ||
Ligne 149: | Ligne 240: | ||
** | ** | ||
- | Renvoyer les modifications dans le référentiel original | + | Il faut maintenant |
- | + | ||
- | Tout d' | + | |
- | + | ||
- | cd ~/ | + | |
- | + | ||
- | Maintenant, vous devez ajouter les fichiers | + | |
git add -A | git add -A | ||
- | Puis vous devez valider les changements | + | Puis il faut valider les modifications : |
- | git commit -m “Update message” -a | + | git commit -m "Update message" |
- | Remplacez la section | + | Remplacez la section |
git push origin master | git push origin master | ||
- | Cela remet les modifications | + | Cela renvoie |
Ligne 192: | Ligne 277: | ||
** | ** | ||
- | Maintenant pour envoyer | + | Envoyez |
- | • visiter | + | * Allez voir votre dépôt |
+ | |||
+ | * Cliquez sur « compare and review » (l' | ||
- | • Cliquez sur « Compare and review » (l' | + | * Sélectionnez les bons dépôt et branche |
- | • Choisir les bons référentiel et branche (lswest: | + | * Relisez vos modifications. |
- | • Relire vos modifications. | + | * Cliquez sur « Click to create a pull request for this comparison ». |
- | • Cliquez sur « Click to create a pull request for this comparison ». [Cliquez pour créer | + | * Tapez un titre et une description. |
- | • Entrez un titre et une description. | + | * Cliquez sur « Send pull request ». |
- | • 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. |
- | À partir de ce point, la balle est maintenant dans mon camp et j'ai besoin d' | + | Si vous voulez en savoir davantage sur LaTeX grâce à cet article, faites-le moi savoir |
- | Si cet article a aiguisé votre appétit sur LaTeX, faites le moi savoir et je reviendrai sur ce sujet une autre fois. Même chose avec git et github : si vous en voulez plus, faites le moi savoir ! D' | ||
issue76/c_c.1390160127.txt.gz · Dernière modification : 2014/01/19 20:35 de fredphil91