Skip to content

Commit

Permalink
Added a layout section to EPUB profile
Browse files Browse the repository at this point in the history
related to #86
  • Loading branch information
HadrienGardeur committed Jun 25, 2024
1 parent 317aafc commit 8facb0c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 20 deletions.
23 changes: 12 additions & 11 deletions profiles/epub.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ While EPUB publications can mostly be converted directly to the Readium Web Publ

This profile is meant to facilitate backward compatibility with EPUB and ensure that these specialized elements are not lost when converting to the Readium Web Publication Manifest.

This profile relies on:

* a declaration of [conformance](#1-declaring-conformance-with-the-epub-profile),
* some [restrictions on the resources of the readingOrder](#2-restrictions-on-the-resources-of-the readingorder),
* the definition of additional [collection roles](#3-collection-roles), [metadata elements](#4-metadata) and [link properties](#5-link-properties),
* the use of the [encryption module](../modules/encryption.md).

## 1. Declaring conformance with the EPUB Profile

Expand All @@ -32,7 +26,15 @@ A Readium Web Publication Manifest that conforms to the EPUB Profile <strong cla

While EPUB itself allows SVG and other formats as long as an XHTML fallback is provided, this is not the case for this profile, which requires to reverse the fallback chain.

## 3. Collection Roles
## 3. Layout

The [`layout`](../contexts/default/README.md#layout-and-reading-progression) of a publication that conforms to the EPUB profile defaults to `reflowable`.

This profile also supports fixed layout publications where the `layout` property is set to `fixed` for the entire publication.

This behaviour can be overriden by specific resources in the reading order using the `layout` property, [as defined in this document](#layout).

## 4. Collection Roles

| Role | Semantics | Compact? | Required? |
| ----- | --------- | -------- | --------- |
Expand All @@ -43,7 +45,7 @@ While EPUB itself allows SVG and other formats as long as an XHTML fallback is p
| lov | Identifies the collection that contains a list of videos. | Yes | No |
| pageList | Identifies the collection that contains a list of pages. | Yes | No |

## 4. Metadata
## 5. Metadata

| Key | Semantics | Type |
| ----- | --------- | -------- |
Expand All @@ -69,7 +71,7 @@ In the context of the Readium Web Publication Manifest, these dedicated elements
- and a dedicated element for [`narrator`](../contexts/default/#contributors)


## 5. Link Properties
## 6. Link Properties

This profile defines additional Link properties:

Expand Down Expand Up @@ -107,9 +109,8 @@ While the media type is the main way to identify the nature of a resource in a L

### layout

The `layout` property defaults to `reflowable` for text resources and `fixed` for images or videos.
By default, each item in the `readingOrder` follows the `layout` specified in `metadata` but the EPUB profile allow content creators to override this behaviour using the `layout` property on specific resources.

Using `fixed` it can also indicate that an HTML document has a viewport with a fixed size.

```
{
Expand Down
3 changes: 0 additions & 3 deletions properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,8 @@ The `page` property is meant to provide a hint to reading systems that rely on s

| Key | Semantics | Type | Values | Reference |
| ----- | --------- | -------- | --------- | --------- |
| [`clipped`](/modules/presentation.md#clipped) | Specifies whether or not the parts of a linked resource that flow out of the viewport are clipped. | Boolean | `true` or `false` | [Presentation Hints](/modules/presentation.md) |
| [`contains`](/profiles/epub.md#contains) | Indentifies content contained in the linked resource, that cannot be strictly identified using a media type. | Array | `mathml`, `onix`, `remote-resources`, `js`, `svg` or `xmp` | [EPUB Profile](/profiles/epub.md#properties) |
| [`fit`](/modules/presentation.md#fit) | Specifies constraints for the presentation of a linked resource within the viewport. | String | `contain`, `cover`, `width` or `height` | [Presentation Hints](/modules/presentation.md) |
| [`layout`](/profiles/epub.md#layout) | Hint about the nature of the layout for the linked resources. | String | `fixed` or `reflowable` | [EPUB Profile](/profiles/epub.md#properties) |
| [`orientation`](/modules/presentation.md#orientation) | Suggested orientation for the device when displaying the linked resource. | String | `auto`, `landscape` or `portrait` | [Presentation Hints](/modules/presentation.md) |
| [`encrypted`](/modules/encryption.md) | Indicates how a given resource has been encrypted or obfuscated. | [Encryption Object](/modules/encryption.md#encryption-object) | See the definition of the Encryption Object | [Encryption Module](/modules/encryption.md) |

## OPDS 2.0
Expand Down
12 changes: 6 additions & 6 deletions roles.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ The Readium Web Publication Manifest specification defines the following roles f

| Role | Definition | Compact Collection? | Required? | Reference |
| ----- | ---------- | ------------------- | --------- | --------- |
| `landmarks` | Identifies the collection that contains a list of points of interest. | Yes | No | [EPUB Profile](profiles/epub.md#collection-roles) |
| `loa` | Identifies the collection that contains a list of audio resources. | Yes | No | [EPUB Profile](profiles/epub.md#collection-roles) |
| `loi` | Identifies the collection that contains a list of illustrations. | Yes | No | [EPUB Profile](profiles/epub.md#collection-roles) |
| `lot` | Identifies the collection that contains a list of tables. | Yes | No | [EPUB Profile](profiles/epub.md#collection-roles) |
| `lov` | Identifies the collection that contains a list of videos. | Yes | No | [EPUB Profile](profiles/epub.md#collection-roles) |
| `pageList` | Identifies the collection that contains a list of pages. | Yes | No | [EPUB Profile](profiles/epub.md#collection-roles) |
| `landmarks` | Identifies the collection that contains a list of points of interest. | Yes | No | [EPUB Profile](profiles/epub.md#4-collection-roles) |
| `loa` | Identifies the collection that contains a list of audio resources. | Yes | No | [EPUB Profile](profiles/epub.md#4-collection-roles) |
| `loi` | Identifies the collection that contains a list of illustrations. | Yes | No | [EPUB Profile](profiles/epub.md#4-collection-roles) |
| `lot` | Identifies the collection that contains a list of tables. | Yes | No | [EPUB Profile](profiles/epub.md#4-collection-roles) |
| `lov` | Identifies the collection that contains a list of videos. | Yes | No | [EPUB Profile](profiles/epub.md#4-collection-roles) |
| `pageList` | Identifies the collection that contains a list of pages. | Yes | No | [EPUB Profile](profiles/epub.md#4-collection-roles) |


## OPDS 2.0
Expand Down

0 comments on commit 8facb0c

Please sign in to comment.