Re: [NTG-context] horizontal spacing under special circumstances

2015-12-08 Thread Wolfgang Schuster

Henning Hraban Ramm 
8. Dezember 2015 um 16:22

Thank you, this is really nice. Didn’t know \directsetup (i.e. I can’t 
handle these setups at all).


I also tried to get rid of the bigger space after stops:

\installlanguage[packed][en]
\setuplanguage[packed][spacing=packed]

You don’t have add a new language because

\startsetups[tightspace]
\spaceskip 0.7\interwordspace plus .5\interwordstretch minus 
\interwordshrink

\stopsetups

\definedescription[BibItem][
before={\directsetup{tightspace}\bgroup\language[packed]},
after={\egroup},
]

you can use here (the grouping isn’t necessary)

   before={\directsetup{tightspace}\setupspacing[packed]},

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] Problem with \inouter and text justification

2015-12-08 Thread josephcanedo
Dear all,


I am trying to add margin notes and for some reason I do not understand when 
having them in the main text, the main text which normally would be fully 
justified (without notes) is now aligned to left, but right side is erratic. I 
attach a simple MWE showing this.


If you disable the notes uncommenting the no op versions of \R and \N macros 
the text is perfectly justified. 


Any hint on what I am doing wrong or some solution to avoid this please?


Another question would be how to make the margin content always aligned to left 
please (even if the used margin is the left one) ? 


Many thanks


Best regards


Joseph Canedo

margin_mwe.tex
Description: margin_mwe.tex
___
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] horizontal spacing under special circumstances

2015-12-08 Thread Aditya Mahajan

On Tue, 8 Dec 2015, Wolfgang Schuster wrote:

nor in my description (is the setups key even supposed to work in 
\definedescription?).
No, there is no setups key for description and you have to misuse the style 
key.


Should we add one? It is a bit annoying at times that some of the 
environments (descriptions, delimitedtexts, etc) don't have a setup key. 
For environments that have been rewritten in the new style, adding a setup 
key is relatively simple.


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] horizontal spacing under special circumstances

2015-12-08 Thread Henning Hraban Ramm

Am 2015-12-08 um 17:50 schrieb Pablo Rodriguez :

> On 12/08/2015 12:11 PM, Henning Hraban Ramm wrote:
>> [...]
>> Thank you for the suggestion, but I can’t see any change, even if I use
>> extreme values for \spaceskip (like 0.1 or 10.0), neither in footnotes
>> nor in my description (is the setups key even supposed to work in
>> \definedescription?).
> 
> Hi Hraban,
> 
> I don’t know whether this is right, but this works for me:
> 
>\startsetups[footnote:space]
>  \spaceskip .7\interwordspace
>plus .5\interwordstretch minus \interwordshrink
>\stopsetups
> 
>\definedescription[definition][before=\directsetup{footnote:space}]
>\definedescription[definitiona]
> 
>\starttext
>\definition{Hermann Zapf} \input zapf
> 
>\definitiona{Hermann Zapf} \input zapf
>\stoptext

Thank you, this is really nice. Didn’t know \directsetup (i.e. I can’t handle 
these setups at all).

I also tried to get rid of the bigger space after stops:

\installlanguage[packed][en]
\setuplanguage[packed][spacing=packed]

\startsetups[tightspace]
  \spaceskip 0.7\interwordspace plus .5\interwordstretch minus \interwordshrink
\stopsetups

\definedescription[BibItem][
before={\directsetup{tightspace}\bgroup\language[packed]},
after={\egroup},
]


Greetlings, Hraban
---
http://www.fiee.net
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] horizontal spacing under special circumstances

2015-12-08 Thread Henning Hraban Ramm
Am 2015-12-08 um 17:48 schrieb Wolfgang Schuster :

>> Henning Hraban Ramm 8. Dezember 2015 um 12:11
>> 
>> Thank you for the suggestion, but I can’t see any change, even if I use 
>> extreme values for \spaceskip (like 0.1 or 10.0), neither in footnotes
> The footnote on the second page is a line shorter.

