Re: [NTG-context] vim module: modify line wrapping
On Wed, 13 May 2015, Andreas Schneider wrote: Here is an example: \usemodule[vim] \definevimtyping[JSON][syntax=javascript, lines=split, strip=yes] Add `option=hyphenated`. \starttext The example: \startJSON { sample_parameter: http://some/url/with/a/lot/of/path/elements?and=somevariables=too; } \stopJSON \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] Weird position of equation numbers for long equations
Hi, I suspect that the equation numbering in attachment (eq-with-chapter.png) is wrong. Shouldnt't the number be positioned on the right (not on the left)? And in case that this positioning on the left is intentional: is there any way or setting to force the equation number to be moved to the right? In any case I suspect that the equation in question could somehow be squeezed into the available space in one line. What's the best trick to squeeze the equation into a single line? Some kind of \hbox to 0pt{\hss [content] \hss} trickery or does there exist something better? Minimum problematic example: \starttext \placeformula \startformula \dorecurse{28}{a+} \stopformula \stoptext Thank you, Mojca ___ 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] vim module: modify line wrapping
On Thu, 14 May 2015, Aditya Mahajan wrote: On Wed, 13 May 2015, Andreas Schneider wrote: Here is an example: \usemodule[vim] \definevimtyping[JSON][syntax=javascript, lines=split, strip=yes] Add `option=hyphenated`. I just released a newer version to t-vim where the `option=hypenated` is documented. It is also possible to hyphenate words by using \definevimtyping[...][..., option={packed,hyphenated}, align=hyphenated, ] 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] \placeongrid command
Hello list members: Based on co-pagedesign.pdf document I'm experimenting with grids. I followed the examples mentioned on page 9-10 (Section 1.5) and used the code below: %begin code \setuplayout[grid=yes] \showgrid \starttext This is a line. This is another line in another paragraph. Third line, new paragraph again. \placeongrid{\framed{This is a framed line placed on grid, default setup.}} Some text. \placeongrid[bottom]{\framed{This is a framed line placed on grid bottom.}} Some text. \placeongrid[top]{\framed{This is a framed line placed on grid top.}} Some text. \placeongrid[both]{\framed{This is a framed line placed on grid both.}} Some text. \stoptext %end code All \placeongrid commands with different options give the same output. See the attached pdf file. What do I do wrong? I have context ConTeXt ver: 2014.01.03 00:40 MKIV current fmt: 2015.4.1 int: english/english I have another question related to grids. When grids are shown in the pdf file (as a result of \showgrid), Adobe Reader 9.5 (linux version) always gives the following error message when opening the file: An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem. Despite of the message the file is shown correctly. Why is this message shown? Thanks, bcsikos placeongrid.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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Weird position of equation numbers for long equations
On Thu, 14 May 2015, luigi scarso wrote: On Thu, May 14, 2015 at 5:45 PM, Aditya Mahajan adit...@umich.edu wrote: On Thu, 14 May 2015, Mojca Miklavec wrote: Hi, I suspect that the equation numbering in attachment (eq-with-chapter.png) is wrong. Shouldnt't the number be positioned on the right (not on the left)? And in case that this positioning on the left is intentional: is there any way or setting to force the equation number to be moved to the right? This is a bug in luatex: http://tracker.luatex.org/view.php?id=807 Aditya isn't the the formula simply too long ? Yes. In tex and pdftex, when the formula is too long \eqno is placed on the next line, shifted to the right. In luatex, the equation number is not shifted. Compare the output of \hsize=2cm $$a^2+b^2=c^2\eqno(1)$$ \bye for pdftex and luatex. 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 ___
Re: [NTG-context] Weird position of equation numbers for long equations
On Thu, May 14, 2015 at 5:45 PM, Aditya Mahajan adit...@umich.edu wrote: On Thu, 14 May 2015, Mojca Miklavec wrote: Hi, I suspect that the equation numbering in attachment (eq-with-chapter.png) is wrong. Shouldnt't the number be positioned on the right (not on the left)? And in case that this positioning on the left is intentional: is there any way or setting to force the equation number to be moved to the right? This is a bug in luatex: http://tracker.luatex.org/view.php?id=807 Aditya isn't the the formula simply too long ? \starttext \placeformula \startformula 0\dorecurse{24}{+a} \stopformula \placeformula \startformula 0\dorecurse{25}{+a} \stopformula \placeformula \startformula 0\dorecurse{35}{+a} \stopformula -- 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Weird position of equation numbers for long equations
On Thu, May 14, 2015 at 7:28 PM, Aditya Mahajan adit...@umich.edu wrote: On Thu, 14 May 2015, luigi scarso wrote: On Thu, May 14, 2015 at 5:45 PM, Aditya Mahajan adit...@umich.edu wrote: On Thu, 14 May 2015, Mojca Miklavec wrote: Hi, I suspect that the equation numbering in attachment (eq-with-chapter.png) is wrong. Shouldnt't the number be positioned on the right (not on the left)? And in case that this positioning on the left is intentional: is there any way or setting to force the equation number to be moved to the right? This is a bug in luatex: http://tracker.luatex.org/view.php?id=807 Aditya isn't the the formula simply too long ? Yes. In tex and pdftex, when the formula is too long \eqno is placed on the next line, shifted to the right. In luatex, the equation number is not shifted. Compare the output of \hsize=2cm $$a^2+b^2=c^2\eqno(1)$$ \bye for pdftex and luatex. Ah ok Following the link above for the tracker 807, I have made the patch if ((eqno_box != null) (eqno_w == 0) !l) { tail_append(new_penalty(inf_penalty)); shift_amount(eqno_box) = line_s + line_w - eqno_w; append_to_vlist(eqno_box); g2 = 0; and now I have the pdf in attachment -- luigi test.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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Weird position of equation numbers for long equations
On Thu, 14 May 2015 18:44:53 +0200 Mojca Miklavec mojca.miklavec.li...@gmail.com wrote: On Thu, May 14, 2015 at 5:45 PM, Aditya Mahajan wrote: On Thu, 14 May 2015, Mojca Miklavec wrote: Hi, I suspect that the equation numbering in attachment (eq-with-chapter.png) is wrong. Shouldnt't the number be positioned on the right (not on the left)? And in case that this positioning on the left is intentional: is there any way or setting to force the equation number to be moved to the right? This is a bug in luatex: http://tracker.luatex.org/view.php?id=807 Thanks. I'll just put \cite[luatex_807] next to the equation then to make my supervisor happy ;) @BUGREPORT{luatex_807, title = Bad position equation number Lualatex, journal = LuaTeX bug tracker, number = 807, year = 2013, month = feb, url = http://tracker.luatex.org/view.php?id=807;, } Mojca \setupbtx [default:list:bugreport] [style=bold,color=red -- Alan Braslau CEA DSM-IRAMIS-SPEC CNRS URA 2464 Orme des Merisiers 91191 Gif-sur-Yvette cedex FRANCE tel: +33 1 69 08 73 15 fax: +33 1 69 08 87 86 mailto:alan.bras...@cea.fr 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Setup narrower body text for sections
Hi, I'm typesetting unix manpages, where I want each section heading to be outset slightly relative to the body text of that section. In other words, I want the body text to have a left margin which is narrower than the page width. I know I can do this with something like: \startsection[title=Synopsis] \startnarrower blah blah blah \stopnarrower \stopsection But I'd much rather set the left margin (or achieving the effect of \startnarrower by some other means) using the setups for \startsection instead. That way I won't need to have \startnarrower .. \stopnarrower all over my document. I tried \setuphead[section][margin=3cm] but the margin applies to the heading, not to the body text of the section. Of course I could set margin=-3cm and make the entire page narrower, but then I'd also need to adjust the headers and footers to match. I thought I could perhaps use before= and after=, but those are of course before and after the heading, not before and after the body text. Is there a setup to wrap some commands around the body text? Or must I define my own \startxyz .. \stopxyz thingy, or is there a better way? Thanks, -- Kate ___ 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] Weird position of equation numbers for long equations
On Thu, May 14, 2015 at 5:45 PM, Aditya Mahajan wrote: On Thu, 14 May 2015, Mojca Miklavec wrote: Hi, I suspect that the equation numbering in attachment (eq-with-chapter.png) is wrong. Shouldnt't the number be positioned on the right (not on the left)? And in case that this positioning on the left is intentional: is there any way or setting to force the equation number to be moved to the right? This is a bug in luatex: http://tracker.luatex.org/view.php?id=807 Thanks. I'll just put \cite[luatex_807] next to the equation then to make my supervisor happy ;) @BUGREPORT{luatex_807, title = Bad position equation number Lualatex, journal = LuaTeX bug tracker, number = 807, year = 2013, month = feb, url = http://tracker.luatex.org/view.php?id=807;, } Mojca ___ 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] Weird position of equation numbers for long equations
On Thu, 14 May 2015, Mojca Miklavec wrote: Hi, I suspect that the equation numbering in attachment (eq-with-chapter.png) is wrong. Shouldnt't the number be positioned on the right (not on the left)? And in case that this positioning on the left is intentional: is there any way or setting to force the equation number to be moved to the right? This is a bug in luatex: http://tracker.luatex.org/view.php?id=807 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 ___
Re: [NTG-context] Weird position of equation numbers for long equations
On Thu, 14 May 2015 15:54:16 +0200 Mojca Miklavec mojca.miklavec.li...@gmail.com wrote: Hi, I suspect that the equation numbering in attachment (eq-with-chapter.png) is wrong. Shouldnt't the number be positioned on the right (not on the left)? And in case that this positioning on the left is intentional: is there any way or setting to force the equation number to be moved to the right? In any case I suspect that the equation in question could somehow be squeezed into the available space in one line. What's the best trick to squeeze the equation into a single line? Some kind of \hbox to 0pt{\hss [content] \hss} trickery or does there exist something better? Make a small angle approximation and express your angles in radians. This simplifies the equation significantly... ;-) (I know that this does not help much, but I couldn't resist!) 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Setup narrower body text for sections
On 05/14/2015 06:16 PM, Kate F wrote: Hi, I'm typesetting unix manpages, where I want each section heading to be outset slightly relative to the body text of that section. In other words, I want the body text to have a left margin which is narrower than the page width. Hi Kate, a quick reply: %~ \setuphead[section][margin=-1cm] \setuphead[section][alternative=inmargin] \starttext \startsection[title=Synopsis] \input zapf \stopsection \stoptext Doesn’t any option suit your needs? I hope it may 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 ___
[NTG-context] bug in latest beta?
Hans, after upgrading to beta from 2015.05.13 23:52, the compilation of most of my documents crashes. I get two different errors depending on the document: error: .../ctxbeta/tex/texmf-context/tex/context/base/typo-itc.lua:148: attempt to call global 'setfield' (a nil value) error: .../ctxbeta/tex/texmf-context/tex/context/base/typo-itc.lua:159: attempt to call global 'setfield' (a nil value) I cannot provide a minimal sample now. I wonder whether the error itself might be enough to fix the issue. 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] Setup narrower body text for sections
On Thu, 14 May 2015, Kate F wrote: Hi, I'm typesetting unix manpages, where I want each section heading to be outset slightly relative to the body text of that section. In other words, I want the body text to have a left margin which is narrower than the page width. I know I can do this with something like: \startsection[title=Synopsis] \startnarrower blah blah blah \stopnarrower \stopsection But I'd much rather set the left margin (or achieving the effect of \startnarrower by some other means) using the setups for \startsection instead. That way I won't need to have \startnarrower .. \stopnarrower all over my document. \setuphead[section][after={\startnarrower}, aftersection={\stopnarrower}] 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 ___
Re: [NTG-context] Setup narrower body text for sections
On 14 May 2015 at 21:33, Aditya Mahajan adit...@umich.edu wrote: On Thu, 14 May 2015, Kate F wrote: Hi, I'm typesetting unix manpages, where I want each section heading to be outset slightly relative to the body text of that section. In other words, I want the body text to have a left margin which is narrower than the page width. I know I can do this with something like: \startsection[title=Synopsis] \startnarrower blah blah blah \stopnarrower \stopsection But I'd much rather set the left margin (or achieving the effect of \startnarrower by some other means) using the setups for \startsection instead. That way I won't need to have \startnarrower .. \stopnarrower all over my document. \setuphead[section][after={\startnarrower}, aftersection={\stopnarrower}] Aditya Thank you! That's exactly what I was hoping for! aftersection= doesn't appear to be documented in cont-enp.pdf :) -- Kate ___ 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] Weird position of equation numbers for long equations
On 5/14/2015 7:56 PM, luigi scarso wrote: Ah ok Following the link above for the tracker 807, I have made the patch if ((eqno_box != null) (eqno_w == 0) !l) { tail_append(new_penalty(inf_penalty)); shift_amount(eqno_box) = line_s + line_w - eqno_w; append_to_vlist(eqno_box); g2 = 0; and now I have the pdf in attachment it will take a bit more work so no quick patch as we also need to check what happens in r2l mode (the code is similar to pdftex but luatex has a whole bunch of extra code related to directions) 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] bug in latest beta?
On 05/14/2015 10:46 PM, Pablo Rodriguez wrote: Hans, after upgrading to beta from 2015.05.13 23:52, the compilation of most of my documents crashes. I get two different errors depending on the document: error: .../ctxbeta/tex/texmf-context/tex/context/base/typo-itc.lua:148: attempt to call global 'setfield' (a nil value) Hans, here you have a sample that triggers the error in that line: \definefontfeature [default] [default] [script=latn, itlc=yes] \setupitaliccorrection [always] \definefontfamily [mainface] [serif] [TeX Gyre Pagella] \starttext \it a \stoptext 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] ConTeXt-defined colours broken in TikZ in MkIV with latest betas
Thanks Hans with context-version 2015.05.13 23:52 it finally works on my side! Thanks for the fix! Christian 2015-04-25 23:18 GMT+02:00 Hans Hagen pra...@wxs.nl: On 4/24/2015 3:05 PM, Christian Prim wrote: Hi Hans I don't know if the latest beta already has the new code. But I can confirm, that there is still a difference between tikz-colors and context/metafun colors. TikZ translates c=1,m=1 in (native) RGB, that is b=1, which is in some way correct. ConTeXt translates c=1,m=1 in something I couldn't really define (perhaps sRGB or some other color profile) r=0.183... g=0.191... b=0.574... or in Web-Hex: #2e3092 or back to cmyk: c=.68, m=.67,k=.43 (which is blue with some key-value compared to TikZ with k=0) So I think that TikZ and ConTeXt don't use the same color profile Hope it could help somewhat to solve my problem. your example works ok here (with the tikz def file i made last week) i also made \setupcolors[cmyk=no] \setupcolors[rgb=no] \setupcolors[cmyk=no,rgb=no] \setupcolors[state=stop] working (nothing needed in tikz as the code that interfaces to it does that) which will be in the next beta 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 ___