Skip to content

Commit

Permalink
LaTeX
Browse files Browse the repository at this point in the history
  • Loading branch information
petry078 authored Jan 12, 2024
1 parent a27417b commit 44f9926
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 20 deletions.
4 changes: 4 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ module.exports = {
text: 'Spells',
link: '/',
},
{
text: 'Tarot',
link: '/tarot.md',
},
{
text: 'About',
link: '/about.md',
Expand Down
2 changes: 1 addition & 1 deletion docs/posts/2022-08-05-github-once-and-for-all.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ git push --set-upstream origin NewBranch
```

<div class="wisdom">
<img class="wisdony" src="https://upload.wikimedia.org/wikipedia/commons/1/11/Wands01.jpg" alt="">
<img class="wisdony" src="https://upload.wikimedia.org/wikipedia/commons/8/84/Cups10.jpg" alt="">
</div>

<style>
Expand Down
127 changes: 108 additions & 19 deletions docs/posts/2024-01-09-latex-pdf-press.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,142 @@
---
title: LaTeX PDF press specification
date: "2024-01-09"
sidebar: auto
tags:
- LaTeX
- TeX
- PDF
---

# LaTeX PDF press specification

Just like magic, LaTeX documents have to be written and than compiled.
LaTeX documents have to be written and than compiled.

> Is it crime to write about LaTeX in an Markdown file?
Write you spell recipe using LaTeX markup syntax and than press it to PDF using `pdflatex fileName.tex`.
Write content using LaTeX markup syntax and than press it to PDF with the command:

```bash
pdflatex fileName.tex
```

To Press PDFs using LaTeX you need to have TeX installed.

```bash
sudo apt-get install texlive-full
tex --version
```
> LaTeX web editor and compiler[Overleaf](https://overleaf.com).
> Complicate stuff? [Overleaf](https://www.overleaf.com), the LaTeX web editor and compiler got you there.
## Typesetting specification

There are reserved characters, commands and comments.
Syntax is divided by **reserved characters**, **commands** and **comments**.

### Reserved character:
### Reserved characters

* `#`
* `$`
* `%`
* `^`
* `&`
* `_`
* `{`
* `}`
* `~`
* `\`
| Character | Definition |
|-----------|-------------------------------------------|
| `#` | Macro key. |
| `$` | Mathematical environment. |
| `%` | Comment. |
| `^` | Superscript. |
| `&` | Separation of columns in tables. |
| `_` | Automatic subscript. |
| `{}` | Scope. |
| `~` | Space between text that cannot be broken. |
| `\` | Command initialization. |

To print then, use `\` before. Example: `\#`.

### Commands:
### Commands

LaTeX document structure is defined by header, that contains metadata and information about the text, and content, with the text information.

#### Header commands

| Command | Definition |
|----------------------|------------|
| \documentclass[]{} | Initialize the document. Requires parameters `[]` and actual document class `{}`. |
| \usepackage[]{} | Import packages with additional functionality. Requires parameters `[]` and scope `{}`. |
|


```latex
\textbf{Bold example}
\textit{Italic example}
###### \documentclass

###### \usepackage

Must be right above the `\documentclass`.

Here are some popular packages and how to cast then.

```tex
\usepackage[utf8]{inputenc}
\usepackage[portuguese]{babel}
\usepackage{graphicx}
```


#### Content commands and techniques

Content commands are only allowed in the document scope:

```Tex
\begin{document}
Content and content commands go here! Like \LaTeX!
\end{document}
```

##### Content commands:

| Command | Definition |
|---------------------------|------------|
| `\\` | Line break, necessary on blank lines |
| `\textbf{Bold example}` | Initialize the document. Requires parameters `[]` and actual document class `{}`. |
| `\textit{Italic example}` | Import packages with additional functionality. Requires parameters `[]` and scope `{}`. |


##### Content techniques

Paragraphs are confusing. It needs to be like this, because whitespaces are considered all of the same thing:

```tex
First paragraph.
\\
Second paragraph.
\\
Third paragraph.
\\
...
```
> Crazy old tech stuff...
Whitespaces after commands are ignored. To print then, type the whitespace inside the commands scope {}. Example: `textbf{text }`.

### Comments

## ABNT

If you don't know what this is. Trust me, you don't need it.

## References 🖨️ 🖨

* Beguinners book: https://linorg.usp.br/CTAN/info/lshort/english/lshort.pdf
* Learn: https://www.overleaf.com/learn/latex/Learn_LaTeX_in_30_minutes#What_is_LaTeX?
* ABNT: https://github.com/abntex/abntex2/wiki/InstalacaoLinux#instala%C3%A7%C3%A3o-autom%C3%A1tica-do-texlive-e-do-abntex2-em-distribui%C3%A7%C3%B5es-debian-ubuntu-e-derivadas-recomendado
* Learning playlist (UFMG): https://youtube.com/playlist?list=PLt2qoMeOJsQzWsM5vM7eWFUZKVbCZmWZB&si=M8rouIXyLS7dUfrb

<div class="wisdom">
<img class="wisdony" src="https://upload.wikimedia.org/wikipedia/commons/a/ae/Cups07.jpg" alt="">
</div>

<style>
.wisdom {
display: flex;
justify-content: center;
}

.wisdony {
height: 120px;
}
</style>
23 changes: 23 additions & 0 deletions docs/tarot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
sidebar: false
home: true
heroText: null
tagline: null
footer: Made with VuePress 2 and Markdown — Guilherme M. Petry 2022
---

Tarot cards discovered:

| Name | Icon | Spell relation |
|------------------|------|----------------|
| The Chariot | | API enchantment with JavaScript |
| The Hermit | | Set up Kali Linux and Metasploitable on VirtualBox |
| Ace of Wands | | Intro on web security with Helmet.js |
| Two of Pentacles | | Bash scriptage |
| The Sun | | JavaScript cast specification |
| Ten of Cups | | GitHub once and for all |
| Four of Cups | | Terminal commands |
| Five of Cups | | Markdown cheat sheet |
| Seven of Cups | | LaTeX PDF press specification |

[The Rider–Waite Tarot](https://en.wikipedia.org/wiki/Rider%E2%80%93Waite_Tarot).

0 comments on commit 44f9926

Please sign in to comment.