Ok.

>> nor in my description (is the setups key even supposed to work in 
>> \definedescription?).
> No, there is no setups key for description and you have to misuse the style 
> key.
> 
> \define\CompressSpace
>   {\spaceskip .7\interwordspace plus .5\interwordstretch minus 
> \interwordshrink}
> 
> \definedescription[compressedspace]

Yes, this works for me. But I like Pablo’s version better.


Greetlings, Hraban
Grüßlinge, Hraban
---
http://www.fiee.net
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] How to put title and counter of the enumeration env. in the FrameTitle?

2015-12-08 Thread Jeong Dal
Dear all,


After searching ConTeXt wiki and googling, I got what I want using the attached 
code.
It can be modified in nicer way which I don’t know.
There are so many hidden commands in ConTeXt for me.
It is absolutely convenient to use the “\defineenumeration” if I don’t use 
FunnyFrame.

Thanks Hans and other developers of ConTeXt.

Best regards,

Dalyoung

%
\definenumber[ThmNumber][way=bychapter, prefix=no]
\setnumber[ThmNumber][1]

\startuseMPgraphic{FunnyFrame} 
picture p ; numeric o ; path a, b ; pair c ; 
p := textext.rt(\MPstring{ThmTitle}) ; 
o := BodyFontSize ; 
a := unitsquare xyscaled (OverlayWidth,OverlayHeight) ; 
p := p shifted (2o,OverlayHeight-ypart center p) ; 
drawoptions (withpen pencircle scaled 1pt withcolor .625red) ; 
b := a superellipsed .95 ; 
draw b ; 
b := (boundingbox p) superellipsed .95 ; 
fill b withcolor .85white ; 
draw b ; 
draw p withcolor black ;
setbounds currentpicture to a ; 
\stopuseMPgraphic 

\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}] 

\defineframedtext[Thm]
[frame=off,
background=FunnyFrame,
offset=\bodyfontsize, 
%increment=yes,
width=\textwidth,
before={\blank[big]},
after={\incrementnumber[ThmNumber]\blank}]

\def\FrameTitle#1% 
{\setMPtext{ThmTitle}{\hbox spread 1em{\hss\strut\ss\bf #1 
\namedheadnumber{chapter}.\getnumber[ThmNumber]\hss}}} 

\starttext

\startchapter[title={First Chapter}]
\setnumber[ThmNumber][1]

{\FrameTitle{Proposition}
\startThm
First theorem in chapter 1.\par
\stopThm}
\input Zapf
{\FrameTitle{Lemma}
\startThm
Second theorem in chapter 1.\par
\stopThm}
\blank
{\FrameTitle{Theorem}
\startThm
$3^{\text{rd}}$ theorem in chapter 1.\par
\stopThm}

\stopchapter

\startchapter[title={Second Chapter}]
\setnumber[ThmNumber][1]

{\FrameTitle{Theorem}  
\startThm
$1^{\text{st}}$ theorem in chapter 2.\par
\stopThm}

\input knuth

{\FrameTitle{Corollary}
\startThm
Second theorem in chapter 2.\par
\stopThm}

{\FrameTitle{Proposition}  
\startThm
Third theorem in chapter 2.\par
\stopThm}

\stopchapter

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

Re: [NTG-context] horizontal spacing under special circumstances

2015-12-08 Thread Pablo Rodriguez
On 12/08/2015 12:11 PM, Henning Hraban Ramm wrote:
> [...]
> Thank you for the suggestion, but I can’t see any change, even if I use
> extreme values for \spaceskip (like 0.1 or 10.0), neither in footnotes
> nor in my description (is the setups key even supposed to work in
> \definedescription?).

Hi Hraban,

I don’t know whether this is right, but this works for me:

\startsetups[footnote:space]
  \spaceskip .7\interwordspace
plus .5\interwordstretch minus \interwordshrink
\stopsetups

