X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=python%2Fbook_texinfo.py;h=1055615d67e413373510c133de43dd2c5aae9f43;hb=HEAD;hp=31a10612b1b938024c00223d3a9548c7f95d74e3;hpb=a24772e986386801a35cc49eea9971cdabc93bc4;p=lilypond.git diff --git a/python/book_texinfo.py b/python/book_texinfo.py index 31a10612b1..1055615d67 100644 --- a/python/book_texinfo.py +++ b/python/book_texinfo.py @@ -114,7 +114,7 @@ TexInfo_output = { OUTPUTIMAGE: r'''@noindent @ifinfo -@image{%(info_image_path)s,,,%(alt)s,%(ext)s} +@image{%(info_image_path)s,,,%(alt)s,} @end ifinfo @html

@@ -170,6 +170,8 @@ TEXINFO_INSPECTION_DOCUMENT = r''' @message{Global: textwidth=@the@hsize,exampleindent=@the@lispnarrowing} +dummy + @bye ''' @@ -201,7 +203,7 @@ def get_texinfo_width_indent (source, global_options): tmp_handle.close () # Work around a texi2pdf bug: if LANG=C is not given, a broken regexp is - # used to detect relative/absolute pathes, so the absolute path is not + # used to detect relative/absolute paths, so the absolute path is not # detected as such and this command fails: progress (_ ("Running texi2pdf on file %s to detect default page settings.\n") % tmpfile); @@ -313,19 +315,17 @@ class BookTexinfoOutputFormat (BookBase.BookOutputFormat): def output_info (self, basename, snippet): str = '' rep = snippet.get_replacements (); + rep['base'] = basename + rep['filename'] = os.path.basename (snippet.filename) + rep['ext'] = snippet.ext for image in snippet.get_images (): rep1 = copy.copy (rep) - (rep1['base'], rep1['ext']) = os.path.splitext (image) + rep1['base'] = os.path.splitext (image)[0] rep1['image'] = image - - # URG, makeinfo implicitly prepends dot to extension. - # Specifying no extension is most robust. - rep1['ext'] = '' rep1['alt'] = snippet.option_dict[ALT] rep1['info_image_path'] = os.path.join (self.global_options.info_images_dir, rep1['base']) str += self.output[OUTPUTIMAGE] % rep1 - rep['base'] = basename str += self.output[OUTPUT] % rep return str