orzih / mkdocs-with-pdf

Generate a single PDF file from MkDocs repository.
MIT License
324 stars 76 forks source link

Ordered lists are not aligned properly when exported to PDF #94

Open theoctober19th opened 2 years ago

theoctober19th commented 2 years ago

When building the docs using mkdocs-with-pdf, the ordered lists appear far left than where they are supposed to be.

Here is what my markdown file looks like:

When SFTech is being setup for the first time, there are three phases of setup that need to be completed.

1. Login with the default `admin` user and then create new password for it.
2. Set the following parameters for the system: 

    a. Impact Assessment Date  
    b. Compounding frequency to be used. (Compounding daily or compounding each interval)  
    c. Computaion model (Retrospective, Modified Retrospective or Prospective)  

These steps are described in detail in the sections that follow.

When viewed on browser, the alignment of ordered list is correct: image

But when exported to PDF, the alignment of ordered list is not correct: image

Here is my mkdocs.yml file:

site_name: SFTech Docs
site_url: https://sftechtepal.com/docs
site_description: The official documentation of SFTech
site_author: SFTech
copyright: Copyright © 2022 Supreme Fintech Private Limited
docs_dir: docs

nav:
  - Home: index.md
  - Setup: setup.md
  - Dashboard: dashboard.md
  - Authentication: authentication.md
  - Leases: leases.md
  - Reports: reports.md
  - Approvals: approvals.md
  - User Management: user_management.md

theme:
    name: material
    logo: assets/img/sft_logo_white.svg
    favicon: assets/img/favicon.ico
    font:
        text: Nunito
    palette:
      - scheme: default
        primary: deep orange
        toggle: 
            icon: material/brightness-4 
            name: Switch to dark mode
      - scheme: slate 
        primary: deep orange
        toggle:
          icon: material/brightness-7
          name: Switch to light mode
    features:
      - toc.integrate
      - navigation.top
      - search.suggest

markdown_extensions:
    - toc:
        permalink: "#"

plugins:
  - search
  - with-pdf

The following were used when this issue appeared:

mkdocs-with-pdf: 0.9.3
macOS Big Sur 11.6
DanielFichtner commented 2 years ago

Encountering the same problem.

mkdocs: 1.2.3 mkdocs-material: 8.1.7 mkdocs-with-pdf: 0.9.3

Arch Linux

DanielFichtner commented 2 years ago

Fix: add the ol to "content indent" in mkdocs_with_pdf/themes/material.scss in line 69

    &>ul,
    &>ol {
      margin-left: 1.5rem;
    }