翻译:Wu Gang
原文地址:https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/
专题主页 | 专题列表
用例
您有一份日语文本,通常会从右到左阅读(在读者的右侧装订);或者一本日记笔记,在纸的长边上书写,那么要从上到下阅读(远离读者装订译者注:即在上方装订)。 通过使用 viewingDirection,您可以将阅读方向传达给符合要求的客户端,允许它分别从右到左和从上到下将内容呈现给读者。
viewDirection 属性告诉展示客户端如何向查看器显示资源序列的一部分。 它允许用于 IIIF Collection(集合)、Manifest(清单)和 Range(范围)资源,但在其他类型的资源上则是无效的属性。当属性是 Collection 或 Manifest 的一部分时,推荐客户端处理它;当属性是 Range 的一部分时可选处理它;如果用于其他资源类型,则推荐忽略它。
viewDirection 的可能值是 left-to-right(未指定该属性时的缺省值)、right-to-left、top-to-bottom 和 bottom-to-top。 请特别注意,这是视图的视觉布局,而不是视图的方向,也不是所表示对象的视图的任何视觉材料的布局或方向。
viewDirection 属性可以告知客户端各种资源安排的适当展示顺序和导航提示。 示例包括手稿中的页面序列、卷轴的所有视图或一套多本书。
尽管下面的示例 Manifest 使用 items 属性来包含表示组成对象的视图的阅读顺序的 Canvas(画布),但 viewingDirection 属性的权重应该大于视图的 Manifest 顺序。
实施说明
除了viewingDirection 之外,您可能还想使用 behavior 属性(另请参阅手册(分页变化)专题),具体取决于查看资源的预期用户体验或物理对象及其数字代理的特性。 一本书最常见的 behavior 值是 paged。 viewDirection 和behavior 之间的交互,尤其是当它们设置在多个和/或分层有序的资源上时,需要特别注意。 建议您仔细阅读展示 3.0 规范的 behavior,并与未来版本保持同步。
限制
示例 1: viewingDirection right-to-left
本 Manifest 展示了从嘉永2年五月(1849年5月)起,在大阪筑后剧院举行的歌舞伎表演“秋葉権現廻船話”、“双蝶々曲輪日記”和“五大力恋緘”的节目单。译者注:参见https://calisphere.org/item/1c26b425-97c3-42ba-8479-6cf2a6c45861/
JSON-LD | Universal Viewer 内查看 | 在 Mirador 内查看
{
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/manifest-rtl.json",
"type": "Manifest",
"label": {
"en": [
"Book with Right-to-Left Viewing Direction"
]
},
"summary": {
"en": [
"Playbill for \"Akiba gongen kaisen-banashi,\" \"Futatsu chōchō kuruwa nikki\" and \"Godairiki koi no fūjime\" performed at the Chikugo Theater in Osaka from the fifth month of Kaei 2 (May, 1849); main actors: Gadō Kataoka II, Ebizō Ichikawa VI, Kitō Sawamura II, Daigorō Mimasu IV and Karoku Nakamura I; on front cover: producer Mominosuke Ichikawa's crest."
]
},
"viewingDirection": "right-to-left",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/p1",
"type": "Canvas",
"label": {
"en": [
"front cover"
]
},
"width": 3497,
"height": 4823,
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/page/p1/1",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/annotation/p0001-image",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_001/full/max/0/default.jpg",
"type": "Image",
"format": "image/jpeg",
"height": 4823,
"width": 3497,
"service": [
{
"id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_001",
"type": "ImageService3",
"profile": "level1"
}
]
},
"target": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/p1"
}
]
}
]
},
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/p2",
"type": "Canvas",
"label": {
"en": [
"pages 1–2"
]
},
"width": 6062,
"height": 4804,
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/page/p2/1",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/annotation/p0002-image",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_002/full/max/0/default.jpg",
"type": "Image",
"format": "image/jpeg",
"width": 6062,
"height": 4804,
"service": [
{
"id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_002",
"type": "ImageService3",
"profile": "level1"
}
]
},
"target": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/p2"
}
]
}
]
},
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/p3",
"type": "Canvas",
"label": {
"en": [
"pages 3–4"
]
},
"width": 6127,
"height": 4776,
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/page/p3/1",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/annotation/p0003-image",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_003/full/max/0/default.jpg",
"type": "Image",
"format": "image/jpeg",
"width": 6127,
"height": 4776,
"service": [
{
"id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_003",
"type": "ImageService3",
"profile": "level1"
}
]
},
"target": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/p3"
}
]
}
]
},
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/p4",
"type": "Canvas",
"label": {
"en": [
"pages 5–6"
]
},
"width": 6124,
"height": 4751,
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/page/p4/1",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/annotation/p0004-image",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_004/full/max/0/default.jpg",
"type": "Image",
"format": "image/jpeg",
"width": 6124,
"height": 4751,
"service": [
{
"id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_004",
"type": "ImageService3",
"profile": "level1"
}
]
},
"target": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/p4"
}
]
}
]
},
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/p5",
"type": "Canvas",
"label": {
"en": [
"back cover"
]
},
"width": 3510,
"height": 4808,
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/page/p5/1",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/annotation/p0005-image",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_005/full/max/0/default.jpg",
"type": "Image",
"format": "image/jpeg",
"width": 3510,
"height": 4808,
"service": [
{
"id": "https://iiif.io/api/image/3.0/example/reference/4f92cceb12dd53b52433425ce44308c7-ucla_bib1987273_no001_rs_005",
"type": "ImageService3",
"profile": "level1"
}
]
},
"target": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/p5"
}
]
}
]
}
]
}
示例 2: viewingDirection top-to-bottom
本 Manifest 代表了美国长途自行车手威廉·刘易斯·萨赫勒本(William Lewis Sachtleben)日记的一部分,他于 1891 年至 1892 年与华盛顿大学同学小托马斯·盖斯凯尔·艾伦(Thomas Gaskell Allen Jr.)从伊斯坦布尔骑车穿越亚洲到达北京。
JSON-LD | 在 Universal Viewer 中查看 | 在 Mirador 中查看
{
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/manifest-ttb.json",
"type": "Manifest",
"label": {
"en": [
"Diary with Top-to-Bottom Viewing Direction"
]
},
"summary": {
"en": [
"William Lewis Sachtleben was an American long-distance cyclist who rode across Asia from Istanbul to Peking in 1891 to 1892 with Thomas Gaskell Allen Jr., his classmate from Washington University. This was part of a longer journey that began the day after they had graduated from college, when they travelled to New York and on to Liverpool; in all they travelled 15,044 miles by bicycle, 'the longest continuous land journey ever made around the world' as reported in their book <cite>Across Asia on a bicycle</cite> (1895). Sachtleben documented his travels with photographs and diaries, the latter of which he numbered sequentially. The diary of notebook 'No. 10' covers a portion of their journey through the Armenian area of Turkey from April 12 to May 9 (there is a 2-page reading list at the end). During this time they rode from Ankara (Angora in the diary) to Sivas, where they stayed for ten days while Allen had a bout of typhoid fever, and the first half of a ten-day excursion to Merzifon (Mersovan in the diary), taken by Sachtleben to give Allen additional time to recover."
]
},
"viewingDirection": "top-to-bottom",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/v1",
"type": "Canvas",
"label": {
"en": [
"image 1"
]
},
"width": 2251,
"height": 3152,
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/page/v1/1",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/annotation/v0001-image",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "https://iiif.io/api/image/3.0/example/reference/9ee11092dfd2782634f5e8e2c87c16d5-uclamss_1841_diary_07_02/full/max/0/default.jpg",
"type": "Image",
"format": "image/jpeg",
"width": 2251,
"height": 3152,
"service": [
{
"id": "https://iiif.io/api/image/3.0/example/reference/9ee11092dfd2782634f5e8e2c87c16d5-uclamss_1841_diary_07_02",
"type": "ImageService3",
"profile": "level1"
}
]
},
"target": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/v1"
}
]
}
]
},
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/v2",
"type": "Canvas",
"label": {
"en": [
"image 2"
]
},
"width": 2268,
"height": 3135,
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/page/v2/1",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/annotation/v0002-image",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "https://iiif.io/api/image/3.0/example/reference/9ee11092dfd2782634f5e8e2c87c16d5-uclamss_1841_diary_07_03/full/max/0/default.jpg",
"type": "Image",
"format": "image/jpeg",
"width": 2268,
"height": 3135,
"service": [
{
"id": "https://iiif.io/api/image/3.0/example/reference/9ee11092dfd2782634f5e8e2c87c16d5-uclamss_1841_diary_07_03",
"type": "ImageService3",
"profile": "level1"
}
]
},
"target": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/v2"
}
]
}
]
},
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/v3",
"type": "Canvas",
"label": {
"en": [
"image 3"
]
},
"width": 2274,
"height": 3135,
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/page/v3/1",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/annotation/v0003-image",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "https://iiif.io/api/image/3.0/example/reference/9ee11092dfd2782634f5e8e2c87c16d5-uclamss_1841_diary_07_04/full/max/0/default.jpg",
"type": "Image",
"format": "image/jpeg",
"width": 2274,
"height": 3135,
"service": [
{
"id": "https://iiif.io/api/image/3.0/example/reference/9ee11092dfd2782634f5e8e2c87c16d5-uclamss_1841_diary_07_04",
"type": "ImageService3",
"profile": "level1"
}
]
},
"target": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/v3"
}
]
}
]
},
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/v4",
"type": "Canvas",
"label": {
"en": [
"image 4"
]
},
"width": 2268,
"height": 3135,
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/page/v4/1",
"type": "AnnotationPage",
"items": [
{
"id": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/annotation/v0004-image",
"type": "Annotation",
"motivation": "painting",
"body": {
"id": "https://iiif.io/api/image/3.0/example/reference/9ee11092dfd2782634f5e8e2c87c16d5-uclamss_1841_diary_07_05/full/max/0/default.jpg",
"type": "Image",
"format": "image/jpeg",
"width": 2268,
"height": 3135,
"service": [
{
"id": "https://iiif.io/api/image/3.0/example/reference/9ee11092dfd2782634f5e8e2c87c16d5-uclamss_1841_diary_07_05",
"type": "ImageService3",
"profile": "level1"
}
]
},
"target": "https://iiif.io/api/cookbook/recipe/0010-book-2-viewing-direction/canvas/v4"
}
]
}
]
}
]
}
相关专题
- 专题手册(最简)
- 专题手册(分页变化) — 此处显示的对象是分页的,但也可以使用其他视图组合,包括连续的卷动和滚动。