Re: [NTG-context] A few questions

2009-11-13 Thread Bernhard Rosensteiner
Hello,

following the new structure code the answer for your second question is:

\definestructureprefixset[figureprefix][section-3]
\definestructureseparatorset [septest][--,--,--,---][?]
\setupstructurecountering[way=bysection, prefixset=figureprefix, 
prefixseparatorset=septest, prefixconnector=--]

explanation: with definestructureprefixset you declare a new prefix which is 
always inserted when it is invoked with the prefixset key (in this case 
section-3 is the section while section-2 is for example the chapter and so 
on... look in the source code for more) you can have 
\definestructureprefixset[figureprefix][section-2,section-3,section-4] for 
example and the prefix gets inserted at the right place in your figure number. 
\definestructureseparatorset [septest][--,--,--,---][?] works similar (the [?] 
is in this case the fallback when no specific separator is defined for that 
position). the prefixconnector is the character which gets inserted between the 
figure number and the rest of the prefixes. All that prefixthings you can also 
do with pagenumbers and section numbers...

i don´t know if this code will see some changes in newer context mkiv versions 
because i think it is still experimental but at the moment it works.

third question: you could define a new head with \definehead then it gets a new 
counter. When you only want that a specific sectionnumber is different from the 
others than do: \startsection [title=dritte section, ownnumber=243]

first question: i don´t know because i don´t needed it.

hope this helps

best regards
Bernhard


Am 13.11.2009 um 01:10 schrieb Vyatcheslav Yatskovsky:

 Hello,
 
 I have a few (I suppose easy) questions:
 
 1) asking about this again and again... how to setup itemization so that the 
 first line were indented too?
 
 2) how to setup figure captions so that  they include section number, like
 sectionNumber.figureNumber
 (no sub-sub-subsections)?
 
 3) How to start section numbering from, say, second section?
 
 Regards,
 Vyatcheslav
 ___
 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] Drawing rectangles

2009-11-13 Thread luigi scarso
On Thu, Nov 12, 2009 at 5:07 PM, Cecil Westerhof cldwester...@gmail.com wrote:

 Work like a charm. There is only one minor problem: where frame's
 touch eachother, the line is a little bit thicker. Is there something
 to be done about this?

 In this case I wanted everything to be centered, but is it possible to
 define the point of the upper corner of a frame?

%% save it as test.tex
\starttext
\hbox{% NO GOOD
\framed[width=6cm,height=8cm,align={lohi,middle}]{\input ward }%
\framed[width=6cm,height=8cm,align={lohi,middle}]{\input ward }%
}

\blank

\hbox{%  GOOD ?
\framed[width=6cm,height=8cm,rightframe=off,align={lohi,middle}]{\input ward }%
\framed[width=6cm,height=8cm,align={lohi,middle}]{\input ward }%
}

\stoptext


Try it with
$texexec test


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


[NTG-context] mkiv math delimiters and |

2009-11-13 Thread Mojca Miklavec
Hello,

I have tried to compile an old document (written in mkii times). Among
other problems that I yet need to isolate, the following minimal
example doesn't want to compile: $\bigl| x \bigr$ since | aren't
recognized as candidates for delimiters. There is a workaround of
course (using \langle, \rangle, ... instead of ), but the three
characters are just way too handy to use.

I suppose that the behaviour in mkii comes from these lines:

\definemathcharacter []   [nothing] [sy] [68] [ex] [0A]
\definemathcharacter []   [nothing] [sy] [69] [ex] [0B]

But I'm not sure where mkiv could be changed.

I have tried to use
  adobename=greater,
  ...
  mathspec={
   { class=binary, name=gt },
   { class=close, name=rbrace },
  },
but without any success.

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] a few questions

2009-11-13 Thread Vyatcheslav Yatskovsky

Thank you, Bernard!

Your snippet works perfectly, I just replaced prefixconnector with '.'

\definestructureprefixset[figureprefix][section-3]

\definestructureseparatorset [septest][--,--,--,---][?]

\setupstructurecountering[way=bysection, prefixset=figureprefix, 
prefixseparatorset=septest, prefixconnector=.]



For third question, I already found the answer in the manual:


\setupheadnumber[section][1] %The next section will have number 2


Concerning my first question how to setup itemization so that the first 
line were indented too? -- I disappointed very much because nobody can 
help me with it. I understand that it may outside of area of interest at 
the moment, but itemized list looks ugly, and my work cannot be done 
without fixing it.



Regards,
Vyatcheslav



___
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] a few questions

2009-11-13 Thread Taco Hoekwater


Vyatcheslav Yatskovsky wrote:
 
 Concerning my first question how to setup itemization so that the first
 line were indented too? -- I disappointed very much because nobody can
 help me with it. I understand that it may outside of area of interest at
 the moment, but itemized list looks ugly, and my work cannot be done
 without fixing it.

I am not even sure what you want to achive, exactly. Can you create
a bit of 'ascii' art?


