Re: [NTG-context] How to wirte a registered trademark in mkiv?

2010-10-18 Thread Wolfgang Schuster

Am 19.10.2010 um 05:12 schrieb seasoul:

> Is there a built-in module to write a registered trademark: a R in a circle; 
> or a TM in a circle?
> 

\starttext
® or \registered\crlf
™ or \trademark
\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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] How to wirte a registered trademark in mkiv?

2010-10-18 Thread seasoul
Is there a built-in module to write a registered trademark: a R in a circle;
or a TM in a circle?
___
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] background over two page

2010-10-18 Thread Otared Kavian
Hi Wolfgang, 

Indeed your solution works without any flaw…
Looking at your code, I learned that Overlaybox is an object which can be 
filled with a background color, as in:
fill OverlayBox withcolor lightgray ;
so that the background can be in color.

Should we add this kind of problems and solutions to the wiki?
If yes, I am willing to do so.

Best regards: OK

On 18 oct. 2010, at 17:22, Wolfgang Schuster wrote:

> 
> Am 18.10.2010 um 14:18 schrieb Otared Kavian:
> 
>> Your solution works as intended when the framed, highlighted text with 
>> background spans over two pages (though it doesn't when it spans over three 
>> pages or more, but this is not a real issue, since it is a bad idea to have 
>> such long highlighted texts…).
> 
> 
> I guess this is also possible with textbackground:
> 
> \newcounter\CurrentBackground
> 
> \def\StartBackground
>  {\doglobal\increment\CurrentBackground
>   \setposition{Background:b:\CurrentBackground}%
>   \startbackground}
> 
> \def\StopBackground
>  {\stopbackground
>   \setposition{Background:e:\CurrentBackground}}
> 
> \def\DrawBackground
>  
> {\ifnum\MPp{Background:b:\CurrentBackground}=\MPp{Background:e:\CurrentBackground}
> \startMPcode
> draw topboundaryOverlayBox withcolor red ;
> draw bottomboundary OverlayBox withcolor red ;
> draw leftboundary   OverlayBox withcolor red ;
> draw rightboundary  OverlayBox withcolor red ;
> \stopMPcode
>   \else\ifnum\realpageno=\MPp{Background:b:\CurrentBackground}
> \startMPcode
> draw topboundaryOverlayBox withcolor red ;
> draw leftboundary   OverlayBox withcolor red ;
> draw rightboundary  OverlayBox withcolor red ;
> \stopMPcode
>   \else\ifnum\realpageno=\MPp{Background:e:\CurrentBackground}
> \startMPcode
> draw bottomboundary OverlayBox withcolor red ;
> draw leftboundary   OverlayBox withcolor red ;
> draw rightboundary  OverlayBox withcolor red ;
> \stopMPcode
>   \else
> \startMPcode
> draw leftboundary   OverlayBox withcolor red ;
> draw rightboundary  OverlayBox withcolor red ;
> \stopMPcode
>   \fi\fi\fi}
> 
> \defineoverlay[DrawBackground][\DrawBackground]
> 
> \starttext
> 
> \setupbackground[background=DrawBackground]
> 
> \input knuth
> 
> \StartBackground
> \dorecurse{12}{\input knuth\par}
> \StopBackground
> 
> \input knuth
> 
> \StartBackground
> \input knuth\par
> \StopBackground
> 
> \input knuth
> 
> \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  : 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] Missing cont-fil on minimals ?

2010-10-18 Thread Arthur Reutenauer
> Thank you, got that (i.e. changed it in context.mkii and context.mkiv), 
> but it's to be changed in the distribution

  It's already changed :-)

Arthur
___
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] Missing cont-fil on minimals ?

2010-10-18 Thread Henning Hraban Ramm


Am 2010-10-18 um 18:35 schrieb Arthur Reutenauer:


Hans, I don't understand what you want to say.


 Hans says that you have to change \loadcorefile{cont-fil} to
\loadmarkfile{cont-fil} in context.mkii and context.mkiv because the
file used to be called cont-fil.tex and has now been renamed
cont-fil.mkii and cont-fil.mkiv for Mark II and Mark IV respectively.


Thank you, got that (i.e. changed it in context.mkii and  
context.mkiv), but it's to be changed in the distribution - my local  
changes get overwritten at the next update, of course.



Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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] Missing cont-fil on minimals ?

2010-10-18 Thread Arthur Reutenauer
> Hans, I don't understand what you want to say.

  Hans says that you have to change \loadcorefile{cont-fil} to
