sorry... a tab snuck in that patch set... this one is correct...

On Thu, Nov 6, 2008 at 12:50 AM, Yarko T <[EMAIL PROTECTED]> wrote:

> On Wed, Nov 5, 2008 at 10:16 PM, yarko <[EMAIL PROTECTED]> wrote:
>
>>
>> In the current tree, this fails:
>>
>> .. image::  _images/foo.*
>>
>> The path gets lost in processing this for the builders.
>>
>> I'll have a patch for this in a moment...
>>
>> Yarko
>>
>
> I also found a minor problem w/ Latex generation:  title / author was not
> being escaped for LaTeX (sections, etc. were - so this was annoying...)
>
> Here's a patch which addresses both attached.
>
> Regards,
> Yarko
>
>
>

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

diff -r 4d9cc1b7c60f sphinx/environment.py
--- a/sphinx/environment.py     Tue Nov 04 23:46:17 2008 +0100
+++ b/sphinx/environment.py     Thu Nov 06 00:54:06 2008 -0600
@@ -621,9 +621,9 @@
                 for filename in glob(path.join(self.srcdir, imgpath)):
                     dir, base = path.split(filename)
                     if base.lower().endswith('.pdf'):
-                        candidates['application/pdf'] = path.join(docdir, base)
+                        candidates['application/pdf'] = path.join(docdir, 
filename)
                     elif base.lower().endswith('.svg'):
-                        candidates['image/svg+xml'] = path.join(docdir, base)
+                        candidates['image/svg+xml'] = path.join(docdir, 
filename)
                     else:
                         f = open(filename, 'rb')
                         try:
@@ -631,7 +631,7 @@
                         finally:
                             f.close()
                         if imgtype:
-                            candidates['image/' + imgtype] = path.join(docdir, 
base)
+                            candidates['image/' + imgtype] = path.join(docdir, 
filename)
             else:
                 candidates['*'] = imgpath
             for imgpath in candidates.itervalues():
diff -r 4d9cc1b7c60f sphinx/latexwriter.py
--- a/sphinx/latexwriter.py     Tue Nov 04 23:46:17 2008 +0100
+++ b/sphinx/latexwriter.py     Thu Nov 06 00:54:06 2008 -0600
@@ -160,10 +160,10 @@
             'papersize':    papersize,
             'pointsize':    builder.config.latex_font_size,
             # if empty, the title is set to the first section title
-            'title':        document.settings.title,
+            'title':        document.settings.title.translate(tex_escape_map),
             'date':         strftime(builder.config.today_fmt or _('%B %d, 
%Y')),
             'release':      builder.config.release,
-            'author':       document.settings.author,
+            'author':       document.settings.author.translate(tex_escape_map),
             'releasename':  _('Release'),
             'preamble':     builder.config.latex_preamble,
             'modindexname': _('Module Index'),

Reply via email to