Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > Non-English Discussions > Forum Français > Software

Notices

Reply
 
Thread Tools Search this Thread
Old 03-30-2010, 08:03 AM   #1
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)
Smile Sigil et la feuille de style

Bonjour

Je ne suis pas sûr de posséder tout le vocabulaire, menfin je me lance.

J'ouvre avec Sigil un gros fichier au format xhtml. Dans ce fichier, il y a bien sûr un en-tête avec notamment un élément appelé style.

J'aimerais
- placer cet élément avec ses attributs dans la feuille de style annexe (Styles) et
- dans l'en-tête du fichier xhtml remplacer l'élément disparu par un lien vers la feuille de style annexe.

Si je réussis cette manip, il me semble que je pourrai ensuite fractionner mon fichier xhtml en 50 chapitres sans avoir à répéter 50 fois le contenu de l'élément style.

Le diable étant dans les détails, je me suis planté plusieurs fois en essayant cela et j'ai besoin de conseils pratiques.

Ce que je sais:
Un clic droit dans la boite "Styles" permet de créer un nouvel item, nommé par exemple Style0001.css.

Ensuite j'ai tenté de copier et coller l'élément Style dans l'item en question et d'ajouter un lien de ce genre dans l'en-tête.
<link rel="stylesheet" href="../Styles/Style0001.css" type="text/css" />

Cela n'a pas fonctionné et je me suis retrouvé sans feuille de style fonctionnelle. Quelques conseils?
roger64 is offline   Reply With Quote
Old 03-30-2010, 10:44 AM   #2
EowynCarter
Wizard
EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.EowynCarter ought to be getting tired of karma fortunes by now.
 
Posts: 4,332
Karma: 4000000
Join Date: Oct 2008
Location: Paris
Device: Cybooks; Sony PRS-T1
Quote:
<link rel="stylesheet" href="../Styles/Style0001.css" type="text/css" />
Cette balise doit apparaitre dans tout tes fichiers xhtml, et entre les deux balises head.

Dans mon cas <link rel="stylesheet" href="../Styles/toto.css" type="text/css" /> marche efectivement.
EowynCarter is offline   Reply With Quote
Old 03-30-2010, 11:01 AM   #3
zelda_pinwheel
zeldinha zippy zeldissima
zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.
 
zelda_pinwheel's Avatar
 
Posts: 27,827
Karma: 921169
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
vérifie que tu n'as pas conservé, dans ton fichier .css, les balises < style > dans le head du fichier xhtml.

vérifie aussi que tu n'as pas fait de coquille dans ton chemin de fichier, nom de fichier, nom du dossier. tout ce code est sensible à la casse, donc si ton fichier s'appelle Styles.css tu ne peux pas écrire "styles.css" dans ton lien.

sinon, normalement ça devrait marcher...
zelda_pinwheel is offline   Reply With Quote
Old 03-30-2010, 09:23 PM   #4
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)
Merci beaucoup de vos réponses et de vos conseils.

J'y suis finalement douloureusement parvenu. L'une de ces deux choses à réglé le problème.
- L'adresse du lien dans l'attribut href se terminait par un slash si anodin...
- L'autre, est que j'ai rajouté cette ligne sur la feuille de style:
@namespace h "http://www.w3.org/1999/xhtml";

J'ai un peu honte mais au moins la leçon a porté. Le diable est bien dans les détails. Si ça peut inspirer un pur débutant, je joins la V3
Evidemment, il n' y a pas de gain de place parce que le fichier n'est pas suffisamment gros pour mériter d'être fractionné.

J'ai lu que Valloric a promis pour les versions suivantes la mise en place automatique de la feuille de style. Ce sera un vrai soulagement. Vous commencez à comprendre pourquoi je privilégie le GUI...

Nota: il faudrait une v4 en fait. J'avais rajouté dans la feuille de style la ligne
@namespace h "http://www.w3.org/1999/xhtml";
parce que je l'avais vu dans d'autres epub et que ça me paraissait bien. En fait, dans ce cas précis, cela provoque un défaut de visualisation de la police Times New Roman. On perd l'option serif et elle est remplacée par autre chose.

Ne me demandez pas pourquoi. Pour retrouver le serif bien aimé (joli, hein?) il suffit de supprimer cette ligne. Je fais donc l'économie de la v4. Mais si quelqu'un a une explication..
Attached Files
File Type: epub Essai avec imagesV2.epub (143.0 KB, 657 views)
File Type: epub Essai avec imagesV3.epub (143.3 KB, 617 views)

Last edited by roger64; 03-31-2010 at 09:08 AM. Reason: solution trouvée raaah!
roger64 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dressing Up In Style thymaster Sony Reader 53 10-10-2010 10:09 AM
Sigil Style Sheets crutledge Sigil 3 10-06-2010 08:48 AM
Style Chooser poohbear_nc Feedback 2 04-14-2010 11:07 AM
Mobi TOC style vs ePub style? phearlez Kindle Formats 3 04-11-2010 06:35 AM
iLiad Widget style tomchek iRex Developer's Corner 5 08-02-2007 11:16 AM


All times are GMT -4. The time now is 10:51 PM.


MobileRead.com is a privately owned, operated and funded community.