___
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] a few questions

2009-11-13 Thread luigi scarso
On Fri, Nov 13, 2009 at 3:13 PM, Vyatcheslav Yatskovsky
yatskov...@gmail.com wrote:

 Concerning my first question how to setup itemization so that the first
 line were indented too? -- I disappointed very much because nobody can help
 me with it. I understand that it may outside of area of interest at the
 moment, but itemized list looks ugly, and my work cannot be done without
 fixing it.
Maybe you can try a patch by yourself .
I do this, sometime.

-- 
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] Drawing rectangles

2009-11-13 Thread CLDWesterhof
Willi Egger w.eg...@boede.nl writes:

 There  is TeXshow-web, accessible through the contextgarden. Look for
 setupframed.

At the moment the site can not be reached. I'll try it later.

-- 
Cecil Westerhof
Senior Software Engineer

LinkedIn: http://www.linkedin.com/in/cecilwesterhof
___
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] ragged right in a simplecolumns environment

2009-11-13 Thread Oliver Heins
Wolfgang Schuster schuster.wolfg...@googlemail.com writes:

 Am 12.11.2009 um 18:03 schrieb Oliver Heins:

 How can I swith to ragged right in a simplecolumns environment?  (I have
 to use it for some reasons.)
 
 \startsimplecolumns[n=4,align=right] does not work.

 \startsimplecolumns[n=4]\setupalign[right]

That was easy, thank you :-)

olli

-- 
Oliver Heins he...@sopos.orghttp://oliverheins.net/
http://blog.overheins.net/ F27A BA8C 1CFB B905 65A8
http://scriptorium-adp.de/ 2544 0F07 B675 9A00 D827
1024D/9A00D827 2004-09-24 -- gpg --recv-keys 0x9A00D827
Please avoid sending me Word or PowerPoint attachments:
http://www.gnu.org/philosophy/no-word-attachments.html
___
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] MetaPost integration: default parameters

2009-11-13 Thread Oliver Buerschaper

Hi,

ConTeXt already passes quite a few length parameters on to embedded  
MetaPost code ... BodyFontSize, CurrentWidth etc.


Would it be possible to add some more font/math related parameters to  
the default definitions? I'm thinking of exposing math OpenType  
parameters like


AxisHeight
FractionRuleThickness
UpperLimitBaselineRiseMin
UpperLimitGapMin
LowerLimitGapMin
LowerLimitBaselineDropMin
etc.

of the surrounding text to MetaPost as well. This would be very handy  
for me since I need to draw diagrammatic expressions to be used in  
formulas and I'd like them to adapt to the current math font and  
fontsize automatically. At the moment I set these variables manually...


Also, is there a way to directly get the glyph outlines of, say, $ 
\bigotimes$ in MetaPost code and use it to derive some length unit  
from it?


Oliver
___
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] shorthands for hyphens with \penalty, \allowbreak, breaking up ligatures etc.

2009-11-13 Thread Oliver Heins
In LaTeX with babel option german there are several shortcuts needed for
typesetting german texts with their large amount of composita.  Some of
them are defined in Context, too, but not all (maybe I didn't find them
yet).  In typesetting german there is the need of breaking up some
ligatures, too.

Here are some examples of what I'm talking about:

composita  | line break | Babel shortcut|  pure TeX-Code
---||---|
(Kinder-)Armut | (Kinder-)  | (Kinder~)Armut | (Kinder\protect1
   | Armut  |   | -)\allowbreak Armut
   ||   |
Bundestag und  | (...) und  | (...) und ~rat   | (...) und \hbox{-rat}
-rat   | -rat   |   | [\protect1000 doesn't
   ||   | seem to work here]
--- breaking up ligatures ---
Auffassung | Auffassung | Auf|fassung  | ??? (babel code:
   | (not   |   | \textormath{\penal...@m
   | Auffassung) |   | \discretionary{-}{}%
   ||   | {\kern.03em}%
   ||   | \allowhyphens}{}%)

Is there any context way to define these kind of shorthands?  (Babel
has the \decl...@shorthand internal command.)

TIA,
 olli


-- 
Oliver Heins he...@sopos.orghttp://oliverheins.net/
http://blog.overheins.net/ F27A BA8C 1CFB B905 65A8
http://scriptorium-adp.de/ 2544 0F07 B675 9A00 D827
1024D/9A00D827 2004-09-24 -- gpg --recv-keys 0x9A00D827
Please avoid sending me Word or PowerPoint attachments:
http://www.gnu.org/philosophy/no-word-attachments.html
___
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] Wiki pages for Scite and Notepad++

2009-11-13 Thread Idris Samawi Hamid ادريس سماوي حامد

Hi Richard,

On Wed, 11 Nov 2009 09:46:43 -0700, richard.steph...@converteam.com  
wrote:


