Skip to content

toc_b、fixedtitleA 等样式无法正常渲染 #42

@goudanZ1

Description

@goudanZ1

我使用的是 VS Code + Marp for VS Code (v3.1.1),在预览 files 目录下的 md 文件时,发现部分页面未按照预期功能渲染。导出为 html 或 pdf 文件后,这些页面仍然与 files 目录下提供的 html 和 pdf 文件相差较大,包括:

  • 第 19 页(toc_b):右边目录是从页面中间开始的,导致部分条目溢出
  • 第 36, 37 页(col1_ul_sq fglass, col1_ul_ci fglass):列表外框较窄
  • 第 49 页(fixedtitleA):标题栏并没有固定在顶部,页面内容仍然居中

一个可能的解决方法是在 themes/am_template.scss 文件的 section 类中加一行 display: flex;,即:

section {
  font-family: var(--font-family-main);
  font-size: var(--font-size-main);
  color: var(--color-main);
  text-align: justify;
  display: flex;
}

这样可以解决以上无法正常渲染的问题,并且对该 md 文件内其他页面的渲染没有负面影响。但由于我并没有仔细研究您的 css 是怎么写的,因此无法确认这样改动是否可能会与其他样式产生潜在的冲突 >_<

另外,新版的 Marp for VS Code 插件弃用了 markdown.marp.enableHtml 选项而改用 markdown.marp.html,因此 .vscode/settings.json 文件也需要更新。

附无法正常渲染的页面截图:

Image Image Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions