Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 03-20-2018, 04:09 PM   #301
manon123
Member
manon123 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Nov 2014
Device: Kobo glo
Notes de bas de page

Bonsoir,
Une question pour celles ou ceux qui font leurs epubs avec LO.
Comment faire pour ajouter une note de bas de page qui soit lisible de la même façon lors de la conversion avec Writer2xhtml ?

J'ai vi que c'était faisable en éditant certains ebooks commerciaux avec calibre, mais leurs méthodes de conversion ne sont pas les mêmes...

Merci.
manon123 is offline   Reply With Quote
Advert
Old 03-21-2018, 05:26 AM   #302
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,236
Karma: 2334301
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Bonjour

Je crée les notes de fin avec LO (insertion > note de fin) de façon tout à fait classique.

En ce qui concerne writer2xhtml, j'ai bien peur de ne pouvoir te donner une réponse générique. Je peux par contre t'expliquer précisément ce que je fais.

Depuis la sortie du greffon ODTImport de Sigil, je ne produis mes ePub3 qu'avec lui. J'utilise un fichier de configuration unique nommé config.xml qui remplace le GUI de writer2xhtml et ses écrans multiples.

Voici ce fichier:

Spoiler:

Code:
<?xml version="1.0" encoding="UTF-8" ?>
<config>
  <!-- Style options -->
  <option name="template_ids" value=",,," />
  <option name="pretty_print" value="true" />
  <option name="no_doctype" value="false" />
  <option name="encoding" value="UTF-8" />
  <option name="hexadecimal_entities" value="true" />
  <option name="use_named_entities" value="false" />
  <option name="add_bom" value="false" />
  <option name="multilingual" value="false" />
  <option name="separate_stylesheet" value="false" />
  <option name="custom_stylesheet" value="" />
  <!-- Control the conversion of formatting -->
  <option name="formatting" value="ignore_hard" />
  <option name="frame_formatting" value="ignore_hard" />
  <option name="section_formatting" value="ignore_hard" />
  <option name="table_formatting" value="ignore_hard" />
  <option name="table_size" value="relative" />
  <option name="list_formatting" value="css1" />
  <option name="tabstop_style" value="2em" />
  <option name="use_default_font" value="true" />
  <option name="default_font_name" value="LinLibertineG30" />
  <!-- Handling of dimensions -->
  <option name="convert_to_px" value="true" />
  <option name="scaling" value="100%" />
  <option name="column_scaling" value="100%" />
  <option name="image_size" value="relative" />
  <option name="relative_font_size" value="true" />
  <option name="font_scaling" value="100%" />
  <!-- Options for special content -->
  <option name="formulas" value="image+starmath" />
  <option name="use_mathjax" value="false" />
  <option name="embed_svg" value="true" />
  <option name="embed_img" value="false" />
  <option name="endnotes_heading" value="Notes" />
  <option name="footnotes_heading" value="Notes" />
  <option name="use_dublin_core" value="true" />
  <option name="notes" value="true" />
  <option name="display_hidden_text" value="false" />
  <option name="include_toc" value="true" />
  <option name="include_ncx" value="true" />
  <option name="float_objects" value="true" />
  <!-- AutoCorrect options -->
  <option name="ignore_double_spaces" value="false" />
  <option name="ignore_empty_paragraphs" value="false" />
  <option name="ignore_hard_line_breaks" value="false" />
  <!-- File options -->
  <option name="external_toc_depth" value="3" />
  <option name="split_level" value="2" />
  <option name="repeat_levels" value="5" />
  <option name="page_break_split" value="explicit" />
  <option name="split_after" value="0" />
  <option name="image_split" value="90%" />
  <option name="cover_image" value="false" />
  <option name="save_images_in_subdir" value="false" />
  <option name="uplink" value="" />
  <!-- Options specific for spreadsheet documents -->
  <option name="calc_split" value="false" />
  <option name="display_hidden_sheets" value="false" />
  <option name="display_hidden_rows_cols" value="false" />
  <option name="display_filtered_rows_cols" value="false" />
  <option name="apply_print_ranges" value="false" />
  <option name="use_title_as_heading" value="true" />
  <option name="use_sheet_names_as_headings" value="true" />
  <!-- Options for batch conversion -->
   <option name="directory_icon" value="" />
  <option name="document_icon" value="" />
  <!-- Style maps --> 
  <xhtml-style-map after="" before="" block-css="(none)" block-element="dl" css="(none)" element="dt" family="paragraph" name="List Heading" />
  <xhtml-style-map after="" before="" block-css="(none)" block-element="" css="(none)" element="address" family="paragraph" name="Sender" />
  <xhtml-style-map after="" before="" block-css="(none)" block-element="dl" css="(none)" element="dd" family="paragraph" name="List Contents" />
  <xhtml-style-map after="" before="" block-css="(none)" block-element="blockquote" css="(none)" element="p" family="paragraph" name="Quotations" />
  <xhtml-style-map after="" before="" block-css="(none)" block-element="" css="(none)" element="hr" family="paragraph" name="Horizontal Line" />
  <xhtml-style-map after="" before="" block-css="(none)" block-element="" css="(none)" element="pre" family="paragraph" name="Preformatted Text" />
  <xhtml-style-map after="" before="" block-css="(none)" block-element="" css="(none)" element="p" family="paragraph" name="Text body" />
  <xhtml-style-map after="" before="" css="(none)" element="em" family="text" name="Emphasis" />
  <xhtml-style-map after="" before="" css="(none)" element="var" family="text" name="Variable" />
  <xhtml-style-map after="" before="" css="(none)" element="code" family="text" name="Source Text" />
  <xhtml-style-map after="" before="" css="(none)" element="strong" family="text" name="Strong Emphasis" />
  <xhtml-style-map after="" before="" css="(none)" element="kbd" family="text" name="User entry" />
  <xhtml-style-map after="" before="" css="(none)" element="samp" family="text" name="Example" />
  <xhtml-style-map after="" before="" css="(none)" element="dfn" family="text" name="Definition" />
  <xhtml-style-map after="" before="" css="(none)" element="cite" family="text" name="Citation" />
  <xhtml-style-map after="" before="" css="(none)" element="tt" family="text" name="Teletype" />
  <xhtml-style-map css="(none)" element="sup" family="attribute" name="superscript" />
  <xhtml-style-map css="(none)" element="b" family="attribute" name="bold" />
  <xhtml-style-map css="(none)" element="i" family="attribute" name="italics" />
</config>


J'ai aussi l'habitude d'inclure automatiquement un fichier epub.css avec notamment quelques styles spécifiques pour les notes
Spoiler:

Code:
sup { 
 vertical-align: text-top;
 font-size: smaller;
}
a:link    {
 color: green;
 background-color: transparent;
 text-decoration: none
}
.noteanchor {
 margin-left: 5px;
 font-weight: normal;
 font-style: normal;
 font-size: smaller;
 vertical-align: text-top;
 color: green
}
.noteSymbol {
 font-size: 130%;
 font-weight: normal;
}
p.note {
  margin-top: 10px;
  font-size: 0.9em;
}


Une fois converti, j'utilise un groupe de regex avec l'éditeur de Calibre (question d'habitude). Quelques-unes me permettent de personnaliser le style de mes notes (et aussi de mettre des crochets) et de mettre des fines. Voici le fichier texte .json concernant les regex notes que l'on peut importer dans l'éditeur de Calibre.
Spoiler:

[/CODE]
{
"searches": [
{
"case_sensitive": false,
"dot_all": false,
"find": "</i><i>|</sup><sup>|</b><b>|<a></a>|<span></span>",
"mode": "regex",
"name": "[w2x] NETT supprimer tags redondants (i, b, sup...)",
"replace": ""
},
{
"case_sensitive": false,
"dot_all": false,
"find": "<span class=\"Appeldenotedefin\">(<i>)?(<span class=\"Appeldenotedefin\">|<span class=\"Endnoteanchor\">)(.*?)</span>(</i>)?</span>",
"mode": "regex",
"name": "[w2x] NOTES appel de fin double",
"replace": "<span class=\"noteanchor\">\\3</span>"
},
{
"case_sensitive": false,
"dot_all": false,
"find": "<span class=\"Endnoteanchor\">",
"mode": "regex",
"name": "[w2x] NOTES appel de fin simple",
"replace": "<span class=\"noteanchor\">"
},
{
"case_sensitive": false,
"dot_all": true,
"find": "id=\"body(.*?)\">(.*?)</a>",
"mode": "regex",
"name": "[w2x] NOTES crochets appels de note (writer2xhtml)",
"replace": "id=\"body\\1\">[\\2]</a>"
},
{
"case_sensitive": false,
"dot_all": false,
"find": "<p>(<a class=\"Appeldenotedefin\"|<a class=\"EndnoteSymbol\")",
"mode": "regex",
"name": "[w2x] NOTES \"class=\"note\" et noteSymbol",
"replace": "<p class=\"note\"><a class=\"noteSymbol\""
}
],
"version": 1
}
[/CODE]


Je suis conscient que, livrées brutes de fonderie, ces explications peuvent sembler complexes. Cependant, la conversion elle-même est automatique, et l'exécution du groupe de regex se fait d'un seul coup. Une fois les réglages fonctionnels, tout fonctionne comme une horloge.

Nota: l'éditeur de Calibre permet également de simplifier et fusionner les feuilles de style (p.ex. celle que produit writer2xhtml et la feuille de style complémentaire que je rajoute).

Last edited by roger64; 03-21-2018 at 06:53 AM.
roger64 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Créer des epub à partir d'une syntaxe wiki (chaîne d'édition vers PDF (LaTeX), xHTML farvardin Software 1 04-03-2011 12:49 PM
Problème avec conversion de *.pdf avec calibre panzer Assistance 2 08-24-2010 03:49 AM
Comment créer un tableau centré dans un Ebook avec sigil ? agronomia Software 7 05-06-2010 06:26 AM
Créer des documents ePub Thomas_ Software 3 04-17-2010 07:36 AM
Comment créer une recette avec calibre ? KLAO Software 1 02-04-2010 09:17 AM


All times are GMT -4. The time now is 04:00 AM.


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