记事本 删除换行和回车符

By default, each Notepad document has the name of the document in the header and the page number in the footer when you print a text file. However, you can customize the header and footer with special commands or custom text, or leave one or both blank.

默认情况下,当您打印文本文件时,每个记事本文档的页眉均具有文档名称,页脚具有页码。 但是,您可以使用特殊命令或自定义文本来自定义页眉和页脚,或者将其中一个或两个都留空。

The header and footer in Notepad are only visible on a printed text file, not in the Notepad program itself. To customize the header and footer in Notepad, select “Page Setup” from the “File” menu.

记事本中的页眉和页脚仅在打印的文本文件上可见,而在记事本程序本身中则不可见。 要在记事本中自定义页眉和页脚,请从“文件”菜单中选择“页面设置”。

On the Page Setup dialog box, enter the text you want in the header and footer in their respective boxes. You can also use the following strings to insert specific data:

在“页面设置”对话框的相应框中,在页眉和页脚中输入所需的文本。 您还可以使用以下字符串插入特定数据:

  • &f : Print the name of the document

    &f :打印文档名称

  • &d : Print the current date

    &d :打印当前日期

  • &t : Print the current time

    &t :打印当前时间

There are also commands that allow you to specify how the text is aligned in the header and footer.

还有一些命令允许您指定文本在页眉和页脚中的对齐方式。

  • &l : Left align the characters that follow (that’s a lowercase “L” after the ampersand)

    &l :左对齐后跟的字符(在“&”号后的小写字母“ L”)

  • &c : Center the characters that follow

    &c :将后面的字符居中

  • &r : Right align the characters that follow

    &r :右对齐后面的字符

For example, I entered the following line in the Header box.

例如,我在“标题”框中输入了以下行。

&l&f&rLori Kaufman - &d

This will left align the name of the document and right align my name, a dash, and the date. I kept the default footer containing the page number.

这将使文档名称左对齐,并使我的名字,破折号和日期右对齐。 我保留了包含页码的默认页脚。

If you don’t want any text in the header or footer, delete all the text in the Header and Footer edit boxes (or one or the other if you want only one blank). For example, maybe you want page numbers on the bottom of each page, but don’t need anything at the top of the page. In that case, delete all the text in the Header edit box to leave the header blank.

如果您不希望在页眉或页脚中添加任何文本,请删除“页眉”和“页脚”编辑框中的所有文本(如果只需要一个空白,则删除一个或另一个)。 例如,也许您希望在每个页面的底部放置页码,但在页面的顶部不需要任何内容​​。 在这种情况下,请删除“标题”编辑框中的所有文本,将标题保留为空白。

NOTE: Unlike headers and footers in Microsoft Word, you cannot have different headers and footers in the same Notepad document.

注意:与Microsoft Word中的页眉和页脚不同,同一记事本文档中不能有不同的页眉和页脚。

Click “OK” once you’ve set up your header and footer.

设置页眉和页脚后,单击“确定”。

Here’s what my example header looks like:

这是我的示例标头的样子:

If you don’t specify an alignment command, the text is automatically centered. For example, if I entered the following text into the Header box, some of the text will overlap, as shown below.

如果未指定对齐命令,则文本将自动居中。 例如,如果我在“标题”框中输入以下文本,则某些文本将重叠,如下所示。

&f&rLori Kaufman - &d

I didn’t tell Notepad to left align the document name.

我没有告诉记事本左对齐文档名称。

Once you set the header and footer, it is saved and applied to any document you open in Notepad from then on. The text you assign to the header and footer is saved in the registry once you close Notepad. This makes it quick and easy to reset the header and footer to their default values. You can reset the header and footer manually by entering the following default values into the edit boxes on the Page Setup dialog box.

一旦设置了页眉和页脚,就将其保存并应用于以后在记事本中打开的任何文档。 关闭记事本后,分配给页眉和页脚的文本将保存在注册表中。 这样可以轻松快捷地将页眉和页脚重置为其默认值。 您可以通过在“页面设置”对话框的编辑框中输入以下默认值来手动重置页眉和页脚。

  • Header: &f

    标头: &f

  • Footer: Page &p

    页脚: Page &p

However, we’ll show you how to reset the header and footer in Notepad to the default settings using the Registry Editor and also provide downloadable registry hacks to make it really easy to do.

