[Date Index]
[Thread Index]
[Author Index]
Re: Create jpg image files of mathematical equations
*To*: mathgroup at smc.vnet.net
*Subject*: [mg102556] Re: Create jpg image files of mathematical equations
*From*: Diana <diana.mecum at gmail.com>
*Date*: Thu, 13 Aug 2009 03:23:00 -0400 (EDT)
*References*: <h5okvi$sn$1@smc.vnet.net> <h5r8a5$l41$1@smc.vnet.net>
Hi all,
I ended up using StringJoin and ToString for the dynamic file names,
and ImageAssemble to import building block images for the final merged
image. I created the "building block" images with Fireworks.
I also padded the composite image on the top and bottom if the width x
length proportion of the jpg was wider than 660 x 440.
m=1;n=0
0
n=n+1
1
* * *
If[Length[IntegerDigits[m]]+Length[IntegerDigits[n]]+Length
[IntegerDigits[m n]]==5,Export[StringJoin["03","-",ToString
[m],"-",ToString[n],"-",ToString[m n],".jpg"],ImagePad[ImageAssemble
[{Import["pad.jpg"],Import[StringJoin[ToString[m],".jpg"]],Import
["times.jpg"],Import[StringJoin[ToString[n],".jpg"]],Import
["equal.jpg"],Import[StringJoin[ToString[m n],".jpg"]],Import
["pad.jpg"]}],{{0,0},{50,50}},CMYKColor[0,1,1,.2]]]]
* * *
Diana
On Aug 12, 1:32 am, Diana <diana.me... at gmail.com> wrote:
> David,
>
> Thank you for explaining how to do the export with ExpressionCell.
>
> I have a two part followup:
>
> 1) I want to do hundreds of these files, and would like to use a table
> and variables which change. Is it possible to use "m" and "n" within
> the ExpressionCell[Defer[1 + 91}, for example, so that I don't have to
> rewrite each export statement?
>
> 2) I would like to make the file names dynamic. For example, if I am
> adding 1 + 91 = 92, I would like to name the file 01019192.jpg, where
> the leading 01 stands for addition, and the remaining string 019192
> stand for 1, 91, and the sum, respectively.
>
> As an example, I would like to be able to write one statement to
> create 14 jpg files for the "14's" times tables, 1 x 14 = 14, 2 x 14 =
= 28, ..., 14 x 14 = 196.
>
> Thank you for your time,
>
> Diana M.
>
> On Aug 11, 12:57 am, David Reiss <dbre... at gmail.com> wrote:
>
> > Here are two examples to get you started (of course the paths to the
> > files need to be changed for your system)....
>
> > Export["/Users/dreiss/Desktop/MyEquation.jpg",
> > ExpressionCell[Defer[1 + 91], "Input", FontSize -> 30,
> > Background -> LightGray]]
>
> > Export["/Users/dreiss/Desktop/MyEquation.jpg",
> > ExpressionCell[Defer[1 + 91 == #] &[1 + 91], "Input", FontSize -=
> 30,
> > Background -> LightGray]]
>
> > Hope this helps,
>
> > Davidhttp://www.scientificarts.com/worklife/
>
> > On Aug 10, 4:15 am, Diana <diana.me... at gmail.com> wrote:
>
> > > Hi all,
>
> > > I want to quickly create many jpg image files of math facts though 24=
,
> > > such as
>
> > > 12 + 12 = 24
> > > 30 - 15 = 15
> > > 3 x 4 = 12
>
> > > I would like to create the files with and without answers, with very
> > > large font, and with an option to choose font and background colors.
>
> > > Can someone explain how to export equations, with special characters
> > > for +, - * and /?
>
> > > Thank you,
>
> > > Diana
Prev by Date:
**Re: Lisp Macros in Mathematica (Re: If Scheme is so good**
Next by Date:
**Re: Create jpg image files of mathematical equations**
Previous by thread:
**Re: Create jpg image files of mathematical equations**
Next by thread:
**Re: Create jpg image files of mathematical equations**
| |