Re: [NTG-context] Setting up protrusion, side-effects

2010-07-31 Thread Martin Althoff
 Could as well be a luatex backend problem so I have to
 discuss it with Taco and Hartmut.
 
 Hans
 

Hi Hans,

Thanks for  looking into this further. I have tried to drill down the effect 
being switchable through \setupfootertexts here are my results.

In the example below, I get (with the stress about the latest update, I 
refrained, running: LuaTeX, Version beta-0.60.2-2010070117; ConTeXt  ver: 
2010.07.27 16:30) I can switch/influence the horizontal collapse by (this is 
not a series of steps, each statement assumes starting with the example as 
given):

-- as given, the lines collapse.

-- en-/disabling \sc makes problem switchable

-- en-/disabling \setupfootertexts, problem switchable, however, once 
\setuppagenumbering is commented out, this does not work anymore. The error 
stays permanently.

-- enabling \input tufte in front of the \sc line causes the problem to 
appear permanently now. 

-- adding more tuftes before or after shifts the problem either way. But now 
the permutation of cases gets a bit much...





% protusion 
\definefontfeature [default][default][protrusion=quality,expansion=quality]
\setupalign[hz,hanging]


\setupfootertexts[chapter][pagenumber]
\setuppagenumbering [location=] 


\usetypescript[palatino]
\setupbodyfont[times,12pt]

\starttext

%\input tufte
%\dorecurse {5}{\input tufte}

{\sc Die Exposition der Frage}

Notwendigkeit, Struktur und Vorrang der Frage

\section {Wiederholung der Frage}

\dorecurse {5}{\input tufte}

\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] no indent after blank

2010-07-31 Thread Wolfgang Schuster

 Am 31.07.10 00:50, schrieb Hans Hagen:

[1] http://bitbucket.org/wolfs/fancybreak/src


I'll have a more detailed look at it later (remind me that we need to 
formalize this \ namespace for modules issue; we might need \??? 
for the core soon as we run out of \??'s).


I wonder what the side effects of \everyvbox are as the next box 
content can have vboxes itself (ok, you can do an everyvbox\emptytoks 
inside the \everyvbox); maybe \dowithnextboxcontent can be used here


I changed it now to \dowithnextbox and it works as well, the main 
purpose of the macro is to insert
a symbol between paragraphs but it's true you can't know how other 
people misuse the function.

Another convention could be

\doifmode\s!mkiv{\let\dosetfancybreakattributes\gobbletwoarguments}

so that you then get (less testing):

   \dowithnextboxcontent
 {\setupalign[\fancybreakparameter\c!align]%
  \dosetfancybreakattributes\c!style\c!color}%
 {\blank[\fancybreakparameter\c!spacebefore]%
  \flushnextbox


Done although it has to be \doifmode\v!mkii ;)
As you write nice and clean modules that are perfect examples for 
others, we should take some time at the context conference and see if 
we can derive some 'module writing conventions'.


I want to use this module myself to present how to include macros to 
document a modules source (%M, %D etc.).
I wonder if I should finaly make a definer for \fancybreakparameter 
like cases. I had one once but it looked quite horrible and there are 
subtle differences between all cases but I'll give it a try some day soon.

You mean \installparameterhandler in str-def.mkiv?

The macro is interesting but three arguments are enough because 'framed' 
part is always the same in the parameter commands.


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] no indent after blank

2010-07-31 Thread Hans Hagen

On 31-7-2010 10:01, Wolfgang Schuster wrote:


You mean \installparameterhandler in str-def.mkiv?

The macro is interesting but three arguments are enough because 'framed'
part is always the same in the parameter commands.


indeed, but i need to think about some variants as well, as there are 
differences in parent resolving (or something like that) ... eventually 
we will have this parent chain in all comands i guess (less hash space 
wasted but a bit slower but normally that's not the bottleneck)


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] footnote missing

2010-07-31 Thread Peter Münster
On Wed, Jul 28 2010, Peter Münster wrote:
 
 \starttext
 \startlocalfootnotes
   AAA\footnote{aaa}
   \placelocalfootnotes
 \stoplocalfootnotes
 BBB\footnote{bbb}
 \startlocalfootnotes
   CCC\footnote{ccc} % footnote missing
   \placelocalfootnotes
 \stoplocalfootnotes
 \stoptext

Thanks Hans, it's repaired in latest beta!
Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___
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] part problems

2010-07-31 Thread Hans Hagen

On 31-7-2010 1:08, Alan BRASLAU wrote:

On Friday 30 July 2010 23:00:16 Henning Hraban Ramm wrote:

Am 2010-07-30 um 22:46 schrieb luigi scarso:


