[dev-context] faking mathalignments

Hans Hagen pragma at wxs.nl
Thu Aug 10 14:05:58 CEST 2006


Aditya Mahajan wrote:
> Hans,
>
>    Can you cook up something along the lines of fakeformula for math 
> alignments. I need a few variations to show different math alignment 
> features. I am using a rather verbose naming scheme and syntax to 
> convey the idea.
>   
a starting point showing how to do it

> 1. fakemathalignment
>
> \fakemathalignment[alternative=a,lines=2] %Maybe random number of 
> lines
>
> should give
>
> \NC XX \NC = random number XX + XX \NR[+]
> \NC XX \NC = random number XX + XX \NR[+]
>
> where XX is a \fakerule of random width.
>
> \fakemathalignment[alternative=b,lines=2] should give
>
> \NC XX \NC = random number of XX + XX   \NC XX = random number of XX + 
> XX \NR[+]
> \NC XX \NC = random number of XX + XX   \NC XX = random number of XX + 
> XX \NR[+]
>
> that is two blocks (maybe keep the number of blocks configurable).
>
> 2. fakemathlinearequations
>
> \fakemathlinearequations[columns=4,lines=2,alternative=a]
>
> should give
>
> \NC XX \NC + XX \NC + XX \NC = XX \NR[+]
> \NC XX \NC + XX \NC + XX \NC = XX \NR[+]
>
>
> \fakemathlinearequations[columns=4,lines=2,alternative=b]
>
> \NC XX \NC + \NC XX \NC + \NC XX \NC = \NC XX \NR[+]
> \NC XX \NC + \NC XX \NC + \NC XX \NC = \NC XX \NR[+]
>
> that is each operator should be in a column of its own.
>
> 3. fakemathsplitformula
>
> Another variation
>
> \fakemathsplitformula[lines=3]
>
> \NC XX \NC= random number of XX + XX \NR
> \NC    \NC= random number of XX + XX \NR
> \NC    \NC= random number of XX + XX \NR[+]
>
> \fakemathsplitformula[lines=3,alternative=b]
>
> should give
>
> \NC XX = \NC random number of XX + XX \NR
> \NC      \NC + XX + XX                \NR
> \NC      \NC + XX + XX                \NR[+]
>
>
> 4. fakemathmatrix [lines=3,columns=3]
>
> \NC XX \NC XX \NC XX \NR
> \NC XX \NC XX \NC XX \NR
> \NC XX \NC XX \NC XX \NR
>
> 5. fakemathcases[lines=3]
>
> \NC XX \NC XX XX (2-4 random XX) \NR
> \NC XX \NC XX XX (2-4 random XX) \NR
>
> These are all that I can think of at the moment :-)
>
> Thanks,
> Aditya
> _______________________________________________
> dev-context mailing list
> dev-context at ntg.nl
> http://www.ntg.nl/mailman/listinfo/dev-context
>   


-- 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: m-matvis.tex
Type: application/x-tex
Size: 2807 bytes
Desc: not available
URL: <http://mailman.ntg.nl/pipermail/dev-context/attachments/20060810/56a75f16/attachment.tex>


More information about the dev-context mailing list