Re: [NTG-context] simple bibliography and dots after section numbering

2010-05-09 Thread Taco Hoekwater

Rogutės Sparnuotos wrote:


But would it let me place such a list of publications:

  Books
  
  1. Author (year). Title.

  2. Author (year). Title.
  
  Internet resources


  3. URL

  Movies

  4. Author (year). Title.

It seems that I could easily use \setuppublicationlayout to define a
'movies' type, but is listing references by type implemented 


Not in mkii.


(or easily done with MKIV)? Intuitively, I would use

  \placepublications[criterium=[type, book]]

for each list...



___
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] mistake in lang-cjk.mkiv

2010-05-09 Thread Tomáš Pustelník
Also I would like to ask if file lang-spe.mkii have some equivalent in 
MkIV and  where the language specifics are defined (in which file)? Or is 
it treated in enco files?


in mkiv we don't have (want) language specifics ... why do yoi need them?

Hans


Well I actually don't need them, I browse source codes and I found it there. 
It looks quite useful so I was wondering, if in MkIV is this implemented as 
well. Could you please tell me, why specifics weren't implemented in MkIV 
(why don't we want them)? And is there any other mechanics which replace 
language specifics in MkIV? And just to be sure. In MkII language specifics 
are still working, right?


Also are there any documents or information sources where I could find info 
about encoding in ConTeXt? I could use them for my bachelor thesis.


Thank you for answer.

Tomas Pustelnik



___
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] mistake in lang-cjk.mkiv

2010-05-09 Thread Wolfgang Schuster

Am 06.05.10 22:16, schrieb Hans Hagen:
Also I would like to ask if file lang-spe.mkii have some equivalent 
in MkIV and  where the language specifics are defined (in which 
file)? Or is it treated in enco files?


in mkiv we don't have (want) language specifics ... why do yoi need them?


languagespecifics are not needed but we need a method to load language
dependend setups, e.g. for french you can have in lang-ger

\startsetups [fr] [punctuation]

  \setcharacterspacing[frenchpunctuation]

\stopsetups

\startsetups [fr] [itemize]

  \setupitemize[symbol=2]

\stopsetups

and in your document you can load them with

\setuplanguage[fr][setups={punctuation,itemize}]

or

\enablelanguagesetups[punctuation,itemize]

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] Figure numbering without sectionnumber

2010-05-09 Thread Wolfgang Schuster

Am 08.05.10 21:56, schrieb Jaroslav Hajtmar:

Thanx Wolfgang!
I was tried your \setupcaption[figure][way=bytext].
In MKII is this OK, but in MKIV without efect.

I have to compiling by MKIV because part of source code is for MKII 
unknown.


I have more sections but only one set of figures for all document.

Is any solution in MKIV?


\setupcaption[figure][way=bytext,prefixsegments=100]
\starttext
\chapter{One}
\placefigure{one}{1}
\section{Two}
\placefigure{two}{2}
\chapter{Three}
\placefigure{three}{3}
\section{Four}
\placefigure{four}{4}
\subsection{Five}
\placefigure{five}{5}
\subsubsection{Six}
\placefigure{six}{6}
\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] Problem with the loading cid fonts in luatex-plain format

2010-05-09 Thread 李延瑞
Hi,

The following is my test file for Adobe OTF fonts loading.

\font\cidfont=file:AdobeSongStd-Light
\cidfont 测试
\bye

I have put the Adobe-GB1-4.cidmap file into the directory which
contains the test file. As a result, luatex gives this waring:

LuaTeX warning: lua-loaded font [51] (file:AdobeSongStd-Light) has
no characters!

I remember it could work before.

My environment: linux x86 / context minimals  2010.05.08 13:33 /
luatex 0.60.1-2010050821

-- 
Best regards,

Li Yanrui (李延瑞)
___
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] Figure numbering without sectionnumber

2010-05-09 Thread Jaroslav Hajtmar

Great,
hat the ticket!

Thank you very much.
Jaroslav

Dne 9.5.2010 11:18, Wolfgang Schuster napsal(a):


\setupcaption[figure][way=bytext,prefixsegments=100]
\starttext
\chapter{One}
\placefigure{one}{1}
\section{Two}
\placefigure{two}{2}
\chapter{Three}
\placefigure{three}{3}
\section{Four}
\placefigure{four}{4}
\subsection{Five}
\placefigure{five}{5}
\subsubsection{Six}
\placefigure{six}{6}
\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] mistake in lang-cjk.mkiv

