[dev-context] faking mathalignments

Aditya Mahajan adityam at umich.edu
Wed Aug 9 08:29:18 CEST 2006


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.

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



More information about the dev-context mailing list