[NTG-context] Ubuntu Light font
Dear all, I would like to use the light version of the Ubuntu font both for text and for text in math environment. The list of fonts is the following *mtxrun --script fonts --list --all | grep ubuntuubuntu ubuntu /home/flavien/.fonts/Ubuntu-R.ttfubuntubold ubuntubold /home/flavien/.fonts/Ubuntu-B.ttfubuntubolditalic ubuntubolditalic /home/flavien/.fonts/Ubuntu-BI.ttfubuntucondensed ubuntucondensedregular /home/flavien/.fonts/Ubuntu-C.ttfubuntucondensednormal ubuntucondensedregular /home/flavien/.fonts/Ubuntu-C.ttfubuntucondensedregular ubuntucondensedregular /home/flavien/.fonts/Ubuntu-C.ttfubuntuitalic ubuntuitalic /home/flavien/.fonts/Ubuntu-RI.ttfubuntulight ubuntulight /home/flavien/.fonts/Ubuntu-L.ttfubuntulightitalic ubuntulightitalic /home/flavien/.fonts/Ubuntu-LI.ttfubuntumedium ubuntumedium /home/flavien/.fonts/Ubuntu-M.ttfubuntumediumitalic ubuntumediumitalic /home/flavien/.fonts/Ubuntu-MI.ttfubuntumono ubuntumonoregular /home/flavien/.fonts/UbuntuMono-R.ttfubuntumonobold ubuntumonobold /home/flavien/.fonts/UbuntuMono-B.ttfubuntumonobolditalic ubuntumonobolditalic /home/flavien/.fonts/UbuntuMono-BI.ttfubuntumonoitalic ubuntumonoitalic /home/flavien/.fonts/UbuntuMono-RI.ttfubuntumononormal ubuntumonoregular /home/flavien/.fonts/UbuntuMono-R.ttfubuntumonoregular ubuntumonoregular /home/flavien/.fonts/UbuntuMono-R.ttfubuntunormal ubuntu /home/flavien/.fonts/Ubuntu-R.ttfubunturegular ubuntulight /home/flavien/.fonts/Ubuntu-L.ttf* I tried a script that I used before for Maven pro through, *\definefontfeature[default][default][script=latin]\definefontfamily[mainface][sans][ubuntulight]\definefallbackfamily [mainface] [math] [ubuntulight] [math:lowercaseitalic] [force=yes]\definefallbackfamily [mainface] [math] [ubuntulight] [math:digitsnormal][force=yes]\definefontfamily [mainface] [math] [TeX Gyre Pagella Math]\definebodyfontenvironment [11pt][a=12pt,b=14.4pt,c=17.3pt,d=32pt,interlinespace=13pt]\setupbodyfont[mainface,11pt]* but it does not work (it is ok if I use ubuntu instead of ubuntulight). Thanks for your help, F. ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Change the default text colour for entire document
On 1/27/2014 12:24 AM, Wolfgang Schuster wrote: Am 22.01.2014 um 02:15 schrieb Thangalin thanga...@gmail.com: Hi, In ConTeXt to change the default text colour for the entire document, there are at least two settings that need to be configured: \setupcolors[textcolor=red] \setupinmargin[line=13,color=red,style=slanted,] The border colour for tables remains black: \setupcolors[textcolor=red] \setupinmargin[color=red] \starttext {\bTABLE \bTR \bTD One \eTD \bTD Two \eTD \eTR \eTABLE} \stoptext How can you override *all* instances of black? (Ideally there would be a single setting that is inherited by all.) That is, it is difficult to know all the various aspects of a ConTeXt document that use the default black colour -- margins, body text, table borders, and possibly more that I don't know about. Notes (local notes excluded because they use a different placement system) and margin texts ignore the global text color because both mechanism reset colors and many other settings to avoid unwanted output from local changes in the main text etc. Even though there is a comment about this problem for margin notes in the source it wasn’t fixed yet but I think it makes sense to to so. \appendtoks \inheritmaintextcolor \to \everybeforenoteinsert \appendtoks \inheritmaintextcolor \to \everymargindatacontent could work, but it needs testing as we cannot predict side effects The problem with the black frames for natural tables are a result of the explicit framecolor setup for it (I guess to avoid problems when you use metapost backgrounds which use the framecolor value). A possible way to fix this is to add a framecolor setup to \setupcolors which argument is now used as default color for the frame of natural tables, this way can use this color also in other commands (core functions as well as third party modules) to set a default value. needs some thinking \setupTABLE [framecolor=\maintextcolor] some settings date from mkii times but again we need to think of side effects Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Change the default text colour for entire document
Hi Everybody, If I remember right colors can be defined in ConTeXt, right? So why not just redefine black! If this is stupid, the defaults get initialize before a redefined occurs! forget it! Just a stupid simplistic idea! regards Keith. Am 27.01.2014 um 12:10 schrieb Hans Hagen pra...@wxs.nl: On 1/27/2014 12:24 AM, Wolfgang Schuster wrote: Am 22.01.2014 um 02:15 schrieb Thangalin thanga...@gmail.com: Hi, In ConTeXt to change the default text colour for the entire document, there are at least two settings that need to be configured: \setupcolors[textcolor=red] \setupinmargin[line=13,color=red,style=slanted,] The border colour for tables remains black: \setupcolors[textcolor=red] \setupinmargin[color=red] \starttext {\bTABLE \bTR \bTD One \eTD \bTD Two \eTD \eTR \eTABLE} \stoptext How can you override *all* instances of black? (Ideally there would be a single setting that is inherited by all.) That is, it is difficult to know all the various aspects of a ConTeXt document that use the default black colour -- margins, body text, table borders, and possibly more that I don't know about. Notes (local notes excluded because they use a different placement system) and margin texts ignore the global text color because both mechanism reset colors and many other settings to avoid unwanted output from local changes in the main text etc. Even though there is a comment about this problem for margin notes in the source it wasn’t fixed yet but I think it makes sense to to so. \appendtoks \inheritmaintextcolor \to \everybeforenoteinsert \appendtoks \inheritmaintextcolor \to \everymargindatacontent could work, but it needs testing as we cannot predict side effects The problem with the black frames for natural tables are a result of the explicit framecolor setup for it (I guess to avoid problems when you use metapost backgrounds which use the framecolor value). A possible way to fix this is to add a framecolor setup to \setupcolors which argument is now used as default color for the frame of natural tables, this way can use this color also in other commands (core functions as well as third party modules) to set a default value. needs some thinking \setupTABLE [framecolor=\maintextcolor] some settings date from mkii times but again we need to think of side effects Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Change the default text colour for entire document
Keith: that was a brilliantly clever idea. I will write up a wiki page on this if someone can tell me where *every independent occurrence of black* could possibly appear (e.g., margins, footnotes, page numbers, table borders, etc.) and how to set each to a different colour. Not having a single inherited colour means knowledge of where all black references are used should be captured. I much prefer Hans' suggestion of defining \inheritmaintextcolor and using that everywhere: it is quite clean. Thank you! ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] runtime problem with metafun() code
On 1/25/2014 1:58 PM, Peter Rolf wrote: Am 25.01.2014 01:07, schrieb Hans Hagen: On 1/24/2014 7:41 PM, Peter Rolf wrote: Am 24.01.2014 14:45, schrieb Hans Hagen: On 1/24/2014 1:35 PM, Peter Rolf wrote: Hi, I try to create a Metapost path in lua and it works so far for the attached example. But a call of that function from another lua function sadly fails (no path visible after call). The code seems to be executed later (the output from 'show pid;' appears somewhere later in the log). How can I ensure that the code is executed at runtime? I don't understand the issue but isn't there a metafun(draw p;) missing then? Setting the bounding box has the same effect, as drawing something. Both methods avoid that the emtpy graphic is ignored by ConTeXt. Anyhow, the MP path is not available in metapost.variables after the function call. If there is no other way I have to call the function from the TeX side (like in the attached example). Will look into that tomorrow. %D We also provide an outputless run: \unexpanded\def\startMPcalculation I tried that command, but couldn't get it to work on the lua side. The first pure MP line after context.startMPcalculation() raises a lua error and a combination with metafun() is also not working. So how to use this in lua? Anyhow, the problem is the execution time of the MP graphic. I changed the attached example a bit, so that you can see it. The inspect() in drops.foo() gives an empty table, while the second inspect on the TeX side shows the path drops:foo. I need the path right after the call (it needs to be adapted to IM afterwards; mainly scaling and shifting). Is there a way to force the execution of the graphic without switching back to the TeX side? function drops.foo(id,width,height,radius) drops.generate_default_path(id,width,height,radius) context(function() inspect(metapost.variables) end) -- empty here end or function drops.bar() inspect(metapost.variables) end function drops.foo(id,width,height,radius) drops.generate_default_path(id,width,height,radius) context(drops.bar) -- empty here end - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] MPpositiongraphic: I don't know when it's going to work and when it's not.
On 1/24/2014 12:52 AM, Elspeth McGullicuddy wrote: Hi Hans, The tip you gave me (wandering spaces), worked for the previous example, the one where the overlay was attached to the background of the paper. For the other example, where the overlay is attached to the background of a \framed, I haven't been able to make it work. The extra spaces there, were in fact added during the mail process but weren't in my file. I put the file that doesn't work in attached files, so there are no risk it collects extra spaces. There is probably an obvious and silly mistake but I can't find it: for me it's quite similar to the examples in metafun-p.pdf, p. 127: \framed[background=demo circle]{This text is overlayed.}, but mine refuses to work. you need to anchor the graphic: \starttext \defineoverlay[my fourth overlay][\positionoverlay{my backgraphics}] \startpositionoverlay{my backgraphics} \setMPpositiongraphic{three}{mypos:circle}{mypos:circleradius=1cm,mypos:circlecolor=red} \setMPpositiongraphic{three}{mypos:circle}{mypos:circleradius=.5cm,mypos:circlecolor=green} \stoppositionoverlay \startMPinclusions if unknown context_apos : input mp-apos.mpiv ; fi ; if unknown context_abck : input mp-abck.mpiv ; fi ; \stopMPinclusions \startMPpositiongraphic{mypos:circle} numeric x, y, w, h, d, radius; color c; path p ; x = \MPx{\MPvar{self}}; y = \MPy{\MPvar{self}}; w = \MPw{\MPvar{self}}; radius = \MPvar{mypos:circleradius}; c = \MPvar{mypos:circlecolor}; p = (x+w/2+radius,y)..(x+w/2,y+radius)..(x+w/2-radius,y) ..(x+w/2,y-radius)..cycle; drawarrow p withpen pencircle scaled 2pt withcolor c; anchor_box(\MPanchor{\MPvar{self}}) ; \stopMPpositiongraphic \framed [background=my fourth overlay,align=middle,width=7cm] {have attached it: \hpos{three}{{\em here}}, the} \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] runtime problem with metafun() code
Am 27.01.2014 13:12, schrieb Hans Hagen: On 1/25/2014 1:58 PM, Peter Rolf wrote: Am 25.01.2014 01:07, schrieb Hans Hagen: On 1/24/2014 7:41 PM, Peter Rolf wrote: Am 24.01.2014 14:45, schrieb Hans Hagen: On 1/24/2014 1:35 PM, Peter Rolf wrote: Hi, I try to create a Metapost path in lua and it works so far for the attached example. But a call of that function from another lua function sadly fails (no path visible after call). The code seems to be executed later (the output from 'show pid;' appears somewhere later in the log). How can I ensure that the code is executed at runtime? I don't understand the issue but isn't there a metafun(draw p;) missing then? Setting the bounding box has the same effect, as drawing something. Both methods avoid that the emtpy graphic is ignored by ConTeXt. Anyhow, the MP path is not available in metapost.variables after the function call. If there is no other way I have to call the function from the TeX side (like in the attached example). Will look into that tomorrow. %D We also provide an outputless run: \unexpanded\def\startMPcalculation I tried that command, but couldn't get it to work on the lua side. The first pure MP line after context.startMPcalculation() raises a lua error and a combination with metafun() is also not working. So how to use this in lua? Anyhow, the problem is the execution time of the MP graphic. I changed the attached example a bit, so that you can see it. The inspect() in drops.foo() gives an empty table, while the second inspect on the TeX side shows the path drops:foo. I need the path right after the call (it needs to be adapted to IM afterwards; mainly scaling and shifting). Is there a way to force the execution of the graphic without switching back to the TeX side? function drops.foo(id,width,height,radius) drops.generate_default_path(id,width,height,radius) context(function() inspect(metapost.variables) end) -- empty here end or function drops.bar() inspect(metapost.variables) end function drops.foo(id,width,height,radius) drops.generate_default_path(id,width,height,radius) context(drops.bar) -- empty here end Ah, that's how it works. I'm still a luatex noob... Many thanks, Hans!! Peter ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] definefontfamily options for caps and capsbold fonts
On 01/26/2014 10:54 PM, Wolfgang Schuster wrote: Am 26.01.2014 um 00:07 schrieb Pablo Rodriguez oi...@gmx.es: Hi Wolfgang, with the new simplefonts interface I have two options that used to work with the old interface, but that don’t work now. Here is the command: \definefontfamily[mainface][mono][ryt1xtt][capsfont=ryt1xttsc, boldfont=ryt1xbtt, capsboldfont=ryt1xttsc] I get mono the bold font, but I cannot get mono small caps or mono bold small caps. You can set the smallcaps font with the “smallcapsfont” key but I suggest to use the new keys instead because the old ones will disappear at one point. \definefontfamily[…][…][…][bf=file:ryt1xbtt,sc=file:ryt1xttsc] The bold caps font you want to use is not possible with the \definefontfamily command because context doesn’t provide a command to use it by default. Many thanks for your reply, Wolfgang. I will see if I can create a single font with caps and regular glyphs. 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] MPpositiongraphic: I don't know when it's going to work and when it's not.
On Mon, Jan 27, 2014 at 1:34 PM, Hans Hagen pra...@wxs.nl wrote: you need to anchor the graphic: anchor_box(\MPanchor{\MPvar{self}}) ; Thanks a lot, it works now. I wouldn't have guessed: I learnt a lot with that. Chris ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___