2010-05-09 Thread Hans Hagen

On 9-5-2010 10:47, Wolfgang Schuster wrote:

Am 06.05.10 22:16, schrieb Hans Hagen:

Also I would like to ask if file lang-spe.mkii have some equivalent
in MkIV and where the language specifics are defined (in which file)?
Or is it treated in enco files?


in mkiv we don't have (want) language specifics ... why do yoi need them?


languagespecifics are not needed but we need a method to load language
dependend setups, e.g. for french you can have in lang-ger

\startsetups [fr] [punctuation]

\setcharacterspacing[frenchpunctuation]

\stopsetups

\startsetups [fr] [itemize]

\setupitemize[symbol=2]

\stopsetups

and in your document you can load them with

\setuplanguage[fr][setups={punctuation,itemize}]

or

\enablelanguagesetups[punctuation,itemize]


indeed setups is the way to go

\enablelanguagesetups is somewhat tricky as we then also want to disable 
them selectively which boils down to either tagging them all internally 
or let lua deal with sets in which case we need some optimization to 
prevent redundant calls


also, we need the reverse actions then i.e. for german we want to 
disable the punctuation


\startsetups [fr] [punctuation:reset]

\resetcharacterspacing

\stopsetups

and for style changes that's quite some extra code (and adding an extra 
level of language hashes to each mechanism is also no solution)


so, we might distinguish between 'mainlanguage' and local 'language'

\startlanguagesetups [fr:punctuation:set] % local language
  \setcharacterspacing[frenchpunctuation]
\stopsetups

\startlanguagesetups [fr:punctuation:reset] % local language
  \resetcharacterspacing
\stopsetups

\startlanguagesetups [fr:itemize] % mainlanguage
  \setupitemize[symbol=2]
\stopsetups

or so ... needs bit of thinking

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] TABLE in TABLE

2010-05-09 Thread Xan

Hi,

Is it possible to put a table in another table?
Example: this code gives me an error:
! Argument of \parseTD has an extra }.
inserted text
   \par
to be read again
  }
\handleTBLcell ...\bTBLCELL \TBLcharalign {#2}{#4}
 \eTBLCELL \inTBLcell 
{#1}{...

inserted text ...bl \begintblrow \makeTBL {1}{1}
 \nexttblcol \endtblrow 
\be...


\endTBL ...x {\trialtypesettingtrue \the \tbltoks
 }\settbldis 
\maximumcol {\...


\eTABLE ...}}\eTBL }\removeunwantedspaces \endTBL
 \stopTBLprocessing \fi 
\eg...

l.172 \eTABLE
   
? x




\placefigure
 [here,none]
 [fig:puntuacio-figures]
 {Puntuació de cada figura}
 {\bTABLE[frame=on,align={middle,lohi}]
\bTR
\bTD

\bTABLE[frame=on,align={middle,lohi}]
\bTR
\bTD
{\sc Cub}
\eTD
\eTR
\bTR
\bTD
\externalfigure[figs/p-cube.jpg][scale=400]
\eTD
\eTR
\bTR
\bTD
2 punts
\eTD
\eTR
\bTR
\bTD
Número de cares: 6
Forma de les cares: quadrat
\eTD
\eTR
\eTABLE

\eTD
\eTR
\bTR
\bTD
h
\eTD
\eTR
\eTABLE}



Thanks a lot,
Xan.
___
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] TABLE in TABLE

2010-05-09 Thread Taco Hoekwater

Xan wrote:

Hi,

Is it possible to put a table in another table?


IIRC, putting the nested table in a buffer should work, but
maybe it is good enough to just add a brace group around it:
\bTD { \bTABLE ... \eTABLE } \eTD

Best wishes,
Taco
___
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] TABLE in TABLE

2010-05-09 Thread Peter Münster
On Sun, May 09 2010, Xan wrote:

 Is it possible to put a table in another table?

Yes:

\starttext
\bTABLE \bTR \bTD
  {\bTABLE \bTR \bTD bla \eTD \eTR \eTABLE}
\eTD \eTR \eTABLE
\stoptext

Cheers, 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] TABLE in TABLE

2010-05-09 Thread Xan

Thanks all of you.
In other kind of ideas: is it a bug? Why we need {} for embed tables and 
not for embed itemizes in itemizes for example?


Please CCme
Xan.
___
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] TABLE in TABLE

