2024年 10月 md转ppt

385 阅读1分钟

本文介绍如何将markdown文档转成ppt,这样我们可以更加专注于内容本身!

github.com/liyunwei-35…

有时公式是 公式中有空格 marp显示不出来 用vscode正则匹配

(?<!$)$\s*([^]+?)\s*\(?!$)

替换成

$$$1$

有时dfgdfg 需要变成3行

$$([^]+?)\$

\n$1\n

项目目录结构

根目录

  • .vscode:
    • settings.json
  • images: 文件夹用来存PPT背景图片
    • brand.png
    • title.png
    • thanks2.png
  • themes: 文件夹用来存CSS
    • sdlgppt.css
  • template_work.md

vscode 下载插件:Marp for VS Code

图片处理

![bg right:45% 100%](image-7.png)
![bg left 80%](./images/juleiSummary.bmp)

template_work.md


---
marp: true
theme: SdlgPPT
paginate: false
math: mathjax
---


# <!-- fit -->  多项式与快速傅里叶变换 

<br>
<br>

<!--
class: center1
-->
作者:刘向荣



sdlgppt.css

/* @theme SdlgPPT */

@charset "UTF-8";
@import 'uncover';

section {
    font-size: 25px;
    padding-left: 50px;
    padding-right: 45px;
    text-align: left;
    letter-spacing: 2px;
    font-family: Arial, Helvetica, sans-serif;
    padding-top: 75px;
}

h1 {
    text-align: left;
    color: rgb(0, 128, 199);
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 40px;
    line-height: 45px;
}

h2 {
    text-align: left;
    margin-top: 12px;
    font-size: 30px;
    line-height: 25px;
    margin-bottom: 15px;
}

h3 {
    text-align: left;
    margin-top: 10px;
    margin-bottom: 12px;
    font-size: 27px;
    line-height: 25px;
}

p {
    text-align: left;
    font-size: 22px;
    margin-top: 7px;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

header {
    left: 57px;
    right: 50px;
    top: 15px;
    height: 50px;
    text-align: left;
    color: rgb(0, 128, 199);
    font-weight: bold;
    font-size: 40px;
}

footer {
    height: auto;
    font-size: 28px;
    color: rgb(37, 64, 97);
    border-width: 4px;
    border-style: solid;
    font-weight: bold;
    list-style-type: square;
    padding-left: 20px;
    padding-top: 12px;
    padding-bottom: 12px;
}

blockquote {
    background: rgba(173, 216, 230, 0.15);
    border-left: 10px solid rgb(173, 216, 230);
    padding: 0.5em 10px;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
}

blockquote p {
    display: inline;
}

.center1 {
    color: rgb(37, 64, 97);
}

setting.json

{
    "markdown.marp.themes": [
    // "C:/Users/10840/Desktop/codes/marpcss/try.css",
    "./themes/sdlgppt.css",
    ]
}

brand.png

thanks2.png

title.png