Dear all, I am close to give up, but maybe there is a solution... I have a book to typeset literally peppered with hundreds of little drawings which are supposed to appear irregularly surrounded by text flowing around them on all sides. -------------------------------- |xxxxxxxxxxxxxxxxxxxxxx | |xxxxx-----xxxxxxxxxxxxxx| |xxxxx| |xxxxxx----xxxx | |xxxxx|__|xxxxxx| |xxxx| |xxxxxxxxxxxxxx |__|xxxx| |xxxxxxxxxxxxxxxxxxxxxx| -------------------------------- I naively imagine that should not be that hard to implement ;) Since we already have overlays it's no problem to place images in arbitrary places. It only remains to drill white holes in the text to make room for them. What about such procedure: 1. While building the line TeX checks if there is any overlay ahead. 2 if so, it puts empty hbox of the overlay width when it reaches necessary distance from the edge. 3. and does so for the number of lines which equal overlay height. Of course that leaves aside the problem of justification and without justification such page would probably look very ugly (I dare not to think if hz optimization, which I really got used to, would still work). Is there still hope I could stay with ConTeXt this time as well? Many thanks for any ideas in advance Piotr -- http://okle.pl
Piotr Kopszak wrote:
Dear all,
I am close to give up, but maybe there is a solution... I have a book to typeset literally peppered with hundreds of little drawings which are supposed to appear irregularly surrounded by text flowing around them on all sides. -------------------------------- |xxxxxxxxxxxxxxxxxxxxxx | |xxxxx-----xxxxxxxxxxxxxx| |xxxxx| |xxxxxx----xxxx | |xxxxx|__|xxxxxx| |xxxx| |xxxxxxxxxxxxxx |__|xxxx| |xxxxxxxxxxxxxxxxxxxxxx| --------------------------------
I naively imagine that should not be that hard to implement ;) Since we already have overlays it's no problem to place images in arbitrary places. It only remains to drill white holes in the text to make room for them. What about such procedure:
1. While building the line TeX checks if there is any overlay ahead. 2 if so, it puts empty hbox of the overlay width when it reaches necessary distance from the edge. 3. and does so for the number of lines which equal overlay height.
Of course that leaves aside the problem of justification and without justification such page would probably look very ugly (I dare not to think if hz optimization, which I really got used to, would still work). Is there still hope I could stay with ConTeXt this time as well?
one can have parshapes in tex but not that complex as you want ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Any chance lua might change something here in the future?
P.
2009/5/12 Hans Hagen
Piotr Kopszak wrote:
Dear all,
I am close to give up, but maybe there is a solution... I have a book to typeset literally peppered with hundreds of little drawings which are supposed to appear irregularly surrounded by text flowing around them on all sides. -------------------------------- |xxxxxxxxxxxxxxxxxxxxxx | |xxxxx-----xxxxxxxxxxxxxx| |xxxxx| |xxxxxx----xxxx | |xxxxx|__|xxxxxx| |xxxx| |xxxxxxxxxxxxxx |__|xxxx| |xxxxxxxxxxxxxxxxxxxxxx| --------------------------------
I naively imagine that should not be that hard to implement ;) Since we already have overlays it's no problem to place images in arbitrary places. It only remains to drill white holes in the text to make room for them. What about such procedure:
1. While building the line TeX checks if there is any overlay ahead. 2 if so, it puts empty hbox of the overlay width when it reaches necessary distance from the edge. 3. and does so for the number of lines which equal overlay height.
Of course that leaves aside the problem of justification and without justification such page would probably look very ugly (I dare not to think if hz optimization, which I really got used to, would still work). Is there still hope I could stay with ConTeXt this time as well?
one can have parshapes in tex but not that complex as you want
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
Piotr Kopszak wrote:
Any chance lua might change something here in the future?
maybe, but not in the near future Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Tue, May 12, 2009 at 11:22 AM, Piotr Kopszak
Dear all,
I am close to give up, but maybe there is a solution... I have a book to typeset literally peppered with hundreds of little drawings which are supposed to appear irregularly surrounded by text flowing around them on all sides. -------------------------------- |xxxxxxxxxxxxxxxxxxxxxx | |xxxxx-----xxxxxxxxxxxxxx| |xxxxx| |xxxxxx----xxxx | |xxxxx|__|xxxxxx| |xxxx| |xxxxxxxxxxxxxx |__|xxxx| |xxxxxxxxxxxxxxxxxxxxxx| --------------------------------
I naively imagine that should not be that hard to implement ;) Since we already have overlays it's no problem to place images in arbitrary places. It only remains to drill white holes in the text to make room for them. What about such procedure:
1. While building the line TeX checks if there is any overlay ahead. 2 if so, it puts empty hbox of the overlay width when it reaches necessary distance from the edge. 3. and does so for the number of lines which equal overlay height.
Of course that leaves aside the problem of justification and without justification such page would probably look very ugly (I dare not to think if hz optimization, which I really got used to, would still work). Is there still hope I could stay with ConTeXt this time as well?
Many thanks for any ideas in advance
can you post a little example ? -- luigi
Only to show better how I would like text and images placed on the page.
\definelayer [figure][width=\overlaywidth,height=\overlayheight]
\defineoverlay[figure][{\directsetup{figure}\tightlayer[figure]}]
\setupcolors[state=start]
\setupbackgrounds[page][background=figure]
\starttext
\dorecurse{4}{\input knuth}
\startsetups figure
\setlayerframed[figure][x=.3\layerwidth,y=.2\layerheight]{\externalfigure[cow][width=3cm,height=4cm]}
\setlayerframed[figure][x=.55\layerwidth,y=.4\layerheight]{\externalfigure[cow][width=3cm]}
\setlayerframed[figure][x=.4\layerwidth,y=.6\layerheight]{\externalfigure[cow][width=2cm,height=4cm]}
\stopsetups
\stoptext
2009/5/12 luigi scarso
On Tue, May 12, 2009 at 11:22 AM, Piotr Kopszak
wrote: Dear all,
I am close to give up, but maybe there is a solution... I have a book to typeset literally peppered with hundreds of little drawings which are supposed to appear irregularly surrounded by text flowing around them on all sides. -------------------------------- |xxxxxxxxxxxxxxxxxxxxxx | |xxxxx-----xxxxxxxxxxxxxx| |xxxxx| |xxxxxx----xxxx | |xxxxx|__|xxxxxx| |xxxx| |xxxxxxxxxxxxxx |__|xxxx| |xxxxxxxxxxxxxxxxxxxxxx| --------------------------------
I naively imagine that should not be that hard to implement ;) Since we already have overlays it's no problem to place images in arbitrary places. It only remains to drill white holes in the text to make room for them. What about such procedure:
1. While building the line TeX checks if there is any overlay ahead. 2 if so, it puts empty hbox of the overlay width when it reaches necessary distance from the edge. 3. and does so for the number of lines which equal overlay height.
Of course that leaves aside the problem of justification and without justification such page would probably look very ugly (I dare not to think if hz optimization, which I really got used to, would still work). Is there still hope I could stay with ConTeXt this time as well?
Many thanks for any ideas in advance
can you post a little example ? -- 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
On Tue, May 12, 2009 at 1:28 PM, Piotr Kopszak
Only to show better how I would like text and images placed on the page.
\definelayer [figure][width=\overlaywidth,height=\overlayheight] \defineoverlay[figure][{\directsetup{figure}\tightlayer[figure]}] \setupcolors[state=start] \setupbackgrounds[page][background=figure]
\starttext
\dorecurse{4}{\input knuth}
\startsetups figure
\setlayerframed[figure][x=.3\layerwidth,y=.2\layerheight]{\externalfigure[cow][width=3cm,height=4cm]}
\setlayerframed[figure][x=.55\layerwidth,y=.4\layerheight]{\externalfigure[cow][width=3cm]}
\setlayerframed[figure][x=.4\layerwidth,y=.6\layerheight]{\externalfigure[cow][width=2cm,height=4cm]} \stopsetups
\stoptext
hmm what about columnsets ? http://wiki.contextgarden.net/Columns#Column_Sets -- luigi
But I want text in one column in the whole document. I was wondering
however if I could mimick something similar with textflows but cannot
understand the Dutch example in page-flw.tex.
Piotr
2009/5/12 luigi scarso
On Tue, May 12, 2009 at 1:28 PM, Piotr Kopszak
wrote: Only to show better how I would like text and images placed on the page.
\definelayer [figure][width=\overlaywidth,height=\overlayheight] \defineoverlay[figure][{\directsetup{figure}\tightlayer[figure]}] \setupcolors[state=start] \setupbackgrounds[page][background=figure]
\starttext
\dorecurse{4}{\input knuth}
\startsetups figure
\setlayerframed[figure][x=.3\layerwidth,y=.2\layerheight]{\externalfigure[cow][width=3cm,height=4cm]}
\setlayerframed[figure][x=.55\layerwidth,y=.4\layerheight]{\externalfigure[cow][width=3cm]}
\setlayerframed[figure][x=.4\layerwidth,y=.6\layerheight]{\externalfigure[cow][width=2cm,height=4cm]} \stopsetups
\stoptext
hmm what about columnsets ? http://wiki.contextgarden.net/Columns#Column_Sets
-- 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
On Tue, May 12, 2009 at 3:03 PM, Piotr Kopszak
But I want text in one column in the whole document. I was wondering however if I could mimick something similar with textflows but cannot understand the Dutch example in page-flw.tex.
Do you mean this ? % Example (dutch) % % \stelpapierformaatin [S6] % \steltolerantiein [soepel,rek] % \stelkleurenin [status=start] % \stelvoetin [strut=nee] % \stelwitruimtein [groot] % % \stellayoutin % [rechterrand=5cm,breedte=passend,marge=0pt,randafstand=1cm, % voet=4cm,voetafstand=1cm,hoofd=0cm] % % \stelteksttekstenin[rand][][\vbox{\flushtextflow{alpha}}] % \stelvoettekstenin [rand][][\vbox{\flushtextflow{beta}}] % \stelvoettekstenin [\vbox{\flushtextflow{gamma}}][] % % \definetextflow [alfa] [breedte=\rechterrandbreedte] % \definetextflow [beta] [breedte=\rechterrandbreedte] % \definetextflow [gamma] [breedte=\voethoogte] % % \starttekst % % \dorecurse{50} % {\getrandomnumber{\funny}{0}{8} % \ifcase\funny \starttextflow[alfa] \input tufte.tex \stoptextflow % \or \starttextflow[beta] \input knuth.tex \stoptextflow % \or \starttextflow[gamma] \input materie.tex \stoptextflow % \or {\bf TUFTE}\quad \input tufte \par % \or {\bf TUFTE}\quad \input tufte \par % \or {\bf KNUTH}\quad \input knuth \par % \or {\bf KNUTH}\quad \input knuth \par % \or {\bf MATERIE}\quad \input materie \par % \else {\bf MATERIE}\quad \input materie \par % \fi} % % \stoptekst -- luigi
Yes, exactly.
2009/5/12 luigi scarso
On Tue, May 12, 2009 at 3:03 PM, Piotr Kopszak
wrote: But I want text in one column in the whole document. I was wondering however if I could mimick something similar with textflows but cannot understand the Dutch example in page-flw.tex.
Do you mean this ?
% Example (dutch) % % \stelpapierformaatin [S6] % \steltolerantiein [soepel,rek] % \stelkleurenin [status=start] % \stelvoetin [strut=nee] % \stelwitruimtein [groot] % % \stellayoutin % [rechterrand=5cm,breedte=passend,marge=0pt,randafstand=1cm, % voet=4cm,voetafstand=1cm,hoofd=0cm] % % \stelteksttekstenin[rand][][\vbox{\flushtextflow{alpha}}] % \stelvoettekstenin [rand][][\vbox{\flushtextflow{beta}}] % \stelvoettekstenin [\vbox{\flushtextflow{gamma}}][] % % \definetextflow [alfa] [breedte=\rechterrandbreedte] % \definetextflow [beta] [breedte=\rechterrandbreedte] % \definetextflow [gamma] [breedte=\voethoogte] % % \starttekst % % \dorecurse{50} % {\getrandomnumber{\funny}{0}{8} % \ifcase\funny \starttextflow[alfa] \input tufte.tex \stoptextflow % \or \starttextflow[beta] \input knuth.tex \stoptextflow % \or \starttextflow[gamma] \input materie.tex \stoptextflow % \or {\bf TUFTE}\quad \input tufte \par % \or {\bf TUFTE}\quad \input tufte \par % \or {\bf KNUTH}\quad \input knuth \par % \or {\bf KNUTH}\quad \input knuth \par % \or {\bf MATERIE}\quad \input materie \par % \else {\bf MATERIE}\quad \input materie \par % \fi} % % \stoptekst
-- 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
Am 12.05.2009 um 15:18 schrieb Piotr Kopszak:
Yes, exactly.
\setuppapersize [S6] \setuptolerance [soepel,rek] \setupcolors [state=start] \setupfooter [strut=no] \setupwhitespace[big] \setuplayout [rightmargin=5cm, width=fit, margin=0pt, edgedistance=1cm, footer=4cm, footerdistance=1cm, header=0cm] \setuptexttexts [margin][][\vbox{\flushtextflow{alpha}}] \setupfootertexts[margin][][\vbox{\flushtextflow{beta}}] \setupfootertexts [\vbox{\flushtextflow{gamma}}][] \definetextflow [alfa] [width=\rightmarginwidth] \definetextflow [beta] [width=\rightmarginwidth] \definetextflow [gamma] [width=\footerheight] \starttext \dorecurse{50} {\getrandomnumber{\funny}{0}{8} \ifcase\funny \starttextflow[alfa] \input tufte.tex \stoptextflow \or \starttextflow[beta] \input knuth.tex \stoptextflow \or \starttextflow[gamma] \input materie.tex \stoptextflow \or {\bf TUFTE}\quad \input tufte \par \or {\bf TUFTE}\quad \input tufte \par \or {\bf KNUTH}\quad \input knuth \par \or {\bf KNUTH}\quad \input knuth \par \or {\bf MATERIE}\quad \input materie \par \else {\bf MATERIE}\quad \input materie \par \fi} \stoptext Wolfgang
Right. If I understand correctly on the first look textflows appear
in fixed locations on consecutive pages. I guess I'm banging my head
against a wall but what about if it was possible to have them side by
side on the same page?
2009/5/12 Wolfgang Schuster
Am 12.05.2009 um 15:18 schrieb Piotr Kopszak:
Yes, exactly.
\setuppapersize [S6] \setuptolerance [soepel,rek] \setupcolors [state=start] \setupfooter [strut=no] \setupwhitespace[big]
\setuplayout [rightmargin=5cm, width=fit, margin=0pt, edgedistance=1cm, footer=4cm, footerdistance=1cm, header=0cm]
\setuptexttexts [margin][][\vbox{\flushtextflow{alpha}}] \setupfootertexts[margin][][\vbox{\flushtextflow{beta}}] \setupfootertexts [\vbox{\flushtextflow{gamma}}][]
\definetextflow [alfa] [width=\rightmarginwidth] \definetextflow [beta] [width=\rightmarginwidth] \definetextflow [gamma] [width=\footerheight]
\starttext
\dorecurse{50} {\getrandomnumber{\funny}{0}{8} \ifcase\funny \starttextflow[alfa] \input tufte.tex \stoptextflow \or \starttextflow[beta] \input knuth.tex \stoptextflow \or \starttextflow[gamma] \input materie.tex \stoptextflow \or {\bf TUFTE}\quad \input tufte \par \or {\bf TUFTE}\quad \input tufte \par \or {\bf KNUTH}\quad \input knuth \par \or {\bf KNUTH}\quad \input knuth \par \or {\bf MATERIE}\quad \input materie \par \else {\bf MATERIE}\quad \input materie \par \fi}
\stoptext
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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
On Tue, May 12, 2009 at 3:32 PM, Wolfgang Schuster < schuster.wolfgang@googlemail.com> wrote:
Am 12.05.2009 um 15:18 schrieb Piotr Kopszak:
Yes, exactly.
\setuppapersize [S6] \setuptolerance [soepel,rek]
better \setuppapersize [S6][S6] \setuptolerance [tolerant,stretch] -- luigi
I think I more or less got the idea of what is possible. But let me
describe my project. Maybe you might come up with a better solution.
I'm going to typeset a diary written and drawn by an illustrator and
graphic designer 70 years ago. What is unique, it consists of
handwritten pages which were already composed for publication. So in
fact I have to preserve both the juxtaposition of illustrations and
the text (give or take line or two). As basically the text should not
flow between pages I guess I could set the whole thing with layers
only. The biggest problem seems how to control placement of layers so
that the text inside them is set on the grid. Here is my initial setup
for a single page.
\definelayer [figure][width=\overlaywidth,height=\overlayheight]
\defineoverlay[figure][{\directsetup{figure}\tightlayer[figure]}]
\setupcolors[state=start]
\setupbackgrounds[page][background=figure]
\setuppagenumbering[location={footer,right}]
\usetypescript[palatino]
\setupbodyfont[palatino,14pt]
\starttext
\startbuffer[zapf]
\input zapf
\stopbuffer
\startbuffer[hawking]
\input hawking
\stopbuffer
\flushlayer[figure]
\startsetups figure
\setlayerframed[figure][frame=off,x=25mm,y=43mm]{\externalfigure[cow][width=\textwidth,height=40mm]}
\setlayerframed[figure][frame=off,x=25mm,y=90mm,align=normal,width=\textwidth]{\getbuffer[zapf]}
\setlayerframed[figure][frame=off,x=80mm,y=150mm]{\externalfigure[cow][width=30mm,height=100mm]}
\setlayerframed[figure][frame=off,x=25mm,y=150mm,align=normal,width=50mm]{\getbuffer[hawking]}
\setlayerframed[figure][frame=off,x=120mm,y=150mm,align=normal,width=50mm]{\getbuffer[hawking]}
\stopsetups
\stoptext
Of course, it looks like it's going to take couple of months of rather
tedious manual work so any ideas how to make it easier are welcome.
Piotr
2009/5/12 luigi scarso
On Tue, May 12, 2009 at 3:32 PM, Wolfgang Schuster
wrote: Am 12.05.2009 um 15:18 schrieb Piotr Kopszak:
Yes, exactly.
\setuppapersize [S6] \setuptolerance [soepel,rek]
better
\setuppapersize [S6][S6] \setuptolerance [tolerant,stretch] -- 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
No, ppchtex is not dead... I would like to use color. 1. color= and rulecolor= does not appear to be implemented (mkiv)... 2. how can one change the color of the bonds? 3. using \color[red]{} causes the text to be offset. "minimal" example: \setupcolors[state=start] \usemodule[chemic] \starttext \startchemical \chemical[ONE,SB,Z0][C] \stopchemical \startchemical \color[red]{\chemical[ONE,SB,Z0][C]} \stopchemical % text "C" is offset... \startchemical \chemical[ONE,SB,Z0][{\red C}] \stopchemical % OK, but I would like to draw the bonds as well in red. \startchemical[color=red] \chemical[ONE,SB,Z0][C] \stopchemical % "C" is red in mkii, black in mkiv \startchemical[rulecolor=red] \chemical[ONE,SB,Z0][C] \stopchemical % bonds are black, "C" is red in mkii, black in mkiv \stoptext
Alan BRASLAU wrote:
\startchemical \color[red]{\chemical[ONE,SB,Z0][C]} \stopchemical % text "C" is offset...
add a % after the } (maybe we should ignore endofline, i.e. make a mkiv variant and extend/maintain that) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Alan BRASLAU wrote:
No, ppchtex is not dead...
I would like to use color.
1. color= and rulecolor= does not appear to be implemented (mkiv)... 2. how can one change the color of the bonds? 3. using \color[red]{} causes the text to be offset.
"minimal" example:
\setupcolors[state=start] \usemodule[chemic] \starttext
\startchemical \chemical[ONE,SB,Z0][C] \stopchemical
\startchemical \color[red]{\chemical[ONE,SB,Z0][C]} \stopchemical % text "C" is offset...
\startchemical \chemical[ONE,SB,Z0][{\red C}] \stopchemical % OK, but I would like to draw the bonds as well in red.
\startchemical[color=red] \chemical[ONE,SB,Z0][C] \stopchemical % "C" is red in mkii, black in mkiv
has to do with different color mechanism .. path line 1171: \setbox2=\hbox{\@@dochemicalcolor$\@@dochemicalstyle{\@@localchemicalformat \chemicaltext}$}%
\startchemical[rulecolor=red] \chemical[ONE,SB,Z0][C] \stopchemical % bonds are black, "C" is red in mkii, black in mkiv
\stoptext
___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Alan BRASLAU wrote:
No, ppchtex is not dead...
I would like to use color.
1. color= and rulecolor= does not appear to be implemented (mkiv)... 2. how can one change the color of the bonds? 3. using \color[red]{} causes the text to be offset.
"minimal" example:
\setupcolors[state=start] \usemodule[chemic] \starttext
\startchemical \chemical[ONE,SB,Z0][C] \stopchemical
\startchemical \color[red]{\chemical[ONE,SB,Z0][C]} \stopchemical % text "C" is offset...
\startchemical \chemical[ONE,SB,Z0][{\red C}] \stopchemical % OK, but I would like to draw the bonds as well in red.
\startchemical[color=red] \chemical[ONE,SB,Z0][C] \stopchemical % "C" is red in mkii, black in mkiv
\startchemical[rulecolor=red] \chemical[ONE,SB,Z0][C] \stopchemical
setting happened at the outer level (ok, that's broken now but we can fix that later); so now, each formula must have the settings; when i have time i'll make a mkiv variant so that we can upgrade (i don't want interference with mkii since that version is also used in latex and we don't need to upgrade that) \def\setchemicalattributes {\scratchdimen\@@chemicalrulethickness \def\chemicalattributes {withpen pencircle scaled \the\scratchdimen\space withcolor }% \doifelsenothing\@@chemicalrulecolor {\edef\chemicalattributes{\chemicalattributes black}} {\edef\chemicalattributes{\chemicalattributes \MPcolor{\@@chemicalrulecolor}}}% \startMPdrawing drawoptions (\chemicalattributes) ; \stopMPdrawing} ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Alan BRASLAU wrote:
No, ppchtex is not dead...
i split ppchtex in mkii/mkiv (and included the fixes) so we can improve things eventually can you check if it still runs ok (beta zip on website) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
i split ppchtex in mkii/mkiv (and included the fixes) so we can improve things eventually
can you check if it still runs ok (beta zip on website)
Hans
Unzipped cont-tmf.zip on top of my minimals installation and ran context on my current working documents: system : module chemic loaded (/usr/local/context.new/tex/texmf-context/tex/context/base/m-chemic.tex (/usr/local/context.new/tex/texmf-context/tex/context/base/m-chemic.mkiv system : module pictex loaded (/usr/local/context.new/tex/texmf-context/tex/context/base/m-pictex.tex (/usr/local/context.new/tex/texmf-context/tex/context/base/thrd-pic.tex warning : \dimen \linethickness is already defined (\relax it first) )) (/usr/local/context.new/tex/texmf-context/tex/context/base/ppchtex.mkiv ppchtex : using PiCTeX and MetaPost ))) It appears to work as before... (I will now look into your color suggestions.) Alan
Alan BRASLAU wrote:
i split ppchtex in mkii/mkiv (and included the fixes) so we can improve things eventually
can you check if it still runs ok (beta zip on website)
Hans
Unzipped cont-tmf.zip on top of my minimals installation and ran context on my current working documents:
system : module chemic loaded (/usr/local/context.new/tex/texmf-context/tex/context/base/m-chemic.tex (/usr/local/context.new/tex/texmf-context/tex/context/base/m-chemic.mkiv system : module pictex loaded (/usr/local/context.new/tex/texmf-context/tex/context/base/m-pictex.tex (/usr/local/context.new/tex/texmf-context/tex/context/base/thrd-pic.tex warning : \dimen \linethickness is already defined (\relax it first) )) (/usr/local/context.new/tex/texmf-context/tex/context/base/ppchtex.mkiv ppchtex : using PiCTeX and MetaPost )))
It appears to work as before... (I will now look into your color suggestions.)
color should work ok (that is: color=red, and rulecolor=red) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
i split ppchtex in mkii/mkiv (and included the fixes) so we can improve things eventually
can you check if it still runs ok (beta zip on website)
Hans
Works correctly (bonds in red, atoms in black): \usemodule[chemic] \setupchemical[rulecolor=red] \starttext \startchemical \chemical[ONE,SB,Z0][C] \stopchemical \stoptext However, the following variant does not work. \usemodule[chemic] \starttext \startchemical[rulecolor=red] \chemical[ONE,SB,Z0][C] \stopchemical \stoptext I don't understand, as my (quick) look at the source code indicates that the parameters should be handled identically. Alan
Alan BRASLAU wrote:
i split ppchtex in mkii/mkiv (and included the fixes) so we can improve things eventually
can you check if it still runs ok (beta zip on website)
Hans
Works correctly (bonds in red, atoms in black):
\usemodule[chemic] \setupchemical[rulecolor=red] \starttext \startchemical \chemical[ONE,SB,Z0][C] \stopchemical \stoptext
However, the following variant does not work.
\usemodule[chemic] \starttext \startchemical[rulecolor=red] \chemical[ONE,SB,Z0][C] \stopchemical \stoptext
I don't understand, as my (quick) look at the source code indicates that the parameters should be handled identically.
no, that was actually the problem ... local vs global ... for the moment set it up local (per formula) as i need to make an inheritance chain now that i've split in mkii/mkiv that's easier since we no longer have to keep things working in latex (which means that we can use more core helper code) just remind me occasionally Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Wednesday 13 May 2009 10:33:18 Hans Hagen wrote:
Alan BRASLAU wrote:
Works correctly (bonds in red, atoms in black):
\usemodule[chemic] \setupchemical[rulecolor=red] \starttext \startchemical \chemical[ONE,SB,Z0][C] \stopchemical \stoptext
However, the following variant does not work.
\usemodule[chemic] \starttext \startchemical[rulecolor=red] \chemical[ONE,SB,Z0][C] \stopchemical \stoptext
I don't understand, as my (quick) look at the source code indicates that the parameters should be handled identically.
no, that was actually the problem ... local vs global ... for the moment set it up local (per formula) as i need to make an inheritance chain
now that i've split in mkii/mkiv that's easier since we no longer have to keep things working in latex (which means that we can use more core helper code)
just remind me occasionally
OK. The following extension would also be useful: \usemodule[chemic] \starttext \startchemical \chemical[SIX,B,rulecolor=red,AU][] \stopchemical \stoptext
Alan BRASLAU wrote:
On Wednesday 13 May 2009 10:33:18 Hans Hagen wrote:
Alan BRASLAU wrote:
Works correctly (bonds in red, atoms in black):
\usemodule[chemic] \setupchemical[rulecolor=red] \starttext \startchemical \chemical[ONE,SB,Z0][C] \stopchemical \stoptext
However, the following variant does not work.
\usemodule[chemic] \starttext \startchemical[rulecolor=red] \chemical[ONE,SB,Z0][C] \stopchemical \stoptext
I don't understand, as my (quick) look at the source code indicates that the parameters should be handled identically. no, that was actually the problem ... local vs global ... for the moment set it up local (per formula) as i need to make an inheritance chain
now that i've split in mkii/mkiv that's easier since we no longer have to keep things working in latex (which means that we can use more core helper code)
just remind me occasionally
OK. The following extension would also be useful:
\usemodule[chemic] \starttext \startchemical \chemical[SIX,B,rulecolor=red,AU][] \stopchemical \stoptext
in mkiv syntax that is: \defineprocessor[chemred][color=red] \startchemical \chemical[SIX,SB,C135,R,Z][chemred->A,chemred->C,chemred->C] \stopchemical we can rewrite ppchtex a bit but it depends on how much time you want to spend on filling in the holes that i will create (i can make the framework) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (5)
-
Alan BRASLAU
-
Hans Hagen
-
luigi scarso
-
Piotr Kopszak
-
Wolfgang Schuster