Re: [NTG-context] PDF document statistics (character count incl. spaces)?

2015-02-02 Thread Marcin Borkowski

On 2015-02-01, at 22:06, Jörg Weger joerg73@googlemail.com wrote:

 Is the character count “wc --char textfile” returns with or without 
 blank spaces? (Which is important for me.) “man wc” doesn’t talk about that.

 I had hoped there was a better way than to edit the result of 
 “pdftotext” in my text editor or in libreoffice writer (deleting 
 unnecessary carriage returns and spaces by searching for regular 
 expressions) which are able to do the count I need. In fact I had hoped 
 that ConTeXt was able to count the characters and spaces it renders to 
 PDF (is that theoretically possible?) …

I am pretty sure that you can make sed filter out blank characters.  So
then you can just chain pdftotext, sed and wc.

OTOH, here's a relevant question (and a simple answer) on SO.  (It seems
to count newlines, though.)

JFF, I've just coded this in Emacs Lisp:

--8---cut here---start-8---
;; Count non-blank characters in a buffer

(defun how-many-visible-chars ()
Count visible (i.e., other than spaces, tabs and newlines)
characters in the buffer.
  (interactive)
  (let ((count 0))
(save-excursion
  (goto-char (point-min))
  (while (not (eobp))
(unless (looking-at-p [ \t\n])
  (setq count (1+ count)))
(forward-char)))
(message %d visible characters count)))
--8---cut here---end---8---

It's terribly unoptimized, but I ran it on a 300+ kB file on my low-end
netbook and it ran in something like 2 seconds, so it's not that bad in
practice.  Also, it's not well-coded: it should e.g. return the number
instead of displaying the message when called non-interactively, it
might take active region into account etc. - but as a proof-of-concept,
it works surprisingly well (i.e., fast).

 Greetings Jörg

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
___
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] TOC with Grey background for pages belonging to last section of every chapter

2015-02-02 Thread Wolfgang Schuster

 Am 02.02.2015 um 14:00 schrieb Keith J. Schultz keithjschu...@web.de:
 
 Hi Wolgang,
 
 I noticed that \startnamedsection does not add it to the TOC
 how would one go about having these „namedsections“ added to the TOC.
 
 regards
   Keith.
 
 Am 02.02.2015 um 12:51 schrieb Wolfgang Schuster 
 schuster.wolfg...@gmail.com mailto:schuster.wolfg...@gmail.com:
 
 You have to add „location=paragraph” to the textbackground setup.
 
 \definetextbackground
  [ChapterFrame]
  [frame=off,
   background=color,
   backgroundcolor=green,
   backgroundoffset=1ex,
   location=paragraph] % default: location=text
 
 \definehead [Framed][chapter]
 \definehead [Frameless] [chapter]
 
 \setuphead
  [Frameless]
  [before={\blank[2*line]}]
 
 \setuphead
  [Framed]
  [page=no,
   before=,
   beforesection={\page\blank[2*line]\starttextbackground[ChapterFrame]},
   aftersection=\stoptextbackground]
 
 \starttext
 
 \startnamedsection[Frameless][title=Chapter without frame]
 
 \input knuth
 
 \stopnamedsection
 
 \startnamedsection[Framed][title=Chapter with frame]
 
 \input knuth
 
 \stopnamedsection
 
 \stoptext

The command \startnamedsection[chapter] is the same as using \startchapter in 
your
document, the only difference is that you use the header-type as argument in 
the first
case while in the second case the head-type is part of the command name.

When you print your table of contents with the \placecontent or \completecontent
commands ConTeXt uses only headers which are in the list for the “content” list.
To print additional headers which are defined with \definehead in your document
you can either use \placelist[chapter,MYHEADER,section,…] instead of 
\placecontent
or you extend the list for “content” with 
\setupcombinedlist[content][list={chapter,MYHEADER,…}]
or \placecontent[list={chapter,MYHEADER,…}]

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] font search path and subfolders

2015-02-02 Thread Jörg Weger
Just did a complete reinstall and now the subfolders work. Also makes 
manual uninstall of fonts much more convenient.


Cheers Jörg

