![]() |
#1 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Aug 2013
Device: PaperWhite
|
Adding to existing tags?
Hi!
Hope my question is easy. Have searched around but found no decent answer yet. I want to create a clip, which is easy enough, which adds a percentage of a line margin to a line. Which is easy, and works well. All done... Except, I'm trying to get this working in book/text mode, by highlighting a line or adding to the start of it, without losing my current line formatting. Which includes individual bold words, italics etc. Basically I'm formatting some source code snippets for reading at leisure, but would like to do so without editing in XML code, and without setting up a series of different styles. |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,908
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Clips may d owhat you want (or mangle the results
![]() <h3 class="chapno">\1</h3> <p>Foobar</p> Select (in BV): Foobar Apply clip above results in <h3 class="chapno">Foobar</h3> I wrapped foobar in a span, it did not survive ![]() |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
It will not work in bookview, only in codeview. But there it is also easy to retain formatting.
|
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Aug 2013
Device: PaperWhite
|
Thanks for the replies.
I tried a few approaches; Creating 3 indent classes, and 2 font styles, then creating clips using a combo of these to basically reformat the lot. Bloody tedious and will take a long while. The benefit is I get nice clean formatting and epub source. Works well with my keyboard macro buttons set to insert the clips. But then I tried using a clip with "** And that works nice quick and easy, like tabbing it really. But I lose the margin percentage scaling, which given the time saving, is just not an issue. I think I will eventually go my first approach, due to cleanliness of source. |
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Aug 2013
Device: PaperWhite
|
If anybody is interested, this is the style I ended up settling on.
Although nbsp's were quick and dirty, I decided to do it all properly. The result is much much cleaner and scales to displays. ------------ p { display: block; margin-bottom: 1em; margin-left: 0; margin-right: 0; margin-top: 1em; text-indent: 1em; color: #231F20 } .code { font-family: Courier, serif; color: #231F20; text-indent: 0em } .highlight { font-family: Courier, serif; color: #231F20; text-indent: 0em } .comment { font-family: Courier, serif; color: #797A7C } .tab1 { margin-left: 3%; } .tab2 { margin-left: 6%; } .tab3 { margin-left: 9%; } .tab4 { margin-left: 12%; } Using a paragraph with class="code" works a charm, then add in the tabs for each line (time consuming, but quicker with a macro keyboard like a Sidewinder or Logitech), endline comments can also quickly be formatted, and any single line comments can either use a tab*+comment clip or be done in code-view. Overall I'm very pleased with the results. Even if it will take me over a week to complete it. |
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adding another format to an existing book | Len666 | Library Management | 11 | 04-15-2012 01:22 PM |
Adding existing files problem | congngo | Sigil | 37 | 01-23-2012 12:49 PM |
Adding another version to existing book | Agama | Upload Help | 4 | 04-11-2011 12:19 PM |
[?] Add downloaded tags not overwrite existing? | random43743 | Calibre | 7 | 01-11-2011 12:34 AM |
Adding existing collection of ebooks to calibre | Chris_147 | Calibre | 2 | 09-30-2010 08:35 AM |