View Single Post
Old 02-10-2019, 09:46 AM   #176
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,808
Karma: 7423683
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by mathil View Post
Hi all,

I'm not sure what I'm doing wrong exactly, but I'm having trouble with the "Kepub stylesheet additions" patch. I want to enable it so that I can set justification as the default for all of my books, and as far as I understand it, to do that I need to 1) enable the patch itself (changing no into yes), 2) uncomment the ReplaceString line below "Example 1". However, whenever I do that the patch creation process will fail, and I will get the following in the log file:



which corresponds to the line I uncommented. I'm assuming it's some sort of stupid mistake on my part, so if somebody could help me I would really appreciate it I'm pasting the text of the patch below.

Code:
KePub stylesheet additions:
  - Enabled: yes
  - Description: Makes room to add some additional CSS to the default KePub stylesheet.
    # See replacement CSS below for examples.
  - FindBaseAddressString: ".KBHighlighting, .KBSearchResult {"
  - ReplaceString: {Offset: 0x0000, Find: ".KBHighlighting, .KBSearchResult { background-color: #C6C6C6 !important; } \t",                                                                         Replace: ".KBHighlighting,.KBSearchResult{background-color:#C6C6C6!important}.KBSearch", MustMatchLength: yes}
  - ReplaceString: {Offset: 0x004C, Find: ".KBSearchResult, .KBAnnotation, .KBHighlighting { font-size: 100% !important; -webkit-text-combine: inherit !important; } \t",                          Replace: "Result,.KBAnnotation,.KBHighlighting{font-size:100%!important;-webkit-text-combine:inherit!important}.KBAnnotation[writingM", MustMatchLength: yes}
  - ReplaceString: {Offset: 0x00C7, Find: ".KBAnnotation[writingMode=\"horizontal-tb\"], .KBAnnotationContinued[writingMode=\"horizontal-tb\"] { border-bottom: 2px solid black !important; } \t", Replace: "ode=\"horizontal-tb\"],.KBAnnotationContinued[writingMode=\"horizontal-tb\"]{border-bottom:2px solid black!important}.KBAnnotation[writingMode=\"vert", MustMatchLength: yes}
  - ReplaceString: {Offset: 0x0157, Find: ".KBAnnotation[writingMode=\"vertical-rl\"], .KBAnnotationContinued[writingMode=\"vertical-rl\"] { border-right: 2px solid black !important; } \t",      Replace: "ical-rl\"],.KBAnnotationContinued[writingMode=\"vertical-rl\"]{border-right:2px solid black!important}.KBAnnotation[writingMode=\"vertical-lr\"]", MustMatchLength: yes}
  - ReplaceString: {Offset: 0x01E2, Find: ".KBAnnotation[writingMode=\"vertical-lr\"], .KBAnnotationContinued[writingMode=\"vertical-lr\"] { border-left: 2px solid black !important; }",          Replace: ",.KBAnnotationContinued[writingMode=\"vertical-lr\"]{border-left:2px solid black!important}/*********************************************/", MustMatchLength: yes}
    #
    # Replacement value: CSS string of exactly 47 characters in length:
    #
    # Example 1: Make full justification the default:
 - ReplaceString: {Offset: 0x023B, Find: "/*********************************************/", Replace: "body{text-align:justify                       }", MustMatchLength: yes}
    #
    # Example 2: text-rendering:optimizeSpeed: Disables kerning, but fixes some
    # rendering problems that affect fully justified text.
# - ReplaceString: {Offset: 0x023B, Find: "/*********************************************/", Replace: "body{text-rendering:optimizeSpeed             }", MustMatchLength: yes}
    #
    # Example 3: text-rendering:optimizeLegibility: Enables ligatures, but causes
    # some additional rendering problems for fully justified text.
# - ReplaceString: {Offset: 0x023B, Find: "/*********************************************/", Replace: "body{text-rendering:optimizeLegibility        }", MustMatchLength: yes}
    #
    # Example 4: Make KePub font sizes match ePub font sizes: ePubs render with
    # 1.5 times the font size of KePubs by default. With this enabled they match.
# - ReplaceString: {Offset: 0x023B, Find: "/*********************************************/", Replace: "#book-inner{font-size:1.5em                   }", MustMatchLength: yes}
You forgot a space to replace the hash with. The indentation of the dash needs to be the same as the others.
geek1011 is offline   Reply With Quote