On 31.01.2015 21:07, Jörg Weger wrote:

I tried to put the subfolders into a folder ~/fonts/ instead of
~/.fonts/ – same result :-(

ls -la returns drwxr-xr-x  for ~/.fonts/ as well as for
~/.fonts/opentype/ and ~/.fonts/truetype/

Greetings Jörg

On 31.01.2015 19:26, Pablo Rodriguez wrote:

On 01/31/2015 05:35 PM, Jörg Weger wrote:

I still get (while using subfolders in ~/.fonts/opentype/)

  !LuaTeX error: cannot find OpenType font file for reading ()
 == Fatal error occurred, no output PDF file produced!

mtx-context | fatal error: return code: 1

after having run

  export OSFONTDIR=/usr/local/share/fonts//;$HOME/.fonts//


Hi Jörg,

at least to avoid to run that again and again, I think you could add
that at last line of tex/setuptex.

BTW, do you have a  ~/.fonts/truetype/ directory? And does ConTeXt load
fonts from that directory without problems?

Could it be that you have an issue with permissions in the
~/.fonts/opentype/ directory?

What about creating a new directory with another name and moving your
fonts there?

I think it may be an issue with permissions.

Just in case it helps,


Pablo




___
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] PDF document statistics (character count incl. spaces)?

2015-02-02 Thread Jörg Weger
So I hope you might get bored once in a while before I have to write my 
bachelor thesis :)


Greetings Jörg

On 02.02.2015 00:56, Hans Hagen wrote:

On 2/1/2015 10:06 PM, Jörg Weger wrote:

Is the character count “wc --char textfile” returns with or without
blank spaces? (Which is important for me.) “man wc” doesn’t talk about
that.

I had hoped there was a better way than to edit the result of
“pdftotext” in my text editor or in libreoffice writer (deleting
unnecessary carriage returns and spaces by searching for regular
expressions) which are able to do the count I need. In fact I had hoped
that ConTeXt was able to count the characters and spaces it renders to
PDF (is that theoretically possible?) …


it's not too hard so maybe when i'm bored or see a good reason ..

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
___

___
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] Grey background for pages belonging to last section of every chapter

2015-02-02 Thread Wolfgang Schuster

 Am 30.01.2015 um 21:43 schrieb Rob Heusdens robh...@xs4all.nl:
 
 Correction, I added offset=none,frameoffset=0pt, to the parameters for
 the textbackground frame.
 
 Code again with correction:
 
 % test background
 \setupwhitespace[none]
 \setupindenting[yes, small, next]
 \setuppagenumbering[alternative=doublesided]
 
 \definetextbackground
  [SummaryBackground]
  [frame=off,offset=none,frameoffset=0pt,
   background=color,
   backgroundcolor=gray,
   backgroundoffset=2ex]
 
 \definehead[summary][section]
 
 \setuphead
  [summary]
  [number=no,
   style=bold,
   before=,
   beforesection={\noindentation\page\starttextbackground[SummaryBackground]},
   aftersection={\stoptextbackground\blank}]
 
 \setuphead[section][number=no,style=bold]
 
 
 \definecombinedlist[content][section,summary]
 \setupcombinedlist[content][level=4, alternative=c]
 
 \starttext
 \completecontent
 \page
 \dorecurse{9}{
 \startsection[title={Knuth -- \recurselevel}]
 
 \input{knuth}
 
 \stopsection
 }
 
 \startsummary[title=Samenvatting]
 
 \input{zapf}
 
 \stopsummary
 
 \stoptext
 
 
 
 Still the summary title is a bit lower on the page then other text.


You have to add „location=paragraph” to the textbackground setup.

\definetextbackground
  [ChapterFrame]
  [frame=off,
   background=color,
   backgroundcolor=green,
   backgroundoffset=1ex,
   location=paragraph] % default: location=text

\definehead [Framed][chapter]
\definehead [Frameless] [chapter]

\setuphead
  [Frameless]
  [before={\blank[2*line]}]

\setuphead
  [Framed]
  [page=no,
   before=,
   beforesection={\page\blank[2*line]\starttextbackground[ChapterFrame]},
   aftersection=\stoptextbackground]

