Re: [NTG-context] making horizontal space in luacode.
On Mon, 22 Oct 2012, Jeong Dal wrote: Dear all, 1. I'd like to make a horizontal space using \hspace[3em] inside luacode. But context.hspace({3em}), context.hspace({"3em"}), context.hspace("3em") don't work. And print(" ") doesn't work either. How to make some horizontal space in luacode? \hspace does not accept dimensions. The syntax for hspace is \definehspace[whatever][3em] \hspace[whatever]. So, you need: \definehspace[skip][3em] \starttext \startluacode context("Some text") context.hspace{"skip"} context("More text") \stopluacode \stoptext Aditya ___ 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 ___
[NTG-context] making horizontal space in luacode.
Dear all, 1. I'd like to make a horizontal space using \hspace[3em] inside luacode. But context.hspace({3em}), context.hspace({"3em"}), context.hspace("3em") don't work. And print(" ") doesn't work either. How to make some horizontal space in luacode? 2. There is no white line even though I put "\blank[big]" between Frame(bring it from MetaFun) and text as in the following example. \starttext framed Text \startuseMPgraphic{FunnyFrame} picture p ; numeric o ; path a, b ; pair c ; p := textext.rt(\MPstring{FunnyFrame}) ; o := BodyFontSize ; a := unitsquare xyscaled(OverlayWidth,OverlayHeight) ; p := p shifted (2o,OverlayHeight-ypart center p) ; drawoptions (withpen pencircle scaled 1pt withcolor .625red) ; b := a superellipsed .95 ; %fill b withcolor .85white ; draw b ; b := (boundingbox p) superellipsed .95 ; fill b withcolor .425green;%.85white ; draw b ; draw p withcolor black ; setbounds currentpicture to a ; \stopuseMPgraphic \defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}] \defineframedtext[FunnyText][frame=off,background=FunnyFrame, offset=\bodyfontsize, width=\overlaywidth]%.8\textwidth] \def\StartFrame{\startFunnyText} \def\StopFrame {\stopFunnyText} \def\FrameTitle#1% {\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut\ss\bf\white #1\hss}}} This is a test line file for blank spaces. \blank[big] % white line is wanted {\FrameTitle{Test} \StartFrame \startitemize[n] \item the first line. \item the second line. \item the third line. \stopitemize \StopFrame } \blank[big] % white line is wanted Here is another test line. \stoptext What should I do to make a blank line before and after Thank you. Best regards, Dalyoung ___ 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] trimwhite utility (was: Current ConTeXt & wiki)
On Sat, 20 Oct 2012 13:49:05 +0200, Marco Patzer wrote: 2012-10-20 Hans Hagen: > Another option is to use pdftrimwhite, which is part of the minimals rather than pdfcrop. if needed I can make a mtx-trimwhite (lua instead of perl) +1 If you decide to rewrite pdftrimwhite, maybe you can consider making it work with multiple page files as well. +1 It would be handy enough. Btw: I didn't use/test the utility so far, but I believe it really removes the content out of the trimming area; some SW I've been using for that purpose just change the crop-box, so the content out of the trimming area reappears once you restore the cropping specification to its original value. Best regards, Lukas The current version only crops the first page and discards the rest. Marco ___ 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] Test suite report
> Any clue about which directory can be safely dropped? Nevermind, I'm finding the way. -- Marco ___ 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 ___
[NTG-context] Overlapping margin figures
Hi, I have narrow margin floats and wide floats that protrude into the margin. Currently they overlap with the narrow figures. How to avoid this? \useMPlibrary [dum] \definefloat [marginfigure] [marginfigures] [figure] \setupfloat [marginfigure] [default=margin] \definefloat [widefigure] [widefigures] [figure] \setupfloat [widefigure] [location=left] \starttext \dorecurse{5}{%% \startplacemarginfigure \externalfigure [dum] [width=\rightmarginwidth, height=2cm] \stopplacemarginfigure} \startplacewidefigure \externalfigure [dum] [width=\dimexpr\textwidth+\rightmargintotal\relax, height=3cm] \stopplacewidefigure \stoptext Marco ___ 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] Test suite report
Hans Hagen writes: > there is s zip with lots of test files, it might make sense to take > some from them (not all make sense in a visual compare) There are more then 800 files in http://www.pragma-ade.com/context/latest/cont-tst.7z Any clue about which directory can be safely dropped? -- Marco ___ 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] Test suite report
On 21-10-2012 15:24, Marco Pessotto wrote: Hello there. Aditya added a couple of testfiles. Thanks a lot. I encourage anyone reporting bugs to send a minimal example to me too, via mail or via pull requests on github, so people running the tests can catch regressions. there is s zip with lots of test files, it might make sense to take some from them (not all make sense in a visual compare) - 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] Help with Long Titles
Am 21.10.2012 um 12:51 schrieb Malte Stien : > Wolfgang, > > Thank you. That is very close. > >> Replace the line above with this block: >> >> >> \startframed[frame=off,align=normal,offset=none,foregroundstyle=\tfc,foregroundcolor=darkgray] >> \getvariable{titlepage}{title} >> \stopframed > > That left-aligns it; I need to right align it. Already tried align=right and > align=flushright, none of which worked. I am just guessing here as there does > not seem to be any documentation available on \startframed. How can I > right-align this? When I use “align=flushright” the text is right aligned but you have change to change also the width with “width=broad”. \startframed … \stopframed is only a different way to write \framed{…}. 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] math: \text does not scale properly
On 21-10-2012 04:35, Aditya Mahajan wrote: On Sat, 20 Oct 2012, Aditya Mahajan wrote: On Thu, 4 Oct 2012, Andreas Mang wrote: Hi there, As Aditya mentioned in a former posting (*) that "\text{ ... }" should scale properly when used as super- or subscript, I have prepared a minimal example to demonstrate that it doesn't. In my document I have switched from "\text{ }" to "\normal", which works. There is another bug with \text. Actually, the bug is with \setcurrentfontbody \starttext ABC \hbox{\setcurrentfontbody{\scriptscriptface} Testing} DEF \stoptext The above works correctly in mkii but not in mkiv. I really don't understand what \setcurrentfontbody is supposed to do. In Mkii it scales the bodyfont if \scriptface or \scriptscriptface is used as an argument; but does not work for any other value (e.g. \setcurrentfontbody{20pt}). In MkIV it does not do anything. How about: \unprotect \ifdefined\font_basics_switchtobodyfont\else \def\font_basics_switchtobodyfont#1{\switchtobodyfont[#1]}% \fi \def\mathstyleface#1% #1 is number (\normalmathstyle) {\ifcase#1\relax \textface \or \textface \or \textface \or \textface \or \scriptface \or \scriptface \or \scriptscriptface \or \scriptscriptface \else \textface \fi} % For some reason mathfaces are not normalized .. why not? % \let\m_math_text_choice_style\relax % % \def\math_text_choice#1% % {\edef\m_math_text_choice_style{\normalmathstyle}% %\hbox\bgroup %% \everymath{\triggermathstyle\m_math_text_choice_style}% % \normalizebodyfontsize\m_math_text_choice_style{\mathstylefont\m_math_text_choice_style}% % \font_basics_switchtobodyfont\m_math_text_choice_style % #1% %\egroup} \let\m_math_text_choice_face \relax \def\math_text_choice#1% {\normalizebodyfontsize\m_math_text_choice_face{\mathstyleface\normalmathstyle}% \hbox{\font_basics_switchtobodyfont\m_math_text_choice_face#1}} \protect \setupbodyfont[dejavu] \starttext \testfeatureonce{1000}{$f_{\text{text $a+b$}_{\text{text $a+b$}_{\text{text $a+b$$\par} % 2.7 \stoptext There is also a bug in the definition of \text in mkii. In strc-mat.mkii, we should have ok, fixed, 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 ___
[NTG-context] Test suite report
Hello there. Aditya added a couple of testfiles. Thanks a lot. I encourage anyone reporting bugs to send a minimal example to me too, via mail or via pull requests on github, so people running the tests can catch regressions. I modified the code, so a unique filename for each test is not required anymore. I promoted to references the PDF which have a minimal shifting, because they generated too much noise, but I left one just as a reminder of the different distance between columns. Issue still pending (as far as I know): https://github.com/melmothx/context-unofficial-test-suite/blob/master/src/base/core-ver/core-ver-003.tex > Number should continue.There are several long lines. Are the numbers correctly > managed with long lines? > \startcode[continue] But it doesn't continue and it's reset to 1. Cheers -- Marco ___ 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] Help with Long Titles
Wolfgang, Thank you. That is very close. > Replace the line above with this block: > > > \startframed[frame=off,align=normal,offset=none,foregroundstyle=\tfc,foregroundcolor=darkgray] >\getvariable{titlepage}{title} >\stopframed That left-aligns it; I need to right align it. Already tried align=right and align=flushright, none of which worked. I am just guessing here as there does not seem to be any documentation available on \startframed. How can I right-align this? Thank you. Malte. Am 19.10.2012 um 02:29 schrieb Malte Stien : > Hello, > > I am using a the startsetups mechanism that defines a title page in my > environment file. That way anyone creating a document in my organisation can > create a new document and get a consistent look of the title page. There is > one problem with this: On occasions I get very long document titles and then > the title extends over the left-hand edge of the page. I would like to > incorporate a new line into the document title; I'd even be happy to do that > manually, ie. it does not have to be automatic. > > There are two problems here: > 1. I had not had any success with putting a newline into the title; it will > need to be not where the titlepage is defined but where it is used (see > below). I have tried \par and \\ and none of them work. > 2. Assuming I found a way to do this, I would need to also find a way of > reducing the \blank[170mm] by the amount that the second line of the title > takes up to render the information down the bottom in roughly the same place. > If push comes to shove, I could create a second titlepage setup for two-line > titles, but I much rather not. Is there a solution to that? Is there maybe a > way to position the information down the bottom absolute? > > Here is minimal example (or something very close to that): > > % The title page > \startsetups titlepage > \startstandardmakeup[style=sans] > \blank[50mm] > \rightaligned{\bfd\getvariable{titlepage}{project}} > \textrule > \rightaligned{\tfc\color[darkgray]{\getvariable{titlepage}{title}}} Replace the line above with this block: \startframed[frame=off,align=normal,offset=none,foregroundstyle=\tfc,foregroundcolor=darkgray] \getvariable{titlepage}{title} \stopframed 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___