Re: [sphinx-dev] Re: Hiding header and footer in epub

2011-04-30 Thread Jan Ulrich Hasecke
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 29.04.11 21:18, rolmei wrote:

 For this case it might be not this difficult. You should edit the
 file _templates/layout.html. If it does not exist, just add the
 following contents:
 
 {% extends !layout.html %} {% block relbar1 %}{% endblock %} {%
 block footer %}{% endblock %}

Perfect. Thanks. :-)

 That should be sufficient. Rebuild the epub file. Note that the
 header and footer are also removed from the HTML output, so the empty
 blocks should be removed if you also want the HTML output.

Fortunately they are not. :-)

- -- 
Jan Ulrich Hasecke
DZUG e.V. (Deutschsprachige Zope User Group)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk28BiAACgkQPUzUEFbILMR0+gCgjYOV6dZPnz2IvIL20OMMdkTd
z7oAoJcWBBpO0FgJJJFh1KPWQaAzV7Y9
=1ANL
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google Groups 
sphinx-dev group.
To post to this group, send email to sphinx-dev@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.



[sphinx-dev] Re: Hiding header and footer in epub

2011-04-29 Thread rolmei
Hi,

On 28 Apr., 10:17, Jan Ulrich Hasecke juhase...@googlemail.com
wrote:
 I'm aware that I can make a custom theme. I did one before and it wasn't
 fun. ;-)

For this case it might be not this difficult.
You should edit the file _templates/layout.html.
If it does not exist, just add the following contents:

{% extends !layout.html %}
{% block relbar1 %}{% endblock %}
{% block footer %}{% endblock %}

If it already exists, add the last two lines.
You should also check that the conf.py contains
the following line:

templates_path = ['_templates']

That should be sufficient. Rebuild the epub file.
Note that the header and footer are also removed from
the HTML output, so the empty blocks should be removed
if you also want the HTML output.


 But I think simply removing the header and footer is not enough. I my
 point of view an ebook is really a book and not a bunch of html pages.
 This implies that footnotes should not be counted page wise but
 continously through the whole book similar to what the pdf builder does.

 I am not quite sure whether there are use cases that an ebook should be
 compiled from several html pages, so maybe this can be another option:
 make the ebook from one single html page with continously counted
 footnotes or make it from several html pages with chapter wise counting.

In my opinion, creating the epub from one big HTML file is not
feasible
due to memory and cpu constraints.
The readers can only process small files (I try to keep them  100k).
And the rendering of large files can take minutes,

Formatting the footnotes as endnotes might be possible through an
extension.
I think the notes example extension does something similar.
However, for the endnotes you have to renumber the notes and rewrite
the links.

Roland

-- 
You received this message because you are subscribed to the Google Groups 
sphinx-dev group.
To post to this group, send email to sphinx-dev@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.



Re: [sphinx-dev] Re: Hiding header and footer in epub

2011-04-28 Thread Jan Ulrich Hasecke
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Roland,

On 27.04.11 22:18, rolmei wrote:
 you can remove the header and footer by using a custom theme that 
 defines the relbar1 and footer as empty blocks. It is quite easy to 
 do. Please read the sphinx documentation for further information. If
 there is enough interest, I may add options for the epub builder, 
 although the options may also be useful for the general HTML
 builder.
 
 I do not want to remove the header and footer by default, because 
 they may be of interest for some people.

yes, an option to remove them would be great. I put a feature request
into the tracker.

I'm aware that I can make a custom theme. I did one before and it wasn't
fun. ;-)

But I think simply removing the header and footer is not enough. I my
point of view an ebook is really a book and not a bunch of html pages.
This implies that footnotes should not be counted page wise but
continously through the whole book similar to what the pdf builder does.

I am not quite sure whether there are use cases that an ebook should be
compiled from several html pages, so maybe this can be another option:
make the ebook from one single html page with continously counted
footnotes or make it from several html pages with chapter wise counting.

juh

- -- 
Jan Ulrich Hasecke
DZUG e.V. (Deutschsprachige Zope User Group)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk25Io4ACgkQPUzUEFbILMSmbQCgi+bZMoqX8KMNh3GgV6+iphPu
1qQAoL26yRe5fbGvkDthZQk+7rBb6ODX
=CJ+V
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google Groups 
sphinx-dev group.
To post to this group, send email to sphinx-dev@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.



[sphinx-dev] Re: Hiding header and footer in epub

2011-04-27 Thread rolmei

On 26 Apr., 18:54, Jan Ulrich Hasecke juhase...@googlemail.com
wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hi all,

 is there any option to hide the header and footer in the epub output? I
 only need the plain text in the output.

 TIA
 juh

Hi,
you can remove the header and footer by using a custom theme that
defines the relbar1 and footer as empty blocks. It is quite easy to
do.
Please read the sphinx documentation for further information.
If there is enough interest, I may add options for the epub builder,
although the options may also be useful for the general HTML builder.

I do not want to remove the header and footer by default, because
they may be of interest for some people.

Hope this helps,
  Roland

-- 
You received this message because you are subscribed to the Google Groups 
sphinx-dev group.
To post to this group, send email to sphinx-dev@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.