但是,我们将向您展示如何使用注册表编辑器将记事本中的页眉和页脚重置为默认设置,并提供可下载的注册表技巧,以使其真正易于实现。

Standard warning: The Registry Editor is a powerful tool and misusing it can render your system unstable or even inoperable. This is a pretty simple hack and as long as you stick to the instructions, you shouldn’t have any problems. That said, if you’ve never worked with it before, consider reading about how to use the Registry Editor before you get started. And definitely back up the Registry (and your computer!) before making changes.

标准警告:注册表编辑器是一个功能强大的工具,滥用它会使您的系统不稳定甚至无法运行。 这是一个非常简单的技巧,只要您按照说明进行操作,就不会有任何问题。 也就是说,如果您以前从未使用过它,请在开始之前考虑阅读有关如何使用注册表编辑器的信息。 并在进行更改之前一定要备份注册表(和您的计算机!)。

Open the Registry Editor by hitting Start and typing “regedit.” Press Enter to open Registry Editor and give it permission to make changes to your PC.

通过单击开始并键入“ regedit”来打开注册表编辑器。 按Enter键打开注册表编辑器,并授予其对PC进行更改的权限。

In the Registry Editor, use the left sidebar to navigate to the following key:

在注册表编辑器中,使用左侧边栏导航至以下键:

HKEY_CURRENT_USER\Software\Microsoft\Notepad

In the right pane, there are two values that store the values for the header and footer in Notepad: szHeader and szTrailer , respectively. Click on the value you want to delete and press the “Delete” key.

在右窗格中,有两个值将szHeaderszTrailer分别存储在记事本中的页眉和页脚的值。 单击要删除的值,然后按“删除”键。

The Confirm Value Delete dialog box displays asking if you’re sure you want to permanently delete this value. Click “Yes”. To delete the other value, select it, press “Delete”, and then click “Yes” on the confirmation dialog box.

显示“确认值删除”对话框,询问您是否确定要永久删除该值。 点击“是”。 要删除其他值,请选择它,按“删除”,然后在确认对话框上单击“是”。

You can also reset all the settings in Notepad back to default settings, including the header and footer.

您还可以将“记事本”中的所有设置重置为默认设置,包括页眉和页脚。

If you’re not comfortable editing the Registry yourself, we’ve created a downloadable registry hack you can use to delete the “szHeader” and “szTrailer” values under the Notepad key. We’ve included three .reg files: one for deleting both values, one for deleting just the value for the header (szHeader), and one for deleting just the value for the footer (szTrailer). Extract the .zip file, double-click the appropriate .reg file for what you want to reset, and click through the prompts.

如果您不满意自己编辑注册表,我们创建了一个可下载的注册表黑客,您可以使用它删除记事本键下的“ szHeader”和“ szTrailer”值。 我们包含了三个.reg文件:一个用于删除两个值,一个用于仅删除页眉(szHeader)的值,以及一个仅删除页脚(szTrailer)的值的文件。 提取.zip文件,双击要重置的相应.reg文件,然后在提示中单击。

Registry hacks for resetting Notepad’s header and footer

用于重置记事本的页眉和页脚的注册表黑客

if you enjoy working with the Registry, it’s worth taking the time to learn how to make your own Registry hacks.

如果您喜欢与Registry一起工作,那么值得花时间学习如何制作自己的Registry hack 。

翻译自: https://www.howtogeek.com/256870/how-to-customize-or-remove-the-headers-and-footers-of-a-notepad-text-file/

记事本 删除换行和回车符