\starttext

\startnamedsection[Frameless][title=Chapter without frame]

\input knuth

\stopnamedsection

\startnamedsection[Framed][title=Chapter with frame]

\input knuth

\stopnamedsection

\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] TOC with Grey background for pages belonging to last section of every chapter

2015-02-02 Thread Keith J. Schultz
Hi Wolgang,

I noticed that \startnamedsection does not add it to the TOC
how would one go about having these „namedsections“ added to the TOC.

regards
Keith.

 Am 02.02.2015 um 12:51 schrieb Wolfgang Schuster 
 schuster.wolfg...@gmail.com:
 
 You have to add „location=paragraph” to the textbackground setup.
 
 \definetextbackground
  [ChapterFrame]
  [frame=off,
   background=color,
   backgroundcolor=green,
   backgroundoffset=1ex,
   location=paragraph] % default: location=text
 
 \definehead [Framed][chapter]
 \definehead [Frameless] [chapter]
 
 \setuphead
  [Frameless]
  [before={\blank[2*line]}]
 
 \setuphead
  [Framed]
  [page=no,
   before=,
   beforesection={\page\blank[2*line]\starttextbackground[ChapterFrame]},
   aftersection=\stoptextbackground]
 
 \starttext
 
 \startnamedsection[Frameless][title=Chapter without frame]
 
 \input knuth
 
 \stopnamedsection
 
 \startnamedsection[Framed][title=Chapter with frame]
 
 \input knuth
 
 \stopnamedsection
 
 \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] A note on Arabic names in bibliographies and indices

2015-02-02 Thread Alan BRASLAU
The handling of the vons issue is cultural and language-dependent.
The problem with mucking around with vonsep and other parameters is
that one may very well have a mixture of references in a single
document (this is often the case for me). I see no solution other than
trying to identify some common use and to make the behavior depend on
the language= field (or the document language, by default).

Alan


On Sun, 1 Feb 2015 20:57:23 +0100
Keith J. Schultz keithjschu...@web.de wrote:

 Hi Idris, All,
 
 We have here the classical database problem of finding a format that
 fits all. But, as any body working with databases knows this will not
 work with a rigid format.
 
 Here we have 3 fields for the authors can can be misused.
 The von is the most problematic. It seems due to its cultural
 diversity.
 
 The use of the \setuppublicationlist[colsep=] helps in some ways that
 it gives the writers of text the flexibility of  manually controlling
 the space after von field, but as Idris has pointed out this would
 involve a lot of work depending on the authors one has in ones
 database. This is especially, problematic for academics that reuse
 their bibliographies!
 
 Irdis second solution is a simple work around for where only a few
 changes are necessary.
 
 I am not an expert with this „von“ business, but in Idris case here
 „al-„ a simple change in the output of the vonsep could help globally
 without causing to many problems. That is make the output of the
 vonsep dependent on the last character of the von-field here „-„ 
 
 The other possibility would be to use a discretionary switch for the
 output of the vonsep one definition could be vonsep=
   yes : output blank or global vonsep (default if
 vonsep field not in publication entry) no: do not
 output vonsep string : output character sequence
 command : use command to output vonsep
 
 Of  course we could just have a default handler for the von field and
 allow it to be changed by writers! 
 
 hope this helps the people smashing their brains on this subject/code!
 
 regards
   Keith. 
 
  Am 01.02.2015 um 16:06 schrieb Idris Samawi Hamid ادريس سماوي حامد
  isha...@colostate.edu:
  
  Dear Syndicate,
  
  The current bibliography handler uses the following for authors:
  
  \type{\author[junior]{firstnames}[inits]{von}{surname}}
  
  Now in Arabic we have something similar to the 'von' field: the
  definite article 'al-', 'ibn', etc. Just as with 'von' we want to
  ignore them in the alphabetical sorting. [On the other hand,
  ConTeXt cannot currently sort its own bbl files alphabetically].
  See the linked picture for a real-life example (the top-right of
  the page contains both Dutch and Arabic examples):
  
  https://www.dropbox.com/s/rnimlactrlqz6ak/arabic-dutch-bib.jpg?dl=0
  
  Now the {von} field works for these Arabic prefixes, but there is
  an issue: There can be no space between 'al-' and what follows
  (e.g. 'al-Haq'). But the {von} field by default adds a space (von
  Corbin). So what to do? One solution is to use
  \setuppublicationlist[vonsep=] (see also attached):
  
 [snip, snip]
  \setuppublicationlist[vonsep=] kills the space after the prefix,
  but that means that for every 'von', 'van', 'abu', and the like we
  have to add the space manually in the {von} field (as in the above
  example).
  
  If we don't want to use \setuppublicationlist[vonsep=] then we have
  to define a command for 'al-' that gobbles the space:
  
  % \define \GobbleSpace{\ignorespaces}
  % \define \Al{al-\GobbleSpace}
  
  If one is using lots of Arabic names and few, e.g., Dutch names,
  then using the [vonsep=] approach seems better. But in the upcoming
  bib module we may want a better solution so that bbl files can be
  more consistent and portable. Any thoughts are appreciated, and
 [snip, snip]
