Skip to content

Commit 251fa31

Browse files
dariusptrshofbi
andauthored
Add Template Tutorial (#16)
* add template tutorial * Add Logo to front page * formatting * Apply suggestions from code review Co-authored-by: Darius Peters <[email protected]> * fix checks failing * fix 2 --------- Co-authored-by: Markus Hofbauer <[email protected]>
1 parent 35db70f commit 251fa31

File tree

5 files changed

+92
-2
lines changed

5 files changed

+92
-2
lines changed

.md-link-config.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,15 @@
66
{
77
"pattern": "^http://"
88
}
9+
],
10+
"replacementPatterns": [
11+
{
12+
"pattern": "^/",
13+
"replacement": "{{BASEURL}}/"
14+
},
15+
{
16+
"pattern": "/img/",
17+
"replacement": "/docs/img/"
18+
}
919
]
1020
}

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# [LaTeX4Ei](http://latex4ei.de)
1+
<h1>
2+
<img src="/img/Logo.png" width="100" style="vertical-align: middle; margin-right: 10px;">
3+
<a href="http://latex4ei.de" style="color: currentColor; text-decoration: none;">LaTeX4Ei</a>
4+
</h1>
25

36
Mitschriften und Formelsammlungen in LaTeX für Elektro- und Informationstechnik (TUM).
47

docs/TEMPLATE.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# ![CheatsheetTemplate](/img/CheatsheetTemplate.png)
2+
3+
The [**LaTeX4Ei Template**](https://github.com/latex4ei/CheatsheetTemplate) is the solution for writing beautiful cheat sheets. In this section we explain how to get started using our template.
4+
5+
## Example
6+
7+
Here is our documentation PDF that demonstrates the template’s output:
8+
9+
<iframe src="https://latex4ei.github.io/latex4ei-packages/LaTeX4EI-Template-Documentation.pdf" style="width: 100%; height: 510px; aspect-ratio: 297 / 210;"
10+
frameborder="0">
11+
This browser does not support PDFs. Please download the PDF <a href="https://latex4ei.github.io/latex4ei-packages/LaTeX4EI-Template-Documentation.pdf">here</a>.
12+
</iframe>
13+
14+
______________________________________________________________________
15+
16+
## Using the Template
17+
18+
### 1. Setting Up Your Repository
19+
20+
1. **Create Your Repository:**
21+
Click the **"Use this template"** button on our [CheatsheetTemplate](https://github.com/latex4ei/CheatsheetTemplate) GitHub repository to create a new repository. Alternatively, you can clone the repository.
22+
23+
1. **Download the Required Package:**
24+
To compile locally, you must have the latest LaTeX4Ei package. Get it from:
25+
[https://github.com/latex4ei/latex4ei-packages/releases](https://github.com/latex4ei/latex4ei-packages/releases)
26+
27+
1. **Place the Package:**
28+
Unzip `latex4ei.zip` (from the package download) and move the entire `latex4ei` folder into the root of your repository.
29+
30+
If you want to **permanently install** our package, copy the `latex4ei` folder into your TeX distribution directory.
31+
32+
- **Windows**
33+
34+
```
35+
Copy files to C:\texlive\XXXX\texmf-dist\tex\latex\latex4ei
36+
```
37+
38+
- **Linux**
39+
40+
```
41+
sudo cp -r latex4ei /usr/share/texlive/texmf-dist/tex/latex/latex4ei
42+
sudo mktexlsr
43+
```
44+
45+
- **Mac OS X**
46+
47+
```
48+
cp -r latex4ei /usr/local/texlive/texmf-local/tex/latex/latex4ei
49+
```
50+
51+
### 2. Update Environment (if using GitHub Actions)
52+
53+
1. **Rename Your File:** Rename the provided `CheatsheetTemplate.tex` file to exactly match the name of your repository. This ensures proper integration with our build process.
54+
55+
1. **Update Build Files:**
56+
Follow these steps to automatically update the build files:
57+
58+
1. Go to your repository on GitHub.
59+
1. Click on the **Actions** tab.
60+
1. Locate and trigger the **"Update README and LaTeX Build File"** action.
61+
62+
This action automatically updates your README and the CMake build file with your repository’s name, ensuring your build configuration is set up correctly.
63+
64+
### 3. Compile Your Cheat Sheet
65+
66+
Now you can start adding content to your `.tex` file. You can compile your document:
67+
68+
- **Locally:** With the `latex4ei` folder in your repository root, compile using your preferred LaTeX compiler (e.g., `pdflatex`).
69+
70+
- **Via GitHub Actions:** When you push your changes, our GitHub action will automatically compile your cheat sheet. The generated PDF is available in the `gh-pages` branch or as an artifact of the workflow run.
71+
72+
______________________________________________________________________
73+
74+
## Questions?
75+
76+
For questions or contributions, visit our [GitHub](https://github.com/latex4ei) or contact us at [[email protected]](mailto:[email protected]).

docs/img/CheatsheetTemplate.png

22.3 KB
Loading

mkdocs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ plugins:
2626

2727
nav:
2828
- Home: README.md
29+
- Template: TEMPLATE.md
30+
- Wie kann ich helfen: CONTRIBUTING.md
2931
- TEX4TUM: http://tex4tum.de
3032
- Über uns: ABOUT.md
31-
- Wie kann ich helfen: CONTRIBUTING.md
3233
- Kontakt: CONTACT.md
3334

3435
extra_css:

0 commit comments

Comments
 (0)