I have recently added two new pages to the Wiki, one for Scite  
(http://wiki.contextgarden.net/Scite

) and one for Notepad++ (http://wiki.contextgarden.net/Notepad%2B%2B)

I have used words plagiarised from release notes and the mailing list,  
plus some

of my own experiences of trying to get them to work.

It would be good if someone knowledgeable could review what I've put and
straighten out any inaccuracies.


I greatly appreciate this! Now I'm on vista, and a different directory  
structure is needed. So the dir-structure next updates to the Npp package  
will be vista only, although I welcome anyone's help in keeping it  
compatible with XP.


Thanks again and

Best wishes
Idris

--
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

___
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] MetaPost integration: default parameters

2009-11-13 Thread Mojca Miklavec
On Fri, Nov 13, 2009 at 17:53, Oliver Buerschaper wrote:

 Also, is there a way to directly get the glyph outlines of, say,
 $\bigotimes$ in MetaPost code and use it to derive some length unit from it?

Yes, but this only works for Type1 fonts, not for OpenType.

The example below is a literal copy from metapost manual (created by Taco).

You first search in the source for that glyph:
\definemathsymbol [bigotimes] [op]  [ex] [4E] % this equals 78 in
decimal notation
and then you need either name or number of glyph + name of font.

fontmapfile =lm-math.map;
beginfig(1);
  picture q;
  path p;
  interim ahlength := 12bp;
  interim ahangle := 25;
  q := glyph 78 of lmex10 scaled .2;
%  q := glyph circlemultiplytext of lmex10 scaled .2;
% cheat by looking at lm-mathex.enc
  for item within q:
p := pathpart item;
drawarrow p withcolor (.6,.9,.6)
withpen pencircle scaled 1.5;
for j=0 upto length p:
  pickup pencircle scaled .7;
  draw (point j of p -- precontrol j of p)
  dashed evenly withcolor blue;
  draw (point j of p -- postcontrol j of p)
  dashed evenly withcolor blue;
  pickup pencircle scaled 3;
  draw precontrol j of p withcolor red;
  draw postcontrol j of p withcolor red;
  pickup pencircle scaled 2;
  draw point j of p withcolor black;
endfor
  endfor
endfig;
end.

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] Drawing rectangles

2009-11-13 Thread Cecil Westerhof
luigi scarso luigi.sca...@gmail.com writes:

 Work like a charm. There is only one minor problem: where frame's
 touch eachother, the line is a little bit thicker. Is there something
 to be done about this?

 %% save it as test.tex
 \starttext
 \hbox{% NO GOOD
 \framed[width=6cm,height=8cm,align={lohi,middle}]{\input ward }%
 \framed[width=6cm,height=8cm,align={lohi,middle}]{\input ward }%
 }

 \blank

 \hbox{%  GOOD ?
 \framed[width=6cm,height=8cm,rightframe=off,align={lohi,middle}]{\input ward 
 }%
 \framed[width=6cm,height=8cm,align={lohi,middle}]{\input ward }%
 }

 \stoptext

Thanks. I made it now:
\usemodule[defaults]

\setupoutput[pdf]

\setuplayout[header=0cm, footer=0.25cm]

\defineframed
   [action][width=5cm, height=3cm, offset=none]
\defineframed
   [base]  [width=3cm, height=2cm, offset=none, topframe=off]

\starttext

\setupheader[state=high]

\setupfootertexts[\hfill {\switchtobodyfont[6pt]\copyright Decebal 
Computing, http://www.decebal.nl} \hfill][] [][right header]

\setupalign[middle]\offinterlineskip

\noindent\action[bottomframe=off]{}


\noindent\action[bottomframe=off,rightframe=off]{}\action[bottomframe=off]{} 

\noindent\dorecurse{2}{\action[rightframe=off]{}}\action{}

\dorecurse{7}{
  \noindent \base{}

}

\stoptext

Still another question. I have to write:

\noindent\action[bottomframe=off,rightframe=off]{}\action[bottomframe=off]{} 
because the following does not work:
\noindent\action[bottomframe=off,rightframe=off]{}
\action[bottomframe=off]{} 
But the second I find more readable. Is there a way to make it more
readable?

-- 
Decebal Computing
Voor uw ICT oplossingen

Cecil Westerhof
Senior Software Engineer
M ce...@decebal.nl
W http://www.decebal.nl

LinkedIn: http://www.linkedin.com/in/cecilwesterhof
___
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] Drawing rectangles

2009-11-13 Thread Aditya Mahajan

On Fri, 13 Nov 2009, Cecil Westerhof wrote:


Still another question. I have to write:
   \noindent\action[bottomframe=off,rightframe=off]{}\action[bottomframe=off]{}
because the following does not work:
   \noindent\action[bottomframe=off,rightframe=off]{}
   \action[bottomframe=off]{}
But the second I find more readable. Is there a way to make it more
readable?


Maybe adding a % at the end helps.

\noindent\action[bottomframe=off,rightframe=off]{}%
\action[bottomframe=off]{}

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
___