Hm, Hraban needs really to come to Brejlov


And yes, I'll try to come to Brejlov, still waiting for an answer from
my lift...


Using parts is not as simple as it seems and is still somewhat problematic,
or maybe I, too, am unable to read the source.


parts are just like chapters and sections; the defaults are just set up 
differently; don't think of them as something programatically different




-
  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] Setting up protrusion, side-effects

2010-07-31 Thread Martin Althoff

 It has to do with the backend resolving fontnames and
 expansions factors 
 and so ... first I need to hear from Hartmut what he thinks
 of it.


No stress :) I'll wait silently -- just wanted to submit, what I thought to be, 
useful info.

cheers, Martin



___
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] CSV parser do not processed macro.

2010-07-31 Thread Jaroslav Hajtmar

Hello all,

to solve my problem I need to find why my function ParseCSVdata 
incorrectly parses strings stored in a macro.
It's including possibly the reason why do not work properly Mojca 
database module as I wrote in a recent mail.
It seems to enter a string function, which is not my function to find a 
separator.


Thanx Jaroslav

Here is my minimal example:


\startluacode
function ParseCSVdata(string2parse, separator, leftdelimiter, 
rightdelimiter)

-- Funkce pro rozparsování jednotlivých záznamů (řádků) CSV tabulky
-- Vstupní textový řetězec (načtený řádek) je v místech výskytu 
separátoru rozsekán na jednotlivá pole
-- Jediný povinný vstupní parametr je 'string2parse'. Při 
nenastavení zbývajících tří parametrů se jako separátor a oddělovače 
použijí buď globální proměnné Sep, Ld a Rd nebo se použijí defaultní hodnoty

-- Výstupem je pole oddělených řetězců
-- Když nejsou globální proměnné Sep, Ld a Rd nastaveny uživatelem, 
nastaví se na defaultní hodnoty. Uživatel si může defaultní hodnoty 
libovolně změnit podle toho, jaké hodnoty používá ve svých aplikacích 
nejčastěji
Sep = (Sep == nil) and UserCSVSeparator or Sep -- Pokud není 
glob. neznámá Sep nastavena, použije se defaultní hodnota ';' (středník).
Ld = (Ld == nil) and UserCSVLeftDelimiter or Ld -- Pokud není glob. 
neznámá Ld (left delimiter) nastavena, použije se defaultní hodnota '' 
(prázdný řetězec)
Rd = (Rd == nil) and UserCSVRightDelimiter or Rd -- Pokud není 
glob. neznámá Rd (right delimiter) nastavena, použije se defaultní 
hodnota '' (prázdný řetězec)
  -- Nastavení hodnot parametrů, které nejsou při volání funkce 
nastaveny tj. při volání funkce ParseCSVdata(string2parse) s pouze 
jedním parametrem
local separator = (separator == nil) and Sep or separator -- při 
nenastavení separátoru se použije

local leftdelimiter = (leftdelimiter == nil) and Ld or leftdelimiter
local rightdelimiter = (rightdelimiter == nil) and Rd or rightdelimiter
-- A jdeme na vlastní zpracování řetězce ...
local result={}
if leftdelimiter ~= '' and rightdelimiter ~= '' then -- Když 
jsou položky v řádku vymezeny levým i pravým delimiterem (tj. jakousi 
závorkou) např. pole1;pole2 nebo {pole1};{pole2} .. atd.
string.gsub(string2parse, 
leftdelimiter..(.-)..rightdelimiter, function(a) 
table.insert(result,a) end ) -- Je vidět, že v tomto případě ani  
nezáleží na separátoru, jednotlivé uzávorkované řetězce se od sebe oddělí
else -- Když je pouze separátor polí bez vymezujících znaků - 
delimiterů (tento případ bohužel neumožňuje použití separátoru jako 
samostatného znaku v nějakém poli )
  result=string.split(string2parse,separator) -- pak stačí 
vstupní řetezec jen vysplitovat tj. rozsekat na samostatné části

end
return result  -- Funkce vrátí pole result obsahující oddělená 
jednotlivá pole řádkového CSV záznamu

end

function pars(inppar)
tex.sprint(input parametr (string):  ..inppar..\\par)
CSVLine=ParseCSVdata(inppar,',','','')
tex.print(table.maxn(CSVLine).. item(s) \\par)
for i = 1, table.maxn(CSVLine) do
tex.sprint(i... ..CSVLine[i]..\\par)
end
tex.sprint(\\blank[big])
end

\stopluacode



\def\printaction{x,y,z,u,v}


\starttext

\startluacode
pars(a,b,c,d)
pars(\\printaction)
\stopluacode



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