View Single Post
Old 06-10-2013, 09:49 AM   #230
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Bonjour

Images en arrière-plan.

C'est une question qui m'a été posée il y a quelque temps. Il y a une réponse directe avec Sigil, à partir de l'utilisation de l'argument float:none.

L'objectif était de créer un catalogue d'images. Les images elles-mêmes sont placées en arrière-plan (en pleine page), avec un texte en surimpression, ce qui facilite les modifications et/ou recherches ultérieures.

Mode d'emploi.

Une fois que les images ont été insérées (peu importe la façon),
ouvrez le fichier EPUB avec Sigil:
- placez chaque image dans un container div ayant la classe bg
- A l'intérieur de l'image, rajoutez la classe background:
Ce qui apparaît ainsi dans le code xhtml (voir flèches rouges).

Dans la feuille de style CSS, inscrire:
Code:
.bg {float:none;width:auto; }
.background { float:none;height:0cm;text-align:left;}
L'EPUB test joint s'affiche correctement sur Kobo, calibre, ADE 1.7 et bien sûr Sigil.

NB1 - Cette technique est déjà mise en œuvre sur un convertisseur Windows (Amanuensis). Il ne s'agit ici que d'un exemple brut. Il est recommandé par ailleurs d'utiliser un wrapper SVG (voir plus bas).

NB2 - Bien que l'image reste en arrière-plan, il ne s'agit pas ici de la fonction CSS nommée background - d'un usage d'ailleurs plus complexe. Bref, c'est de l'arrière-plan sans être du background...

Ajouter un wrapper SVG

Là aussi il y a un moyen direct et simple avec Sigil 0.7.2. en utilisant le menu Outils/Ajouter une couverture.
En cas de besoin, déplacez le code créé. Autres précisions sur le manuel Sigil.
Attached Thumbnails
Click image for larger version

Name:	background.png
Views:	670
Size:	16.8 KB
ID:	106858  
Attached Files
File Type: epub Arriere-plan.epub (123.3 KB, 743 views)

Last edited by roger64; 06-14-2013 at 12:53 AM.
roger64 is offline   Reply With Quote