垂直制表符(C语言中的\v, ASCII 11)最初的历史用途是什么?

它的键盘上有键吗?人们是如何产生它的?

现在还在使用的语言或系统中,垂直制表符有一些有趣和有用的地方吗?


当前回答

similar to R0byn's experience, i was experimenting with a Powerpoint slide presentation and dumped out the main body of text on the slide, finding that all the places where one would typically find carriage return (ASCII 13/0x0d/^M) or line feed/new line (ASCII 10/0x0a/^J) characters, it uses vertical tab (ASCII 11/0x0b/^K) instead, presumably for the exact reason that dan04 described above for Word: to serve as a "newline" while staying within the same paragraph. good question though as i totally thought this character would be as useless as a teletype terminal today.

其他回答

垂直标签用于加快打印机的垂直移动。一些打印机使用带有各种标签点的特殊标签带。这有助于在表单上对齐内容。VT到页眉空间,填充页眉,VT到正文区域,填充行,VT形成页脚。一般来说,它是作为一个字符常量在程序中编码的。在键盘上,它是CTRL-K。

我不相信任何人会有理由再使用它。大多数表单都是用postscript等打印机控件语言生成的。

@Talvi Wilson注意到它在python '\v'中使用。

print("hello\vworld")

输出:

hello
     world

上面的输出似乎导致默认的垂直大小为一行。我已经用perl“\013”进行了测试,出现了相同的输出。在将换行转换为换行-换行+换行的设备上,这可以用于进行换行而不需要换行。

在打字机时代,它被用来向下移动一页到下一个垂直的位置,通常间隔6行(与水平制表符沿一行移动8个字符大致相同)。

在现代环境中,vt即使有意义,也是微不足道的。

ASCII垂直制表符(\x0B)仍然在一些数据库和文件格式中作为字段中的新行使用。例如:

在.mer文件格式中,允许在数据字段中添加新行, FileMaker数据库可以使用垂直选项卡作为换行符(参见https://support.microsoft.com/en-gb/kb/59096)。

我发现VT字符是用在pptx文本框在每行显示在盒子的末尾,以调整文本到盒子的大小。 它似乎是由powerpoint自动生成的(不是用户引入的),目的是将文本移动到下一行,并将完整的文本块固定到文本框中。在下面的例子中,在§的位置:

"This is a text §
inside a text box"

similar to R0byn's experience, i was experimenting with a Powerpoint slide presentation and dumped out the main body of text on the slide, finding that all the places where one would typically find carriage return (ASCII 13/0x0d/^M) or line feed/new line (ASCII 10/0x0a/^J) characters, it uses vertical tab (ASCII 11/0x0b/^K) instead, presumably for the exact reason that dan04 described above for Word: to serve as a "newline" while staying within the same paragraph. good question though as i totally thought this character would be as useless as a teletype terminal today.