06-22-2016, 05:01 AM | #16 |
Grand Sorcerer
Posts: 5,647
Karma: 23456789
Join Date: Dec 2010
Device: Kindle PW2
|
I attached a new version with updated configuration and stylesheet files provided by roger64.
To take full advantage of the stylesheet you'll need to download and embed the Linux Libertine fonts. Of course, you can replace both files with your own customized versions. BTW, the new version allows you to embed files, e.g. fonts or images files. These files need to be copied to the plugin resources folder. (You can also define a different folder via the resource_dir plugin preference settings.) The following plugin preference values can set: Code:
{ "add_resources": true, "resource_dir": "C:/Resources", "output_format": "epub3", "ibooks_xml": true, "initialdir": "C:/Users/User/Downloads" } BTW, if you use the "output_format": "epub3", option, you'll get the following epubcheck warning: Code:
WARNING(HTM-014a): XHTML Content Document file name 'OEBPS/Text/chapter.html' should have the extension '.xhtml'. Technical note: If you don't use the bundled interpreter, you'll need to install the bs4 and lxml Python libraries. |
03-12-2018, 09:32 AM | #17 |
Grand Sorcerer
Posts: 5,647
Karma: 23456789
Join Date: Dec 2010
Device: Kindle PW2
|
Since the Writer2LaTeX author has released a new beta version, I've updated the plugin.
(Unless you use the plugin to generate epub3 files, you can ignore this update, because it mostly fixes epub3 bugs and some bugs related to output formats other than epub2.) |
Advert | |
|
04-21-2018, 11:33 PM | #18 |
Enthusiast
Posts: 29
Karma: 10
Join Date: Nov 2014
Location: Belgium
Device: Kobo glo
|
I can't use it.
I've some errors with Python. I tryed python 3 and 3.6 : nothing to do, always the same error Last edited by manon123; 04-21-2018 at 11:37 PM. |
04-22-2018, 03:20 AM | #19 |
Grand Sorcerer
Posts: 5,647
Karma: 23456789
Join Date: Dec 2010
Device: Kindle PW2
|
1. What's your Linux distribution?
2. Did you build Sigil from source or did you install an Ubuntu/Debian package? It looks like your system is missing the Python Tk library, which should have been automatically installed with Sigil. If you have a Ubuntu-based distro, you'll need to install python3-tk. You also might want to check that the following Ubuntu packages are installed: python3-pyqt5 python3-lxml python-bs4 |
04-22-2018, 07:51 AM | #20 |
Enthusiast
Posts: 29
Karma: 10
Join Date: Nov 2014
Location: Belgium
Device: Kobo glo
|
Hi Doitsu,
My Linux Distribution in Archlinux. I've installed Sigil from the AUR repository (Sigil is'nt present in the repositories of Archlinux). In Arch repositories, python3-pyqt5, python3-lxml, python-bs4 doesn't exist. Yaourt -Ss give me back : nothing. But, I've found it in the Archlinux's Wiki : the library is simply named : tk So, with a Code:
sudo pacman -S tk Sorry for my English, I don't speak it fluently Thank you for your answer. Last edited by manon123; 04-22-2018 at 07:56 AM. |
Advert | |
|
04-22-2018, 10:11 AM | #21 |
Grand Sorcerer
Posts: 28,077
Karma: 199770456
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
For the record: Sigil is definitely available in the standard Arch repos. It's in Community.
https://www.archlinux.org/packages/c.../x86_64/sigil/ You may also want to install python-pyqt5 from Arch Extra. More and more Sigil plugins make use of PyQt5. Python3 is the default on Arch. So its various packages are just python-*, not python3-*. Last edited by DiapDealer; 04-22-2018 at 10:13 AM. |
04-23-2018, 01:32 PM | #22 |
Enthusiast
Posts: 29
Karma: 10
Join Date: Nov 2014
Location: Belgium
Device: Kobo glo
|
Thanks a lot for your help.
Everything is working fine now. Indeed, looking for all the dependencies of the package, I was able to install the two missing packages. |
10-16-2019, 04:59 PM | #23 |
Junior Member
Posts: 8
Karma: 400000
Join Date: Mar 2017
Device: Samsung Galaxy 2 9.7"
|
Doitsu,
Thanks for pointing me to the Sigil tool. Without plugins, I already like it. What I'm doing right now: 1. Creating document in LibreOffice Writer with Sections, each section collects endnotes at end of section. I also protect the sections when I'm done. 2. Saving as .docx, since Calibre won't import .odt. 3. Add book in Calibre as .docx, convert to epub. 4. Open the .epub in Sigil, where the endnotes are dumped at the end of the book, because the conversion to .docx messes up the sections (when I re-open the .docx in LibreOffice, the sections have disappeared). Move them to their appropriate sections in Sigil. Obviously it would be great if I could save in .odt and import directly into Sidil. To that aim, I downloaded and installed your ODTImport v0.1 in Sigil. Trying to use it, I get "Plugin by that name does not exist." I made sure my python interpreters were python2.7 and python3.5. Any thoughts? Also, exactly where should the custom-css go, assuming I'm able to solve the problem? Thanks in advance! |
10-16-2019, 05:17 PM | #24 |
Grand Sorcerer
Posts: 5,647
Karma: 23456789
Join Date: Dec 2010
Device: Kindle PW2
|
I've never seen this error message. Did you by any chance unzip ODTImport_0.3.2.zip or do you have a Mac?
(IIRC, Macs will automatically unzip downloaded .zip files, however, the Sigil plugin manager expects .zip files.) If you have a Mac, you can also manually move the unzipped ODTImport folder to the Sigil plugins folder. (To display the plugins folder, select Edit > Preferences > Open Preferences Location.) config.xml and epub.css should both go in the ODTImport plugin folder. Please re-read the instructions in the first post. |
10-16-2019, 05:39 PM | #25 |
Junior Member
Posts: 8
Karma: 400000
Join Date: Mar 2017
Device: Samsung Galaxy 2 9.7"
|
Never mind, I solved the problem. Plugin is working. I guess I need one more question:
Sigil adds all the footnotes to a separate .xhtml, which is the last one in my ebook imported from the .odt. It's easy enough to cut from it and paste at the bottom of the correct .xhtml. But at that point, the superscript number points to the original .xhtml which is now empty. I know I'm doing something wrong, the question is what? Thanks in advance! |
10-16-2019, 05:55 PM | #26 |
Junior Member
Posts: 8
Karma: 400000
Join Date: Mar 2017
Device: Samsung Galaxy 2 9.7"
|
Great. Custom-Stylesheet.CSS, epub.css and config.xml are now in my /home/username/.local/share/sigil-ebook/sigil/plugins/ODTImport/
(This is a Linux box). Notice that the custom-stylesheet filename has an upper-case extension, and Linux is case-sensitive. Does that make a difference? |
10-16-2019, 06:15 PM | #27 | ||
Grand Sorcerer
Posts: 5,647
Karma: 23456789
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Code:
<option name="use_endnotes" value="false" /> Spoiler:
This should force Writer2Latex to generate regular footnotes. Quote:
(config.xml controls the conversion and epub.css is an optional stylesheet.) For more information on customizing the output see the Writer2Latex website. |
||
10-18-2019, 11:57 AM | #28 |
Junior Member
Posts: 8
Karma: 400000
Join Date: Mar 2017
Device: Samsung Galaxy 2 9.7"
|
Got it. Many thanks for your help!
|
08-07-2020, 11:20 AM | #29 |
Groupie
Posts: 184
Karma: 10
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
I've come back to needing to generate epub files from LO Writer. My last experiences were around 2015/6 and I used the LO Writer extension, writer2xhtml (v1.5.2alpha). This worked fine.
Now, I see that the world has moved on. Writer's native epub export gives me a poor result. The writer2xhtml extension no longer appears to be maintained but I have tried the writer2xhtml.oxt file from both writer2latex 152alpha and 161 and the results with LO Writer 6.3.5.2 are disappointing. The file > export method using any of the writer2xhtml options on offer fails with a 'general input/output' error. The only thing that does work is the 'publish epub' button on the writer2xhtml toolbar and that gives me an epub3 output without any way of selecting a name for the output file. The file produced needs some work but is not bad. I imagine that something else is required for a Writer extension than just using the .oxt file from writer2latex. I have read this thread and tried this ODTimport plugin v 0.3.2 to produce an epub file. The first thing I noticed was that it stole my first image to use as a cover image and then failed to use the same image in the correct place in the document. It also produced a couple of style sheets, styles.css and styles1.css. Styles1.css contains some but not all of my Writer document styles I used and the output epub file contains a mixture of styles from each of the css files. I guess I can sort that out by using the various suggestions in this thread. Is this plugin still a recommended way to produce an epub file from odt or has it become obsolete and been replaced by other different workflows and tools? |
08-07-2020, 08:58 PM | #30 |
Wizard
Posts: 2,611
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Hi
I am an Archlinux user. As a -nearly - daily user of both writer2xhtml.oxt on LO 6.4.5.2. and of writer2latex.jar with Sigil 1.3. and odtImport plugin 0.3.1. (both of them use in fact writer2xhtml 1.6.1.), I just can say that they both work nicely today. I'll try it asap with LO 7. - Images in the odt file (including cover) are processed without problem. - The first stylesheet you get is coming from your own Resources folder file, the second one (styles1) contains the styles (paragraph and character) of the odt file. So it just depends on your choice if you want to get one (normal case) or two stylesheeets from writer2xhtml. If you get two, of course you'll have later to harmomize them, for example with the Calibre editor, since the first one bears no direct relation to the odt file, but can be used to later fine tune your ePub. At that time, I can't say more. If you email me a test odt file, I would probably be able to provide you with more information. Last edited by roger64; 08-07-2020 at 09:32 PM. Reason: asap |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] KindleUnpack - The Plugin | DiapDealer | Plugins | 495 | 10-19-2024 07:06 AM |
[FileType Plugin] YVES Bible Plugin | ClashTheBunny | Plugins | 27 | 01-16-2023 02:25 AM |
Plugin not customizable: Plugin: HTML Output does not need customization | flyingfoxlee | Conversion | 2 | 02-24-2012 03:24 AM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 01:27 PM |
New Plugin Type Idea: Library Plugin | cgranade | Plugins | 3 | 09-15-2010 01:11 PM |