请输入您要查询的百科知识:

 

词条 Formatted text
释义

  1. Terminology

  2. Beginnings of formatted text

  3. Markup languages

  4. Formatted document files

  5. See also

  6. External links

{{distinguish|Text formatting}}{{redirect|Rich text|text/richtext|Enriched text}}

Formatted text, styled text, or rich text, as opposed to plain text, has styling information beyond the minimum of semantic elements: colours, styles (boldface, italic), sizes, and special features in HTML (such as hyperlinks).

Terminology

Formatted text cannot rightly be identified with binary files or be distinct from ASCII text. This is because formatted text is not necessarily binary, it may be text-only, such as HTML, RTF or enriched text files, and it may be ASCII-only. Conversely, a plain text file may be non-ASCII (in an encoding such as Unicode UTF-8).{{explain|Both ASCII and UTF-8, which is a superset thereof, can be used for plain text and for formatted text.|date=September 2018}} Text-only formatted text is achieved by markup which too is textual, while some editors of formatted text like Microsoft Word save in a binary format.

Beginnings of formatted text

Formatted text has its genesis in the pre-computer use of underscoring to embolden passages in typewritten manuscripts. In the first interactive systems of early computer technology, underscoring was not possible, and users made up for this lack (and the lack of formatting in ASCII) by using certain symbols as substitutes. Emphasis, for example, could be achieved in ASCII in a number of ways:

  • Capitalization: I am NOT making this up.
  • Surrounding with underscores: I am _not_ making this up.
  • Surrounding with asterisks: I am not making this up.
  • Spacing: I am n o t making this up.

Surrounding by underscores was also used for book titles: Look it up in _The_C_Programming_Language_.

Markup languages

{{Main article|Markup languages}}

Formatting can be marked by tags distinguished from the body text by special characters, such as angle brackets in HTML. For example, this text:

The dog is classified as Canis lupus familiaris in taxonomy.

is marked up in HTML thus:

The dog is classified as Canis lupus familiaris in taxonomy.

The italicised text is enclosed by an opening and a closing italics tag. In LaTeX, the text would be marked up like this:

Most markup languages can be edited with any text editor, needing no special software. Many markup languages can also be edited with specialized software designed to automate some functions or present the output as WYSIWYG.

Formatted document files

Since the invention of MacWrite, the first WYSIWYG word processor, in which the typist codes the formatting visually rather than by inserting textual markup, word processors have tended to save to binary files. Opening such files with a text editor reveals the text embellished with various binary characters, either around the formatted areas (e.g. in WordPerfect) or separately, at the beginning or end of the file (e.g. in Microsoft Word).

Formatted text documents in binary files have, however, the disadvantages of formatting scope and secrecy. Whereas the extent of formatting is accurately marked in markup languages, WYSIWYG formatting is based on memory, that is, keeping for example your pressing of the boldface button until cancelled. This can lead to formatting mistakes and maintenance troubles. As for secrecy, formatted text document file formats tend to be proprietary and undocumented, leading to difficulty in coding compatibility by third parties, and also to unnecessary upgrades because of version changes.

WordStar was a popular word processor that did not use binary files with hidden characters.

OpenOffice.org Writer saves files in an XML format. However, the resultant file is a binary since it is compressed (a tarball equivalent).

PDF is another formatted text file format that is usually binary (using compression for the text, and storing graphics and fonts in binary). It is generally an end-user format, written from an application such as Microsoft Word or OpenOffice.org Writer, and not editable by the user once done.

See also

  • Text encoding
  • Online rich-text editor
  • Prepress

External links

  • Word Processors: Stupid and Inefficient by Allin Cottrell (opinion piece)

2 : Computer file formats|Publishing

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/23 20:13:04