2010-05-09 Thread Wolfgang Schuster

Am 09.05.10 14:37, schrieb Xan:

Thanks all of you.
In other kind of ideas: is it a bug? Why we need {} for embed tables 
and not for embed itemizes in itemizes for example?


It has to do with the way how TABLE is implemented, each cell is defined as

\def\bTD#1\eTD{...}

this means when TeX sees a \bTD in the input it grabs everything till 
the \eTD,

let's take a loo at this example

\bTABLE \bTR
\bTD
  \bTABLE \bTR
\bTD text \eTD
  \eTR \eTABLE
\eTD
\eTR \eTABLE

The \bTD from the outer table reads everything till the \eTD from the 
inner table
and what ends up as real content for the table cell where you wanted 
another table is


\bTABLE \bTR
  \bTD text

As you can see the \bTD as delimiting \eTD to end the cell and this is what
cause the error message you get. The braces ({...}) as suggested from 
the others

help in this case because the hide the \eTD from the outer table and buffers
as suggested from Taco are another way to get around this.

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] TABLE in TABLE

2010-05-09 Thread Xan

Thanks for the technical and simple explanation

Xan.

En/na Wolfgang Schuster ha escrit:

Am 09.05.10 14:37, schrieb Xan:

Thanks all of you.
In other kind of ideas: is it a bug? Why we need {} for embed tables 
and not for embed itemizes in itemizes for example?


It has to do with the way how TABLE is implemented, each cell is 
defined as


\def\bTD#1\eTD{...}

this means when TeX sees a \bTD in the input it grabs everything till 
the \eTD,

let's take a loo at this example

\bTABLE \bTR
\bTD
  \bTABLE \bTR
\bTD text \eTD
  \eTR \eTABLE
\eTD
\eTR \eTABLE

The \bTD from the outer table reads everything till the \eTD from the 
inner table
and what ends up as real content for the table cell where you wanted 
another table is


\bTABLE \bTR
  \bTD text

As you can see the \bTD as delimiting \eTD to end the cell and this is 
what
cause the error message you get. The braces ({...}) as suggested from 
the others
help in this case because the hide the \eTD from the outer table and 
buffers

as suggested from Taco are another way to get around this.

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] current

2010-05-09 Thread Hans Hagen

Hi,

As some might have noticed, a new current has been released. One reason 
in that a texlive code freeze happens, another is that we need such a 
snapshot in order to do more drastic changes in mkiv as well as be able 
to use features that we introduce(d) in luatex  0.60.


Taco will post the usual detailed release notes soon. Apart from hotfix 
currents, the next current will be released around the context 
conference. Of course there will be betas in the meantime.


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] Switch for sans slanted

2010-05-09 Thread Marco
Hi,

I've a question concerning switching fonts in setups. How to get a sans
slanted style? Have a look at the following table.

Command Style   Comment
\ss sansOK
\bf boldOK
\ssbf   sansboldOK  
\sl slanted OK
\sssl   sansslanted \sssl OK, sansslanted doesn't work

I've made a minimal example to demonstrate how I use the commands.

\starttext
{\setuphead [section] [textstyle=sans]  % OK
  \section {sans}\input knuth\relax}

{\setuphead [section] [textstyle=bold]  % OK
  \section {bold}\input knuth\relax}

{\setuphead [section] [textstyle=sansbold]  % OK
  \section {sansbold}\input knuth\relax}

{\setuphead [section] [textstyle=slanted]   % OK
  \section {slanted}\input knuth\relax}

{\setuphead [section] [textstyle=sansslanted]   % doesn't work
  \section {sansslanted}\input knuth\relax}

{\setuphead [section] [textstyle=\sssl] % OK
  \section {Command: sssl}\input knuth\relax}
\stoptext

Is there a different command to achieve sansslanted? sansbold works, and
bold is an alternative as slanted is, so intuitively I would expect
sansslanted also to work.

Thanks in advance


___
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] Switch for sans slanted

2010-05-09 Thread Hans Hagen

On 9-5-2010 7:23, Marco wrote:

Hi,

I've a question concerning switching fonts in setups. How to get a sans
slanted style? Have a look at the following table.

Command Style   Comment
\ss sansOK
\bf boldOK
\ssbf   sansboldOK  
\sl slanted OK
\sssl   sansslanted \sssl OK, sansslanted doesn't work

I've made a minimal example to demonstrate how I use the commands.

