Show
Ignore:
Timestamp:
10/07/05 15:05:20 (3 years ago)
Author:
vgough
Message:

LatexFormulaMacro:

Enable 'text_mag' configuration option which can be used to change the size of
text rendered in latex formula. 1000 is the default.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • latexformulamacro/0.8/formula.py

    r124 r130  
    115115    dvipsPath = env.get_config('latex', 'dvips_path') 
    116116    convertPath = env.get_config('latex', 'convert_path') 
    117     texMag = env.get_config('latex', 'mag') 
     117    texMag = env.get_config('latex', 'text_mag') 
    118118    imageFormat = env.get_config('latex', 'image_format') 
    119119 
     
    131131        convertPath = 'convert' 
    132132    if not texMag: 
    133         texMag = '1' # TODO: need a reasonable default here.. 
     133        texMag = 1000 # I'm told this is latex's default value 
    134134    if not imageFormat: 
    135135        imageFormat = 'jpg' 
     
    146146    # the image, so we don't have to recreate it unless they change. 
    147147    hash = sha.new(texData) 
    148     hash.update( "%d" % density ) 
     148    # include some options in the hash, as they affect the output image 
     149    hash.update( "%d %d" % (density, int(texMag)) )  
    149150    hash.update( outputVersion ) 
    150151    name = hash.hexdigest() 
     
    196197    tex += "\\usepackage{epsfig}\n" 
    197198    tex += "\\pagestyle{empty}\n" 
    198 # TODO: magnification doesn't work correctly.. 
    199     #tex += "\\mag=%s\n" % texMag 
     199    tex += "\\mag=%s\n" % texMag 
    200200    # matrix macro 
    201201    tex += "\\newcommand{\\mat}[2][rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr]{\n"