Hallo, I have to typeset a division and have two diverent solutions but they both have problems. %--------------------------------------------------------------------- \starttext {\setuptables[rulethickness=0.05em,distance=small] \starttable[s0|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|] \NC\NC 1\NC 1\NC 0\NC 0\NC 1\NC 1\NC :\NC 1\NC 1\NC = \NC 1\NC 0\NC 0 \NC 0 \NC 1\NC\AR \NC\NC 1\NC 1\NC \NC \NC \NC \NC \NC \NC \NC \NC \NC \NC \NC \NC \NC\AR \DC \DL[2] \DC \DC \DC \DC \DC \DC \DC \DC \DC \DC \DC \DC \DC \DR \NC\NC \NC 0\NC 0\NC \NC \NC \NC \NC \NC \NC \NC \NC \NC \NC \NC \NC\AR \NC\NC \NC 0\NC 0\NC \NC \NC \NC \NC \NC \NC \NC \NC \NC \NC \NC \NC\AR \DC\DC \DL[2] \DC \DC \DC \DC \DC \DC \DC \DC \DC \DC \DC \DC \DR \NC\NC \NC \NC 0\NC 0\NC \NC \NC \NC \NC \NC \NC \NC \NC \NC \NC \NC\AR \NC\NC \NC \NC 0\NC 0\NC \NC \NC \NC \NC \NC \NC \NC \NC \NC \NC \NC\AR \DC\DC\DC \DL[2] \DC \DC \DC \DC \DC \DC \DC \DC \DC \DC \DC \DR \NC\NC \NC \NC \NC 0\NC 1\NC \NC \NC \NC \NC \NC \NC \NC \NC \NC \NC\AR \NC\NC \NC \NC \NC 0\NC 0\NC \NC \NC \NC \NC \NC \NC \NC \NC \NC \NC\AR \DC\DC\DC\DC \DL[2] \DC \DC \DC \DC \DC \DC \DC \DC \DC \DC \DR \NC\NC \NC \NC \NC \NC 1\NC 1\NC \NC \NC \NC \NC \NC \NC \NC \NC \NC\AR \NC\NC \NC \NC \NC \NC 1\NC 1\NC \NC \NC \NC \NC \NC \NC \NC \NC \NC\AR \DC\DC\DC\DC \DC \DL[2]\DC \DC \DC \DC \DC \DC \DC \DC \DC \DR \NC\NC\NC\NC\NC\NC\NC 0\NC\NC\NC\NC\NC\NC\NC\NC\NC\NC\AR \stoptable} \setuplines[style=type] \startlines 110011:11=10001 11 -- ~00 ~00 ~-- ~~00 ~~00 ~~-- ~~~01 ~~~00 ~~~-- ~~~~11 ~~~~11 ~~~~-- ~~~~~0 \stoplines \stoptext %--------------------------------------------------------------------- In both examples there is a far to big distance between the lines and the upper digits. But the interline distance as a whole could be smaller. The simulation of a line with '--' in the second example is unsatisfying. Are there some improvments? Or, is there an idea for a better approach? Wolfgang
Am 17.04.10 11:35, schrieb Wolfgang Werners-Lucchini:
Hallo,
I have to typeset a division and have two diverent solutions but they both have problems.
\setuplines[style=type] \startlines 110011:11=10001 11 ... ~~~~~0 \stoplines \stoptext
\setuplines[style=type,space=on] \startlines \formula{\tt 110011:11=10001} 11 -- 00 00 -- 00 00 -- 01 00 -- 11 11 -- 0 \stoplines You can also look at the xlop package http://ctan.org/tex-archive/macros/generic/xlop/ Wolfgang
Am 17.04.10 11:35, schrieb Wolfgang Werners-Lucchini:
I have to typeset a division …
\setuplines[style=type] \startlines 110011:11=10001 11 -- ~00 ~00 ~-- ~~00 ~~00 ~~-- ~~~01 ~~~00 ~~~-- ~~~~11 ~~~~11 ~~~~-- ~~~~~0 \stoplines \stoptext
\define[1]\divisionrule {\dontleavehmode\blap {\vskip-\strutht \blackrule[width=\the\dimexpr.5em*#1\relax,height=2\linewidth]}% \vskip-\lineheight} \definelines[division][style=type,space=on] \starttext \startdivision \formula{\tt 110011 ÷ 11 = 10001} 11 \divisionrule{2} 00 00 \divisionrule{2} 00 00 \divisionrule{2} 01 00 \divisionrule{2} 11 11 \divisionrule{2} 0 \stopdivision \stoptext Wolfgang
Am 17.04.10 16:59, schrieb Wolfgang Schuster:
Am 17.04.10 11:35, schrieb Wolfgang Werners-Lucchini:
I have to typeset a division …
\setuplines[style=type] \startlines ... \stoplines \stoptext
\definelines[division][style=type,space=on] You don't even need a typewriter font for this:
\definefontfeature[tnum][tnum=yes] \setupbodyfont[pagella] \define[1]\divisionrule {\dontleavehmode\blap {\vskip-\strutht \blackrule[width=\the\dimexpr.5em*#1\relax,height=2\linewidth]}% \vskip-\lineheight} \definelines[division][style=\addff{tnum},space=on] \starttext \startdivision \formula{110011 ÷ 11 = 10001} 11 \divisionrule{2} 00 00 \divisionrule{2} 00 00 \divisionrule{2} 01 00 \divisionrule{2} 11 11 \divisionrule{2} 0 \stopdivision \stoptext Wolfgang
participants (2)
-
Wolfgang Schuster
-
Wolfgang Werners-Lucchini