Re: [NTG-context] stretched title text
M.guravage wrote: Hi, Something has changed in the past couple months that causes my stretched title code to fail with the message: ! You can't use `\end' in internal vertical mode. recently read \normalend I've attatched a small example. Has anyone a suggestion how I can adapt my code accordingly? This is due to a change in core-sec.tex, for 2005.11.24. (the addition of \ifcase\headtimingmode to \doplaceheadtext). Below is a patched version (see lines marked with %TH), but I am not completely sure if that doesn't break that \headtimingmode accidentally. Cheers, Taco \unprotect \def\doplaceheadtext#1#2#3#4% {\beginheadplacement{#1}% \ifemptyhead % = needed \setbox0=\ifvertical\vbox\else\hbox\fi to \zeropoint {\headnumbercontentfalse \resetsystemmode\v!sectionnumber #2}% \makestrutofbox0 \else % = needed \setbox0=\ifvertical\vbox\else\hbox\fi % \vhbox {\headnumbercontentfalse \resetsystemmode\v!sectionnumber % less interfering \ifcase\headtimingmode\or#2\fi % outerside font determines distance \dosetfontattribute{\??ko#1}\c!style % but we don't want color to influence user commands % todo: get the if-else out of it \getvalue{\??ko#1\c!command} {} % no number {\dostartattributes{\??ko#1}\c!style\c!color\empty \dostartattributes{\??ko#1}\c!textstyle\c!textcolor\empty \dontconvertfont \ifdisplaysectionhead \setupinterlinespace \else \setupspacing \fi % \ifcase\headtimingmode#2\fi % can introduce cr \getvalue{\??ko#1\c!commandbefore}% \placeheadmargintexts{#1}% binnen #3? \ifdisplaysectionhead %TH %TH \getvalue{\??ko#1\c!textcommand}% %TH {\setstrut\begstrut\ifcase\headtimingmode\hbox{#2}\fi#3\endstrut}% \ifcase\headtimingmode\hbox{#2}\fi %TH \getvalue{\??ko#1\c!textcommand}{\setstrut\begstrut#3\endstrut}%TH %TH \xdef\localheadheight{\the\strutht}% \xdef\localheaddepth {\the\strutdp}% \xdef\localheadlineheight{\the\lineheight}% % == \globallet\localheaddepth\strutdepth \else \ifcase\headtimingmode#2\fi \getvalue{\??ko#1\c!textcommand}{#3}% \fi \getvalue{\??ko#1\c!commandafter}% \ifdisplaysectionhead\endgraf\fi \dostopattributes \dostopattributes}}% \fi \endheadplacement{#1}{#4}} \protect ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] bibmod
Hi, Hans van der Meer wrote: It looks as if the bib-module does not look higher up in the directory hierarchy as is done for other elements in an \environment. I would expect that from the project structure, being the main benefit of this structuring. Is this really a problem in the bib-module or am I overseeing something. It really is a problem in the module. This improved definition of \dousepublications should fix it: \def\dousepublications#1% {\readfile{#1.bbl} % not \readsysfile {\showmessage{bib}{4}{#1.bbl}} {\showmessage{bib}{2}{#1.bbl}}} You should put it somewhere after \usemodule, but before \usepublications. Thanks for the bug report! Cheers, Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] cyrillic font
Hello list, I'm trying to write down some Russian-French vocabulary without any success. I've read the page about Russian in the wiki (http://wiki.contextgarden.net/Russian). The examples are not working for me and that's certainly a font problem (acroread say that to me). How to know if the cm-super fonts are installed on my computer? I'm using a tetex distribution (2.0.2). For information, I'm able to output cyrillic with latex. Thanks a lot for your help. -AJ ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] bibmod
So it really is a bug. Makes my day! It is not that often one stumbles onto a bug. After all these years ConTeXt seems pretty robust to me. And thanks for quickly providing the fix. yours sincerely, dr. H. van der Meer On Jan 13, 2006, at 13:07, Taco Hoekwater wrote: Hi, Hans van der Meer wrote: It looks as if the bib-module does not look higher up in the directory hierarchy as is done for other elements in an \environment. I would expect that from the project structure, being the main benefit of this structuring. Is this really a problem in the bib-module or am I overseeing something. It really is a problem in the module. This improved definition of \dousepublications should fix it: \def\dousepublications#1% {\readfile{#1.bbl} % not \readsysfile {\showmessage{bib}{4}{#1.bbl}} {\showmessage{bib}{2}{#1.bbl}}} You should put it somewhere after \usemodule, but before \usepublications. Thanks for the bug report! Cheers, Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] cyrillic font
Hello list, if you are able to typeset in cyrillic, it implies that you have *at lease some* cyrillic fonts installed. :-) Could you please post here the error messages from the log (of some of your unsuccessful attempts) so we could see what happened? In the .log file i've a warning: Warning: pdfetex (file larm1000): Font larm1000 at 720 not found And when I'm trying to open the .pdf, acroread says me Could not find a font in the Resources dictionary, using Helvetica instead. and then Cannot find or create the font 'Helvetica' [...]. Where could I find other error messages if it's not enough? My source file is: \setupoutput[pdf] \enableregime[utf] \useencoding[cyr] \definetypeface [russian] [rm] [serif] [computer-modern] [default] [encoding=t2a] \setupbodyfont[russian] \starttext Мама и Папа % Some Russian characters \stoptext Thanks a lot for your help -AJ From: Junod Antoine [mailto:[EMAIL PROTECTED] To: ntg-context@ntg.nl Sent: Fri, 13 Jan 2006 14:59:56 +0100 Subject: [NTG-context] cyrillic font Hello list, I'm trying to write down some Russian-French vocabulary without any success. I've read the page about Russian in the wiki (http://wiki.contextgarden.net/Russian). The examples are not working for me and that's certainly a font problem (acroread say that to me). How to know if the cm-super fonts are installed on my computer? I'm using a tetex distribution (2.0.2). For information, I'm able to output cyrillic with latex. Thanks a lot for your help. -AJ ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] followtokens
Dear all, I am quite new to context (but love it) and i am trying tind a way to typeset texts properly kerned in such a way that the characters be all rotated with tiny randomized angle (strange project indeed). I tried to do it by writing a macro inspired by \followtokens. I have two questions : 1. It works but just for text within a single line : I have no clue how to manage the line breaking, and I have to admit that I don't know eanough TeX ConTeXt to find out. 2. In playing with the macro followtoken I happened to write two files with no apparent significant difference (I mean for me) but which give quite different results : one properly kerned, and another that is not. Could someone explain me what's happening here ? (files attached) Thanks a lot, Alexandre Billon dontwork.tex Description: TeX document work.tex Description: TeX document ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Reg. fonts and math
Aditya Mahajan wrote: No, I mean the complicated math is much harder in context. Consider \begin{align} a = b \\ c = d \notag \\ = f \notag \\ = g \end{align} which will typeset as a = b(1) c = d = f = g(2) \begin{subequations} \begin{align} a = b \\ c = d \end{align} \end{subequations} Compare this from how to do this in context (see the wiki). You have to *manually* set the number of the subequation. Actually, for equation numbering and refering, the context way is rather limited. Consider something like an align environment a = b\\ c = d\\ e = f Suppose, I want to refer to the second equation. In latex, I can simply add \label{eq:2} and the end of c= d and then \ref{eq:2}. For context, the reference label goes at the top, with \placeformula[eqs]. But I am not sure, how to give individual labels to each equations. this 'loose label' is one of the ugliest concept i can think of -) i'm willing to implement anything reasonable but since i hardly use such math i only act on 'i want to achieve this' kind of specs (i have no time to read tons of tex documents) much if this 'complicated' math is not that complicated to support,see attached file btw, defaulting to numbers and then using \notag is messy; i prefer readable code, even if it takes more bytes; inventing a formula takes more time than keying it in. Also, more structure, means more hooks for configurability Hans % some simple math constructs \unprotect \def\numberedeqalign {\doifelse\@@fmlocation\v!left\leqalignno\eqalignno} \def\doalignNR[#1][#2]% {\doifsomething{#1} {\doifelse{#1}{+} {\doformulanumber[][#2][]{}} {\doformulanumber[#1][#2][]{ \long\def\startalign#1\stopalign {\def\NC{\crcr\def\NC1{1}}% \def\EQ{=} \def\NR{\dodoubleempty\doalignNR}% % amstex compatibility mode: \def\notag{\def\\{\crcr}}% \def\\{\doalignNR[+][]\crcr}% % end of compatibility mode \numberedeqalign{#1\relax}} %D \startbuffer %D \placeformula \startformula \eqalignno { %D a = b \formulanumber \cr %D c = d \cr %D= e \cr %D= f \formulanumber %D } \stopformula %D \stopbuffer %D %D \typebuffer \getbuffer %D %D \startbuffer %D \placeformula \startformula \startalign %D \NC a \EQ b \NR[+] %D \NC c \EQ d \NR %D \NC\EQ f \NR[for:hans] %D \NC\EQ g \NR[for:whoelse][a] %D \NC\EQ h \NR[for:whomore][b] %D \NC\EQ i \NR %D \stopalign \stopformula %D \stopbuffer %D %D \typebuffer \getbuffer %D %D \startbuffer %D \placeformula \startformula \startalign %D \NC a \EQ b \NR[+] %D \NC c \EQ d \NR %D \NC \EQ f \NR %D \NC \EQ g \NR %D \NC \EQ h \NR %D \NC \EQ i \NR[+] %D \stopalign \stopformula %D \stopbuffer %D %D \typebuffer \getbuffer %D %D \startbuffer %D \placeformula \startformula \startalign %D a = b \\ %D c = d \notag \\ %D = e \notag \\ %D = f \\ %D \stopalign \stopformula %D \stopbuffer %D %D \typebuffer \getbuffer %D %D \startbuffer %D \placeformula \startformula \startalign %D a = b \NR[+] %D c = d \NR %D = e \NR %D = f \NR[+] %D \stopalign \stopformula %D \stopbuffer %D %D \typebuffer \getbuffer %D %D \startbuffer %D \placeformula \startformula \startalign %D \NC a \NC \eq b \NR[+] %D \NC c \NC \neq d \NR %D \NC\NC \neq f \NR[for:hans] %D \NC\NC \geq g \NR[for:whoelse][a] %D \NC\NC \leq h \NR[for:whomore][b] %D \NC\NC \neq i \NR %D \stopalign \stopformula %D \stopbuffer %D %D \typebuffer \getbuffer \protect \endinput ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Factor Trees
Hi, Looking for an idea to set some simple factor trees. I.e., suppose that I want to prime factor 36 = 2x2x3x3. Can I get this using Metapost in a form of a binary tree with 36 at the top and the prime factors at the bottom as leaves? Any ideas? Thanks. ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] MPinclusions
I thought to incrementally add to MPinclusions by successive blocks \startMPinclusions .. \stopMPinclusions \startMPinclusions .. \stopMPinclusions etc. But according to the generated mp-file it seems to incorporate the last one only. Is this correct and if so, is it an option to allow appending in the above manner? Or will that be too difficult to build. yours sincerely, dr. H. van der Meer ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Pagenumbers and labels
Dear syndicate, Three questions (test file attached): 1. A pagenumbering problem: I have \setuppagenumbering[way=bytext] Good: The page numbers are continuous and do not restart with each new part; Bad: The page numbers are still prefaced by the part number, e.g. 1-24, 1-25, 2-26, 2-27 etc. I want, rather, just 24, 25, 26, 27 etc 2. I want the chapter numerals to ignore the part, so I get Part 2, Chapter 3, Chapter 4. 3. I would to keep Part 1 Part 2 in the TOC, but no numeral at all in the main text. I got rid of the Part label in the main text, but not the numeral. incrementnumber=no works but then the TOC loses the Parts altogether. Thnx in advance Best Idris % output=pdf interface=en \setuphead[part][number=yes, bodypartlabel={}, page=right, continue=yes, ownnumber=no, incrementnumber=yes, placehead=yes] \setuppagenumbering[way=bytext] \definecombinedlist[summary][part,chapter][textstyle=\tf] \starttext \placesummary \part{Test} \chapter{Knuth} \dorecurse{7}{\input knuth\par } \chapter{More Knuth} \dorecurse{7}{\input knuth\par } \part{Test} \chapter{Knuth} \dorecurse{7}{\input knuth\par } \chapter{More Knuth} \dorecurse{7}{\input knuth\par } \stoptext -- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523 -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] MPgraphic question
Hans van der Meer wrote: I find it difficult to see the difference -- and therefore when to use the one or the other -- between useMPgraphic and uniqueMPgraphic. Is there someone who will enlighten me? Because I hate not knowing what I am doing. say that you have a background behind framed: compare: \startuseMPgraphic{test} draw OverlayBox withcolor red ; \stopuseMPgraphic{test} \setupcolor[state=start] \defineoverlay[test][\useMPgraphic{test}] \starttext \framed[background=test]{Hans} \framed[background=test]{Hans van} \framed[background=test]{Hans van der} \framed[background=test]{Hans van der Meer} \framed[background=test]{Hans} \stoptext compare: use, reuse and unique and you'll notice the differnece: use: every time (i.e. 5 mp runs) reuse: once, each framed gets the same background (some have wrong dimensions) unique: 4 runs, the last one has the same dimensions and is shared so ... unique is able to determine if it can reuse (based on configurable characteristics) Hans ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] MPgraphic question
I am recalling from memory, but try each, but use the graphic about five times in your document. Before compiling, clear your directory of all files except your sample tex file. Then compile. If I remember, when you use the useMPgraphic, you'll get a graphic file each time you use it (five of them), but only one with the uniqueMPgraphic. That's one difference, if I am remembering this properly. On Jan 13, 2006, at 12:52 PM, Hans van der Meer wrote: I find it difficult to see the difference -- and therefore when to use the one or the other -- between useMPgraphic and uniqueMPgraphic. Is there someone who will enlighten me? Because I hate not knowing what I am doing. yours sincerely, dr. H. van der Meer ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context David Arnold College of the Redwoods Mathematics Department Eureka, CA 95501 (707) 476-4222 http://online.redwoods.edu/instruct/darnold/ ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Reg. fonts and math
--- On Jan 13, Hans Hagen wrote --- Aditya Mahajan wrote: No, I mean the complicated math is much harder in context. Consider \begin{align} a = b \\ c = d \notag \\ = f \notag \\ = g \end{align} which will typeset as a = b(1) c = d = f = g(2) \begin{subequations} \begin{align} a = b \\ c = d \end{align} \end{subequations} Compare this from how to do this in context (see the wiki). You have to *manually* set the number of the subequation. Actually, for equation numbering and refering, the context way is rather limited. Consider something like an align environment a = b\\ c = d\\ e = f Suppose, I want to refer to the second equation. In latex, I can simply add \label{eq:2} and the end of c= d and then \ref{eq:2}. For context, the reference label goes at the top, with \placeformula[eqs]. But I am not sure, how to give individual labels to each equations. this 'loose label' is one of the ugliest concept i can think of -) If you come up with any other way, I will be glad to use it. Frankly, I do not think that the latex syntax is the best, but plain tex looks too indimidating and context does not have anything yet. btw, defaulting to numbers and then using \notag is messy; i prefer readable code, even if it takes more bytes; inventing a formula takes more time than keying it in. Also, more structure, means more hooks for configurability Fine by me. Your method is perfectly acceptable. much if this 'complicated' math is not that complicated to support,see attached file Wonderful. I did not know that something like this can be done so easily in context. i'm willing to implement anything reasonable but since i hardly use such math i only act on 'i want to achieve this' kind of specs (i have no time to read tons of tex documents) Here are features that I would want context math to have. I do not care about the input syntax (whether it is same as latex or not) as long as the features are there. 1. Have align support with variable number of columns. a = b = c + d + e should be typeset as a = b = c + d + e 2. Have a mechanism to individually number/not-number an equation. 3. Have a gather environment. Depending on the user option should either center, left justify or right justify all equations. Useful when you have a bunch of equation together and do not want to have startforumla and stopformula after each of them. 4. In align you should be able to specify the separation between columns. There should be some input syntax that allows you to typeset an output like a = b c = d e = f g = h It will be great if you can number each equation (i.e. four number in the above example). There should be an option to only number each line. 5. have a splitformula environment that allows a = b + c \\ + d to come out as a = b + c + e(1) with only one formula number. The formula number should be at the last line or the center of the whole formula, configurable by an option. 6. Allow, someway of typesetting a = b + c Using some result = d + e that is, you should be able to come out of the align mode temporarily and then go back. Latex calls this intertext. Have some means to adjust the before and after skips of intertext. Something like \setupintertextskip[small or medium or big] 7. Allow some way of typesetting multilined formula where first line is left aligned second line after some hskip third line after some hskip ... last line right alinged This should have only one formula number, either on the last line or in the center of the display. 8. Have a version of align, gather and multiline that can be used inside a formula. So one should be able to type \startformula \left.\startaligned \NC a \NC= b \NR \NC c \NC= d \NR \stopaligned\right\} \implies \startaligned \NC b \NC= a \NR \NC d \NC= c \NR \stopaligned \stopformula to get a = b } = b = a c = d } d = c where the implies is centered between the two lined. Have an option to make these environments come at the top, middle or bottom of the baseline. 9. Allow easy input of multiline subscripts. Suppose I want \sum a b c d e f 10. Allow the big subscripts of math operators to be smashed to the left or right. Suppse, I have a \times \lim_{a very long equation} b_n There should be a command, say \smashoperator such that a \times \smashoperator\lim_{a very long equation} b_n comes as a lim b_n a very long eq where (a very long equation) in centered beneath the center of lim but the bounding box is the bb of lim not the bb of the subscript Also a \times \smashoperator[r]\lim_{a very long equation} b_n should come as a lim b_n a very lone eq where the bounding box of a lim on the right is the bb of the lim, on the left is the bb of the subscript. Similarly of \smashoperator[l] 11.
[NTG-context] Keep framed on the baseline
All, I have: \placeformula[-] \startformula \eqalign{ \text{Divisors of 12}: \framed{1},\ \framed{2},\ \framed{3},\ 4,\ \framed{6},\ 12\cr \text{Divisors of 18}: \framed{1},\ \framed{2},\ \framed{3},\ \framed{6},\ 9,\ 18} \stopformula But I'd like to keep the numbers on the same baseline and let the frame dip below the baseline. ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Canceling common primes with strikeout
All, Anyone have a nice technique to strike out the common primes using the color red? \placeformula[-] \startformula \frac{12}{18}=\frac{2\cdot2\cdot3}{2\cdot3\cdot3}=\frac23 \stopformula ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Alignments side by side
All, I am wondering how I can put two alignment environments side-by-side? For test purposes, it's OK to use this twice. \placeformula[-] \startformula \eqalign{ f(x)=x^2-2x-3\cr f(x)=x^02x+1-1-3\cr f(x)=(x-1)^2-4} \stopformula I'd like to get two of these side-by-side, or something that will typeset a similar result side-by-side. Thanks. ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context