\loadmarkfile{cont-fil} in context.mkii and context.mkiv because the
file used to be called cont-fil.tex and has now been renamed
cont-fil.mkii and cont-fil.mkiv for Mark II and Mark IV respectively.

Arthur
___
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] Missing cont-fil on minimals ?

2010-10-18 Thread Henning Hraban Ramm


Am 2010-10-18 um 13:36 schrieb Hans Hagen:


On 18-10-2010 12:28, luigi scarso wrote:

Today, first-setup.sh on my linux box says:
! I can't find file `cont-fil'.

   \relax
l.117 \loadcorefile{cont-fil}


in context.mkii/mkiv :

\loadmarkfile{cont-fil}

I moved some more files to the mkii/mkiv namespace.



Same here (OSX-intel, but the problem isn't OS dependent).

Hans, I don't understand what you want to say.
I get the same error, so with the current beta ConTeXt (i.e. format  
generation) just doesn't work.



Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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] background over two page

2010-10-18 Thread Wolfgang Schuster

Am 18.10.2010 um 14:18 schrieb Otared Kavian:

> Your solution works as intended when the framed, highlighted text with 
> background spans over two pages (though it doesn't when it spans over three 
> pages or more, but this is not a real issue, since it is a bad idea to have 
> such long highlighted texts…).


I guess this is also possible with textbackground:

\newcounter\CurrentBackground

\def\StartBackground
  {\doglobal\increment\CurrentBackground
   \setposition{Background:b:\CurrentBackground}%
   \startbackground}

\def\StopBackground
  {\stopbackground
   \setposition{Background:e:\CurrentBackground}}

\def\DrawBackground
  
{\ifnum\MPp{Background:b:\CurrentBackground}=\MPp{Background:e:\CurrentBackground}
 \startMPcode
 draw topboundaryOverlayBox withcolor red ;
 draw bottomboundary OverlayBox withcolor red ;
 draw leftboundary   OverlayBox withcolor red ;
 draw rightboundary  OverlayBox withcolor red ;
 \stopMPcode
   \else\ifnum\realpageno=\MPp{Background:b:\CurrentBackground}
 \startMPcode
 draw topboundaryOverlayBox withcolor red ;
 draw leftboundary   OverlayBox withcolor red ;
 draw rightboundary  OverlayBox withcolor red ;
 \stopMPcode
   \else\ifnum\realpageno=\MPp{Background:e:\CurrentBackground}
 \startMPcode
 draw bottomboundary OverlayBox withcolor red ;
 draw leftboundary   OverlayBox withcolor red ;
 draw rightboundary  OverlayBox withcolor red ;
 \stopMPcode
   \else
 \startMPcode
 draw leftboundary   OverlayBox withcolor red ;
 draw rightboundary  OverlayBox withcolor red ;
 \stopMPcode
   \fi\fi\fi}

\defineoverlay[DrawBackground][\DrawBackground]

\starttext

\setupbackground[background=DrawBackground]

\input knuth

\StartBackground
\dorecurse{12}{\input knuth\par}
\StopBackground

\input knuth

\StartBackground
\input knuth\par
\StopBackground

\input knuth

\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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] quoted environment arguments

2010-10-18 Thread Philipp Gesang
Hi,

there’s a behaviour concerning how context handles forced quotes
in command line arguments that I do not understand.

···  ···

for i=-1,#environment.rawarguments do
print(i, environment.rawarguments[i], environment.originalarguments[i])
end

··  ···

Now run this as ‘test.lua’ with mtxrun:

  # mtxrun --script test.lua \"simple\" \"more complex\"

Here I get the following output:

···  

-1  texlua  texlua
0   /home/kokytos/context/tex/texmf-linux/bin/mtxrun
/home/kokytos/context/tex/texmf-linux/bin/mtxrun
1   --script--script
2   test.luatest.lua
3   "simple"simple"
4   "more   more complex
5   complex"nil

··  

Number 3 indicates that a quoted argument is fully unquoted iff
it gets parsed into multiple arguments. It also leads to
‘Unbalanced quotes in argument ./simple"’ when used with the main
‘context’ script. It would make sense if you expect only args
containing spaces to be explicitly quoted, though.

I would propose a patch like the one I attached but I’m having
difficulties testing locally modified copies of the core Lua
files, so it remains untested.

Philipp
--- /home/kokytos/base/luat-env.lua 2010-10-18 15:23:24.053334794 +0200
+++ luat-env.lua2010-10-18 15:27:47.320001408 +0200
@@ -183,10 +183,12 @@
 for index=1,#arg do
 local argument = arg[index]
 if find(argument,"^\"") then
