hgbook

diff en/fblinks @ 48:e8ab09bf5d7d

Force the \grafix macro to use the PDF image

It would seem that the \includegraphics macro is moody and sometimes it
prefers the png over the pdf. This should force it to always use the right
file type.
author Josef "Jeff" Sipek <jeffpc@josefsipek.net>
date Mon Jul 24 15:58:33 2006 -0400 (2006-07-24)
parents ce3339dbeb6f
children
line diff
     1.1 --- a/en/fblinks	Wed Jul 05 00:14:15 2006 -0700
     1.2 +++ b/en/fblinks	Mon Jul 24 15:58:33 2006 -0400
     1.3 @@ -18,8 +18,8 @@
     1.4      if err.errno != errno.EEXIST:
     1.5          raise
     1.6  
     1.7 -def feedback(name, text, line):
     1.8 -    return r'\marginpar{\scriptsize \href{http://demesne:8000/book/feedback/submit/%s/%s/%d/}{Feedback}}' % (hg_id, name, line)
     1.9 +def feedback(name, text, ctx_id):
    1.10 +    return r'\marginpar{\scriptsize \href{http://demesne:8000/book/feedback/submit/%s/%s/%d/}{Feedback}}' % (hg_id, name, ctx_id)
    1.11  
    1.12  ctxs = {}
    1.13  try:
    1.14 @@ -41,16 +41,18 @@
    1.15      ofp = open(dest_name, 'w')
    1.16      new_par = True
    1.17      line_num = 0
    1.18 +    par_num = 0
    1.19      for line in ifp:
    1.20          line_num += 1
    1.21          if new_par:
    1.22              m = line_re.match(line)
    1.23              if m:
    1.24 +                par_num += 1
    1.25                  ls = line.strip()
    1.26 -                if ctxs.get((name, line_num)) != ls:
    1.27 -                    ctxs[(name, line_num)] = ls
    1.28 +                if ctxs.get((name, par_num)) != ls:
    1.29 +                    ctxs[(name, par_num)] = ls
    1.30                      changes += 1
    1.31 -                line = m.group(1) + feedback(name, line, line_num) + m.group(2)
    1.32 +                line = m.group(1) + feedback(name, line, par_num) + m.group(2)
    1.33                  new_par = False
    1.34          elif not line.strip():
    1.35              new_par = True