diff --git a/.github/workflows/render_on_push.yml b/.github/workflows/render_on_push.yml new file mode 100644 index 00000000..ef44f4d9 --- /dev/null +++ b/.github/workflows/render_on_push.yml @@ -0,0 +1,76 @@ +name: Render + +on: + push: + branches: + - "**" + +jobs: + render: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: "Fix cache permissions" + run: | + sudo chmod aoug+rw -R /var/cache/apt + + - name: Cache apt package lists and downloaded deb files + uses: actions/cache@v3 + with: + path: | + /var/cache/apt/archives/**.deb + !/var/cache/apt/archives/partial + !/var/cache/apt/archives/lock + key: apt-packages-cache + restore-keys: | + ${{ runner.os }}-apt + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y pandoc inkscape texlive-latex-base texlive-fonts-extra texlive-extra-utils poppler-utils + + - name: Run the PDF rendering script in the renderer folder + run: make + working-directory: renderer + + - name: Upload PDF files as an artifact + uses: actions/upload-artifact@v4 + with: + name: booklet + path: renderer/*.pdf + + release: + needs: render + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/master' + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Download PDF artifacts + uses: actions/download-artifact@v4 + with: + name: booklet + path: ./renderer + + - name: List downloaded PDF files + run: ls -la ./renderer + + - name: Get current date + id: current_date + run: echo "current_date=$(date +'%y%m%d%H%M')" >> $GITHUB_ENV + + - name: Create Release and Upload Assets + uses: softprops/action-gh-release@v1 + with: + tag_name: release-${{ env.current_date }} + name: Release - ${{ env.current_date }} + body: | + This release was generated automatically upon a successful merge (new article added). + files: ./renderer/*.pdf + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 2d7d7155..776681ec 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ # .gitignore # emacs backup files -*~ +*~ \ No newline at end of file diff --git a/2024/.gitignore b/2024/.gitignore new file mode 100644 index 00000000..83388eb8 --- /dev/null +++ b/2024/.gitignore @@ -0,0 +1 @@ +*/*.tex \ No newline at end of file diff --git a/2024/another_sample_article_topic_name/article.md b/2024/another_sample_article_topic_name/article.md new file mode 100644 index 00000000..db59b6a9 --- /dev/null +++ b/2024/another_sample_article_topic_name/article.md @@ -0,0 +1,20 @@ +# This is a Draft article + +This article serves as a test to see if all Markdown features are rendered correctly. Markdown files will be converted into Latex files and compiled into this PDF. + +You can **bold text** to emphasize important points or *italicize text* for a softer emphasis. You can also ~~cross out text~~ to indicate removal or edits. + +> This is a +> blockquote that can be used to highlight important quotes or thoughts. + +Inline code can be added like this: `const x = 10;`. + +To include math block, use dollar signs: +$$a^2 + b^2 = c^2$$ + +To include code blocks, use triple backticks: +```python +def greet(): + print("Hello World!") +``` + diff --git a/2024/another_sample_article_topic_name/illustration.svg b/2024/another_sample_article_topic_name/illustration.svg new file mode 100644 index 00000000..d669b31c --- /dev/null +++ b/2024/another_sample_article_topic_name/illustration.svg @@ -0,0 +1,27 @@ + + + + + + + + + + diff --git a/2024/sample_article_topic_name/article.md b/2024/sample_article_topic_name/article.md index e69de29b..3ac50677 100644 --- a/2024/sample_article_topic_name/article.md +++ b/2024/sample_article_topic_name/article.md @@ -0,0 +1,20 @@ +# This is a Draft article + +You can create ordered or unordered lists: + +- Item 1 +- Item 2 + +1. First +2. Second + +Or a table: + +| Fruit | Color | Calories | +|-------|-------|---------| +| Apple | Red | 95 | +| Banana| Yellow| 105 | + +Here is a [Link to the TILICS Repo](https://github.com/unibas-tilics/tilics). + +Note that, images will _not_ be shown ![Placeholder](https://upload.wikimedia.org/wikipedia/commons/b/bf/Universit%C3%A4t_Basel_2018_logo.svg). diff --git a/2024/sample_article_topic_name/illustration.png b/2024/sample_article_topic_name/illustration.png deleted file mode 100644 index e69de29b..00000000 diff --git a/2024/sample_article_topic_name/illustration.svg b/2024/sample_article_topic_name/illustration.svg new file mode 100644 index 00000000..d669b31c --- /dev/null +++ b/2024/sample_article_topic_name/illustration.svg @@ -0,0 +1,27 @@ + + + + + + + + + + diff --git a/README.md b/README.md index 7774264b..89b68a5e 100644 --- a/README.md +++ b/README.md @@ -15,14 +15,102 @@ This is the organisation space for 2024 seminar course. - [Task Force 2024](/admin/taskforces_2024.md) - Use [GitHub Discussion](https://github.com/unibas-tilics/tilics/discussions) for organisational matter. - > You can tag people to notify them to participate in discussion. + - 💡 You can tag people to notify them to participate in discussion. ### For Authors #### How to create pull request? +##### Step 1 : Clone the repository + +Clone the repository to your local machine: + +``` +git clone https://github.com/unibas-tilics/tilics.git +``` + +##### Step 2 : Create a new branch + +Run the following command to create and switch to a new branch: + +``` +git checkout -b +``` + +##### Step 3 : Add your article + +1. Create a folder in the `2024` directory. + +2. The name of the folder follows the pattern: `topic-name`, such as `rices-theorem`. + +3. Then create a Markdown file `article.md`. + - 💡 Please use the template below and keep the `` and `` lines intact. **The format is required for making the document more machine-readable.** + + ```markdown + + # Put your title here, including the leading pound sign + + + + Put your article's text in Markdown here. + + + ## Optional text + + If your article has some optional text, add it here. + + + ![illustration.png](../articl-topic_name/illustration.png) + + ## Author + + Put your name (and only your name) here. + + ``` + + - Please put your illustration for the artist(s) to the same directory. + + - Commit and push to your previously created branch. + +##### Step 4 : Open a pull request + +Create a pull request from your branch against the `master` branch. Therefore, please click on `New Pull Request` button and add the description of the pull request. + +[Watch the video tutorial](./admin/tooling/create-pull-request.mp4) + ### For Quality Team #### How to use labels for tagging? +##### Step 1: Go to the Pull Request + +- Click on the "Pull requests" tab at the top of the page. +- Select the specific pull request you want to review. + +##### Step 2: Locate the Labels Section + +- On the right-hand side of the pull request page, you will see a section labeled **Labels**. + +- Add a Label: + - Click on the **Labels** dropdown. + - A list of available labels will appear. You can choose the appropriate label. + - Click on the desired label(s) to apply them to the pull request. + +- Confirm the Label: + - Once the label(s) is added, it will appear on the right side of the pull request, indicating that the label has been successfully applied. + + +Currently available labels are as follows: + + + #### How to merge pull request? + +##### Step 1 : Review + +- In order to be merged, the pull request requires **two approvals** from the Quality Team. +- Reviewers can add comments in the pull request's comment thread if something should be changed. When editing your article, simply commit and push the changes to your branch, they are automatically added to the pull request. + +##### Step 2 : Merge + +- If everything is ok, the pull request can be merged. Be sure to choose the `Squash and Merge` merge option. diff --git a/admin/tooling/create-pull-request.mp4 b/admin/tooling/create-pull-request.mp4 new file mode 100644 index 00000000..557453f1 Binary files /dev/null and b/admin/tooling/create-pull-request.mp4 differ diff --git a/images/labels.png b/images/labels.png new file mode 100644 index 00000000..5b29bbb0 Binary files /dev/null and b/images/labels.png differ diff --git a/renderer/.gitignore b/renderer/.gitignore new file mode 100644 index 00000000..ec53a72d --- /dev/null +++ b/renderer/.gitignore @@ -0,0 +1,11 @@ +# emacs files +*~ + +# temp files +toc*.tex +articles*.tex +svg-inkscape/ +*.aux +*.log +*.pdf +*.out \ No newline at end of file diff --git a/renderer/Makefile b/renderer/Makefile new file mode 100644 index 00000000..63ca8aa4 --- /dev/null +++ b/renderer/Makefile @@ -0,0 +1,64 @@ +# Define variables for the source directory and output files +PAGE_WIDTH := 300 +PAGE_HEIGHT := 200 +SRC_DIR := ../2024 +OUTPUT_PDF := 2024_TILICS +NUM_ARTICLES := 32 + +define generate_toc + awk 'FNR==1 { sub(/^# /, ""); print }' $(SRC_DIR)/*/article.md | \ + head -n $(1) | \ + awk '{ lines[NR] = $$0 } \ + END { mid = int((NR + 1) / 2); \ + for (i = 1; i <= mid; i++) print i, "&&", lines[i], "&&", mid + i, "&&", lines[mid + i], "\\\\" }' +endef + +define process_articles + @for dir in $(SRC_DIR)/*/; do \ + echo "Processing $$dir..."; \ + pandoc -f markdown -t latex --wrap=preserve --lua-filter=filter.lua "$${dir}article.md" > "$${dir}article.tex"; \ + done +endef + +define create_articles_latex + @echo "Creating articles.tex..." + @rm -f articles.tex + @touch articles.tex + @for dir in $(SRC_DIR)/*/; do \ + echo "Insert $$dir..."; \ + echo "\inputSvg{$${dir}illustration.svg}" >> articles.tex; \ + echo "\inputText{$${dir}article.tex}" >> articles.tex; \ + done +endef + + +all: $(OUTPUT_PDF).pdf cropped + + +# Main PDF generation +$(OUTPUT_PDF).pdf: main.tex intro.tex tilics.cls toc.tex articles.tex + @echo "Generating $(OUTPUT_PDF).pdf..." + pdflatex --version + pdflatex --enable-pipes --shell-escape main + pdflatex --enable-pipes --shell-escape main + @mv main.pdf $(OUTPUT_PDF).pdf + pdfinfo $(OUTPUT_PDF).pdf | grep "Page size" + +cropped: $(OUTPUT_PDF).pdf + pdfcrop --margin '-0.25 -29.5 -0.25 -29' $(OUTPUT_PDF).pdf $(OUTPUT_PDF)-cropped.pdf + + +toc.tex: + @echo "Generating toc.tex..." + @$(call generate_toc, $(NUM_ARTICLES)) > toc.tex + +clean: + rm -f toc.tex *.aux *.log $(OUTPUT_PDF)-cropped.pdf + + +articles.tex: + $(call process_articles) + @echo "Generating articles.tex..." + @$(call create_articles_latex) + + diff --git a/renderer/README.md b/renderer/README.md new file mode 100644 index 00000000..26059236 --- /dev/null +++ b/renderer/README.md @@ -0,0 +1,22 @@ +# PDF Renderer + +This repository contains the code to render a booklet PDF. To do so, run: + +```bash +make +``` + +### Rendering Process +1. Convert markdown files to LaTeX. +2. Generate a Table of Contents. +3. Compile everything into the final PDF. + +### Key Files +- **main.tex**: Defines the PDF structure. +- **tilics.cls**: Specifies styling and layout. +- **participants.tex**: Lists seminar participants. +- **Makefile**: Defines the rendering process +- **filter.lua**: Defines how to convert markdown to latex using pandoc + +### Credits +Original code by Professor [Christian Tschudin](mailto:christian.tschudin@unibas.ch), adapted by Repo Team 2024 for GitHub Action. \ No newline at end of file diff --git a/renderer/figs/CC-by-sa.pdf b/renderer/figs/CC-by-sa.pdf new file mode 100644 index 00000000..85f779a6 Binary files /dev/null and b/renderer/figs/CC-by-sa.pdf differ diff --git a/renderer/figs/UniBas_Logo_EN_Schwarz_Trans_RGB_65.pdf b/renderer/figs/UniBas_Logo_EN_Schwarz_Trans_RGB_65.pdf new file mode 100644 index 00000000..5b605522 Binary files /dev/null and b/renderer/figs/UniBas_Logo_EN_Schwarz_Trans_RGB_65.pdf differ diff --git a/renderer/figs/cover.pdf b/renderer/figs/cover.pdf new file mode 100644 index 00000000..1bfc0b00 Binary files /dev/null and b/renderer/figs/cover.pdf differ diff --git a/renderer/filter.lua b/renderer/filter.lua new file mode 100644 index 00000000..4792b959 --- /dev/null +++ b/renderer/filter.lua @@ -0,0 +1,19 @@ +function Image(el) + return {} -- Return an empty table to remove the image +end + +function Figure(el) + return {} -- Return an empty table to remove the figure element +end + +function Pandoc(el) + local body = {} + for _, item in ipairs(el.blocks) do + if item.t == "Header" and item.level == 2 then + break + end + + table.insert(body, item) -- Keep items until the flag is set + end + return pandoc.Pandoc(body) -- Return the modified body +end diff --git a/renderer/intro.tex b/renderer/intro.tex new file mode 100644 index 00000000..6c7bccfd --- /dev/null +++ b/renderer/intro.tex @@ -0,0 +1,28 @@ +\noindent +Studying Computer Science is like taking a deep dive into an endless +ocean of ideas, concepts, and tools. It is easy to get lost in this +wide landscape, even more so if it is not one's main field of +expertise. + +\vskip 0.5em +This is why Computer Science students of the University of Basel set +out to identify the essential concepts and ideas they discovered +during their studies. The intention was to go beyond the scope of +traditional textbooks and also include the pecularities that are not +formally part of typical Computer Science curricula. Finally, the goal +was to present the fruit of this work to people outside of our +field. The project was organized in the form of a Master's level +seminar, which had its first iteration during the spring semester +2019. + +\vskip 0.5em +The result is \,{\bf 2\raisebox{0.5em}{\footnotesize\artcount}\kern 2pt Things I Learned in +Computer Science}, a collection of short illustrated articles. It is +available in the form of this booklet, and online on the +companion website \,\,{\tt\color{UnibasRed} https://tilics.dmi.unibas.ch} + +\vskip 1em{\raggedright +\hspace*{5cm}We hope that you enjoy these info bytes,\\ +\hspace*{5cm}and that you pass them on to your friends! +\vspace*{-2em}} + diff --git a/renderer/main.tex b/renderer/main.tex new file mode 100644 index 00000000..85239697 --- /dev/null +++ b/renderer/main.tex @@ -0,0 +1,129 @@ +% tilics/booklet/main.tex + +% 2019-05-11 christian.tschudin@unibas.ch + +\documentclass{tilics} + + +\minibookletfalse +\ifminibooklet % 2^4 + \newcommand{\lastindex}{15} + \newcommand{\artcount}{4} + \setlength{\pdelta}{4.6mm} +\else % 2^5 + \newcommand{\lastindex}{31} + \newcommand{\artcount}{5} + \setlength{\pdelta}{2.3mm} +\fi + + +% ---------------------------------------------------------------------- +\begin{document} + % \pagecolor{yellow} + \pagecolor{UnibasMint} + \hfill\includegraphics{figs/cover.pdf} + + \vspace*{\fill}{\color{UnibasRed} + \noindent{\Huge\bf 2\raisebox{0.5em}{\LARGE\artcount} Things I Learned} + \vskip 1mm + \noindent{\Huge\bf in Computer Science} + } + + \vskip 4mm\noindent{\large + University of Basel, Department of Mathematics and Computer Science + } + + % 2nd page (even) -- empty + \newpage\pagecolor{white} + \ + + % 3rd page (odd) with booklet title + \newpage + \newgeometry{left=2cm,right=2cm} + \voffset 0.4in%\hoffset 0.1in + + %%\leftBar + \vspace*{\fill} + \noindent\hfil{\Huge\bf 2\raisebox{0.5em}{\LARGE\artcount} Things I Learned} + \vskip 1mm + \noindent\hfil{\Huge\bf in Computer Science} + + \vskip 8pt + \noindent\hfil{\large Department of Mathematics and Computer Science} + \vskip 30mm + \noindent\hfil\includegraphics{figs/UniBas_Logo_EN_Schwarz_Trans_RGB_65.pdf} + \vspace*{-8mm} + + % 4th page (even) with copyright notice + \newpage%\rightBar + + \noindent + {\small\copyright\ 2019 + University of Basel, Department of Mathematics and Computer Science} + + \vspace*{-2pt}\noindent + {\small Spiegelgasse 1, CH -- 4051 Basel, Switzerland} + + \vspace*{-3pt}\noindent + {\small\tt https://dmi.unibas.ch/} + + \vspace*{\fill} + \noindent + \includegraphics{figs/CC-by-sa.pdf}\hspace*{0.4em} + \raisebox{1.5em}{\begin{minipage}{8cm}\small\raggedright + This work is licensed under a {\em Creative Commons Attribution-ShareAlike 4.0 International License}\\ + (CC BY-SA 4.0). + \end{minipage}} + + \vspace*{-0.4em}\noindent + {\small\tt https://creativecommons.org/licenses/by-sa/4.0/legalcode} + % {\small University of Basel, Dept of Mathematics and Computer Science} + + + % 5th page (even) with Author's Note, a + \newpage%\leftBar%\vspace*{\fill} + + %\vspace*{-2mm} + \noindent{\Large Author's Note} + + \vskip 5mm + \small + \input{intro.tex} + + % here we start with the articles! + \newcommand{\tilicsArtNum}{???} + \input{articles.tex} + \input{participants.tex} + + % inner back page + \newpage + \ + + % back page + \newpage\pagecolor{UnibasMint} + + \vspace*{-0.5em} + \noindent + {\Large\bf List of Topics} + \vskip 2em + \noindent + + \begin{tabular}{rp{1em}lp{3em}rp{1em}l} + \input{toc.tex} + \end{tabular} + + \ifminibooklet + + \else + %\vskip 1em + %\noindent{\small\tt\color{UnibasRed} https://tilics.dmi.unibas.ch/} + + %\hspace*{7cm}% + %\rotatebox{90}{\color{UnibasRed}\tt https://tilics.dmi.unibas.ch/} + + \vspace*{-4.5em} + \fi + +\end{document} + +% eof diff --git a/renderer/participants.tex b/renderer/participants.tex new file mode 100644 index 00000000..cb4404fb --- /dev/null +++ b/renderer/participants.tex @@ -0,0 +1,21 @@ +% index page +\newpage %\rightBar + +\vspace*{-0.5em} +\noindent{\Large\bf Seminar participants (fall semester 2024)} +\normalsize + +\vskip 1.5em +\noindent\small +\begin{tabular}{p{3.8cm}p{3.5cm}p{3.5cm}} + Ali Ajorian &Andrei Faur &AndrĂ© Vieira Ribeiro \\ + ArbĂ«r Hyseni &Arita Adili &Ashwin Vazhappilly\\ + Batsilas.Janni &Carina Schrenk &Diyor Musakhanov\\ + Evrim Firatli &Fabian Dudler &Gottfrois.Philippe\\ + Hashim.Muhammad &Ivan Sulima &Jue Du\\ + Koca.Erdem &Laura Engist &Likhitha Vutukuri\\ + Liu Chengrui &Miroslava MačejkovĂĄ &Parth Shandilya\\ + Roozbahani.Matin &Salman Manaa &Selaudin Agolli\\ + Serxhio Dosku &Subahini Nadarajh &Văn TrĂ­ Nguyen\\ +\end{tabular} +\vspace*{\fill}% \ No newline at end of file diff --git a/renderer/test/test.md b/renderer/test/test.md new file mode 100644 index 00000000..cf9421e4 --- /dev/null +++ b/renderer/test/test.md @@ -0,0 +1,59 @@ + + +# Rubber Duck Debugging + + + +> **Sometimes**, you're just **stuck** on a problem that seems impossible to solve. But then as soon as you start explaining the issue to a friend, the solution suddenly becomes clear. + + + +This is the essence of ***rubber duck debugging***. In this technique, a programmer keeps an inanimate object—often a rubber duck—accompanying them at their desk. By explaining the problem aloud to the duck, they are forced to slow down and think through the issue in more detail. + +On many occasions, this procedure helps in finding the root cause. The duck itself **isn't magical**, but it offers a convenient alternative to always needing someone to talk to whenever you encounter a bug. + + +1. **Get your rubber duck.** + ![Rubber Duck](https://example.com/rubber_duck_image.jpg) + +2. **Explain the problem.** + - Speak *loudly* and clearly. + - Use **simple terms**. + +3. **Identify the solution.** + - You may need to: + - Rethink your approach. + - Analyze your code step-by-step. + + +```javascript +console.log(12); +``` + + +Here is some math: +$x = 12$ + +And here's a famous equation: +$$ e^{i \pi} + 1 = 0. $$ + +| Step | Action | Notes | +|------|--------------------------|-----------------------| +| 1 | Get a rubber duck | Any color will do! | +| 2 | Explain your problem | Be detailed! | +| 3 | Find the solution | Reflect and debug. | + + +- Forces **clarity** in thought. +- Encourages **communication**. +- Provides a sense of **companionship**. + +## Author + +| Name | Role | +|--------|-------------| +| Fabian | Debugging Guru | +| Tri | Code Whisperer | + +*Remember*, the duck is always there to listen—without judgment! + diff --git a/renderer/tilics.cls b/renderer/tilics.cls new file mode 100644 index 00000000..0fecec7c --- /dev/null +++ b/renderer/tilics.cls @@ -0,0 +1,223 @@ +% tilics/booklet/tilics.cls + +% cft 2019-05-11 + +\NeedsTeXFormat{LaTeX2e}[1996/06/01] +% \NeedsTeXFormat{LaTeX2e}[1995/12/01] + +\ProvidesClass{tilics} + [2019/05/11 christian.tschudin@unibas.ch] + +\usepackage[english]{babel} + +% \usepackage[paperheight=4in,paperwidth=6in,margin=0.75in,heightrounded,showframe]{geometry} +% \usepackage[paperheight=4in,paperwidth=6in,margin=1cm,showframe]{geometry} +\usepackage[paperheight=4in,paperwidth=6in,margin=1cm]{geometry} + +\usepackage[scaled]{helvet} +\renewcommand\familydefault{\sfdefault} +\usepackage[T1]{fontenc} + +\usepackage{afterpage} +\usepackage[ + % set width and height to a4 width and height + 6mm + % width=6.2truein, height=4.8truein, + width=6truein, height=4.8truein, + % use any combination of these options to add different cut markings + cam, axes, frame, cross, + % cam, axes, cross, + % set the type of TeX renderer you use + pdftex, + % center the contents + center +]{crop} +\usepackage{framed} +\usepackage{graphics} + +%\usepackage{setspace} +\usepackage[absolute,overlay]{textpos} +\usepackage{pgffor} +\usepackage{tikz} +\usepackage{xcolor} + +\definecolor{UnibasMint}{rgb}{0.647, 0.843, 0.824} % 165, 215, 210 +\definecolor{UnibasRed}{rgb}{0.824, 0.02, 0.216} % 210, 5, 55 + +% ---------------------------------------------------------------------- + +\@twosidetrue +\@mparswitchtrue + +% \input{size10.clo} + +\renewcommand\normalsize{% + \@setfontsize\normalsize\@xipt{15}% + \abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@ + \abovedisplayshortskip \z@ \@plus3\p@ + \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@ + \belowdisplayskip \abovedisplayskip + \let\@listi\@listI} +\normalsize +\newcommand\small{% + \@setfontsize\small\@ixpt{11}% + \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@ + \abovedisplayshortskip \z@ \@plus2\p@ + \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@ + \def\@listi{\leftmargin\rightmargin + \topsep 4\p@ \@plus2\p@ \@minus2\p@ + \parsep 2\p@ \@plus\p@ \@minus\p@ + \itemsep \parsep}% + \belowdisplayskip \abovedisplayskip +} +\newcommand\footnotesize{\@setfontsize\tiny\@viipt\@viipt} +\newcommand\tiny{\@setfontsize\tiny\@vpt\@vipt} +\newcommand\large{\@setfontsize\large\@xiipt{14}} +\newcommand\Large{\@setfontsize\Large\@xivpt{18}} +\newcommand\LARGE{\@setfontsize\LARGE\@xviipt{22}} +\newcommand\huge{\@setfontsize\huge\@xxpt{25}} +\newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}} +\newcommand\HUGE{\@setfontsize\Huge{38}{47}} + +\newcommand\thepage{\@arabic\c@page} +\newcommand\labelitemi{\textbullet} + +\setcounter{secnumdepth}{1} +\newcounter{topic} +\setcounter{topic}{0} + +\newlength{\poffs} +\newlength{\pdelta} +%\setlength{\pdelta}{2.3mm} +\setlength{\pdelta}{1.5mm} + +% These commands are used by Pandoc generated latex +\usepackage{hyperref} +\hypersetup{colorlinks=true,linkcolor=blue,urlcolor=blue} + +\usepackage[normalem]{ulem} +\usepackage{soul} +\newenvironment{quote} + {\begin{list}{}{\leftmargin=1cm \rightmargin=1cm} \item[]\fontfamily{ptm}\selectfont} + {\end{list}} + \usepackage{longtable} + \usepackage{booktabs} +\providecommand{\tightlist}{% + \setlength{\itemsep}{0pt} + \setlength{\parskip}{0pt} +} +\setlength{\labelsep}{0.2em} + +\usepackage{svg} +\newcommand{\inputSvg}[1]{% + \newpage + \topskip 0pt % Remove any space at the top of the page + \vspace*{\fill} % Fill the space above the image + \noindent\hfill\includesvg[width=4in]{#1}\hfill % Center horizontally + \vspace*{\fill} % Fill the space below the image +} + +% Render codeblock +\usepackage{fancyvrb} +\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}} +\definecolor{shadecolor}{rgb}{0.9, 0.9, 0.9} % Light gray color for shaded backgrounds +\newenvironment{Shaded}{\begin{snugshade}}{\end{snugshade}} + +\newcommand{\AlertTok}[1]{\textcolor[rgb]{0.8,0.0,0.0}{#1}} +\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.0,0.0,1.0}{\textbf{\textit{#1}}}} +\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.0,0.5,1.0}{#1}} +\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.0,0.7,0.0}{#1}} +\newcommand{\BuiltInTok}[1]{\textcolor[rgb]{0.9,0.4,0.0}{#1}} +\newcommand{\CharTok}[1]{\textcolor[rgb]{0.5,0.0,1.0}{#1}} +\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.2,0.8,0.2}{\textbf{\textit{#1}}}} +\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{1.0,0.0,1.0}{#1}} +\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.7,0.1,0.1}{#1}} +\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.0,0.0,0.7}{\textbf{#1}}} +\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.3,0.6,1.0}{\underline{#1}}} +\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.0,0.7,0.0}{#1}} +\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.0,0.0,1.0}{\textit{#1}}} +\newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.0,0.0,0.0}{\textbf{#1}}} +\newcommand{\ExtensionTok}[1]{\textcolor[rgb]{0.5,0.5,0.0}{#1}} +\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.0,0.5,0.0}{#1}} +\newcommand{\FunctionTok}[1]{\textcolor[rgb]{1.0,0.5,0.0}{\textbf{#1}}} +\newcommand{\ImportTok}[1]{\textcolor[rgb]{0.9,0.2,0.5}{#1}} +\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.0,0.0,1.0}{\textbf{\textit{#1}}}} +\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.1,0.1,0.8}{\textbf{#1}}} +\newcommand{\NormalTok}[1]{\textcolor[rgb]{0.3,0.3,0.3}{#1}} +\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.0,0.0,0.0}{#1}} +\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.9,0.0,0.0}{#1}} +\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.0,0.0,1.0}{\textbf{#1}}} +\newcommand{\RegionMarkerTok}[1]{\textcolor[rgb]{0.5,0.2,0.5}{#1}} +\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.0,0.7,0.0}{#1}} +\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.0,0.5,0.0}{#1}} +\newcommand{\StringTok}[1]{\textcolor[rgb]{0.0,0.0,1.0}{#1}} +\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.5,0.5,0.5}{#1}} +\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.0,0.5,0.0}{#1}} +\newcommand{\WarningTok}[1]{\textcolor[rgb]{1.0,0.0,0.0}{\textbf{#1}}} + + + +\newcommand{\section}[1]{% + \newpage\vspace*{\fill}% + \setlength{\poffs}{1cm}% + \addtolength{\poffs}{\thetopic\pdelta}% + %\leftBar% + % article number to the right + \begin{textblock*}{5cm}(13.4cm,\poffs) % {block width} (coords) + {\tikz \fill [black] (0.1,0.1) rectangle (3,1.2);}% + \hspace*{-2.7cm}\raisebox{2.5mm}{\textcolor{white}{\Huge\bf \thetopic}}% + % \hspace*{-2.7cm}\raisebox{2.5mm}{\textcolor{white}{\Huge\bf \tilicsArtNum}} + \end{textblock*}% +% + \topic*{#1}\stepcounter{topic}\small +} + +\newcommand\topic{% + \@startsection{topic}{0}{\z@}% + %{-3.5ex \@plus -1ex \@minus -.2ex} + {0ex \@plus -0.1ex \@minus -0.1ex}% + % {2.3ex \@plus.2ex}% + {1.5ex \@plus.1ex}% + {\normalfont\Large\bfseries\aftergroup\@afterindentfalse}} + +\newcommand{\rightBar}{% + \begin{textblock*}{1cm}(14.35cm,-0.2cm) % {block width} (coords) + {\tikz \fill [black] (0.1,0.1) rectangle (0.6,10.6);}% + \end{textblock*}% +} + +\newcommand{\leftBar}{% + \begin{textblock*}{1cm}(-0.4cm,-0.2cm) % {block width} (coords) + {\tikz \fill [black] (0.1,0.1) rectangle (0.6,10.6);}% + \end{textblock*}% +} + +\newcommand{\inputFig}[1]{% + \newpage\topskip 0pt%\rightBar + \vspace*{\fill}% + + \noindent\hfill\includegraphics{#1}\hfill + \vspace*{\fill} +} + +\newcommand{\inputText}[1]{% + \input{#1} + + \vspace*{\fill} + \vspace*{0.2cm} +} + +\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} +\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} +\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} + +\def\ps@tilics{% + %\let\@oddfoot\@empty\let\@oddhead\@empty + %\let\@evenfoot\@empty\let\@evenhead\@empty + \newgeometry{left=2cm,right=2cm} +} + +\thispagestyle{empty} +\parindent 1em + +\newif\ifminibooklet +% eof