\starttext
{\setuphead [section] [textstyle=sans]  % OK
   \section {sans}\input knuth\relax}

{\setuphead [section] [textstyle=bold]  % OK
   \section {bold}\input knuth\relax}

{\setuphead [section] [textstyle=sansbold]  % OK
   \section {sansbold}\input knuth\relax}

{\setuphead [section] [textstyle=slanted]   % OK
   \section {slanted}\input knuth\relax}

{\setuphead [section] [textstyle=sansslanted]   % doesn't work
   \section {sansslanted}\input knuth\relax}

{\setuphead [section] [textstyle=\sssl] % OK
   \section {Command: sssl}\input knuth\relax}
\stoptext

Is there a different command to achieve sansslanted? sansbold works, and
bold is an alternative as slanted is, so intuitively I would expect
sansslanted also to work.


\definealternativestyle
  [sansslanted]
  [\ss\bf] []



-
  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] simple bibliography and dots after section numbering

2010-05-09 Thread Rogutės Sparnuotos
Taco Hoekwater (2010-05-09 08:15):
 Rogutės Sparnuotos wrote:
 
  But would it let me place such a list of publications:
 
   Books
   1. Author (year). Title.
   2. Author (year). Title.
  
   Internet resources
   3. URL
 
   Movies
   4. Author (year). Title.
 
 It seems that I could easily use \setuppublicationlayout to define a
 'movies' type, but is listing references by type implemented
   
 Not in mkii.

But I am running MKIV, look one line below. So, is printing a list of
publications grouped by publication type possible or easily done with
MKIV?

 (or easily done with MKIV)? Intuitively, I would use
 
   \placepublications[criterium=[type, book]]
 
 for each list...

-- 
--  Rogutės Sparnuotos
___
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] quotechar and command with database module

2010-05-09 Thread Vianney le Clément
Hello,

There seems to be a bug in the database module when using the
quotechar and command option at the same time. Here is a minimal
example.

\usemodule[database]
\defineseparatedlist
  [CSV]
  [separator=comma,
   quotechar={},
   command=\Whatever]
\def\Whatever#1#2{[#1][#2]\par}
\starttext
\startCSV
One,Two
Three,Four
\stopCSV
\startCSV
One,Two
Three,three,Four
\stopCSV
\stoptext

It works as expected when commenting the fifth line.

Regards,
Vianney
___
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] quotechar and command with database module

2010-05-09 Thread Mojca Miklavec
2010/5/9 Vianney le Clément vleclem...@gmail.com:
 Hello,

 There seems to be a bug in the database module when using the
 quotechar and command option at the same time. Here is a minimal
 example.

 \usemodule[database]
 \defineseparatedlist
  [CSV]
  [separator=comma,
   quotechar={},
   command=\Whatever]
 \def\Whatever#1#2{[#1][#2]\par}
 \starttext
 \startCSV
 One,Two
 Three,Four
 \stopCSV
 \startCSV
 One,Two
 Three,three,Four
 \stopCSV
 \stoptext

 It works as expected when commenting the fifth line.

And while you are discussing this. Not so long ago I requested a fix
for UTF-8 characters in MKII. Hans has fixed it, but I suspect that
that fixed broke proper handling of beginning of lines.

That is:

\defineseparatedlist[TSV][separator=tab]

\startTSV
atabb
tabc
čtabš
\stopTSV

won't work properly on the second line (MKII).

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] Switch for sans slanted

2010-05-09 Thread Marco
  Is there a different command to achieve sansslanted? sansbold
  works, and bold is an alternative as slanted is, so intuitively I
  would expect sansslanted also to work.
 
 \definealternativestyle
[sansslanted]
[\ss\bf] []

I'm sure you meant

\definealternativestyle
   [sansslanted]
   [\ss\sl] []
   ^^^
This works. So sansbold is defined by default and sansslanted isn't
(because it is not needed so often I assume). That's not intuitive but
as the styles are easily created it is OK for me.

Thanks for the quick reply.
Marco


___
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] Hyphenation of composed words

2010-05-09 Thread Marco
 On 16-4-2010 4:46, Marco wrote:
  Hi,
 
  I've yet another hyphenation problem. I cannot get proper
  hyphenation in composed words. Take this MWE:
 
 a mix up of settings .. fized in next beta
Hi Hans,

the following code still produces an en dash instead of a hyphen.

\setuplayout [width=1.5cm]
\starttext
composed||word\par % produces an en dash