\definedescription[definition][before=\directsetup{footnote:space}]
\definedescription[definitiona]

\starttext
\definition{Hermann Zapf} \input zapf

\definitiona{Hermann Zapf} \input zapf
\stoptext


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] horizontal spacing under special circumstances

2015-12-08 Thread Wolfgang Schuster

Henning Hraban Ramm 
8. Dezember 2015 um 12:11

Thank you for the suggestion, but I can’t see any change, even if I 
use extreme values for \spaceskip (like 0.1 or 10.0), neither in footnotes

The footnote on the second page is a line shorter.

\startsetups[footnote:space]
  \spaceskip .7\interwordspace plus .5\interwordstretch minus 
\interwordshrink

\stopsetups

\starttext

\input zapf
\startfootnote
\input zapf
\stopfootnote

\page

\setupnote[footnote][setups=footnote:space]

\input zapf
\startfootnote
\input zapf
\stopfootnote

\stoptext
nor in my description (is the setups key even supposed to work in 
\definedescription?).
No, there is no setups key for description and you have to misuse the 
style key.


\define\CompressSpace
  {\spaceskip .7\interwordspace plus .5\interwordstretch minus 
\interwordshrink}


\definedescription[compressedspace]

\starttext

\startcompressedspace
\input zapf
\stopcompressedspace

\setupdescription[compressedspace][style=\CompressSpace]

\startcompressedspace
\input zapf
\stopcompressedspace

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

Re: [NTG-context] horizontal spacing under special circumstances

2015-12-08 Thread Henning Hraban Ramm
Am 2015-12-08 um 15:01 schrieb Wolfgang Schuster :

>> \unprotect
>> \definedescription[BibItem][
>> headcommand=\gobbleoneargument,
>> align=right,
>> before={\bgroup\spac_spacecodes_set_fixed{50}}, % does this take a value or 
>> a unicode point?
>> after={\egroup}, %\spac_spacecodes_set_stretch},
>> ]
>> \protect
>> 
>> I’d also like to have footnotes in tighter spacing.
> 
> You have to change the value of the \spaceskip register when you want to 
> change with width of a space.
> 
> \startsetups[footnote:space]
>   \spaceskip .7\interwordspace plus .5\interwordstretch minus \interwordshrink
> \stopsetups
> 
> \setupnote[footnote][setups=footnote:space]

Thank you for the suggestion, but I can’t see any change, even if I use extreme 
values for \spaceskip (like 0.1 or 10.0), neither in footnotes nor in my 
description (is the setups key even supposed to work in \definedescription?).

Greetlings, Hraban
---
http://www.fiee.net
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] horizontal spacing under special circumstances

2015-12-08 Thread Wolfgang Schuster

Henning Hraban Ramm 
7. Dezember 2015 um 10:54
Hi again,

since my bibliographic setup works well, thanks again, I’d like to 
tighten it a bit, i.e. reduce spacing under defined circumstances.


In the docs and sources I found only how to affect spacing of 
languages, and only "packed" or "broad".


In lang-spa.mkiv I found \definehspace, and in spac-hor.mkiv I found 
\spac_spacecodes_set_fixed{}, but I don’t understand if they can do 
what I want, and how.


This doesn’t help:

\unprotect
\definedescription[BibItem][
headcommand=\gobbleoneargument,
align=right,
before={\bgroup\spac_spacecodes_set_fixed{50}}, % does this take a 
value or a unicode point?

after={\egroup}, %\spac_spacecodes_set_stretch},
]
\protect

I’d also like to have footnotes in tighter spacing.


You have to change the value of the \spaceskip register when you want to 
change with width of a space.


\startsetups[footnote:space]
  \spaceskip .7\interwordspace plus .5\interwordstretch minus 
\interwordshrink

\stopsetups

\setupnote[footnote][setups=footnote:space]

\starttext

\input zapf
\startfootnote
\input zapf
\stopfootnote

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