___
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] section with \sethupead[section][alternative=text]; other type of section misbehaves..

2015-02-02 Thread Hans Hagen

On 2/2/2015 10:40 AM, Keith Schultz wrote:

Hi Hans, All,



Am 02.02.2015 um 02:18 schrieb Hans Hagen pra...@wxs.nl
mailto:pra...@wxs.nl:

[snip, snip]


It's for good reason. Now you can change the style any time.

When you define

\definehead[one][section]
\definehead[two][one]
\definehead[three][two]
\definehead[four][one]


I think what Rob wants to know is for example if one has


\definehead[one][section]
\definehead[two][one]
\definehead[three][two]

\definehead[one][chapter]
\definehead[four][one]

Does two end up a chapter header or a section header!
I would assume two is a section  header and four a chapter header!


ah, ok ... that is a side effect of the definitions registering 
themselves in a special way (at the lua end) .. i can catch that in the 
next beta:


structuresectioning  reassigning section level 'two' to 'one'
structuresectioning  reassigning section level 'three' to 'two'
structuresectioning  reassigning section level 'three' to 'two'

I'll also add:

\usemodule[structure-sections]

\showstructuresections


Please disregard the fact that this type of coding is bad practice!

regards
Keith.



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




--

-
  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] section with \sethupead[section][alternative=text]; other type of section misbehaves..

2015-02-02 Thread Keith Schultz
Hi Hans, All,


 Am 02.02.2015 um 02:18 schrieb Hans Hagen pra...@wxs.nl:
[snip, snip]

 It's for good reason. Now you can change the style any time.
 
 When you define
 
 \definehead[one][section]
 \definehead[two][one]
 \definehead[three][two]
 \definehead[four][one]

I think what Rob wants to know is for example if one has


\definehead[one][section]
\definehead[two][one]
\definehead[three][two]

\definehead[one][chapter]
\definehead[four][one]

Does two end up a chapter header or a section header!
I would assume two is a section  header and four a chapter header! 

Please disregard the fact that this type of coding is bad practice!

regards
Keith.

___
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 note on Arabic names in bibliographies and indices

2015-02-02 Thread Keith Schultz
Hi Hans, All,

 Am 02.02.2015 um 01:05 schrieb Hans Hagen pra...@wxs.nl:
 
[snip, snip]

 I'm sure we can cook up something. Personally I'd like to get away from this 
 'von' and 'junior' thing and use better names, like
 
 initials (by default taken from firstnames)
 firstnames
 prefixes (unless specificed, taken from surnames)
 surnames
 postfixes (unless specified, taken from surnames)
 
 we can think of a sort keys as well, so maybe:
 
 author = {[sortkey] firstnames, prefixes, surnames, postfixes}
 
 or
 
 author = {sortkey:: firstnames, prefixes, surnames, postfixes}
 
 (we can have an exporter that exports to a regular dumb bib file for other 
 usage)

I would think something more dynamic would be better!

Something like a possible filter field for parsing the author information, so 
that writers
can the set-up the sort field and von fields!
If it is not designated for an entry the default filter is used. 

regards
Keith.___
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] Font switching on title page