\def\compoundhyphen{-}
composed||word\par % workaroud from Thomas, produces hyphen
\stoptext

Using
ConTeXt  ver: 2010.05.08

Marco


___
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] Switch for sans slanted

2010-05-09 Thread Hans Hagen

On 9-5-2010 8:52, Marco wrote:

Is there a different command to achieve sansslanted? sansbold
works, and bold is an alternative as slanted is, so intuitively I
would expect sansslanted also to work.


\definealternativestyle
[sansslanted]
[\ss\bf] []


I'm sure you meant

\definealternativestyle
[sansslanted]
[\ss\sl] []
^^^


sure, consider it an exercise -)


This works. So sansbold is defined by default and sansslanted isn't
(because it is not needed so often I assume). That's not intuitive but
as the styles are easily created it is OK for me.


well, if we define all of them, we end up with many definitions ... just 
consider sansbold not being defined


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] quotechar and command with database module

2010-05-09 Thread Hans Hagen

On 9-5-2010 8:34, Mojca Miklavec wrote:

2010/5/9 Vianney le Clémentvleclem...@gmail.com:

Hello,

There seems to be a bug in the database module when using the
quotechar and command option at the same time. Here is a minimal
example.

\usemodule[database]
\defineseparatedlist
  [CSV]
  [separator=comma,
   quotechar={},
   command=\Whatever]
\def\Whatever#1#2{[#1][#2]\par}
\starttext
\startCSV
One,Two
Three,Four
\stopCSV
\startCSV
One,Two
Three,three,Four
\stopCSV
\stoptext

It works as expected when commenting the fifth line.


And while you are discussing this. Not so long ago I requested a fix
for UTF-8 characters in MKII. Hans has fixed it, but I suspect that
that fixed broke proper handling of beginning of lines.

That is:

\defineseparatedlist[TSV][separator=tab]

\startTSV
atabb
tabc
čtabš
\stopTSV

won't work properly on the second line (MKII).


lucky me that you did the testing ...

\edef\processseplistseparator{\detokenize{,}}%

