# @financial-times/o3-editorial-typography 中文文档

规范地址：https://npmcn.com/package/%40financial-times/o3-editorial-typography/

版本：3\.2\.2
npm 元数据更新时间：2026-10-06T13:39:58.782Z
中文译文更新时间：2026-11-14T18:57:01.087Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40financial-times/o3-editorial-typography
原文对照：https://npmcn.com/package/%40financial-times/o3-editorial-typography/?lang=original

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：54.4 kB，34 个文件
- 模块格式：ESM + CJS
- TypeScript 类型：包内自带
- 运行依赖：0 个
- peer 依赖：@financial-times/o3-foundation ^3\.0\.0
- 首次发布：2024-05-22T15:29:08.902Z
- 最新版本发布：2025-06-30T09:34:13.954Z
- 近 30 天下载量：3395（2026-10-15 至 2026-11-13，npm 官方下载统计）
- 已发布版本数：21（近 12 个月 0 个）

## 中文简介

带有设计符号的折纸印刷

## 安装

```sh
npm install @financial-times/o3-editorial-typography
```

也可以使用：`pnpm add @financial-times/o3-editorial-typography`、`yarn add @financial-times/o3-editorial-typography`、`bun add @financial-times/o3-editorial-typography`

## README

# o3 编辑-打字法

编辑内容的打字风格.

