DEV Community

codemee
codemee

Posted on

Office 軟體方程式更換字型與輸出成向量圖

使用 Word、PowerPoint 時可能會插入方程式來展現數學算式, 但你會發現好像方程式中的字體有些運算符號與數字比例並不協調, 看起來不大美觀。另外, 若是想將方程式放到網頁上, 要怎麼做呢?本文以 PowerPoint 為例說明這些功能。

更改方程式的字型

要更改方程式的字體, 需要額外的步驟, 請依照以下說明:

  1. 請先建立好方程式:

    你可以看到預設的字型會讓負號過長, 看起來和數字的 1 不成比例。

  2. 請點一下方程式內部後, 將方程式內容全部選取:

  3. 按一下『方程式工具/方程式』頁次左邊的一般文字

    你會發現字型已經不一樣, 現在的負號變短了。

  4. 這時就可以切換到『常用』頁次更換字型, 像是以下就更換成 Windows 內建的等寬字 Consolas:

這樣就可以使用你喜歡的字體來建構方程式了。

將方程式輸出成向量圖

要將方程式放到網頁上使用, 可以將方程式單獨會出成標準的 svg 格式向量圖, 如此即可方便嵌入網頁中, 而且因為視像量圖, 所以即使隨意縮放, 也不會因為圖片解析度而影響美觀或是閱讀。請依照以下步驟匯出:

  1. 點選方程式後按滑鼠右鍵:

    執行『另存成圖片』指令。

  2. 存檔類型中建議選用可縮放向量圖形格式 (*.svg):

    我自己測試選用 emf 格式雖然也是向量圖, 但是會有文字內容變掉的怪異現象。

  3. 使用瀏覽器測試開啟剛剛另存的 svg 檔:

    可以正常顯示。

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay