Created LaTeX script

This commit is contained in:
paul-loedige 2022-10-28 17:40:57 +09:00
parent 38609c46ec
commit 15aada615c
2 changed files with 451 additions and 0 deletions

303
LaTeX/.gitignore vendored Normal file
View File

@ -0,0 +1,303 @@
# ---> TeX
## Core latex/pdflatex auxiliary files:
*.aux
*.lof
*.log
*.lot
*.fls
*.out
*.toc
*.fmt
*.fot
*.cb
*.cb2
.*.lb
## Intermediate documents:
*.dvi
*.xdv
*-converted-to.*
# these rules might exclude image files for figures etc.
# *.ps
# *.eps
# *.pdf
## Generated if empty string is given at "Please type another file name for output:"
*.pdf
## Bibliography auxiliary files (bibtex/biblatex/biber):
*.bbl
*.bcf
*.blg
*-blx.aux
*-blx.bib
*.run.xml
## Build tool auxiliary files:
*.fdb_latexmk
*.synctex
*.synctex(busy)
*.synctex.gz
*.synctex.gz(busy)
*.pdfsync
## Build tool directories for auxiliary files
# latexrun
latex.out/
## Auxiliary and intermediate files from other packages:
# algorithms
*.alg
*.loa
# achemso
acs-*.bib
# amsthm
*.thm
# beamer
*.nav
*.pre
*.snm
*.vrb
# changes
*.soc
# comment
*.cut
# cprotect
*.cpt
# elsarticle (documentclass of Elsevier journals)
*.spl
# endnotes
*.ent
# fixme
*.lox
# feynmf/feynmp
*.mf
*.mp
*.t[1-9]
*.t[1-9][0-9]
*.tfm
#(r)(e)ledmac/(r)(e)ledpar
*.end
*.?end
*.[1-9]
*.[1-9][0-9]
*.[1-9][0-9][0-9]
*.[1-9]R
*.[1-9][0-9]R
*.[1-9][0-9][0-9]R
*.eledsec[1-9]
*.eledsec[1-9]R
*.eledsec[1-9][0-9]
*.eledsec[1-9][0-9]R
*.eledsec[1-9][0-9][0-9]
*.eledsec[1-9][0-9][0-9]R
# glossaries
*.acn
*.acr
*.glg
*.glo
*.gls
*.glsdefs
*.lzo
*.lzs
*.slg
*.slo
*.sls
# uncomment this for glossaries-extra (will ignore makeindex's style files!)
# *.ist
# gnuplot
*.gnuplot
*.table
# gnuplottex
*-gnuplottex-*
# gregoriotex
*.gaux
*.glog
*.gtex
# htlatex
*.4ct
*.4tc
*.idv
*.lg
*.trc
*.xref
# hyperref
*.brf
# knitr
*-concordance.tex
# TODO Uncomment the next line if you use knitr and want to ignore its generated tikz files
# *.tikz
*-tikzDictionary
# listings
*.lol
# luatexja-ruby
*.ltjruby
# makeidx
*.idx
*.ilg
*.ind
# minitoc
*.maf
*.mlf
*.mlt
*.mtc[0-9]*
*.slf[0-9]*
*.slt[0-9]*
*.stc[0-9]*
# minted
_minted*
*.pyg
# morewrites
*.mw
# newpax
*.newpax
# nomencl
*.nlg
*.nlo
*.nls
# pax
*.pax
# pdfpcnotes
*.pdfpc
# sagetex
*.sagetex.sage
*.sagetex.py
*.sagetex.scmd
# scrwfile
*.wrt
# svg
svg-inkscape/
# sympy
*.sout
*.sympy
sympy-plots-for-*.tex/
# pdfcomment
*.upa
*.upb
# pythontex
*.pytxcode
pythontex-files-*/
# tcolorbox
*.listing
# thmtools
*.loe
# TikZ & PGF
*.dpth
*.md5
*.auxlock
# titletoc
*.ptc
# todonotes
*.tdo
# vhistory
*.hst
*.ver
# easy-todo
*.lod
# xcolor
*.xcp
# xmpincl
*.xmpi
# xindy
*.xdy
# xypic precompiled matrices and outlines
*.xyc
*.xyd
# endfloat
*.ttt
*.fff
# Latexian
TSWLatexianTemp*
## Editors:
# WinEdt
*.bak
*.sav
# Texpad
.texpadtmp
# LyX
*.lyx~
# Kile
*.backup
# gummi
.*.swp
# KBibTeX
*~[0-9]*
# TeXnicCenter
*.tps
# auto folder when using emacs and auctex
./auto/*
*.el
# expex forward references with \gathertags
*-tags.tex
# standalone packages
*.sta
# Makeindex log files
*.lpz
# xwatermark package
*.xwm
# REVTeX puts footnotes in the bibliography by default, unless the nofootinbib
# option is specified. Footnotes are the stored in a file with suffix Notes.bib.
# Uncomment the next line to have this generated file ignored.
#*Notes.bib

148
LaTeX/Homework_Lesson_3.tex Normal file
View File

@ -0,0 +1,148 @@
\documentclass[a4paper, 12pt, english]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{listings}
\usepackage{xcolor}
\usepackage{hyperref}
\usepackage{multicol}
\usepackage{setspace}
\title{Advanced Operating Systems\\Assignment Week 3}
\author{Paul Lödige \\ Student ID: 37-229753}
\makeatletter
\newcommand*{\toccontents}{\@starttoc{toc}}
\makeatother
\begin{document}
\maketitle
\toccontents
\clearpage
\section{Code}%
\label{sec:Code}
\definecolor{mGreen}{rgb}{0,0.6,0}
\definecolor{mGray}{rgb}{0.5,0.5,0.5}
\definecolor{mPurple}{rgb}{0.58,0,0.82}
\definecolor{backgroundColour}{rgb}{0.95,0.95,0.92}
\lstset{
language=C,
backgroundcolor=\color{backgroundColour},
commentstyle=\color{mGreen},
keywordstyle=\color{magenta},
numberstyle=\tiny\color{mGray},
stringstyle=\color{mPurple},
basicstyle=\ttfamily\scriptsize,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
firstnumber=0,
stepnumber=1,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2,
literate={~}{{$\mathtt{\sim}$}}1
}
\lstset{literate=%
{Ö}{{\"O}}1
{Ä}{{\"A}}1
{Ü}{{\"U}}1
{ß}{{\ss}}2
{ü}{{\"u}}1
{ä}{{\"a}}1
{ö}{{\"o}}1
}
\lstinputlisting{../Code/assignment.c}
\clearpage
\section{Output of \texttt{sudo cat /proc/devices}}%
\label{sec:Output of proc devices}
\begin{multicols}{2}
\begin{spacing}{.9}
\texttt{
Character devices:\\
1 mem\\
4 /dev/vc/0\\
4 tty\\
4 ttyS\\
5 /dev/tty\\
5 /dev/console\\
5 /dev/ptmx\\
7 vcs\\
10 misc\\
13 input\\
29 fb\\
116 alsa\\
128 ptm\\
136 pts\\
180 usb\\
188 ttyUSB\\
189 usb\_device\\
202 cpu/msr\\
203 cpu/cpuid\\
226 drm\\
235 chardev\\
236 binder\\
237 hidraw\\
238 wwan\_port\\
239 nvme-generic\\
240 nvme\\
241 aux\\
242 bsg\\
243 watchdog\\
244 remoteproc\\
245 ptp\\
246 pps\\
247 cec\\
248 lirc\\
249 rtc\\
250 dma\_heap\\
251 dax\\
252 dimmctl\\
253 ndctl\\
254 gpiochip\\
\columnbreak\\
Block devices:\\
8 sd\\
65 sd\\
66 sd\\
67 sd\\
68 sd\\
69 sd\\
70 sd\\
71 sd\\
128 sd\\
129 sd\\
130 sd\\
131 sd\\
132 sd\\
133 sd\\
134 sd\\
135 sd\\
259 blkext\\
}
\end{spacing}
\end{multicols}
\section{Output of \texttt{cat /dev/chardev}}%
\label{sec:Output of dev chardev}
First run:\\
\texttt{I already told you 0 times Hello world!}\\
Second run:\\
\texttt{I already told you 1 times Hello world!}
\section{Output of \texttt{sudo dmesg -T -l info | tail -3}}%
\label{sec:Output of dmesg}
\texttt{[Fri Oct 28 15:47:13 2022] I was assigned major number 235.}\\
\texttt{[Fri Oct 28 15:47:13 2022] Device created on /dev/chardev}\\
\texttt{[Fri Oct 28 15:47:13 2022] Goodbye}
\end{document}