Summary of Comprehensive Guide to Markup Languages
Comprehensive Guide to Markup Languages for Students
Introduction
Markup languages are used to describe the structure and presentation of text documents and graphics using simple text tags. This material focuses on practical approaches, examples, and comparisons of the main types of markup languages used at the university level.
Definition: A markup language is a text format that uses special tags to describe the structure or content of a document so that it can be further processed or displayed.
Key Concepts (Breakdown)
1) TeX and LaTeX — Typography and Precise Typesetting
- TeX: A programming language for creating professional typesetting; emphasizes precise control over the output.
- LaTeX: A high-level language (a set of macro commands) built on top of TeX, which simplifies common tasks like chapters, citations, and tables.
Definition: TeX is a low-level language for document typesetting; LaTeX is a macro package that provides a higher level of abstraction over TeX.
Practical example of a basic LaTeX document:
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[UTF-8]{inputenc}
\usepackage{babel}
\begin{document}
Hello, world!
\end{document}
- Tip: Save the file with a .tex extension and compile it into a PDF using tools like pdfLaTeX or XeLaTeX.
Practical applications:
- Writing scientific articles, theses, books, and mathematical texts.
- Precise page layout configuration, support for packages for citations, graphics, and equation typesetting.
2) Markdown — Lightweight Text Markup for Web and Notes
- Markdown is a simple syntax for quickly writing structured text that converts into HTML or other formats.
- Often used for README files, note-taking applications, and Jupyter notebooks.
Practical example (basic syntax):
- Heading: # Heading
- Bold text: bold
- List: - item
Applications:
- Quick documentation in GitHub repositories, writing notes in tools like Obsidian, or inputs/outputs for generative tools.
3) SVG — Vector Graphics in Text Format
- SVG (Scalable Vector Graphics) is an XML application for vector graphics; the resulting files are text-based and can be edited in a text editor.
Definition: SVG is a format for describing vector graphics using tags, which preserves quality when scaled.
Key features:
- Smaller file size for simple shapes compared to bitmaps
- Animation capabilities, accessibility of text within the graphic, use of CSS and scripting
Example of a simple shape (schematic):
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<polyline points="20,20 40,25 60,40" style="fill:none;stroke:black;stroke-width:3" />
</svg>
Ways to embed into HTML (advantages/disadvantages):
| Method | Advantage | Disadvantage |
|---|---|---|
| <img src="..."> | Simple, commonly supported by browsers | Limited access to internal SVG elements |
| <object data="..."> | Wide support across HTML versions | More complex scripting within the object |
| <iframe src="..."> | Isolated context, good support | Difficult integration with page CSS |
| Embed directly <svg> | Full control and styling | Increases HTML document size, can be maintenance-intensive |
Applications:
- Interactive visualizations, diagrams, charts, animations.
4) Other Languages and Examples
- Polyline, path, and text in SVG for drawing and labels.
- KML (Keyhole Markup Language) for geolocating points on maps.
Short KML example:
<?xml version='1.0' encoding='UTF-8'?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Placemark>
<name>Plzeň</name>
<description>Plzeň is the beer capital of the world.</description
Already have an account? Sign in
Markup Languages — Overview
Klíčové pojmy: TeX is a tool for professional document typesetting., LaTeX is a set of macros that simplifies working with TeX., Markdown is a lightweight format for quick writing and conversion to HTML., SVG describes vector graphics in text form., SVG can be embedded into HTML in several ways: img, object, iframe, or inline., Polyline and path are fundamental SVG shapes for drawing paths., KML is used to describe geographical data for maps., The choice of markup language depends on requirements for precision, interactivity, and simplicity., A LaTeX document begins with \documentclass and ends with \end{document}., Markdown has various dialects; CommonMark aims to unify the syntax., SVG allows for animations, scripts, and text accessibility within graphics., Conversion between formats (Markdown → LaTeX/PDF) streamlines the workflow.