Re: [NTG-context] align question
At 10:21 PM -0700 7/14/06, Aditya Mahajan wrote: On Fri, 14 Jul 2006, David Arnold wrote: On another matter, I'm having some alignment issues. Consider the following code: \starttext \startformula \startalign[n=4,{left, middle, middle, middle}] aaabd\\ abbbcddd \stopalign \stopformula \stoptext Compile this and you will notice that the alignment parameters {left, middle, middle, middle} are ignored. And you can change these to anything else (left, middle, right), with absolutely no change. Any idea what is going on here? Wrong syntax. It should be \startalign[n=4,align={left,}] I would strongly suggest to use \NC \NC bb \NC d \NR instead of raw and \\. Aditya The align= seems to make no difference. In fact, I had tried including it before. Also, I'm finding that the {left,middle, middle, middle} parameters are still ignored when using the Context syntax \NC \NR, as in: \startformula \startalign[n=4,align={left, middle, middle, middle}] \NC aaa\NC b\NC \NC d\NR \NC a\NC bbb\NC c\NC ddd\NR \stopalign \stopformula Interestingly enough, the alignment is slightly different than I get when using the LaTeX syntax, but I still can't get alignment to work correctly. Incidentally, the reason I am using the LaTeX syntax is that we are translating LaTeX code into Context automatically using a perl script, and it's therefore much easier to stick to whatever LaTeX code works. Basically, I just want something comparable to the array environment in LaTeX, which works very nicely. Thanks, Bruce -- __ Bruce H. Wagner e-mail: [EMAIL PROTECTED] Department of Mathematics phone: 707-476-4207 College of the Redwoods fax: 707-476-4424 7351 Tompkins Hill Road WWW: http://online.redwoods.edu/instruct/bwagner Eureka, CA 95501 ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] regenerating formats
On Jul 14, 2006, at 2:58 PM, Peter Münster wrote: On Fri, 14 Jul 2006, Alan Bowen wrote: sudo texmfstart texexec --make --all (which worked with the last ConTeXt installation) and sudo -H texmfstart texexec --make --all failed with the error message sudo: texmfstart: command not found. Does it matter that I have the line alias texmfstart='ruby /usr/local/teTeX/share/texmf.local/scripts/ context/ruby/texmfstart.rb' in my .profile rather than an executable version of the texmfstart script in my $PATH? Hello Alan, I doubt, that an alias is inherited by the shell of sudo. Here is one way, how to set up the ruby scripts without touching the ConTeXt-texmf tree (extracted from my tetex.spec in http://pmrb.free.fr/work/OS/ConTeXt/tetex/): mkdir -p /opt/teTeX/ruby-bin install texexec /opt/teTeX/ruby-bin ln -s ../texmf-context/scripts/context/ruby/texmfstart.rb \ /opt/teTeX/ruby-bin/texmfstart for i in `unzip -l cont-tmf.zip | \ sed -nre 's_^.*scripts/context/ruby/([^/]+)\.rb$_\1_p'`; do if [ $i != texexec -a $i != texmfstart ]; then ln -s texexec /opt/teTeX/ruby-bin/$i fi done And these 2 lines in the file texexec: #!/bin/sh exec texmfstart `basename $0`.rb $@ Then, /opt/teTeX/ruby-bin must come before the normal teTeX-bin in PATH. Cheers, Peter -- http://pmrb.free.fr/contact/ ___ Thanks, Peter! This is very helpful and much appreciated. Alan ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] regenerating formats
On Jul 14, 2006, at 3:35 PM, Paul Hoffman wrote: On Jul 14, 2006, at 2:23 PM, Alan Bowen wrote: I downloaded the latest ConTeXt and tried regenerating the hyphenation patterns and formats (to get hyphenation with Thomas’ Greek module). The first step texmfstart ctxtools --pat was successful. But sudo texmfstart texexec --make --all (which worked with the last ConTeXt installation) and sudo -H texmfstart texexec --make --all failed with the error message sudo: texmfstart: command not found. [...] Does it matter that I have the line alias texmfstart='ruby /usr/local/teTeX/share/texmf.local/scripts/context/ruby/ texmfstart.rb' in my .profile rather than an executable version of the texmfstart script in my $PATH? Yes -- sudo doesn't know about shell aliases, it's trying to find an executable file named texmfstart in your PATH. If it does, is there a way to set things so that texmfstart is automatically available to the administrator and user whenever a Terminal session is begun? Yes, by saving the following script as texmfstart in /usr/local/bin or wherever is appropriate: #!/bin/sh exec ruby /usr/local/teTeX/share/texmf.local/scripts/context/ruby/texmfstart.rb $@ (Everything from 'exec' to '$@' should be on a single line.) If you're using sudo while logged in as yourself (i.e., not root), this texmfstart script can be anywhere in your PATH. Paul. Alan___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context -- Paul Hoffman [EMAIL PROTECTED] http://nkuitse.com/ http://hoffmancommapaul.com/ Many thanks, Paul! I appreciate your help. Alan ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Hiding subanswer blocks
All, Below I have our environment for our question and answer blocks. We are attempting to have questions that have parts, as in: 1. Yada, Yada, Yada, Yada, Yada, Yada, Yada, Yada, Yada. 1a) Yada, Yada, Yada, Yada, Yada, Yada, Yada, Yada, Yada. 1b) Yada, Yada, Yada, Yada, Yada, Yada, Yada, Yada, Yada. 1c) Yada, Yada, Yada, Yada, Yada, Yada, Yada, Yada, Yada, 2, 2a) 2b) Etc. However, we want to hide some of the shortsubanswers. We try with: \beginshortanswer \startanswer \startsubanswer[-] \stopsubanswer \startsubanswer[-] \stopsubanswer \startsubanswer[-] \stopsubanswer \startsubanswer \startbuffer ... When typeset, the first three subanswers here are hidden, but the first subanswer that is not hidden, which should be the answer to part d, it winds up be labeled part a in the pdf output. Can anyone help? \def\genericqacommands#1{\unnumberedsubsection{#1}\vskip 1em} \def\startgenericqadouble#1{\genericqacommands{#1}\startcolumns[n=2]} \def\stopgenericqadouble{\stopcolumns} \def\startgenericqasingle#1{\genericqacommands{#1}} \def\stopgenericqasingle{} \def\preqacontainment{\vskip 0.5ex plus 1ex} \def\postqacontainment{\vskip 0.5ex plus 1ex} \def\startquestions{\startgenericqadouble{Exercises}} \def\stopquestions{\stopgenericqadouble} \def\startlonganswers{\startgenericqasingle{Answers}} \def\stoplonganswers{\stopgenericqasingle} \def\startshortanswers{\startgenericqadouble{Answers}} \def\stopshortanswers{\stopgenericqadouble} \def\questionbreak{\vskip 2em plus 1ex minus 1 ex} \def\placeanswers{% \doifmodeelse{short} { \startshortanswers \selectblocks[shortanswer,shortsubanswer][criterium=section] \stopshortanswers } { \startlonganswers \selectblocks[longanswer,longsubanswer][criterium=section] \stoplonganswers } } \defineenumeration [question] [text=, headcolor=heavygreen] \setupenumerations [question] [location=left, width=fit, distance=1em, hang=1, margin=0pt, headcolor=heavygreen, right=., way=bysection, sectionnumber=no, before=\preqacontainment, after=\postqacontainment] \defineenumeration [subquestion] [location=hanging, text=, headcolor=heavygreen, conversion=characters] \setupenumerations [subquestion] [right=)] \defineenumeration [answer] [text=, headcolor=heavygreen] \setupenumerations [answer] [location=left, width=fit, distance=1em, hang=1, margin=0pt, headcolor=heavygreen, right=., way=bysection, sectionnumber=no, before=\preqacontainment, after=\postqacontainment] \defineenumeration [subanswer] [location=hanging, text=, headcolor=heavygreen, conversion=characters] \setupenumerations [subanswer] [right=)] \defineblock [question,shortanswer,longanswer,subquestion,shortsubanswer,longsubanswe r] \hideblocks[shortanswer,longanswer,shortsubanswer,longsubanswer] ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] switching font encodings
Hello, I have to print plenty of utf-8-encoded entries from a database. I will probably output entries as \contestant{name}{country}{code}, for example \contestant{Đức Đặng}{VNM}{1} I have defined \def\contestant#1#2#3{...#1...} But what's the easiest way to change the encoding to t5 if the country code is VNM and to some other encoding if country code is RUS, SER (or one of other countries using Cyrillic)? I'll probably use \usetypescript[antykwa-torunska][ec] % for most of entries \setupbodyfont[antykwa] I wanted to use XeTeX, but that I figured out/remembered that XeTeX doesn't yet support inclusion of images which I need for this document. Thanks a lot, Mojca (I need this pretty soon.) ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] ConTeXt, Charts, and transparency
Hans Hagen wrote: Idris Samawi Hamid wrote: Yes, but that seems mainly geared towards flow charts, not graphical charts. Can m-chart do things like the example png attached at the start of the thread? i lost that one; actually, willy egger is the most experienced chart user but he's on vacation It was more like a bar graph (with two sets of y-values), nothing to do with m-charts. I thought about mp-graph stuff, but I don't see how it can be (trivially) made to do that visual style. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 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 ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] prevent hyphenation (flush left)
Hello, I urgently need to have my \framed texts left-justified (no hyphenation and nothing may go over the right border) I know that it must be trivial, but I assume that explicit \exhyphenpenalty=1 \hyphenpenalty=1 are replaced inside \framed anyway. Thank you, Mojca ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Arial and Vietnamese
How can I use Arial/Helvetica Vietnamese? Which fonts do I need to download? Thanks, Mojca ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] align question
On Fri, 14 Jul 2006, Bruce H. Wagner wrote: At 10:21 PM -0700 7/14/06, Aditya Mahajan wrote: On Fri, 14 Jul 2006, David Arnold wrote: On another matter, I'm having some alignment issues. Consider the following code: \starttext \startformula \startalign[n=4,{left, middle, middle, middle}] aaabd\\ abbbcddd \stopalign \stopformula \stoptext Compile this and you will notice that the alignment parameters {left, middle, middle, middle} are ignored. And you can change these to anything else (left, middle, right), with absolutely no change. Any idea what is going on here? Wrong syntax. It should be \startalign[n=4,align={left,}] I would strongly suggest to use \NC \NC bb \NC d \NR instead of raw and \\. Aditya The align= seems to make no difference. In fact, I had tried including it before. Also, I'm finding that the {left,middle, middle, middle} parameters are still ignored when using the Context syntax \NC \NR, as in: \startformula \startalign[n=4,align={left, middle, middle, middle}] \NC aaa\NC b\NC \NC d\NR \NC a\NC bbb\NC c\NC ddd\NR \stopalign \stopformula Strange. This works perfectly here. Interestingly enough, the alignment is slightly different than I get when using the LaTeX syntax, but I still can't get alignment to work correctly. Can you send me your context file and pdf offlist? Incidentally, the reason I am using the LaTeX syntax is that we are translating LaTeX code into Context automatically using a perl script, and it's therefore much easier to stick to whatever LaTeX code works. Basically, I just want something comparable to the array environment in LaTeX, which works very nicely. There is \startmathmatrix \stopmathmatrix which is equivalent to latex array environment. This reminds me that I need to update myway on startalign to include the matrix features. Aditya ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] prevent hyphenation (flush left)
On Sun, 16 Jul 2006, Mojca Miklavec wrote: Hello, I urgently need to have my \framed texts left-justified (no hyphenation and nothing may go over the right border) Hi Mojca, Does this do what you want? \starttext \framed[width=5cm,align={leftflushed,stretch,tolerant,nothyphenated}] {\input knuth \endgraf} \stoptext Aditya I know that it must be trivial, but I assume that explicit \exhyphenpenalty=1 \hyphenpenalty=1 are replaced inside \framed anyway. Thank you, Mojca ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context -- Aditya Mahajan, EECS Systems, University of Michigan http://www.eecs.umich.edu/~adityam || Ph: 7342624008 ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context