-newarg[#newarg+1] = gsub(argument,"^\"","")
 if not find(argument,"\"$") then
 instring = true
+else
+argument = argument:gsub("\"$", "")
 end
+newarg[#newarg+1] = gsub(argument,"^\"","")
 elseif find(argument,"\"$") then
 newarg[#newarg] = newarg[#newarg] .. " " .. gsub(argument,"\"$","")
 instring = false


pgpYwsNgpxwGe.pgp
Description: PGP signature
___
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] background over two page

2010-10-18 Thread Otared Kavian
On 18 oct. 2010, at 09:43, luigi scarso wrote:

> On Mon, Oct 18, 2010 at 9:32 AM, Otared Kavian  wrote:
>> […]
> With my solution it's a matter of changing few lines
> bottomframe=off,topframe=on,
> 
> bottomframe=on,topframe=off,


Thanks Luigi!
Your solution works as intended when the framed, highlighted text with 
background spans over two pages (though it doesn't when it spans over three 
pages or more, but this is not a real issue, since it is a bad idea to have 
such long highlighted texts…).

Best regards: OK

I copy below your modfied solution:

% A solution by Luigi Scarso, slightly modified by him

%%
\newdimen\SpaceLeft

\def\CheckSpace{%
\ifdim\pagetotal=0pt\SpaceLeft=\vsize\else\SpaceLeft=\pagegoal\advance\SpaceLeft
by -\pagetotal\advance\SpaceLeft by -2\lineheight\fi}%

\setupcolors[state=start]

\long\def\StartBg#1\StopBg{%
\bgroup
\setbox8000=\vbox{\hsize=\dimexpr\textwidth-1em\relax#1}
\CheckSpace% \the\SpaceLeft\the\ht8000 \the\dp8000
\ifdim\dimexpr(\ht8000+\dp8000)>\SpaceLeft\relax
%
\setbox8001=\vsplit8000 to \SpaceLeft%
\setbox8001=\vbox{\unvbox8001}%
%
\setupbackground
[bottomframe=off,
topframe=on, % suggested by Luigi, in his answer
rulethickness=1pt,
rightframe=on,
width=\textwidth,
leftframe=on]
\startbackground\unvbox8001\stopbackground%

\setupbackground
[bottomframe=on,
topframe=off, % suggested by Luigi, in his answer
rulethickness=1pt,
rightframe=on,
width=\textwidth,
leftframe=on]
\startbackground\unvbox8000\stopbackground%
\else
\setupbackground
[bottomframe=on,
topframe=on,
rulethickness=1pt,
rightframe=on,
leftframe=on]
\startbackground #1\stopbackground%
\fi
\egroup
}

\setupbackground
[bottomframe=on,
rulethickness=1pt,
rightframe=on,
leftframe=on]

\starttext

\input ward
\blank

\StartBg
\dorecurse{2}{\input knuth\par}
\StopBg

\blank
\input ward
\blank
\StartBg
\dorecurse{4}{\input knuth\par}
\StopBg

\blank
\input ward

\stoptext
%%

On 18 oct. 2010, at 09:43, luigi scarso wrote:

> On Mon, Oct 18, 2010 at 9:32 AM, Otared Kavian  wrote:
>> 
>> On 16 oct. 2010, at 17:30, Emanuele Sacco wrote:
>> 
>>> A solution by Luigi:
>>> […]
>> 
>> Hi Emmanuele, Hi Luigi,
>> 
>> Please excuse me if I get involved in the thread of your discussions…
>> I was interested both by the question ad the solutions, since I had a 
>> similar problem some time ago, but I gave up.
>> 
>> Now that you give a solution with \definetextbackground (the solution 
>> below), I would like to point out that with this definition the beginning of 
>> the highlighted text does not have the upper frame turned on, while at the 
>> end the bottom frame is turned on (of course this is what we want).
>> So my question is: can one have both the upper frame turned on at the 
>> begining of the highlighted text (and only there) and also the bottom frame 
>> turned on at the end (and only there).
>> In other words, a highlighted framed text spanning over two (or more) pages, 
>> would be like a big rectangle of which the upper and the bottom frame, as 
>> well as the left and right frames, are shown.
>> 
>> Thanks in advance for you attention: OK
> With my solution it's a matter of changing few lines
> bottomframe=off,topframe=on,
> 
> 
> bottomframe=on,topframe=off,
> 
> 
> -- 
> 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
> ___


___
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] Missing cont-fil on minimals ?

2010-10-18 Thread Hans Hagen

On 18-10-2010 12:28, luigi scarso wrote:

Today, first-setup.sh on my linux box says:
! I can't find file `cont-fil'.

\relax
l.117 \loadcorefile{cont-fil}


in context.mkii/mkiv :

\loadmarkfile{cont-fil}

I moved some more files to the mkii/mkiv namespace.

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] Missing cont-fil on minimals ?

