Marp CSS theme for creating A4 presentations with a focus on clarity and printing efficiency.
This repository provides a Light theme optimized for presentations and document-like PDFs. The setup ensures compatibility with VS Code and Marp.
- A4 page layout for seamless printing and PDF generation.
- Clean Light theme with customizable styles.
- Easy setup with
.vscode/settings.jsonfor consistent rendering. - Printing-friendly CSS adjustments for reduced ink usage.
Before using this repository, ensure you have:
- VS Code installed.
- Marp for VS Code extension installed.
-
Clone this repository:
git clone https://github.com/StatPan/A4-marp.git cd A4-marp -
Open the folder in VS Code:
code . -
Start creating your Markdown file:
--- marp: true theme: a4-light paginate: true ---
You can automate the creation of a new project folder with this script. Add it to your ~/.bashrc or ~/.zshrc:
function notes() {
mkdir "$1" && cd "$1" && mkdir .vscode
wget -q "https://raw.githubusercontent.com/StatPan/A4-marp/main/.vscode/settings.json"
mv settings.json .vscode
echo "---" >> "$1".md
echo "marp: true" >> "$1".md
echo "theme: a4-light" >> "$1".md
echo "paginate: true" >> "$1".md
echo "---" >> "$1".md
echo "" >> "$1".md
date=$(date)
echo "<!-- $date -->" >> "$1".md
echo "" >> "$1".md
echo "# $1" >> "$1".md
wget -q "https://raw.githubusercontent.com/StatPan/A4-marp/main/a4-light.css"
code .
}Usage:
notes <project_name>This will create a folder
<project_name>containing a file<project_name>.mdwith the date inside. It will also create the folder<project_name>/.vscodeand apply the A4 Light theme.
Include the following at the beginning of your .md file to use the Light theme:
---
marp: true
theme: a4-light
paginate: true
---To optimize for ink-saving when printing, you can adjust the following styles in a4-light.css:
pre {
border-radius: .4em;
padding: 0.2em 0.5em;
line-height: 1.15;
overflow-x: auto;
padding: 0.6em;
word-break: break-all;
white-space: pre-wrap !important;
font-size: 94%;
border-style: solid;
border-width: 1px;
}
code {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
color: black;
overflow-x: auto;
}For any issues or feature requests, feel free to contribute or raise an issue in the repository.