2015-02-02 Thread Wolfgang Schuster

 Am 01.02.2015 um 12:04 schrieb Pablo Rodriguez oi...@gmx.es:
 
 On 02/01/2015 11:37 AM, Jörg Weger wrote:
 I have started to design a title page for a paper.
 
 First comes an information block at bodyfont size \tf (all in sans 
 serif), followed by the title of the paper in \bfd, then the author 
 (=me) in \bfa. The information block that follows then should be in 
 bodyfont size again, but it isn’t, it is too tall. What am I missing 
 about font switching? Is it maybe because it is a makeup page?
 
 Hi Jörg,
 
 pagestate=stop is the default in makeups, so you don’t need to add it.
 
 \tf only changes the font to roman, but not the size. I don’t know
 whether there is a switch that does that.
 
 The best way avoid problems when using font switches is to enclose them
 in braces.
 
 Such as in (complete sample):
 
 \definemakeup[titlepage][doublesided=no]
 
 \starttext
 
 \starttitlepagemakeup[top=,]
 
 {\ss
 
 information \crlf
 about \crlf
 university \crlf
 and \crlf
 course \par}
 
 \blank[4*line]
 
 {\bfd \ss
 
 Paper \par}
 
 \blank
 
 {\bfa \ss
 
 by me}
 
 \blank[4*line]
 
 {\ss
 
 my \crlf
 information, \crlf
 adress \crlf
 etc.}
 
 \stoptitlepagemakeup
 
 I hope it helps,


For a titlepage I suggest to use a different mechanism to select a certain font 
style and size.

You can also use \definedfont[…]{…} instead of \startfont[…] … \stopfont.

\definemakeup[titlepage][doublesided=no]

\starttext

\starttitlepagemakeup[top=]

\startfont[Sans]
\startlines
information
about
university
and
course
\stoplines
\stopfont

\blank[4*line]

\startfont[SansBold sa d]
Paper
\stopfont

\blank

\startfont[SansBold sa b]
by me
\stopfont

\blank[4*line]

\startfont[Sans]
\startlines
my
information,
adress
etc.
\stoplines
\stopfont

\stoptitlepagemakeup

\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] PDF document statistics (character count incl. spaces)?

2015-02-02 Thread Alan BRASLAU
On Mon, 2 Feb 2015 17:55:35 +0100
Hans Hagen pra...@wxs.nl wrote:

 this feature relates to (simple) spell checking and collectign words
 for dedicated spell check lists and, 4 chars is nearly always avalid
 word which is why we discard them

English is rich in four-letter words!

Alan ;-)
___
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] 2UP Arranging

2015-02-02 Thread John Kitzmiller
Using 2UP the rightmargin on odd (recto) pages becomes the leftmargin on even 
(verso) pages.

Is there an option for 2UP doublesided to be printed and folded where the 
rightmargin is always on the righthand side of each ‘page’ from the reader’s 
viewpoint? Or another layout scheme to get the same result?

This mwe shows 2UP default:

\definepapersize[booklet][width=140mm,height=216mm]
\setuppapersize[booklet][letter,landscape]
\setuppagenumbering[alternative=doublesided]
\setuparranging[2UP,doublesided]

\setuplayout[
  width=92mm,
  leftedge=0mm,  
  leftmargin=0mm,
  backspace=15mm,
  rightmargindistance=3mm,
  rightmargin=25mm,
  ]

\showframe

\starttext
\dorecurse{4}{\input ward \page}
\stoptext

And this gives an image of the desired layout:

\definepapersize[booklet][width=140mm,height=216mm]
\setuppapersize[booklet][letter,landscape]
\setuppagenumbering[alternative=doublesided]
\setuparranging[2UP,doublesided]

\setuplayout[
  width=92mm,
  leftedge=0mm,  
  leftmargin=0mm,
  backspace=15mm,
  rightmargindistance=3mm,
  rightmargin=25mm,
  ]

\definelayout[evenside][
  width=92mm,
  leftmargindistance=3mm,
  leftmargin=25mm,
  backspace=43mm,
  rigthedge=0mm,
  rightmargin=0mm,
  ]