\def\dodefineprocessseplist#1#2% separator \docommand
  {\edef\processseplistseparator{\detokenize{#1}}%
   \def\dodoprocessseplist##1##2#1%
 {\edef\!!stringa{\detokenize{##1}}%
  \ifx\detokenizedrelax\!!stringa
\expandafter\nodoprocessseplist
  \else\ifx\!!stringa\processseplistseparator
#2{}%
#2{##2}%
\expandafter\expandafter\expandafter\dodoprocessseplist
  \else
#2{##1##2}%
\expandafter\expandafter\expandafter\dodoprocessseplist
  \fi\fi}%
   \def\doprocessseplist##1\relax
 {\dodoprocessseplist##1#1\relax#1\relax\relax\end}}



-
  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] strange error

2010-05-09 Thread Marius
Hello,

I am confronted with difficulties to understand why do I get this
strage error then compile the attached document? And how to fix it?

! String contains an invalid utf-8 sequence.
l.1 \setuppublicationlist[samplesize={
  ─A},totalnumber=1]

Thank you,
Marius


b.bib
Description: Binary data


test3.tex
Description: TeX document
___
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] Multiple pleas for help (long)

2010-05-09 Thread Scott Steele
Thanks so much for the help! Pleas 1, 2, 5, and 6 are completely solved. (In
particular, Mojca, the fix for accents is fantastic!) I wasn't able to get
\Frowny to work any better with the advice provided, but I found that when I
scaled it down, it stopped knocking the text off the grid, and I have a hard
time telling the difference in size between the old and new.

% New (works) :
\useexternalfigure[frowny][Frowny][factor=7,type=pdf]
\def\Frowny{\hbox{\externalfigure[frowny]}}
\useexternalfigure[smiley][Smiley][factor=7,type=pdf]
\def\Smiley{\hbox{\externalfigure[smiley]}}
\useexternalfigure[slashy][Slashy][factor=7,type=pdf]
\def\Slashy{\hbox{\externalfigure[slashy]}}



I'm currently working on the Table of Contents formatting. I'm trying to
format it as follows:

\starttable[|r|c|l|]
subjectName · pageNumber\MR
subjectName · pageNumber\MR
...etc...
\stoptable % Of course, where I don't actually input it subject by subject
like this.

Ideally, I'd like to be able to position the table on the page by deciding
where the center line of single dots is (eg a setup where the dots are in
the very center of the page layout or another setup where they are
two-thirds of the textblock/pagelayout size (I'm not sure what the correct
term is here) to the right).

I've tried a number of different ways to set this up. This is the only thing
close to what I want that I can get to work, but of course, it doesn't have
the dots aligned:

\def\ListCommand#1#2#3%
{
\starttabulate[|r|c|l|]
\NC #2\NC ·\NC #3
 \stoptabulate
}

\def\TableOfContents
{
\placelist[section]
 [criterium={chapter,subject}, alternative=command,
command=\ListCommand]
}

Here's an example of what I tried to do but which doesn't work:

\def\ListCommandOne#1#2#3%
{#2\NC}
\def\ListCommandTwo#1#2#3%
{·\NC}
\def\ListCommandThree#1#2#3%
{#3\NC}

\def\TableOfContents
{
\starttabulate[|l|l|l|]
\NC
 \placelist[section]
[criterium={chapter,subject}, alternative=command,
command=\ListCommandOne]
 \NC
\placelist[section]
[criterium={chapter,subject}, alternative=command,
 command=\ListCommandTwo]
\NC
\placelist[section]
 [criterium={chapter,subject}, alternative=command,
command=\ListCommandThree]
 \stoptabulate
}

Obviously that attempt—aside from not working—is incredibly un-elegant and
could quickly screw things up with misaligned names and page numbers. Here
is another attempt:

\def\ListCommand#1#2#3{#2 · #3\MR}

\def\TableOfContents
{
\starttable[|r|c|l|]
\placelist[section]
[criterium={chapter,subject}, alternative=command,
 command=\ListCommand]
\stoptable
}

I think part of my problem is that I really don't understand what placelist
{\em is} or what it is doing. Is this something that would be clearer only
if I knew more about plain Tex?

Note: I'm putting \TableOfContents in the frontmatter.



Scott

-
This is a work of fiction.  Names, characters, places, and incidents either
are the product of the writer's imagination or are used fictitiously, and any
resemblance to actual persons, living or dead, businesses, companies,
events, or locales is entirely coïncidental.
___
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] quotechar and command with database module

2010-05-09 Thread Mojca Miklavec
Hans,

Great, thanks a lot. This patch fixes both of my reported issues, but:
- doesn't solve Vianney's one
- MKIV behaves a bit weird (three letters that were supposed to be in
the same cell go into a different cell each etc.)

I'm sending a tiny file for testing. It seems that quotechar does very
weird things indeed.

Mojca


a.tex
Description: TeX document
___
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] Hyphenation of composed words

2010-05-09 Thread Wolfgang Schuster

Am 09.05.10 21:34, schrieb Marco:

On 16-4-2010 4:46, Marco wrote:
 

Hi,

I've yet another hyphenation problem. I cannot get proper
hyphenation in composed words. Take this MWE:
   

a mix up of settings .. fized in next beta
 

Hi Hans,

the following code still produces an en dash instead of a hyphen.

\setuplayout [width=1.5cm]
\starttext
composed||word\par % produces an en dash

\def\compoundhyphen{-}
composed||word\par % workaroud from Thomas, produces hyphen
\stoptext
   


1. || does *not* produce a en-dash but to kerned hyphens

2. The correct method to get a *normal* hyphen is

   \setuphyphenmark[sign=normal]

   If the output is not correct it's a bug.

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] Hyphenation of composed words

2010-05-09 Thread Marco
 1. || does *not* produce a en-dash but to kerned hyphens
You're right, I looked it up in the sources. It just looked like an
en-dash for me. But this is wrong. For hyphenation a hyphen is used. The
font designer has created a dedicated glyph for this purpose. And two
hyphens (or an en-dash) is too large. I've never seen the advice in a
typography book to kern two hyphens. I don't know why this is
implemented like this.

 2. The correct method to get a *normal* hyphen is
 
 \setuphyphenmark[sign=normal]
 
Yes, this is the correct method. It should be enabled by default. If
somebody wants a larger hyphen (for some mysterious reasen), he/she can set it
up with

\setuphyphenmark[sign=wide]

 If the output is not correct it's a bug.
Yes, it is a bug. Hans already confirmed and said, he'll fix it, but it is not
yet done, that's why I wanted to remember him. You can try and run the example
from my first post. With Thomas' workaround the output is OK, but it is only a
workaround. I (and probably many other users) would like to have correct
behaviour by default.

Marco


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