Re: [NTG-context] mathradical defaults to "normal", should it perhaps be "default"?
On Wed, 7 Jun 2017 18:03:35 +0200 Hans Hagenwrote: > > I have been massacred on this list for ever preferring \over to > > \frac... > > and because of the many {} you then need you get these mismatch > errors ... but, you can make > > \unexpanded\def\fakefrac#1#2{{{#1}\over{#2}}} The syntax {a \over b} is much more readable (to a mathematician) than \frac{a}{b} which looks fine to a programmer. This has nothing to say about how one or the other performs, it is a purely syntactical preference. Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] how to prevent stupid typos?
On 06/07/2017 11:01 PM, Hans Hagen wrote: > sure it's no big deal to write such a script but in decades of tex i > never felt the need I wrote a small script for my Linux machine (check-context.sh), to be able to check a single file: source $HOME/ctxbeta/tex/setuptex mtxrunjit --autogenerate --script check $1 echo $1 But when applied to a file, I get the following: $ check-context untitled.tex The argument "/home/ousia/untitled.tex" is not a valid TEXROOT path. (There is no file "/home/ousia/untitled.tex/texmf/tex/plain /base/plain.tex") 8 grouping error ode[abc] This is \linenote{abed intended.\stopt 10 missing stop enote{abed intended.\stoptext (see line 7) untitled.tex I mean, I get the output, but after an error. $1 has full path in the first ocurrence, but it has only the relative path with echo. Of course, I get not error by direct invocation: $ mtxrunjit --autogenerate --script check untitled.tex 8 grouping error ode[abc] This is \linenote{abed intended.\stopt 10 missing stop enote{abed intended.\stoptext (see line 7) What am I doing wrong here? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Position of prime for derivatives
On 6/7/2017 9:57 PM, Mikael P. Sundqvist wrote: In 2017.06.06 13:22 something is still not correct. i mentioned that you need a new engine (the garden has 1.0.5 binafies for windows but other platforms need to be generated) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] how to prevent stupid typos?
On 6/7/2017 9:02 PM, Idris Samawi Hamid ادريس سماوي حامد wrote: On Wed, 07 Jun 2017 12:11:14 -0600, Pablo Rodriguezwrote: (but i have to admit that i normally just run files and redo after fixing an error, running is fast enough) My question here isn’t about speed. If a source may load twenty source files and it actually loads five source files, the problem is having to check the files individually. I suppose it wouldn't be too hard for someone with the requisite ability to write a script to pipe and run the check on the argument of each \input in a main file. OTOH, \input's can have \input's so it could get unwieldy pretty quick.. As a matter of workflow, I would just check each \input when editing it, don't see the need to check them all over and over - but maybe you have some huge collaborative project with lots of \inputs frequently changing.. sure it's no big deal to write such a script but in decades of tex i never felt the need Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] how to prevent stupid typos?
On Wed, 07 Jun 2017 14:33:05 -0600, Pablo Rodriguezwrote: On 06/07/2017 10:16 PM, Idris Samawi Hamid ادريس سماوي حامد wrote: On Wed, 07 Jun 2017 14:08:21 -0600, Pablo Rodriguez wrote: And creating a keyboard shortcut to launch the script automatically helps a lot. Scite: Ctrl-0 Notepad++: Ctrl-Shift-0 (new n++ setup for context currently under development) Where are these setops? I mean, in the past, I tried to add them to Notepad++ with the help of the wiki and I gave up because I couldn’t make it work. Best to forget the old stuff on the wiki... Will make an announcement once the new system is ready. It includes a dedicated lexer plugin and some other neat things; stay tuned. Idris -- Idris Samawi Hamid, Professor Department of Philosophy Colorado State University Fort Collins, CO 80512 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] how to prevent stupid typos?
On 06/07/2017 10:16 PM, Idris Samawi Hamid ادريس سماوي حامد wrote: > On Wed, 07 Jun 2017 14:08:21 -0600, Pablo Rodriguezwrote: > >> And creating a keyboard shortcut to launch the script automatically >> helps a lot. > > Scite: Ctrl-0 > Notepad++: Ctrl-Shift-0 > > (new n++ setup for context currently under development) Where are these setops? I mean, in the past, I tried to add them to Notepad++ with the help of the wiki and I gave up because I couldn’t make it work. Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] how to prevent stupid typos?
On Wed, 07 Jun 2017 14:08:21 -0600, Pablo Rodriguezwrote: And creating a keyboard shortcut to launch the script automatically helps a lot. Scite: Ctrl-0 Notepad++: Ctrl-Shift-0 (new n++ setup for context currently under development) Idris -- Idris Samawi Hamid, Professor Department of Philosophy Colorado State University Fort Collins, CO 80512 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] how to prevent stupid typos?
On 06/07/2017 09:08 PM, Hans Hagen wrote: > On 6/7/2017 8:11 PM, Pablo Rodriguez wrote: >> My question here isn’t about speed. If a source may load twenty source >> files and it actually loads five source files, the problem is having to >> check the files individually. > > in that case i always run the individual files independently when > editing them As Idris pointed out too, I need to get the habit of ckecking source files every time I edit them. And creating a keyboard shortcut to launch the script automatically helps a lot. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] how to prevent stupid typos?
On 06/07/2017 09:02 PM, Idris Samawi Hamid ادريس سماوي حامد wrote: > [...] > As a matter of workflow, I would just check each \input when editing it, > don't see the need to check them all over and over - but maybe you have > some huge collaborative project with lots of \inputs frequently changing.. My project isn’t collaborative (I’m the only one who writes code there) and it is by no means huge. It is probably too complex for such simple mind as mine . \inputs don’t change too frequently. But the code I wrote a month ago is totally forgotten to me. I mean, I read and I understand what I wrote, but I may not remember why I did something in that particular way. I don’t need external examination to see that the code is unnecessarily complex in many ways. But I’m neither a ConTeXt or programming expert. The most common problem is that we have different conditions that weren’t considered when writing the original code. And these code additions may cause trouble. Because they need to be implemented in the shortest period of time and in the not the quietest working environment. At least for me, this is the perfect scenario to forget to close something I opened before. That being said, "mtxrunjit --autogenerate --script check" is the perfect tool to spot those stupid errors. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Position of prime for derivatives
On Wed, Jun 7, 2017 at 9:57 PM, Mikael P. Sundqvistwrote: > On Mon, Jun 5, 2017 at 11:00 PM, Hans Hagen wrote: >> On 6/4/2017 11:06 PM, Otared Kavian wrote: >>> >>> Hi Mikael, >>> >>> Indeed your observation is correct, but using \over instead of \frac >>> yields the correct behavior. Please try the following sample: >>> >>> %%% begin derivatives-prime-4.tex >>> \setupbodyfont[lucidaot] >>> >>> \starttext >>> >>> Compare the position of the prime sign in $f'/g$ in these two expressions: >>> the first one using \type{{... \over ...}} >>> \startformula >>> \left({f \over g}\right)' = {f' \over g} - {f \over g^2}g' >>> \stopformula >>> (which yields a correct position of the prime for $f'$ in $f'/g$), and the >>> second using \type{\frac{...}{...}} >>> \startformula >>> \left(\frac{f}{g} \right)' = \frac{f'}{g} - \frac{f}{g^2} g' >>> \stopformula >>> which yields a prime sign for $f'$ a little bit lower. >>> >>> \stoptext >>> %%% end derivatives-prime-4.tex >> >> The problem with primes is that it's a real mess, conceptually as well as in >> fonts. >> >> - we need to deal with not only one prime but also with double, tripple and >> quadruple ones and they need to become proper unicode symbols too >> >> - fonts have one, two or three sizes, often inconsistent and with funny >> dimensions, onlyt the text size can be trusted >> >> - we cannot use prime as nuclues as it can be combined with a subscript >> >> - but it isn't designed as a script symbol and is already raised (somewhat) >> >> - so we have to deal with a good old tex / fonts / plain inheritance, >> unicode but also want to avoid active character and parsing mess etc. >> >> I tried several approaches and it's hard to come up with a general solution >> that suits all fonts. >> >> Now, the bad is that when we use a superscript with a smashed virtual >> characters we end up in script choice mess with primes being one step too >> small. >> >> So, I decided to follow a different route and extend luatex with a sizeless >> super/subscript feature so that we can handle such weird cases (there might >> be more). >> >> This also means that the primes get larger. I only use the text size prime >> and scale that down for the other sizes i.e. no stty for primes as they are >> such a mess) but we can live with that. >> >> The good news is that it gets better but the bad news is that you have to >> wait till we release luatex 1.0.5 (planned for the ctx meeting but we might >> do an intermediate garden release anyway). >> >> btw, with \frac you get cramped styles and these have different positioning. >> Such is life. >> >> Hans >> >> - >> Hans Hagen | PRAGMA ADE >> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >>tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl >> - >> ___ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> http://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : http://contextgarden.net >> ___ > > Again, thanks. > > In 2017.06.06 13:22 something is still not correct. > > The input file > > \startTEXpage[offset=3pt] > $f'(x)\hat{f}'(x)$ > \stopTEXpage > > gives the attached output. The prime of f'(x) looks wrong, the one of > \hat{f}'(x) looks correct. > > /Mikael I was too quick. The example \setupbodyfont[lucidaot,10pt] \setupmathematics[stylealternative={calligraphic}]% to get the normal math lower case italic \startTEXpage[offset=3pt] $f'(x)\hat{f}'(x)$ \stopTEXpage gives bad result in both cases. The first one with wrong size and wrong vertical placement, the second one only with wrong vertical placement (that was not obvious to me for latin modern). /Mikael ctx-listexample31.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Position of prime for derivatives
On Mon, Jun 5, 2017 at 11:00 PM, Hans Hagenwrote: > On 6/4/2017 11:06 PM, Otared Kavian wrote: >> >> Hi Mikael, >> >> Indeed your observation is correct, but using \over instead of \frac >> yields the correct behavior. Please try the following sample: >> >> %%% begin derivatives-prime-4.tex >> \setupbodyfont[lucidaot] >> >> \starttext >> >> Compare the position of the prime sign in $f'/g$ in these two expressions: >> the first one using \type{{... \over ...}} >> \startformula >> \left({f \over g}\right)' = {f' \over g} - {f \over g^2}g' >> \stopformula >> (which yields a correct position of the prime for $f'$ in $f'/g$), and the >> second using \type{\frac{...}{...}} >> \startformula >> \left(\frac{f}{g} \right)' = \frac{f'}{g} - \frac{f}{g^2} g' >> \stopformula >> which yields a prime sign for $f'$ a little bit lower. >> >> \stoptext >> %%% end derivatives-prime-4.tex > > The problem with primes is that it's a real mess, conceptually as well as in > fonts. > > - we need to deal with not only one prime but also with double, tripple and > quadruple ones and they need to become proper unicode symbols too > > - fonts have one, two or three sizes, often inconsistent and with funny > dimensions, onlyt the text size can be trusted > > - we cannot use prime as nuclues as it can be combined with a subscript > > - but it isn't designed as a script symbol and is already raised (somewhat) > > - so we have to deal with a good old tex / fonts / plain inheritance, > unicode but also want to avoid active character and parsing mess etc. > > I tried several approaches and it's hard to come up with a general solution > that suits all fonts. > > Now, the bad is that when we use a superscript with a smashed virtual > characters we end up in script choice mess with primes being one step too > small. > > So, I decided to follow a different route and extend luatex with a sizeless > super/subscript feature so that we can handle such weird cases (there might > be more). > > This also means that the primes get larger. I only use the text size prime > and scale that down for the other sizes i.e. no stty for primes as they are > such a mess) but we can live with that. > > The good news is that it gets better but the bad news is that you have to > wait till we release luatex 1.0.5 (planned for the ctx meeting but we might > do an intermediate garden release anyway). > > btw, with \frac you get cramped styles and these have different positioning. > Such is life. > > Hans > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ Again, thanks. In 2017.06.06 13:22 something is still not correct. The input file \startTEXpage[offset=3pt] $f'(x)\hat{f}'(x)$ \stopTEXpage gives the attached output. The prime of f'(x) looks wrong, the one of \hat{f}'(x) looks correct. /Mikael ctx-listexample31.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] aligning external figures
On 06/07/2017 09:02 PM, Hans Hagen wrote: > On 6/7/2017 8:23 PM, Pablo Rodriguez wrote: >> [...] >> \c!align=\v!none, % New, for Tacos extremely large graphics. >> >> Sorry for asking, but would it be possible that the key should set >> alignment for externalfigures and there is a bug in it? >> >> Taco, may you enlighten us in the alignment your extremely large >> graphics needed? (Sorry for bothering you, but we need to know which >> kind of alignment is.) > > probably a mkii left over ... (maybe the reporting part) ... there is > nothing to align in an external graphic (apart from the framed box but > thatone has exact dimension sso again, nothing to align Many thanks for your reply, Hans. Now it’s clear to me. Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] how to prevent stupid typos?
On 6/7/2017 8:11 PM, Pablo Rodriguez wrote: My question here isn’t about speed. If a source may load twenty source files and it actually loads five source files, the problem is having to check the files individually. in that case i always run the individual files independently when editing them Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] how to prevent stupid typos?
On Wed, 07 Jun 2017 12:11:14 -0600, Pablo Rodriguezwrote: (but i have to admit that i normally just run files and redo after fixing an error, running is fast enough) My question here isn’t about speed. If a source may load twenty source files and it actually loads five source files, the problem is having to check the files individually. I suppose it wouldn't be too hard for someone with the requisite ability to write a script to pipe and run the check on the argument of each \input in a main file. OTOH, \input's can have \input's so it could get unwieldy pretty quick.. As a matter of workflow, I would just check each \input when editing it, don't see the need to check them all over and over - but maybe you have some huge collaborative project with lots of \inputs frequently changing.. Best wishes Idris -- Idris Samawi Hamid, Professor Department of Philosophy Colorado State University Fort Collins, CO 80512 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] aligning external figures
On 6/7/2017 8:23 PM, Pablo Rodriguez wrote: On 06/07/2017 03:55 PM, Hans Hagen wrote: On 6/4/2017 11:29 AM, Pablo Rodriguez wrote: [...] Does anyone know how the align key in \setupexternalfigure works? it doesn't (no clue what it should be doing anyway) Many thanks for your reply, Hans. grph-inc.mkiv includes the following content in line 104 (removed some blank spaces, so it fits in a single line): \c!align=\v!none, % New, for Tacos extremely large graphics. Sorry for asking, but would it be possible that the key should set alignment for externalfigures and there is a bug in it? Taco, may you enlighten us in the alignment your extremely large graphics needed? (Sorry for bothering you, but we need to know which kind of alignment is.) probably a mkii left over ... (maybe the reporting part) ... there is nothing to align in an external graphic (apart from the framed box but thatone has exact dimension sso again, nothing to align Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] how to prevent stupid typos?
On Wed, 07 Jun 2017 02:09:48 -0600, Hans Hagenwrote: On 6/7/2017 7:02 AM, Pablo Rodriguez wrote: On 06/06/2017 10:56 PM, Idris Samawi Hamid ادريس سماوي حامد wrote: [...] Would it be any way to make ConTeXt report that \linenote{ hasn’t been closed? Just check your file before running it: mtxrun --autogenerate --script check test.tex Running this on your example gives 2 grouping error \starttext This is \linenote{abed intended. \stoptext Dear Idris, many thanks for the advice. I’m afraid that it doesn’t report errors in files loaded with the \input command %%% contents of file a.tex: \starttext This is \linenote{error intended \stoptext %%% contents of file b.tex: \starttext This only loads a file. \input a.tex \stoptext If I runt "mtxrunjit --autogenerate --script check b.tex", I get the following message: no error Is there no way to check also the files loaded by the main source? i just run that command from the editor (configured under a key) so i can use it when editing a file Same here. (but i have to admit that i normally just run files and redo after fixing an error, running is fast enough) Again, same here. Idris -- Idris Samawi Hamid, Professor Department of Philosophy Colorado State University Fort Collins, CO 80512 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] mathradical defaults to "normal", should it perhaps be "default"?
On Wed, Jun 7, 2017 at 7:31 PM, Hans Hagenwrote: > On 6/7/2017 4:50 PM, Mikael P. Sundqvist wrote: >> >> On Mon, Jun 5, 2017 at 10:24 AM, Mikael P. Sundqvist >> wrote: >>> >>> Hi, >>> >>> this might be a matter of taste. >>> >>> look at the output of (attached). In my opinion the first square root >>> is to "high", while it looks better on the second line. From >>> setup-en.pdf it looks like the default of \setupmathradical is set to >>> normal (and not default). I don't understand what normal should mean, >>> but I think the alternative=default looks better. (The lucida fonts >>> are loaded in this example, since the effect is more clear for them). > > Ok, this is the story > > -- radicals (roots) are rather special and have some hard coded properties > (like always scriptscript in the degree) > > -- \over (and friends) that are used in \frac (which by the way can be > configured in many ways) has the danger of getting the wrong style as side > effect of parsing (math list construction) and processing > > -- in context we want to support color etc for noth in a consistent way as > well as style control (important in educational math) > > Normally it works out ok with the 'normal' setting but there is some catch > here. The size of the radical symbols is determine by > > -- RadicalVerticalGap = 50 > -- RadicalDisplayStyleVerticalGap = 175 > > (These are lucide values) and it happens that the second one if too large > which can give a bad threshold in our case. In cambria it's > > RadicalVerticalGap = 166 > RadicalDisplayStyleVerticalGap = 345 > > So a 1:2 ratio. If we use that for lucida it looks better, so > > lucida-opentype-math.lfg > > can become: > > local function FixRadicalDisplayStyleVerticalGap(value,target,original) > local o = original.mathparameters.RadicalVerticalGap -- 50 > return 2 * o * target.parameters.factor > end > > return { > name = "lucida-opentype-math", > version = "1.00", > comment = "Goodies that complement lucida opentype.", > author = "Hans Hagen", > copyright = "ConTeXt development team", > mathematics = { > parameters = { > RadicalDisplayStyleVerticalGap = > FixRadicalDisplayStyleVerticalGap, > }, > alternates = { > italic = { feature = 'ss01', value = 1, comment = > "Mathematical Alternative Lowercase Italic" }, > arrow= { feature = 'ss02', value = 1, comment = > "Mathematical Alternative Smaller Arrows" }, > operator = { feature = 'ss03', value = 1, comment = > "Mathematical Alternative Smaller Operators" }, > calligraphic = { feature = 'ss04', value = 1, comment = > "Mathematical Alternative Calligraphic Characters" }, > zero = { feature = 'ss05', value = 1, comment = > "Mathematical Alternative Zero" }, > partial = { feature = 'ss20', value = 1, comment = > "Mathematical Alternative Upright Partial Differential" }, > }, > }, > } > > It's sort of a font property: the more sizes the better and sometimes you're > simply hit by the threshold not suiting your case. > > > Hans > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ Hans, many thanks for your explanation, it is really appreciated when you take your time to do this! I updated my local lucida-opentype-math.lfg and indeed it works like charm. I think the uncramped version I get now looks better than what I forced with the temporary solution that I did not understand. /Mikael ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] aligning external figures
On 06/07/2017 03:55 PM, Hans Hagen wrote: > On 6/4/2017 11:29 AM, Pablo Rodriguez wrote: >> [...] >> Does anyone know how the align key in \setupexternalfigure works? > > it doesn't (no clue what it should be doing anyway) Many thanks for your reply, Hans. grph-inc.mkiv includes the following content in line 104 (removed some blank spaces, so it fits in a single line): \c!align=\v!none, % New, for Tacos extremely large graphics. Sorry for asking, but would it be possible that the key should set alignment for externalfigures and there is a bug in it? Taco, may you enlighten us in the alignment your extremely large graphics needed? (Sorry for bothering you, but we need to know which kind of alignment is.) Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] how to prevent stupid typos?
On 06/07/2017 10:09 AM, Hans Hagen wrote: > On 6/7/2017 7:02 AM, Pablo Rodriguez wrote: >> [...] >> If I runt "mtxrunjit --autogenerate --script check b.tex", I get the >> following message: >> >> no error >> >> Is there no way to check also the files loaded by the main source? > > i just run that command from the editor (configured under a key) so i > can use it when editing a file Hans, I have just discovered the command (thanks to the kind help of Idris), so I still have to experiment with it. First of all, many thanks for the command (method, or whatever it should be called). It is really useful. In my real-world issue, the tool it spotted my mistake (a non-closed \startnotmode nested in \startmode and followed by another \startmode). My previous reply came before having used the checking method. > (but i have to admit that i normally just run files and redo after > fixing an error, running is fast enough) My question here isn’t about speed. If a source may load twenty source files and it actually loads five source files, the problem is having to check the files individually. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] mathradical defaults to "normal", should it perhaps be "default"?
On 6/7/2017 4:50 PM, Mikael P. Sundqvist wrote: On Mon, Jun 5, 2017 at 10:24 AM, Mikael P. Sundqvistwrote: Hi, this might be a matter of taste. look at the output of (attached). In my opinion the first square root is to "high", while it looks better on the second line. From setup-en.pdf it looks like the default of \setupmathradical is set to normal (and not default). I don't understand what normal should mean, but I think the alternative=default looks better. (The lucida fonts are loaded in this example, since the effect is more clear for them). Ok, this is the story -- radicals (roots) are rather special and have some hard coded properties (like always scriptscript in the degree) -- \over (and friends) that are used in \frac (which by the way can be configured in many ways) has the danger of getting the wrong style as side effect of parsing (math list construction) and processing -- in context we want to support color etc for noth in a consistent way as well as style control (important in educational math) Normally it works out ok with the 'normal' setting but there is some catch here. The size of the radical symbols is determine by -- RadicalVerticalGap = 50 -- RadicalDisplayStyleVerticalGap = 175 (These are lucide values) and it happens that the second one if too large which can give a bad threshold in our case. In cambria it's RadicalVerticalGap = 166 RadicalDisplayStyleVerticalGap = 345 So a 1:2 ratio. If we use that for lucida it looks better, so lucida-opentype-math.lfg can become: local function FixRadicalDisplayStyleVerticalGap(value,target,original) local o = original.mathparameters.RadicalVerticalGap -- 50 return 2 * o * target.parameters.factor end return { name = "lucida-opentype-math", version = "1.00", comment = "Goodies that complement lucida opentype.", author = "Hans Hagen", copyright = "ConTeXt development team", mathematics = { parameters = { RadicalDisplayStyleVerticalGap = FixRadicalDisplayStyleVerticalGap, }, alternates = { italic = { feature = 'ss01', value = 1, comment = "Mathematical Alternative Lowercase Italic" }, arrow= { feature = 'ss02', value = 1, comment = "Mathematical Alternative Smaller Arrows" }, operator = { feature = 'ss03', value = 1, comment = "Mathematical Alternative Smaller Operators" }, calligraphic = { feature = 'ss04', value = 1, comment = "Mathematical Alternative Calligraphic Characters" }, zero = { feature = 'ss05', value = 1, comment = "Mathematical Alternative Zero" }, partial = { feature = 'ss20', value = 1, comment = "Mathematical Alternative Upright Partial Differential" }, }, }, } It's sort of a font property: the more sizes the better and sometimes you're simply hit by the threshold not suiting your case. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] mathradical defaults to "normal", should it perhaps be "default"?
On 6/7/2017 5:12 PM, Otared Kavian wrote: Hi, Indeed using \frac yields a weird result in the example sent by Mikael. Compare the output of the three formulas below, with or without \setupmathradical[sqrt][alternative=default]. The results are correct using \over in both cases, while the first one is weird when using \frac and \setupmathradical[sqrt][alternative=default]. Best regards: OK %%% start of test file \starttext \startbuffer[math] \startformula \sqrt{1+\Bigl(\frac{f(x_k)-f(x_{k-1})}{x_k-x_{k-1}}\Bigr)^2} \stopformula \startformula 1+\Bigl(\frac{f(x_k)-f(x_{k-1})}{x_k-x_{k-1}}\Bigr)^2 \stopformula \startformula \sqrt{1+\Bigl({f(x_k)-f(x_{k-1}) \over x_k - x_{k-1}}\Bigr)^2} \stopformula \stopbuffer \getbuffer[math] \hairline \setupmathradical[sqrt][alternative=default] \getbuffer[math] \stoptext interesting side effect of Ustack (i'll look at it) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] mathradical defaults to "normal", should it perhaps be "default"?
On 6/7/2017 5:45 PM, Alan BRASLAU wrote: On Wed, 7 Jun 2017 17:12:44 +0200 Otared Kavianwrote: The results are correct using \over in both cases, while the first one is weird when using \frac and I have been massacred on this list for ever preferring \over to \frac... and because of the many {} you then need you get these mismatch errors ... but, you can make \unexpanded\def\fakefrac#1#2{{{#1}\over{#2}}} - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] mathradical defaults to "normal", should it perhaps be "default"?
> On 7 Jun 2017, at 17:45, Alan BRASLAUwrote: > > On Wed, 7 Jun 2017 17:12:44 +0200 > Otared Kavian wrote: > >> The results are correct using \over in both cases, while the first >> one is weird when using \frac and > > I have been massacred on this list for ever preferring \over to \frac... Do not be sad, we will bring flowers to console you - some of us do not hate \over ;-) ;-) ;-) > __ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] mathradical defaults to "normal", should it perhaps be "default"?
On Wed, 7 Jun 2017 17:12:44 +0200 Otared Kavianwrote: > The results are correct using \over in both cases, while the first > one is weird when using \frac and I have been massacred on this list for ever preferring \over to \frac... ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] mathradical defaults to "normal", should it perhaps be "default"?
Hi, Indeed using \frac yields a weird result in the example sent by Mikael. Compare the output of the three formulas below, with or without \setupmathradical[sqrt][alternative=default]. The results are correct using \over in both cases, while the first one is weird when using \frac and \setupmathradical[sqrt][alternative=default]. Best regards: OK %%% start of test file \starttext \startbuffer[math] \startformula \sqrt{1+\Bigl(\frac{f(x_k)-f(x_{k-1})}{x_k-x_{k-1}}\Bigr)^2} \stopformula \startformula 1+\Bigl(\frac{f(x_k)-f(x_{k-1})}{x_k-x_{k-1}}\Bigr)^2 \stopformula \startformula \sqrt{1+\Bigl({f(x_k)-f(x_{k-1}) \over x_k - x_{k-1}}\Bigr)^2} \stopformula \stopbuffer \getbuffer[math] \hairline \setupmathradical[sqrt][alternative=default] \getbuffer[math] \stoptext %%% end of test file > On 7 Jun 2017, at 16:50, Mikael P. Sundqvistwrote: >> […] > > Hans, > > maybe the \setupmathradical[sqrt][alternative=default] was not so > successful after all. Or maybe this is a bug: > > %%% start of test file > \setupmathradical[sqrt][alternative=default] > > \starttext > \startformula > \sqrt{1+\Bigl(\frac{f(x_k)-f(x_{k-1})}{x_k-x_{k-1}}\Bigr)^2} > \stopformula > \stoptext > %%% stop of test file > > The numerator looks too small in my opinion. Compiled with 2017.06.06 13:22. > > /Mikael > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] mathradical defaults to "normal", should it perhaps be "default"?
On Mon, Jun 5, 2017 at 10:24 AM, Mikael P. Sundqvistwrote: > Hi, > > this might be a matter of taste. > > look at the output of (attached). In my opinion the first square root > is to "high", while it looks better on the second line. From > setup-en.pdf it looks like the default of \setupmathradical is set to > normal (and not default). I don't understand what normal should mean, > but I think the alternative=default looks better. (The lucida fonts > are loaded in this example, since the effect is more clear for them). > > /Mikael > > \setupbodyfont[lucidaot] > > \starttext > > \startTEXpage[offset=2pt] > \startformula > \sqrt{1+x^2}\neq \frac{1}{\sqrt{1+x^2}} > \stopformula > > %the default setting for mathradical seems to be "normal". We change > it to "normal" > \setupmathradical[sqrt][alternative=default] > > \startformula > \displaystyle\sqrt{1+x^2}\neq \frac{1}{\sqrt{1+x^2}} > \stopformula > \stopTEXpage > > \stoptext Hans, maybe the \setupmathradical[sqrt][alternative=default] was not so successful after all. Or maybe this is a bug: %%% start of test file \setupmathradical[sqrt][alternative=default] \starttext \startformula \sqrt{1+\Bigl(\frac{f(x_k)-f(x_{k-1})}{x_k-x_{k-1}}\Bigr)^2} \stopformula \stoptext %%% stop of test file The numerator looks too small in my opinion. Compiled with 2017.06.06 13:22. /Mikael ctx-example22.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] aligning external figures
On 6/4/2017 11:29 AM, Pablo Rodriguez wrote: Dear list, I have the following sample: \setupexternalfigure[location=default, align=middle] \starttext \dontleavehmode\externalfigure[cow.pdf] \externalfigure[cow.pdf] \stoptext As you can see, \dontleavehmode makes no difference. Does anyone know how the align key in \setupexternalfigure works? it doesn't (no clue what it should be doing anyway) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] how to prevent stupid typos?
On 6/7/2017 7:02 AM, Pablo Rodriguez wrote: On 06/06/2017 10:56 PM, Idris Samawi Hamid ادريس سماوي حامد wrote: [...] Would it be any way to make ConTeXt report that \linenote{ hasn’t been closed? Just check your file before running it: mtxrun --autogenerate --script check test.tex Running this on your example gives 2 grouping error \starttext This is \linenote{abed intended. \stoptext Dear Idris, many thanks for the advice. I’m afraid that it doesn’t report errors in files loaded with the \input command %%% contents of file a.tex: \starttext This is \linenote{error intended \stoptext %%% contents of file b.tex: \starttext This only loads a file. \input a.tex \stoptext If I runt "mtxrunjit --autogenerate --script check b.tex", I get the following message: no error Is there no way to check also the files loaded by the main source? i just run that command from the editor (configured under a key) so i can use it when editing a file (but i have to admit that i normally just run files and redo after fixing an error, running is fast enough) - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___