GitXplorerGitXplorer
h

markdown-pdf-styles

public
18 stars
2 forks
0 issues

Commits

List of commits on branch main.
Unverified
ff7883521e583cc3d7c740b45d8c98faba1e179b

Use condensed font, wrap list and table distances

hhanggrian committed 2 years ago
Unverified
0c3e82b2ad744de072d4fa470e097340b57efcc6

Add cheatsheet preset style

hhanggrian committed 2 years ago
Unverified
034b410e27bc1fd2d42a0b756a5b29a157a50e45

Add spacing, rename indent and column styles

hhanggrian committed 2 years ago
Unverified
522c26eee0a7244a37345e7802ce679e94d1f7c8

Fix IEEE title line height, image & small indentation, code font size

hhanggrian committed 2 years ago
Unverified
77c036e48324715bbcb4f1217661107c67c6b6b6

Fix resume margins, add extra gap to multi layouts

hhanggrian committed 2 years ago
Unverified
9e64089d78d9460e4e507a59c4393cb2a7ecf828

Introduce classic series, always use pt in font size

hhanggrian committed 2 years ago

README

The README file for this repository.

Markdown PDF Styles

VSCode Markdown PDF logo.

Stylesheets for VSCode Markdown PDF.

Usage

To use the style, modify VSCode user settings.json according to the style below. A root project directory may also have .vscode/settings.json for project-wide preferences, which will override global settings.

Preset styles

Report

Preset style preview: Classic report.

Replace variable $TITLE to report's title.

::: attributions
Urna Semper<br>Instructor’s Name<br>March 13, 2023
:::

::: title
Geology 101 Report
:::

::: subtitle
Sed et lacus quis enim mattis nonummy
:::

Lorem ipsum...

Letter

Preset style preview: Classic letter.

::: sender
Sender Name
:::

::: contact
1234 Main Street<br>Anytown, State ZIP<br>123-456-7890<br>no_reply@example.com
:::

29 April 2023

::: recipient
Recipient Name<br>4321 First Street<br>Anytown, State ZIP
:::

Lorem ipsum...

Resume

Preset style preview: Classic resume.

::: name
Your Name
:::

::: job
Job Title
:::

# Profile

Lorem ipsum...

::: contact
1234 Main Street Anytown, State ZIP&emsp;123-456-7890<br>no_reply@example.com&emsp;@social_media
:::

Preset style preview: Academic IEEE.

IEEE style is an academic paper format with double column and serif font.

::: title
Paper Title* (use style: *paper title*)
:::

::: authors
Given Name Surname<br>
*dept. name of organization (of Affiliation)*<br>
City, Country<br>
email address or ORCID
:::

:::: content
Lorem ipsum...

::: references
1.  Awesome article
1.  Awesome website
:::
::::

Preset style preview: Academic APA.

APA style is an academic paper format with sans serif font.

Replace variable $TITLE to article's title.

::: title
Paper Title
:::

::: subtitle
Author Name<br>
Department of Psychology, The George Washington University<br>
Instructor Name<br>
:::

Lorem ipsum...

::: references
Awesome article

Awesome website
:::

Cheatsheet

Preset style preview: Cheatsheet.

Keep as many content as possible with mini everything.

Custom styles

Only pick at maximum one in each category.

Font

Sans Serif
Custom style preview: Sans font family. Custom style preview: Serif font family.

Font family stylesheets with Noto Sans/Serif and JetBrains Mono, the default is system fonts.

{
  "markdown-pdf.styles": [
    ".../markdown-pdf-styles/styles/font-sans.css",
    ".../markdown-pdf-styles/styles/font-serif.css",
  ],
}

Text

Small Normal
Custom style preview: Small text size. Custom style preview: Normal text size.

Text and code size stylesheets, the default is around 12pt.

{
  "markdown-pdf.styles": [
    ".../markdown-pdf-styles/styles/text-small.css",
    ".../markdown-pdf-styles/styles/text-normal.css",
  ],
}

Indent

Quarter Half
Custom style preview: Quarter-inch indent. Custom style preview: Half-inch indent.

Paragrah indentation and justification stylesheets, there is no indent by default.

{
  "markdown-pdf.styles": [
    ".../markdown-pdf-styles/styles/indent-quarter.css",
    ".../markdown-pdf-styles/styles/indent-half.css",
  ],
}

Spacing

Single Double
Custom style preview: Single-height spacing. Custom style preview: Double-height spacing.

Line height stylesheets, the default is around one-half inch.

{
  "markdown-pdf.styles": [
    ".../markdown-pdf-styles/styles/spacing-single.css",
    ".../markdown-pdf-styles/styles/spacing-double.css",
  ],
}

Column

Two Three Four
Custom style preview: Two-column layout. Custom style preview: Three-column layout. Custom style preview: Four-column layout.

Column splitting stylesheets, the default is full column.

{
  "markdown-pdf.styles": [
    ".../markdown-pdf-styles/styles/column-two.css",
    ".../markdown-pdf-styles/styles/column-three.css",
    ".../markdown-pdf-styles/styles/column-four.css",
  ],
}

Others

Reference

A hotfix to prevent sup and sub for affecting line height.

{
  "markdown-pdf.styles": [
    ".../markdown-pdf-styles/styles/reference.css",
  ],
}

Headers & footers

Template for header and footer needs to be embedded in the settings.

Webpage

Header Footer
Headers style preview: Webpage header. Headers style preview: Webpage footer.

Replace variable $URL to webpage link, $TITLE with document title.

{
  "markdown-pdf.headerTemplate": "<div style='font-size: 7pt; margin-left: 1cm; margin-right: 1cm;'> <span>$URL</span> </div>",
  "markdown-pdf.footerTemplate": "<div style='font-size: 7pt; margin-left: 1cm;'> <span>$TITLE</span> </div> <div style='font-size: 7pt; margin-left: auto; margin-right: 1cm;'> <span class='pageNumber'></span> / <span class='totalPages'></span> </div>",
}

Homework

Header Footer
Headers style preview: Homework header. Headers style preview: Homework footer.

Replace variable $SUBJECT to student credential, $IMAGE_BASE64 to school logo (10px height), $TITLE to document title.

{
  "markdown-pdf.headerTemplate": "<div style='font-size: 7pt; margin-left: 1cm;'> <span>$SUBJECT</span> </div> <div style='margin-left: auto; margin-right: 1cm;'> <img src='$IMAGE_BASE64'> </div>",
  "markdown-pdf.footerTemplate": "<div style='font-size: 7pt; margin-left: 1cm;'> <span>$TITLE</span> </div> <div style='font-size: 7pt; margin-left: auto; margin-right: 1cm;'> <span class='pageNumber'></span> / <span class='totalPages'></span> </div>",
}