[NTG-context] XML in ConTeXt verbatim text
Hi all, I'm back here with the following problem: I'm processing XML files (DocBook DTD) which also may contain the programlisting tag with some preformatted text. In a sample TeX file, I've tested the following: \starttyping somecontext variable name=Var Value of Var /variable /somecontext \stoptyping This works and the result is great. So I defined a macro to process the programlisting tag from the XML file: \defineXMLenvironment[programlisting]{\starttyping}{\stoptyping} This causes an error while processing. Most probably the \starttyping command breaks things inside the \defineXMLenvironment macro... Any guess how to solve this issue? Many thanks! Richard ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Bad link -- Login?
Hi David, Indeed the given link returns an error ... Try this http://www.pragma-ade.com/show-mag.pdf Just choose one of the magazines and then you can scroll through the titlepages by pressing page-down and page-up Willi David Arnold wrote: All, Perhaps a bad link? http://www.pragma-ade.com/show-mag-9.htm I cannot gain access to mag 8 either. ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Bad link -- Login?
All, Perhaps a bad link? http://www.pragma-ade.com/show-mag-9.htm I cannot gain access to mag 8 either. ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Division bug in \doMPconcat (supp-pdf.tex)
I encountered a problem with supp-pdf when I tried to rewrite Knuths dangerous bend as a MetaPost figure. Very little change was required to get a good picture, but the reverse dangerous bend (obtained by merely reflecting the currentpicture produced a quite grotesquely distorted picture. I tracked this down to the method used to divide by the determinant of the scaling matrix in \doMPconcat. The division code is the following: \ifdim\dimen16=\onepoint \else \ifdim\dimen16\MPconcatfactor \onepoint \relax \doMPreducedimen16 \divide \dimen18 \dimen16 \doMPexpanddimen18 \divide \dimen12 \dimen16 \doMPexpanddimen12 \else \divide \dimen18 \dimen16 \doMPexpanddimen18 \doMPexpanddimen18 \divide \dimen12 \dimen16 \doMPexpanddimen12 \doMPexpanddimen12 \fi \fi In the reverse dangerous bend symbol \dimen16 (the determinant in question) is -1 and \MPconcatfactor is 256, so the else part is taken. The division is integer division, so the accuracy (after the two \doMPexpanddimen) is +/- 1pt. This turns values like the following: 58.8 -61.6534 7.53143 -11.0737 7.52731 -11.06958 c 4.48691 -8.02919 1.99252 -4.2878 1.99252 0 c 1.99252 4.2878 4.48691 8.02919 7.52731 11.06958 c 7.53143 11.0737 58.8 61.6534 58.1153 61.65752 c into (actual code in from uncompressed pdf output): 58.0 -61.0 7.0 -11.0 7.0 -11.0 c 4.0 -8.0 1.0 -4.0 1.0 0.0 c 1.0 4.0 4.0 8.0 7.0 11.0 c 7.0 11.0 58.0 61.0 58.0 61.0 c Similar problems occur if the figure is rotated. (Theoretically, the determinant is 1, but with only 5 decimal accuracy, the same branch is taken.) Also the \if tests above don't take the sign of \dimen16 into account. There is a lesser problem with multiplication when numbers are less than around 1pt. The pre-division by 256 (\doMPreducedimen) reduce accuracy to less than 3 significant decimal digits (i.e., 8 binary digits). I have written some modifications for supp-pdf that avoid all of these. No pre-division is used because multiplication is accomplished by something like \dimen16 = \withoutpt\the\dimen0 \dimen6 and division is accomplished by computing 1/D and multiplying. Since the numerator (1) is fixed, this one division can be arranged for maximum accuracy. I do this by halving D until it is less than 1pt, keeping track of the number of halvings required. Then I divide 2^30 by D, then double the result 2 fewer times than than D was halved. This guarantees at least 14 binary places accuracy, or the number of places in D, whichever is smaller. My speed tests show that the resulting code is as fast or slightly faster than the current code. Further efficiency could be gained by performing the calculation of D outside the loop of calls to \doMPconcat (I have not done this yet). The current state of my code can be found at http://comp.uark.edu/~luecking/tex/supp-pdf.mod and a stripped down version of the reverse dangerous bend code that shows the problem is http://comp.uark.edu/~luecking/tex/rdbend.mp Comments are welcome. I hope at least the division can be made more accurate in the context distribution. Dan Luecking Daniel H. Luecking Department of Mathematical Sciences University of Arkansas ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] [BUG] \type... not working
Nikolai Weibull wrote: \starttext \type... \stoptext It doesn't seem to see the end delimiter, nikolai patch for core-ver \starttext \unprotect \def\dodotypeC#1% normal/slanted ... ... ... {\initializetype \verbatimcolor \if#1% [EMAIL PROTECTED] \else [EMAIL PROTECTED] \fi} \bgroup \catcode`\=\@@active \catcode`\=\@@active \gdef\setupalternativetypegrouping {\catcode`\=\@@active \catcode`\=\@@active \def\doless {\ifx\next \def\next {\bgroup\switchslantedtype \let\next=}% \else \let\next\lesscharacter \fi \next}% \def\domore {\ifx\next \def\next {\egroup \let\next=}% \else \let\next\morecharacter \fi \next}% \def{\futurelet\next\doless}% \def{\futurelet\next\domore}} \egroup \protect \startTEXpage normal: \par \type{xx..xx..xx xx ..xx} \par \type \par \type..xx.. \par normal: \par \type{xx..xx..xx slanted ..xx} \par \type{} \par \type{..xx..} \setuptype[option=slanted] slanted: \par \type{xx..sl..xx sl xx..sl..xx} \par \type..xx.. \par \type..sl.. \par slanted: \par \type{xx..sl..xx sl xx..sl..xx} \par \type..xx.. \par \type..sl.. \par \setuptype[option=none] none: \par \type{xx..xx..xx xx ..xx} \par \type \par \type..xx.. \par \stopTEXpage \stoptext - 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 - ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] French quotes ..
Dirar BOUGATEF wrote: Many thanks, My bizarre quotations work now, but they are quite ugly ! How can i change the caracter shape ? Does this depend on the font i use ? yes, use latin modern Hans - 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 - ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] At a loss how to proceed
All, Lately, I've had a number of discussions with the director of disabled student services at our school regarding document preparation for the visually impaired. As a result of these discussions, I am a bit lost as how to proceed with the preparation of mathematics for the web and documents for my course content. I've paid a little attention to the develoment of MathML, but I've always said Who wants to code like that? whenever I look at examples. However, today I found: http://www.dessci.com/en/company/press/releases/040722.htm I now realize that software that reads web pages aloud it pretty important. But how do I, in my limited time, prepare documents for multiple purposes? Can I use Context to support all of our students at our school? Just how do I proceed? At a loss. ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] XML in ConTeXt verbatim text
Richard Gabriel said this at Tue, 14 Dec 2004 16:48:05 +0100: So I defined a macro to process the programlisting tag from the XML file: \defineXMLenvironment[programlisting]{\starttyping}{\stoptyping} Richard, Have you taken a look at x-contml to see how it solves this problem with verbatim? adam -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay, Computing Dept. [EMAIL PROTECTED] Lancaster University, InfoLab21+44(0)1524/510.514 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] At a loss how to proceed
I am afraid your question is to vague to be answerable. Hence here are two pieces of information that might or might not be useful: i) Mathematica 5.1 can convert TeX to MathML, at least to some extent. So it should at least in principle be possible to convert carefully crafted TeX files to MathML + XML. I don't know whether one can make ConTeXt do that, too. If yes, I am sure it is better than what Mathematica can offer. ii) Proofread your web pages with lynx (text-only). If you need formulas, use jpegs/pngs that have as a textual description a text that will be read as you would read the formula (eg: sum of 1 over n square for n from 1 to infinity equals pi squared over 6) But, again, I am completely at loss when thinking about your request, which only shows how little we know and do. Let me know if you find some useful solutions. Matthias On Dec 14, 2004, at 1:51 PM, David Arnold wrote: All, Lately, I've had a number of discussions with the director of disabled student services at our school regarding document preparation for the visually impaired. As a result of these discussions, I am a bit lost as how to proceed with the preparation of mathematics for the web and documents for my course content. I've paid a little attention to the develoment of MathML, but I've always said Who wants to code like that? whenever I look at examples. However, today I found: http://www.dessci.com/en/company/press/releases/040722.htm I now realize that software that reads web pages aloud it pretty important. But how do I, in my limited time, prepare documents for multiple purposes? Can I use Context to support all of our students at our school? Just how do I proceed? At a loss. ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] FAQ style
Hi, I'm looking for FAQ style (print screen). Thank you for your suggestion. Quy NGUYEN-DAI ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context