记事本 删除换行和回车符_如何自定义或删除记事本文本文件的页眉和页脚相关推荐

  1. html 换行_李亚涛:清除HTML所有格式并且删除换行与回车,只显示文本

    大家好,之前我在写程序的时候遇到一个需求,就是获取到一段源代码 然后需要把这段源代码只显示文本,其他HTML代码全部清楚掉. 这种我们应该怎么办呢? 以下是我个人的方法,代码如下: #coding:u ...

  2. word删除任意单个字符_如何从Word中的单个页面中删除页眉或页脚

    word删除任意单个字符 You can remove or make changes to headers or footers on any page in Microsoft Word. Thi ...

  3. 论文页眉奇偶页不同怎么设置_怎样设置Word页眉页脚奇偶页不同?

    来自Excel之家,侵联系删 有伙伴问,怎么设置满足下列要求的页眉页脚: 页眉要求正文部分偶数页居中对齐为"XXXX毕业设计(论文)",奇数页居中对齐是各章章名:字体采用宋体5号. ...

  4. 多份word合并 保留不同页眉_如何给Word设置不同页眉和页脚?

    我们在编辑Word文档时,有时需要设置不同的页眉,或每一页的页眉和页脚都各不相同,分别要用哪些功能键实现呢?用极速写作又是如何操作的呢?一起来学习下吧. 一.如何添加和删除页眉页脚 1.用极速写作打开 ...

  5. WORD中如何删除掉某几页的页眉和页脚

    可以删除掉某几页的页眉和页脚:             假设你要删除掉前面四页的页眉和页脚,你只要在第四页和第五页的分界处分节:插入点定位在分节处-"插入"菜单-分隔符-在&quo ...

  6. 毕业论文,去掉页眉,页脚,页码,页眉里横线,分页符

    前提是有分节符存在,Word 2003里插入分节符方式如下: 查看是否有分节符方式:切换到普通视图,如下图: 可以看到已经显示出分节符. 接下来,正式开始去掉不该有的页眉和页脚,以及页眉里的横线.(页 ...

  7. word页眉、页脚、页码自动编号与分页符的关系

    word页眉.页脚.页码自动编号与分页符的关系 这篇文章是我在搞Word时遇到的烦心事,终于搞懂了,必须要分享一波,以解Word之恨,若有错误的地方,还望各路大侠交流指正~ 先看一个问题,如下图 在编 ...

  8. 通过插入分节符,使word页眉、页脚、页码可以从任意页开始

    1.通过word[插入]功能下,插入页眉.页脚.页码 2. 往往我们使需要使不同页面的页眉.页脚使不一样的,或者页码不是从首页开始的,这时候就需要通过插入分节符来实现,分节符就是使整篇word文档分为 ...

  9. mongo单个文档限制_如何在单个文档中使用多个页眉和页脚

    mongo单个文档限制 Word features a few built-in ways to change up your headers and footers in a document. F ...

最新文章

  1. 三十五、字符串匹配问题--KMP算法
  2. ios android 内存不足,怎样解决手机内存不足?iOS系统可以试试这些方法
  3. 第五章 常用Lua开发库3-模板渲染
  4. GM6 pageset - Cache get scenario /ui2/cl_pfcg_utils
  5. 无法打开包括文件:“mysql..h”: No such file or directory
  6. IndexError: tensors used as indices must be long, byte or bool tensors
  7. 图解:为什么非公平锁的性能更高?
  8. 从零开始学习python编程-从零开始学Python程序设计 PDF 完整影印版
  9. Tlsr8258开发-BQB(DTM)测试
  10. CancelledError: [_Derived_]RecvAsync is cancelled.
  11. 人力资源常用理论和法则
  12. 自定义原生JS键盘快捷键和vue-hotkey
  13. 在GitHub上建立自己在线简历
  14. 【AUTOSAR】基于RT-Thread内核的AUTOSAR在n32g上的实现
  15. 十天内提高单词量到20000! (Vocabulary 10000)
  16. UG/NX二次开发Siemens官方NXOPEN实例解析—1.6 BlockStyler/SelectionExample
  17. 使用Autoit3 自动登录163邮箱
  18. iocp端口断开_在完成端口IOCP模型判断客户端是否已关闭连接(掉线) | 学步园
  19. 共享计算机型n4中n代表什么,n代表什么(n代表的所有含义)
  20. python写自动化测试脚本常见报错_Appium自动化测试

热门文章

  1. 从零开始学Java哇哇哇-Day2
  2. runtime——Class——create
  3. linux查看cpu是否支持ept,查看CPU是否支持虚拟化技术
  4. struts的logic:empty,logic:notEmpty,logic:iterate,bean:write标签
  5. 超全的大数据术语,赶紧mark!
  6. 08.Rust引用和借用
  7. php grid 分页,jqGrid分页pager配置
  8. 采购管理三大误区及提高采购工作效率的十大方法
  9. 【AbstractReading】Redundancy-Free Computation for Graph Neural Networks
  10. PHP代码审计基础_漏洞银行_笔记整理(一)