Re: [NTG-context] expansion problem: random location
> Am 2019-09-13 um 19:44 schrieb Wolfgang Schuster > : > > Henning Hraban Ramm schrieb am 13.09.2019 um 18:51: >> Hi, in an example document I’m trying to get pictures of random size and >> placement. >> Unfortunately the expansion is over my head: > Put the value of the random location in a macro. Thank you! I thought I had tried that, but probably only defining the macro outside of the other… Greetlings, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD ___ 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] expansion problem: random location
Henning Hraban Ramm schrieb am 13.09.2019 um 18:51: Hi, in an example document I’m trying to get pictures of random size and placement. Unfortunately the expansion is over my head: % \useMPlibrary[dum] \usemodule[visual] \startluacode local locations = { 'top', 'bottom', 'left', 'right', } function RandomLocation() context(locations[math.random(1,#locations)]) end \stopluacode \newdimen\PicWidth \PicWidth=\textwidth \define[1]\Blindbild{ \getrandomnumber\imgH{1}{9} \PicWidth=\textwidth \doif{#1}{left}{\PicWidth=.4\textwidth} \doif{#1}{right}{\PicWidth=.4\textwidth} \startplacefigure[location={#1},title={#1 \fakewords{3}{20}}] \externalfigure[place #1][width=\PicWidth,height=\dimexpr\textheight * \imgH / 10 \relax] \stopplacefigure } Put the value of the random location in a macro. \define[1]\Blindbild {\edef\PicLocation{#1}% \getrandomnumber\imgH{1}{9}% \PicWidth=\textwidth \doifinset{\PicLocation}{left,right}{\PicWidth=.4\textwidth}% \startplacefigure[location={\PicLocation},title={\PicLocation\space\fakewords{3}{20}}] \externalfigure [place \PicLocation] [width=\PicWidth, height=\dimexpr\textheight * \imgH / 10 \relax] \stopplacefigure} Wolfgang ___ 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 ___
[NTG-context] expansion problem: random location
Hi, in an example document I’m trying to get pictures of random size and placement. Unfortunately the expansion is over my head: % \useMPlibrary[dum] \usemodule[visual] \startluacode local locations = { 'top', 'bottom', 'left', 'right', } function RandomLocation() context(locations[math.random(1,#locations)]) end \stopluacode \newdimen\PicWidth \PicWidth=\textwidth \define[1]\Blindbild{ \getrandomnumber\imgH{1}{9} \PicWidth=\textwidth \doif{#1}{left}{\PicWidth=.4\textwidth} \doif{#1}{right}{\PicWidth=.4\textwidth} \startplacefigure[location={#1},title={#1 \fakewords{3}{20}}] \externalfigure[place #1][width=\PicWidth,height=\dimexpr\textheight * \imgH / 10 \relax] \stopplacefigure } \starttext \dorecurse{3} {\chapter{\fakewords{5}{10}} \dorecurse{3} {\dorecurse{3}{\fakewords{50}{100}\endgraf} \Blindbild{\ctxlua{RandomLocation()}} % expansion!? \dorecurse{2}{\fakewords{50}{100}\endgraf}}} \stoptext %% So the parameter of \Blindbild should get generated at the time of calling the macro, so that #1 stays the same within the macro. In this state the Lua function gets called at every use of #1. Greetlings, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD ___ 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] formatting index entries: alphabetical order in Unicode
On 9/13/2019 12:20 PM, Robert Zydenbos wrote: On 22. Aug 2019, at 18:17, Wolfgang Schuster wrote: A PDF with the wrong sorting order doesn't help when you can't show a working minimal example to reproduce the problem. When you need more control about the sorting order of the index you should switch to MkIV which has more options. Wolfgang When ConTeXt MkIV (rather: LuaTeX) supports Indic fonts, I'll gladly do that. :-) context does to some extend ... a few month ago some more indic scripts were added but of course one needs the fonts and right settings 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] formatting index entries: alphabetical order in Unicode
On Fri, Sep 13, 2019 at 12:20 PM Robert Zydenbos wrote: > On 22. Aug 2019, at 18:17, Wolfgang Schuster < > wolfgang.schuster.li...@gmail.com> wrote: > > > A PDF with the wrong sorting order doesn't help when you can't show a > working minimal example to reproduce the problem. When you need more > control about the sorting order of the index you should switch to MkIV > which has more options. > > > > Wolfgang > > When ConTeXt MkIV (rather: LuaTeX) supports Indic fonts, I'll gladly do > that. :-) > luahbtex (in texlive 2020) has harfbuzz embedded . -- luigi ___ 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] formatting index entries: alphabetical order in Unicode
On 22. Aug 2019, at 18:17, Wolfgang Schuster wrote: > A PDF with the wrong sorting order doesn't help when you can't show a working > minimal example to reproduce the problem. When you need more control about > the sorting order of the index you should switch to MkIV which has more > options. > > Wolfgang When ConTeXt MkIV (rather: LuaTeX) supports Indic fonts, I'll gladly do that. :-) Robert ___ 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] variable fonts
> Am 2019-09-13 um 10:32 schrieb Ulrike Fischer : > > In https://mailman.ntg.nl/pipermail/ntg-context/2017/088343.html > is some code to use variable fonts. > > I don't have the fonts but tried it (in a current context mkiv) with > "bahnschrift" instead which as far as I could find out should be a > variable font too, but can't see any effect. > > Is the code still meant to work? Hi Ulrike, sorry I can’t help you, but there’s an article by Hans in the proceedings of 11th context meeting, 2017. Do you have that? It’s also in texmf-context/docs/context/documents/general/manuals/onandon.pdf Greetlings, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD ___ 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 ___
[NTG-context] variable fonts
In https://mailman.ntg.nl/pipermail/ntg-context/2017/088343.html is some code to use variable fonts. I don't have the fonts but tried it (in a current context mkiv) with "bahnschrift" instead which as far as I could find out should be a variable font too, but can't see any effect. Is the code still meant to work? -- Ulrike Fischer https://www.troubleshooting-tex.de/ ___ 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 ___
[NTG-context] special book layout problem in ConTeXt
Dear ConText Hepers, I'm not sure I'm writing at the good email adress, or even the good place; but sorry, I didn't find any online forum or othr hep centers, so I try. Please tell me if I have to write to someone else. I'd like to edit a thesis (so, as a book), with the text only on even pages, and tables and figure only on odd pages, in front of the paragraph wich comment them. I try to do this automatically by writing the text, make a reference to the figure in the paragraph, and then the layout appears correctly... I have the impression this is possible to do in ConText, but I havn't find how yet. Is it possibel to force, in the setups, the text to be on the right pages, and the figures on the left pages? Thank you very much in advance All the best Nicolas Mondon -- /Nicolas Mondon catalogue, écoutes, concerts : http://n.mondon.free.fr/ / ___ 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 ___