2010-10-18 Thread luigi scarso
Today, first-setup.sh on my linux box says:
! I can't find file `cont-fil'.

   \relax
l.117 \loadcorefile{cont-fil}


-- 
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] Trouble with ConTeXt's project structure

2010-10-18 Thread Stefan Müller

On 18.10.2010 01:29, Henning Hraban Ramm wrote:

Am 2010-10-17 um 21:43 schrieb Stefan Müller:


I tried to set up a project of mine using the project structure
propagated in
the wiki [1]. Because I ran into some trouble I made the following small
example (using MkIV, minimals 2010.10.14 13:14).

...

All this seems very strange to me, especially since a friend told me
project
structure works pretty well in his projects. I tested on two different
machines
(Windows Vista and Linux). Am I doing something wrong? Is this a bug or a
feature?


Consider it a feature that actual code in your project file is always
executed.
Consider the table of content call in the wiki a bad example. Mea culpa.
Change it.

Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)


Okay, so the \completecontent should be put inside another component, right?

>> Another case, same problem. If I drop the "product", i.e. I only
>> have a project file including several components, the individual
>> component files and an environment file, kind of the same problems
>> appear. Translating the project file works well. Translating the
>> component file c_editorial.tex results in a PDF with 4 pages
>> (instead of one with "Editorial"): "Editorial", "First Article",
>> "Contents", "Editorial". Context puts the whole project in the PDF
>> and appends the component c_editorial...

For me the trouble lies more in my second example "Another case, same 
problem" because the "\component c_something" calls are also considered 
as "actual code", not only the \completecontent. Using a (fake) product 
in this case seems to me like a workaround.


Thank you very much so far,
Stefan.
___
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] MKIV on miktex

2010-10-18 Thread luigi scarso
http://blog.miktex.org/post/2010/10/ConTeXt.aspx

-- 
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] \setuphead

2010-10-18 Thread Herbert Voss
Am 18.10.2010 10:08, schrieb Thomas Schmitz:

>> I want to know if the wiki text is outdated or not.
>> However, I am looking for an example where deeptextcommand
>> is really needed

> I get an error when I compile your code in mkii; deeptextcommand is
> needed. It's only in mkiv that your code works, AFAICS.

I see
thanks

Herbert
___
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] \setuphead

2010-10-18 Thread Thomas Schmitz

On Mon, 18 Oct 2010 10:00:40 +0200
 Herbert Voss  wrote:


I know ...
I want to know if the wiki text is outdated or not.
However, I am looking for an example where 
deeptextcommand

is really needed

Herbert


I get an error when I compile your code in mkii; 
deeptextcommand is needed. It's only in mkiv that your 
code works, AFAICS. So the wiki is not outdated but 
cautious.


Thomas
___
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] \setuphead

2010-10-18 Thread Hans Hagen

On 18-10-2010 10:00, Herbert Voss wrote:


I know ...
I want to know if the wiki text is outdated or not.
However, I am looking for an example where deeptextcommand
is really needed


This was introduced for very special purposes when one wants to work 
directly on the content (I never used it my self but it was a user 
request). Normally #1 and #2 for hooked in commands get more pases than 
the number and title: they get also the font and color switching so 
operating on the title directly is no fun then.


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] \setuphead

2010-10-18 Thread Herbert Voss
Am 18.10.2010 09:52, schrieb luigi scarso:
> 2010/10/18 Herbert Voss :
>> in http://wiki.contextgarden.net/Titles
>> is an example for a wrong setting:
>>
>> \starttext
>> \setuphead[section][textstyle=\em,textcommand=\WORD]
>> \section{A not so long title}
>> \stoptext
>>
>> the wiki sais, that this leads to \WORD{\EM A not so long title}
>> which should give an error. However, the above works for me
>> in the same way as
>
> Also this works
> \starttext
> \setuphead[section][textstyle=\WORD,textcommand=\emphit]
> \section{A not so long title}
> \stoptext

I know ...
I want to know if the wiki text is outdated or not.
However, I am looking for an example where deeptextcommand
is really needed

Herbert
___
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] \setuphead