\showframe

\starttext
\input ward \page
\setuplayout[evenside] \input ward \page
\setuplayout[reset] \input ward \page
\setuplayout[evenside] \input ward 
\stoptext

I would like to avoid the manual switching if possible. Thanks!
John

___
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 place text to the right of a brace

2015-02-02 Thread Fabrice

Hi Pablo,
By searching, I found this :

Some commands like \framed 
http://wiki.contextgarden.net/Command/framed cause line breaks to 
happen if used in vertical mode, e.g. at the beginning of a line.


This explains my problem and soultion you propose.
Thanks,
Fabrice

___
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] PDF document statistics (character count incl. spaces)?

2015-02-02 Thread Alan BRASLAU
On Mon, 2 Feb 2015 10:20:15 +0100
Keith Schultz keithjschu...@icloud.com wrote:

 Hello All,
 
 As a linguist, I can say that not counting words that are shorter is
 an absolute NO-GO for an accurate word count and thereby character
 count!
 
 See below, for a non representative proof !
 
  Am 01.02.2015 um 22:12 schrieb Wolfgang Schuster
  schuster.wolfg...@gmail.com:
  
 [snip, snip]
 
  ConTeXt has an option to count the words (you find the result in
  jobname.words) in a document but words words shorter than four
  letters aren’t taken into account.
 word length under 4 characters  :   10
 word length = 4 chars :   20
 
 here you are missing a third of the words! That is 30%
 
 regards
   Keith



See also:
Zipf, G. K. (1949), Human Behavior and the Principle of Least Effort,
Cambridge, MA: Addison-Wesley.

in particular, Chapter 2: On the Economy of Words.


As well as:
Shannon, C. E. (1951), The redundancy of English, Cybernetics,
248-272.

54% for English, so we can afford to be sloppy (wch s wy txt compr qte
ll).


Alan
___
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] PDF document statistics (character count incl. spaces)?

2015-02-02 Thread Hans Hagen

On 2/2/2015 4:39 PM, Alan BRASLAU wrote:


ConTeXt has an option to count the words (you find the result in
jobname.words) in a document but words words shorter than four
letters aren’t taken into account.

word length under 4 characters  :   10
word length = 4 chars :   20

here you are missing a third of the words! That is 30%


this feature relates to (simple) spell checking and collectign words for 
dedicated spell check lists and, 4 chars is nearly always avalid word 
which is why we discard them


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] A note on Arabic names in bibliographies and indices

2015-02-02 Thread Hans Hagen

On 2/2/2015 3:23 PM, Alan BRASLAU wrote:

The handling of the vons issue is cultural and language-dependent.
The problem with mucking around with vonsep and other parameters is
that one may very well have a mixture of references in a single
document (this is often the case for me). I see no solution other than
trying to identify some common use and to make the behavior depend on
the language= field (or the document language, by default).


what is the rules for a language changed ; the problem is that it slso 
might affect sorting


maybe some extra indicator (6th in comma separated) that specifies it

author={von, Last, Jr, First, Initials,german-a-la-french}

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] A note on Arabic names in bibliographies and indices

2015-02-02 Thread Alan BRASLAU
Of course, language of the cited publication. Nothing else makes sense
at all. This field is also to be used for hyphenation of the title
field.

BUT, the author of the TeX document must control and decide if the
bibliography will use an eventual language= field or rather use the
language rule in vigor for the TeX document; alternately, he/she could
impose a particular language for the rendering of a particular dataset.
Thomas has argued this point.

The explicit parsing of vons or particles gives control for the
sorting of author names. It is not so complicated: if treated as a
particle or von, it does not enter into the sorting; if treated as
intimately part of the surname (often, but not always, the case for
post-revolution names in French, for example) then it does enter into
the sorting.

German is the only case that I know where the von gets placed after
the first names. Here, one must not abbreviate the von, of course, as in:
Laue, M. V. - and I have seen this published!!
Nor do I want to see:
von Laue, M.
However, to be correct, some publications might appear as
Laue, M.

