老了記性差, 筆記下這個好用工具
最近經常要交報告, 偏偏自己當工程師久了變笨都用 markdown, 而且 AI 生出來也都是 markdown
本來想說用 typora 可是要收費, 這對於一個免費仔當然是最後才走的途徑
之前就用過 markdown-pdf 覺得不錯, 可是不曉得怎麼設定 css 及隱藏檔名 日期 頁碼 原來只要在 settings.json 用以下設定即可
1 2 3 4
| "markdown-pdf.styles": [ "markdown-pdf.css", ], "markdown-pdf.displayHeaderFooter": false,
|
接著在自己的 folder 裡面蓋一個 markdown-pdf.css
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
|
body { font-family: "Segoe UI", "Source Code Pro", "Microsoft JhengHei", "微軟正黑體", sans-serif; font-size: 14px; line-height: 1.6; color: #333; margin: 0; padding: 20px; }
h1, h2, h3, h4, h5, h6 { color: #1a5f7a; font-weight: 700; margin-top: 24px; margin-bottom: 16px; line-height: 1.25; }
h1 { font-size: 2em; padding-bottom: 0.3em; border-bottom: 2px solid #1a5f7a; text-align: center; }
h2 { font-size: 1.5em; padding-bottom: 0.3em; border-bottom: 1px solid #eaecef; }
code { font-family: "Cascadia Code", "Consolas", monospace; background-color: #f6f8fa; padding: 0.2em 0.4em; border-radius: 3px; font-size: 85%; }
pre { background-color: #282c34; padding: 16px; border-radius: 6px; overflow: auto; line-height: 1.45; }
pre code { background-color: transparent; color: #abb2bf; padding: 0; font-size: 13px; white-space: pre-wrap; word-break: break-all; }
blockquote { padding: 0 1em; color: #6a737d; border-left: 0.25em solid #dfe2e5; margin: 1em 0; }
ul, ol { padding-left: 2em; }
table { border-spacing: 0; border-collapse: collapse; width: 100%; margin: 16px 0; }
table th, table td { padding: 6px 13px; border: 1px solid #dfe2e5; }
table tr:nth-child(even) { background-color: #f6f8fa; }
@media print { body { padding: 0; background-color: white; }
h1, h2, h3 { page-break-after: avoid; }
pre, blockquote, table { page-break-inside: avoid; }
a { text-decoration: none; color: #0366d6; }
.page-break { page-break-before: always; } }
|