2010-10-18 Thread luigi scarso
2010/10/18 Herbert Voss :
> in http://wiki.contextgarden.net/Titles
> is an example for a wrong setting:
>
> \starttext
> \setuphead[section][textstyle=\em,textcommand=\WORD]
> \section{A not so long title}
> \stoptext
>
> the wiki sais, that this leads to \WORD{\EM A not so long title}
> which should give an error. However, the above works for me
> in the same way as
>
> \starttext
> \setuphead[section][textstyle=\em,deeptextcommand=\WORD]
> \section{A not so long title}
> \stoptext
Also this works
\starttext
\setuphead[section][textstyle=\WORD,textcommand=\emphit]
\section{A not so long title}
\stoptext



>
> mkiv, TeXLive2010
>
> Herbert
> ___
> 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
> ___
>



-- 
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] background over two page

2010-10-18 Thread luigi scarso
On Mon, Oct 18, 2010 at 9:32 AM, Otared Kavian  wrote:
>
> On 16 oct. 2010, at 17:30, Emanuele Sacco wrote:
>
>> A solution by Luigi:
>> […]
>
> Hi Emmanuele, Hi Luigi,
>
> Please excuse me if I get involved in the thread of your discussions…
> I was interested both by the question ad the solutions, since I had a similar 
> problem some time ago, but I gave up.
>
> Now that you give a solution with \definetextbackground (the solution below), 
> I would like to point out that with this definition the beginning of the 
> highlighted text does not have the upper frame turned on, while at the end 
> the bottom frame is turned on (of course this is what we want).
> So my question is: can one have both the upper frame turned on at the 
> begining of the highlighted text (and only there) and also the bottom frame 
> turned on at the end (and only there).
> In other words, a highlighted framed text spanning over two (or more) pages, 
> would be like a big rectangle of which the upper and the bottom frame, as 
> well as the left and right frames, are shown.
>
> Thanks in advance for you attention: OK
With my solution it's a matter of changing few lines
bottomframe=off,topframe=on,


bottomframe=on,topframe=off,


-- 
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] background over two page

2010-10-18 Thread Otared Kavian

On 16 oct. 2010, at 17:30, Emanuele Sacco wrote:

> A solution by Luigi:
> […]

Hi Emmanuele, Hi Luigi,

Please excuse me if I get involved in the thread of your discussions…
I was interested both by the question ad the solutions, since I had a similar 
problem some time ago, but I gave up.

Now that you give a solution with \definetextbackground (the solution below), I 
would like to point out that with this definition the beginning of the 
highlighted text does not have the upper frame turned on, while at the end the 
bottom frame is turned on (of course this is what we want).
So my question is: can one have both the upper frame turned on at the begining 
of the highlighted text (and only there) and also the bottom frame turned on at 
the end (and only there).
In other words, a highlighted framed text spanning over two (or more) pages, 
would be like a big rectangle of which the upper and the bottom frame, as well 
as the left and right frames, are shown.

Thanks in advance for you attention: OK

> An alternative solution with the command \definetextbackground:
> 
> %%
> \setupcolors[state=start]
> \enableregime[utf]
> \def\Linea{\startMPcode
> draw (0,0) -- (\the\textwidth-1,0) withpen pencircle scaled 1bp withcolor red;
> \stopMPcode
> }
> \definetextbackground
> [Prova]
> [
> mp=background:mp,
> location=paragraph,
> rulethickness=1pt,
> width=broad,
> leftoffset=1em,
> rightoffset=1em,
> after={\Linea}
> ]
> \startuseMPgraphic{background:mp}
> path p;
> for i = 1 upto nofmultipars :
> p = (multipars[i]
> topenlarged 5pt
> bottomenlarged 10pt);
> fill p withcolor lightgray ;
> draw leftboundary p withpen pencircle scaled 1bp withcolor red ;
> draw rightboundary p withpen pencircle scaled 1bp withcolor red ;
> endfor;
> \stopuseMPgraphic
> 
> 
> \starttext
> 
> \startProva
> \input knuth
> \input knuth
> \input knuth
> \input knuth
> \input knuth
> \stopProva
> 
> \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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] \setuphead

2010-10-18 Thread Herbert Voss
in http://wiki.contextgarden.net/Titles
is an example for a wrong setting:

\starttext
\setuphead[section][textstyle=\em,textcommand=\WORD]
\section{A not so long title}
\stoptext

the wiki sais, that this leads to \WORD{\EM A not so long title}
which should give an error. However, the above works for me
in the same way as

\starttext
\setuphead[section][textstyle=\em,deeptextcommand=\WORD]
\section{A not so long title}
\stoptext

mkiv, TeXLive2010

Herbert
___
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
___