-   [o3 编辑-打字法](https://npmcn.com/package/%40financial-times/o3-editorial-typography/#readme-o3-editorial-typography)
    -   [概览](https://npmcn.com/package/%40financial-times/o3-editorial-typography/#readme-overview)
    -   [标记](https://npmcn.com/package/%40financial-times/o3-editorial-typography/#readme-markup)
        -   [标题样式](https://npmcn.com/package/%40financial-times/o3-editorial-typography/#readme-heading-styles)
            -   [HTML 语言](https://npmcn.com/package/%40financial-times/o3-editorial-typography/#readme-html)
            -   [联合来文十](https://npmcn.com/package/%40financial-times/o3-editorial-typography/#readme-jsx)
        -   [身体和头盔](https://npmcn.com/package/%40financial-times/o3-editorial-typography/#readme-body-and-dropcap)
            -   [HTML 语言](https://npmcn.com/package/%40financial-times/o3-editorial-typography/#readme-html-1)
            -   [联合来文十](https://npmcn.com/package/%40financial-times/o3-editorial-typography/#readme-jsx-1)
        -   [编辑细节样式](https://npmcn.com/package/%40financial-times/o3-editorial-typography/#readme-editorial-detail-styles)
            -   [主题标记](https://npmcn.com/package/%40financial-times/o3-editorial-typography/#readme-topic-tag)
            -   [先站起来](https://npmcn.com/package/%40financial-times/o3-editorial-typography/#readme-standfirst)
            -   [内容提要](https://npmcn.com/package/%40financial-times/o3-editorial-typography/#readme-summary)
            -   [说明](https://npmcn.com/package/%40financial-times/o3-editorial-typography/#readme-caption)
            -   [按线](https://npmcn.com/package/%40financial-times/o3-editorial-typography/#readme-byline)
        -   [引用](https://npmcn.com/package/%40financial-times/o3-editorial-typography/#readme-quote)
        -   [大数字](https://npmcn.com/package/%40financial-times/o3-editorial-typography/#readme-big-number)
        -   [名单](https://npmcn.com/package/%40financial-times/o3-editorial-typography/#readme-lists)
    -   [主题修改符](https://npmcn.com/package/%40financial-times/o3-editorial-typography/#readme-theme-modifiers)
    -   [移徙](https://npmcn.com/package/%40financial-times/o3-editorial-typography/#readme-migration)
    -   [联系人](https://npmcn.com/package/%40financial-times/o3-editorial-typography/#readme-contact)
    -   [许可证](https://npmcn.com/package/%40financial-times/o3-editorial-typography/#readme-licence)

## 概览

`o3-editorial-typography` 为编辑内容提供打印样式。 它支持以下品牌:

-   `core`
-   `sustainable-view`

用户界面的打字法见 [o3-打字法](https://github.com/Financial-Times/origami/tree/main/components/o3-typography)。 。 。 .

## 标记

o3 编辑-打字支持 [用于反应用户的JSX模板](https://npmcn.com/package/%40financial-times/o3-editorial-typography/#readme-jsx),或直接 HTML。 我们建议尽可能使用JSX.

### 标题样式

标题样式有5个不同类型.

| 类型 | 选择器 | 页:1 |
| :-: | :-: | :-: |
| 显示 | .o3 编辑-打字-播放 | 添加数据 `data-o3-editorial-underline` 下划线属性. |
| 标题 | .o3-编辑-打字-标题 |  |
| 章 次 页 次 | .o3-编辑-打字-分章 |  |
| 分标题 | .o3-编辑-打字-子标题 |  |
| 标签 | .o3-编辑-打字-标签 |  |

#### HTML 语言

```html
<h1 class="o3-editorial-typography-display" data-o3-editorial-underline>
    Large headline
</h1>

<h1 class="o3-editorial-typography-headline">Headline</h1>

<h2 class="o3-editorial-typography-chapter">Chapter</h2>

<h3 class="o3-editorial-typography-subheading">Subheading</h3>

<h3 class="o3-editorial-typography-label">Label</h3>
```

#### 联合来文十

同样的标题样式也可以在 JSX 环境中使用,也可以导入 `<Headline>` 组件和应用 `type` 修饰相. 该组件作为通用js模块和es模块输出。 根据您的工程设置, 您可以从 `/cjs` 或者说 `/esm` 目录.

```jsx
import { Headline } from '@financial-times/o3-editorial-typography/cjs';

<Headline type="display" underline={true}>Large headline</Headline>
<Headline type="headline">Headline</Headline>
<Headline type="chapter">Chapter</Headline>
<Headline type="subheading">Subheading</Headline>
<Headline type="label">Label</Headline>

```

`<Headline>` 道具 :

++ Project ++ 类型 ++ 默认 ++ 说明 |------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------- - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - qq 类型qq `display` | `headline` | `chapter` | `subheading` | `label` | `headline` \* \* 标题类型 主题 `standard` | `inverse` \* \* \* \* \* \* \* 标题主题 {\\fn黑体\\fs22\\bord1\\shad0\\3ahbe\\4ah00\\fscx67\\fscy66\\2chffffff\\3ch808080}用下划线 `boolean` | `false` 在标题中添加下划线 。 仅有效 `display`。 。 。

### 身体和头盔

`o3-foundation` 提供打字机使用符号,包括编辑机构副本(见 `o3-type-body-content-*` (第1条). `o3-editorial-typography` 在此基础上,通过提供一种可选的倒盖样式, `o3-editorial-typography-drop-cap`。 。 。 .

#### HTML 语言

```html
<p class="o3-editorial-typography-drop-cap o3-type-body-content-base">
    This is a small paragraph of text with a drop cap.
</p>
```

#### 主题标记

也叫显示标签,是FT中的分类标签. 用于取笑者(物品卡)来表示职位的类别. 主题标记通常是一个锚,但如果没有页面链接则不必是. 纯 HTML 标记如下:

```html
<a class="o3-editorial-typography-topic-tag" href="#">Topic Link</a>
<span class="o-editorial-typography-topic-tag">Topic Without Link</span>
```

或 JSX 导入:

```jsx
import {TopicTag} from '@financial-times/o3-editorial-typography/cjs'; // or /esm

<TopicTag href="#">Topic Link</TopicTag>
<TopicTag>Topic Without Link</TopicTag>
```

`<TopicTag>` 道具 :

| Prop | 类型 | 默认 | 说明 |
| :-: | :-: | :-: | :-: |
| 小时 | `string` | \- 说吧 | 链接主题标签的 URL 。 存在 `href` prop 将确定已渲染元素标签 |
| 主题 | `standard` | `inverse` | `standard` | 主题标签 . |

主题标签的颜色和徘徊颜色可以通过使用下列 CSS 变量来定制:

| 变量 | 说明 | 默认 |
| :-: | :-: | :-: |
| `--o3-editorial-typography-topic-tag-color` | 主题标签的颜色 | `claret` - 为核心 |
| `--o3-editorial-typography-topic-tag-hover-color` | 主题标签的色彩 | `claret-30` - 为核心 |

#### 先站起来

标题下面的简短的介绍,提供一个员额的背景。 与上部组件中的页眉结合使用. 纯 HTML 标记如下:

```html
<p class="o3-editorial-typography-standfirst">Standfirst</p>
```

或 JSX 导入:

```jsx
import {Standfirst} from '@financial-times/o3-editorial-typography/cjs'; // or /esm

<Standfirst>Standfirst</Standfirst>;
```

`<Standfirst>` 道具 :

| Prop | 类型 | 默认 | 说明 |
| :-: | :-: | :-: | :-: |
| 主题 | `standard` | `inverse` | `standard` | 站立第一的主题. |

#### 内容提要

用于提供文章的简明摘要,为关键要点提供快速,高层次的概述. 它使读者能够不读整篇文章而掌握主要思想.

```html
<p class="o3-editorial-typography-summary">Summary</p>
```

或 JSX 导入:

```jsx
import {Summary} from '@financial-times/o3-editorial-typography/cjs'; // or /esm

<Summary>Summary</Summary>;
```

#### 说明

欲获取关于一件或多件图像的额外信息,这些信息应不那么突出。 纯 HTML 标记如下:

```html
<figcaption class="o3-editorial-typography-caption">Caption</figcaption>
```

或 JSX 导入:

```jsx
import {Caption} from '@financial-times/o3-editorial-typography/cjs'; // or /esm

<Caption>Caption</Caption>;
```

`<Caption>` 道具 :

| Prop | 类型 | 默认 | 说明 |
| :-: | :-: | :-: | :-: |
| 主题 | `standard` | `inverse` | `standard` | 标题的主题 . |

#### 按线

Byline是一个包含作者名称,位置和时间戳的复合组件. 它用于在编辑内容中显示作者细节.

作者名称通常是一个锚地,但如果没有页面链接则不必被. 纯 HTML 标记如下:

```html
<div class="o3-editorial-typography-byline">
    <a class="o3-editorial-typography-byline-author" href="#">Joe Doe</a> in
    London
    <time
        class="o3-editorial-typography-byline-timestamp"
        datetime="2019-10-11T20:51:54Z"
        title="October 11 2019 9:51 pm"
        >October 11 2019</time
    >
</div>
```

或 JSX 导入:

```jsx
import {Byline} from '@financial-times/o3-editorial-typography/cjs'; // or /esm

<Byline>
    <a className="o3-editorial-typography-byline-author" href="#">
        Joe Doe
    </a>
    {''} in London {''}
    <time
        className="o3-editorial-typography-byline-timestamp"
        dateTime="2019-10-11T20:51:54Z"
        title="October 11 2019 9:51 pm">
        October 11 2019
    </time>
</Byline>;
```

`<Byline>` 道具 :

| Prop | 类型 | 默认 | 说明 |
| :-: | :-: | :-: | :-: |
| 主题 | `standard` | `inverse` | `standard` | 下行主题. |

可以通过使用下列 CSS 变量来定制旁线作者颜色和徘徊颜色 :

| 变量 | 说明 | 默认 |
| :-: | :-: | :-: |
| `--o3-editorial-typography-byline-author-color` | 旁线作者的颜色 | `claret` - 为核心 |
| `--o3-editorial-typography-byline-author-hover-color` | 旁线作者的色彩 | `claret-30` - 为核心 |

### 引用

引文是一个包含引文,作者和标题的复合组件. 用来显示一个人直接说的词. 它有两种类型: `block` 财务报告和审定财务报表 `pull`两者的区别在于 `block` 引文左侧有垂直行,而 `pull` 引文没有。 纯 HTML 标记如下:

```html
<blockquote class="o3-editorial-typography-blockquote">
    <p>
        Origami is about empowering developers of all levels to build robust,
        on-brand products ranging from simple static sites through to rich, dynamic
        web applications, to do it faster, to do it cheaper, and leave them more
        supportable and more maintainable.
    </p>
    <cite>
        <span class="o3-editorial-typography-blockquote__author">Quote Author</span>
        <span class="o3-editorial-typography-blockquote__caption"
            >Quote Source</span
        >
    </cite>
</blockquote>
```

或 JSX 导入:

```jsx
import {Quote} from '@financial-times/o3-editorial-typography/cjs'; // or /esm

<Quote
    type="pull"
    quoteAuthor="Quote Author"
    quoteSource="Quote Source"
    quoteIcon={true}>
    Origami is about empowering developers of all levels to build robust, on-brand
    products ranging from simple static sites through to rich, dynamic web
    applications, to do it faster, to do it cheaper, and leave them more
    supportable and more maintainable.
</Quote>;
```

`<Quote>` 道具 :

| Prop | 类型 | 默认 | 说明 |
| :-: | :-: | :-: | :-: |
| 类型 | `block` | `pull` | `block` | 引文总相. |
| 引用授权 | `string` | \- 说吧 | 引文作者. |
| 引用来源 | `string` | \- 说吧 | 引文出处. |
| 引号Icon | `boolean` | `true` | 在引用中添加图标. |
| 主题 | `standard` | `inverse` | `standard` | 引文的主题. |

### 大数字

Big Number是一个包含大量和标签的复合组件. 它被用来描述编辑内容中的大量数字. 纯 HTML 标记如下:

```html
<div class="o3-editorial-typography-big-number">
    <div class="o3-editorial-typography-big-number__title">£27,5m</div>
    <div class="o3-editorial-typography-big-number__content">
        Cost expected to increase by £13.7m a year.
    </div>
</div>
```

```jsx
import {BigNumber} from '@financial-times/o3-editorial-typography/cjs'; // or /esm

<BigNumber title="£27,5m">
    Cost expected to increase by £13.7m a year.
</BigNumber>;
```

`<BigNumber>` 道具 :

| Prop | 类型 | 默认 | 说明 |
| :-: | :-: | :-: | :-: |
| 标题 | `string` | \- 说吧 | 大数字的标题. |
| 主题 | `standard` | `inverse` | `standard` | 大数字的主题. |

### 名单

`o3-editorial-typography` 支持命令和未命令的清单。 使用类 `o3-editorial-typography-list-ordered` 或者说 `o3-editorial-typography-list-unordered`。 。 。 .

列表可能用于不同的上下文,它们继承了大小和家族等字体属性. 因此它需要将字体样式应用到母元素上. 例如,可以用下列方法做到这一点: `o3-editorial-typography-body`数字 :

```html
<div class="o3-editorial-typography-body">
    <ol class="o3-editorial-typography-list-ordered">
        <li>Lorem ipsum adipiscing elit.</li>
        <li>Sed feugiat turpis at massa tristique.</li>
        <li>Curabitu r accumsan elit luctus.</li>
    </ol>
</div>
```

```jsx
import {Body, List} from '@financial-times/o3-editorial-typography/cjs'; // or /esm

<Body>
    <List
        type="ordered"
        listItems={[
            'Lorem ipsum adipiscing elit.',
            'Sed feugiat turpis at massa tristique.',
            'Curabitu r accumsan elit luctus.',
        ]}
    />
</Body>;
```

`<List>` 道具 :

| Prop | 类型 | 默认 | 说明 |
| :-: | :-: | :-: | :-: |
| 类型 | `ordered` | `unordered` | \- 说吧 | 列表类型 . |
| 主题 | `standard` | `inverse` | `standard` | 列表的主题 . |
| 列表项目 | `Array<string>` | \- 说吧 | 列出项目. |

## 主题修改符

所有组件都可以有主题修饰符. 默认,主题是 `standard` 无需这样做. `o3-editorial-typography` 还支持 `inverse` 主题。 添加中 `data-o3-theme="inverse"` 改为折叠元素,或者在元素本身将文本的颜色改为白色。 反向主题得到所有导出组件的支持. 纯 HTML 标记如下:

```html
<h3 class="o3-editorial-typography-label" data-o3-theme="inverse">Label</h3>
```

或者如果你使用 JSX 模板,主题可以作为主题道具传递:

```tsx
import {Heading} from '@financial-times/o3-editorial-typography/cjs';

<Heading type="headline" theme="inverse">
    Headline
</Heading>;
```

## 移徙

| 状态 | 主要版本 | 最后一个小版本 | 移徙指南 |
| :-: | :-: | :-: | :-: |
| 活动 | 3个 | 不详 | [迁移到 v3](https://npmcn.com/package/%40financial-times/o3-editorial-typography/MIGRATION.md#migrating-from-v2-to-v3) |
| 已贬值 | 2个 | 第2.3条 | [迁移到 v2](https://npmcn.com/package/%40financial-times/o3-editorial-typography/MIGRATION.md#migrating-from-v1-to-v2) |
| 已贬值 | 1个 | \- 说吧 | 不详 |

## 联系人

如果您对本部分有任何问题或评论,或需要帮助使用本部分,请 [提出问题](https://github.com/Financial-Times/o3-editorial-typography/issues)访问 [#origami - 支持](https://financialtimes.slack.com/messages/origami-support/) 或电子邮件 [折纸支持](mailto:origami-support@ft.com)。 。 。 .

* * *

## 许可证

本软件由金融时报根据以下规定出版: [麻省理工学院许可证](http://opensource.org/licenses/MIT)。 。 。 .

## 常见问题

### @financial-times/o3-editorial-typography 是什么？

带有设计符号的折纸印刷

### 如何安装 @financial-times/o3-editorial-typography？

在项目目录运行 npm install @financial-times/o3-editorial-typography，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：@financial-times/o3-foundation（^3\.0\.0）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。

### @financial-times/o3-editorial-typography 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @financial-times/o3-editorial-typography 支持 ESM 还是 CommonJS？

同时提供 ES Module 与 CommonJS 入口，import 和 require\(\) 都可以使用，打包工具会自动选择合适的版本。

### @financial-times/o3-editorial-typography 可以商用吗？

@financial-times/o3-editorial-typography 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @financial-times/o3-editorial-typography 的下载量有多少？

根据 npm 官方下载统计，@financial-times/o3-editorial-typography 在 2026/10/15 – 2026/11/13 这 30 天内被下载 3,395 次，日均约 113 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @financial-times/o3-editorial-typography 还在维护吗？

最新版本 3\.2\.2 发布于 2025/06/30（1\.4 年前）；至今共发布 21 个版本，其中过去 12 个月发布了 0 个；首次发布于 2024/05/22。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

