Skip to content

Commit d375e5f

Browse files
Merge pull request #5 from csunibo/Luizo-adds-stuff
Graph, tex import and code snippet examples
2 parents ef50daf + ceeaf2d commit d375e5f

File tree

3 files changed

+46
-4
lines changed

3 files changed

+46
-4
lines changed

.github/workflows/tex.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ jobs:
1717
build:
1818
runs-on: ubuntu-latest
1919
name: Build
20-
container: sotetsuk/pdflatex
2120
steps:
2221
- name: Checkout code
2322
uses: actions/checkout@main
24-
- name: Build
25-
run: cd tesi/ && pdflatex tesi.tex
23+
- name: Compile thesis
24+
uses: xu-cheng/latex-action@v3
25+
with:
26+
root_file: tesi/tesi.tex
27+
work_in_root_file_dir: true
2628
- name: Generate build artifact
2729
uses: actions/upload-artifact@main
2830
with:

tesi/imported_document.tex

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Questo e' il contenuto del documento imported\textunderscore document.tex

tesi/tesi.tex

+40-1
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,32 @@ \subsubsection{Tabelle girate}
267267

268268
\end{landscape}
269269

270+
\section{Grafici}
271+
Puoi creare grafici con tikzpicture.
272+
Qui c'e' un grafico con asse x e y customizzabili per ogni tipo d'utilizzo.
273+
Tutti i tool e tutorial necessari per creare ogni tipo di grafico puo' essere trovato qui: https://tikz.dev/
274+
275+
\begin{tikzpicture}
276+
% Draw x-axis
277+
\draw[->] (-1,0) -- (15,0) node[right] {$x$};
278+
% Draw y-axis
279+
\draw[->] (0,-1) -- (0,5) node[above] {$y$};
280+
281+
% Draw grid lines (optional)
282+
\foreach \x in {1,2,3,4,5,6,7,8,9,10,11,12,13,14}
283+
\draw (\x,-0.1) -- (\x,0.1);
284+
\foreach \y in {1,2,3,4}
285+
\draw (-0.1,\y) -- (0.1,\y);
286+
287+
% Draw origin
288+
\fill (0,0) circle[radius=2pt];
289+
\end{tikzpicture}
290+
291+
\section{Import di file TeX}
292+
Puoi importare altri file tex per intero includendoli cosi'.
293+
Questo e' molto utile per mettere insieme diversi capitoli di una tesi o di un grande documento in generale.
294+
295+
\input{imported_document.tex}
270296

271297
\chapter{Altri comandi}
272298
bla bla
@@ -287,6 +313,19 @@ \section{url e footnote}
287313
per mettere un link usa url: \url{wikipedia.it}
288314

289315
per fare note a piè di pagina usa footnote\footnote{Tipo questa}
316+
317+
\section{Code snippets}
318+
per inserire code snippets, puoi usare lstlisting
319+
320+
\begin{lstlisting}[language=c]
321+
#include<stdio.h>
322+
323+
int main(void) {
324+
printf("Hello World\n");
325+
return 0;
326+
}
327+
\end{lstlisting}
328+
290329
\section{verbatim}
291330
Se ti serve scrivere codice o qualcosa per cui ti serve una formattazione specifica usa verbatim:
292331
\begin{verbatim}
@@ -340,4 +379,4 @@ \chapter{Embed di interi PDF}
340379
\newpage~\newpage
341380
\chapter*{Ringraziamenti}
342381
Grazie a tutti
343-
\end{document}
382+
\end{document}

0 commit comments

Comments
 (0)