Now, say that I want to cite Laue's work published in English (as well
as one or more of his references published in German). Clearly this
real case will cause grief. I could set language=german for all of his
work, but then how are the titles to be hyphenated (and what about quotation
marks if the style uses them)?

This is why Hans asks if we should optionally parse 5 part author names.

Here is a real case:

@Article{Friedrich1912,
  Title= {Interferenzerscheinungen bei Röntgenstrahlen},
  Author   = {Friedrich, W. and Knipping, P. and Laue, M. von},
  Journal  = {Sitzber. Math-phys. Kl. bayer. Akad. Wiss. 
Manche},
  Year = {1912},
  Pages= {303},
  Volume   = {22},

  Language = {german}
}

@Article{Friedrich1913,
  Title= {Interferenzerscheinungen bei Röntgenstrahlen},
  Author   = {Friedrich, W. and Knipping, P. and Laue, M.},
  Journal  = {Annalen der Physik},
  Year = {1913},
  Number   = {10},
  Pages= {971–988},
  Volume   = {346},

  Doi  = {10.1002/andp.19133461004},
  ISSN = {1521-3889},
  Language = {german},
  Publisher= {WILEY-VCH Verlag},
}

@Article{Friedrich1913a,
  Title= {Phénomènes d'interférence des rayons de Röntgen},
  Author   = {Friedrich, W. and Knipping, P. and Laue, M.},
  Journal  = {Radium (Paris)},
  Year = {1913},
  Number   = {2},
  Pages= {47–57},
  Volume   = {10},

  Language = {french}
}

@article{PhysRev.37.53,
  title = {The Diffraction of an Electron-Wave at a Single Layer of Atoms},
  author = {Laue, M. v.},
  journal = {Phys. Rev.},
  volume = {37},
  issue = {1},
  pages = {53--59},
  numpages = {0},
  year = {1931},
  month = {Jan},
  publisher = {American Physical Society},
  doi = {10.1103/PhysRev.37.53},
  url = {http://link.aps.org/doi/10.1103/PhysRev.37.53}
}

This last case is directly what I download from:
http://journals.aps.org/pr/abstract/10.1103/PhysRev.37.53
Yikes!

So some cleaning (and thought) IS necessary!

Alan


On Mon, 2 Feb 2015 20:40:16 +0100
Keith J. Schultz keithjschu...@web.de wrote:

 Hi Alan,
 
 All of this is fine and good, but what is the language field suppose
 to relate to:
   Language of the text,
 language of the cited publication
 language of the citizenship of the author
 language of the heritage of the name of the author!
 
 Sure we can put a lot of heuristics into it, but we still should have
 a means to manually set sorting and setting of the fields of the
 authors!
 
 As you said often one has many mixed authors names and languages of
 texts!
 
 regards
   Keith.
  
 
  Am 02.02.2015 um 15:23 schrieb Alan BRASLAU alan.bras...@cea.fr:
  
  The handling of the vons issue is cultural and language-dependent.
  The problem with mucking around with vonsep and other parameters is
  that one may very well have a mixture of references in a single
  document (this is often the case for me). I see no solution other
  than trying to identify some common use and to make the behavior
  depend on the language= field (or the document language, by
  default).
  
  Alan
  
 



-- 
Alan Braslau
CEA DSM-IRAMIS-SPEC
CNRS URA 2464
Orme des Merisiers
91191 Gif-sur-Yvette cedex FRANCE
tel: +33 1 69 08 73 15
fax: +33 1 69 08 87 86
mailto:alan.bras...@cea.fr
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 

Re: [NTG-context] PDF document statistics (character count incl. spaces)?

2015-02-02 Thread Keith Schultz
Hello All,

As a linguist, I can say that not counting words that are shorter is an 
absolute NO-GO
for an accurate word count and thereby character count!

See below, for a non representative proof !

 Am 01.02.2015 um 22:12 schrieb Wolfgang Schuster 
 schuster.wolfg...@gmail.com:
 
[snip, snip]

 ConTeXt has an option to count the words (you find the result in 
 jobname.words) in a document
 but words words shorter than four letters aren’t taken into account.
word length under 4 characters  :   10
word length = 4 chars :   20

here you are missing a third of the words! That is 30%

regards
Keith

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