Browse Source

First fill

Pierre-Yves Barriat 1 year ago
commit
eb7abbbe52
8 changed files with 248 additions and 0 deletions
  1. 178 0
      MarkDown.md
  2. BIN
      assets/back.png
  3. BIN
      assets/garde.png
  4. BIN
      assets/logo.png
  5. BIN
      assets/logolinux.png
  6. 5 0
      assets/marp.config.js
  7. 55 0
      assets/tum.css
  8. 10 0
      compile.sh

+ 178 - 0
MarkDown.md

@@ -0,0 +1,178 @@
+---
+marp: true
+title: Markdown and applications
+author: P.Y. Barriat
+description: Markdown and applications
+backgroundImage: url('assets/back.png')
+_backgroundImage: url('assets/garde.png')
+footer: 02/06/2023 | Markdown and applications | PY Barriat
+_footer: ""
+paginate: true
+_paginate: false
+math: true
+---
+
+Markdown and applications<!--fit-->
+===
+
+https://gogs.elic.ucl.ac.be/pbarriat/learning-linux
+
+![h:280](assets/logo.png)
+
+**Pierre-Yves Barriat**
+ELIC Training Sessions `June 13th, 2023`
+
+---
+
+# What is Markdown ?
+
+Lightweight **markup language** (a *text-encoding system*)
+
+> "Set of symbols inserted in a text document to control its structure, formatting, or the relationship between its parts."
+
+Others markup languages: HTML, LaTeX, etc
+
+Created in 2004, **Markdown** is now one of the world’s most popular markup languages
+
+Markdown is different than using a `WYSIWYG`
+
+---
+
+# Why Markdown ?
+
+- Markdown is for **everything**: websites, documents, notes, books, presentations, email messages, technical documentation
+
+- Markdown is **portable** 
+  > MS Word locks your content into a proprietary file format
+
+- Markdown is platform **independent**
+
+- Markdown is **simple** and future proof
+  > so easy to learn ( $\neq$ LaTeX)
+
+- Markdown is **everywhere** : Reddit, GitHub, readme, etc
+
+---
+
+# Live Demo
+
+Several online Markdown editors to try writing in Markdown
+
+For example, try [Dillinger](https://dillinger.io/)
+
+After you've become familiar with Markdown, you may want to use a Markdown application that can be installed on your computer
+
+---
+
+# Prerequisites
+
+- text editor : [Visual Studio Code](https://code.visualstudio.com/download)
+
+- universal document converter : [Pandoc](https://pandoc.org/installing.html)
+
+- TeX distribution : [LaTeX](https://www.latex-project.org/)
+
+- Markdown presentation ecosystem : [Marp](https://marp.app/)
+
+---
+
+## Visual Studio Code
+
+VSC is one of the most popular and powerful text editors used by software engineers today 
+> free and available for [macOS](https://www.youtube.com/watch?v=8CJXB4Nu1wo), [Windows](https://www.youtube.com/watch?v=AdeWO-n9O2Q)
+
+> Linux: `wget` the **deb** package then `dpkg -i code*.deb` 
+
+- Markdown All in One
+- Remote - SSH
+- Snippets
+- Tabnine
+- Regex Previewer
+
+---
+
+## VS Code in WSL
+
+Open the Ubuntu terminal and do
+
+```bash
+sudo apt update
+sudo apt upgrade
+
+sudo apt install gedit -y
+sudo apt install chromium-browser -y
+sudo apt install git -y
+
+#wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
+#sudo dpkg -i google-chrome-stable_current_amd64.deb
+
+```
+
+---
+
+## Pandoc
+
+Pandoc is a library for converting from one markup format to another, and a command-line tool that uses this library.
+> free and available for macOS, Windows, and Linux
+> - [Pandoc](https://github.com/jgm/pandoc/releases)
+> - [Pandoc-crossref](https://github.com/lierdakil/pandoc-crossref/releases)
+
+```bash
+cd
+wget https://github.com/jgm/pandoc/releases/download/3.1.2/pandoc-3.1.2-linux-amd64.tar.gz
+wget https://github.com/lierdakil/pandoc-crossref/releases/download/v0.3.16.0/pandoc-crossref-Linux.tar.xz
+tar xzf pandoc-3.1.2-linux-amd64.tar.gz
+tar -xf pandoc-crossref-Linux.tar.xz
+mv pandoc-3.1.2/* .
+mv pandoc-crossref bin
+mv pandoc-crossref.1 share/man/man1
+echo "export PATH=\$PATH:\$HOME/bin" >> .bashrc
+echo "export MANPATH=\$MANPATH:\$HOME/share" >> .bashrc
+rm -rf pandoc-3.1.2 pandoc-3.1.2-linux-amd64.tar.gz pandoc-crossref-Linux.tar.xz
+```
+
+---
+
+## Tex distribution
+
+**LaTeX** is a high-quality typesetting system; it includes features designed for the production of technical and scientific documentation.
+> free and available for [macOS](https://www.tug.org/mactex/), [Windows](https://miktex.org/download), and Linux
+
+```bash
+sudo apt install texlive-latex-base \
+                 texlive-latex-recommended \
+                 texlive-fonts-recommended \
+                 texlive-latex-extra \
+                 texlive-fonts-extra \
+                 texlive-xetex \
+                 texlive-lang-french \
+                 texlive-latex-extra
+```
+
+---
+
+## Marp
+
+Marp (MarkDown slides extension) can convert **Marp Markdown** files into static HTML/CSS, PDF, PowerPoint document, and image(s) easily
+
+Download and install marp-cli (a **CLI** interface for Marp) from the standalone binaries
+> free and available for [macOS](https://github.com/marp-team/marp-cli/releases/download/v2.4.0/marp-cli-v2.4.0-mac.tar.gz), [Windows](https://github.com/marp-team/marp-cli/releases/download/v2.4.0/marp-cli-v2.4.0-win.zip), and [Linux](https://github.com/marp-team/marp-cli/releases/download/v2.4.0/marp-cli-v2.4.0-linux.tar.gz)
+
+> you must install Chrome, Chromium or Edge
+
+---
+
+# Examples
+
+#marp --allow-local-files --theme tum.css git_elic.md -o git_elic.pdf
+#marp --template bespoke --bespoke.progress --allow-local-files --theme tum.css git_elic.md -o git_elic.html
+
+https://www.markdownguide.org/getting-started/
+
+https://jaantollander.com/post/scientific-writing-with-markdown/
+
+https://curvenote.com/blog/writing-a-scientific-paper-faster-myst-markdown
+
+https://github.com/MartinHeroux/pandoc_article_template
+
+https://phd.row1.ca/phd

BIN
assets/back.png


BIN
assets/garde.png


BIN
assets/logo.png


BIN
assets/logolinux.png


+ 5 - 0
assets/marp.config.js

@@ -0,0 +1,5 @@
+const marpKrokiPlugin = require('./kroki-plugin')
+
+module.exports = {
+  engine: ({ marp }) => marp.use(marpKrokiPlugin)
+}

+ 55 - 0
assets/tum.css

@@ -0,0 +1,55 @@
+/* @theme tum */
+
+@import 'default';
+
+section {
+  /*background-color: #fff;
+  color: #000;
+  background-image: url('images/TUM_Logo_blau_rgb_s.svg');
+  background-repeat: no-repeat;
+  background-position: right 40px top 40px;
+  background-size: 8%;*/
+}
+
+section.lead {
+  /*background-image: url('images/TUM_Uhrenturm.png');
+  background-position: right;
+  background-size: 45%;*/
+}
+
+section h1,
+section h2 {
+  color: #1f315c;
+}
+section a {
+  color: #5fb2e6;
+}
+section footer,
+section::after {
+  color: #9cb7d4;
+}
+
+section.invert {
+  background-color: #003359;
+  color: #fff;
+  /*background-image: url('images/TUM_Logo_weiss_rgb_s.svg');*/
+}
+
+section.lead.invert {
+  /*background-image: url('images/TUM_Uhrenturm_w.png');*/
+}
+
+section.invert h1,
+section.invert footer,
+section.invert::after {
+  color: #fff;
+}
+
+section.invert a {
+  color: #e37222;
+}
+
+/* Add "Page" prefix and total page number */
+section::after {
+  content: attr(data-marpit-pagination) ' / ' attr(data-marpit-pagination-total);
+}

+ 10 - 0
compile.sh

@@ -0,0 +1,10 @@
+#!/bin/bash
+#
+# PY Barriat, March 2023
+#
+# Download and install marp (MarkDown slides extension) from here:
+# https://github.com/marp-team/marp-cli/releases
+#
+
+marp --allow-local-files --theme ./assets/tum.css MarkDown.md -o MarkDown.pdf
+marp --template bespoke --bespoke.progress --allow-local-files --theme ./assets/tum.css MarkDown.md -o MarkDown.html