gpt4 book ai didi

ms-word - 如何在 Microsoft Word 中添加代码片段

转载 作者:行者123 更新时间:2023-12-04 12:18:47 27 4
gpt4 key购买 nike

我正在尝试在 Microsoft Word 中为我的最终论文添加代码片段。
下图是示例。我想问一下如何在word文档中添加这些类型的代码片段。

enter image description

最佳答案

我找到了以下 here .

Here is the best way, for me, to add code inside word:

  1. go to "insert" tab, click "object" button (it's on the right)
  2. choose "OpenDocument Text" which will open a new embedded word document
  3. copy and paste your code from Visual Studio / Eclipse inside this embedded word page
  4. save and close

The result looks very nice. Here are the advantages of this method:

  • the code keeps its original layout and colors
  • the code is separated from the rest of the document, as if it was a picture or a chart
  • spelling errors won't be highlighted in the code (this is cool !) And it takes only few seconds.

关于ms-word - 如何在 Microsoft Word 中添加代码片段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43768850/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com