[NTG-context] mixed columns

2013-06-25 Thread Peter Münster
Hi,

I have several questions concerning mixed columns. Here at first a
minimal example:

--8---cut here---start-8---
\useURL[test][http://www.site.com/very/long/long/long/long/long/long/long/long/url]
\def\Section#1{%
 \startsection[title=Title]
   \dorecurse{#1}{\dorecurse{12}{bla }}
 \stopsection}
\starttext
\startmixedcolumns[n=2]
\Section{15}
 \startsection[title=Title]
   \dorecurse{10}{\dorecurse{12}{bla }}
   \footnote{\url[test]}
 \stopsection}
\Section{9}
\Section{9}
\Section{2}
\stopmixedcolumns
\stoptext
--8---cut here---end---8---

1.) How can I avoid, that the footnote overwrites the last line?

2.) How can I get balanced columns?

3.) Why is there additional vertical space around the section titles
   (even with \setuphead[section][before=, after=] there is space)?

TIA for any hints,
-- 
   Peter
___
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] Auto selecting optical sizes for a font

2013-06-25 Thread Hans Hagen

On 6/25/2013 6:16 AM, Andres Conrado Montoya wrote:

Thank you so much, Hans. :) It works great!.

I must agree, however, with Georg's considerations. I am very grateful
for the current solution, but an automatic selection of optical sizes
could be insanely good, from a book designer point of view (I'm a book
designer). Just for the curious, these are some links that go deeper
in the theme of Optical Sizes for Typography:


Optical sizes have always been part of tex (macro packages) and are also 
one of the reasons why tex font subsystems are complex:


- fonts often provide only some styles / variants in sizes, so fallbacks 
need to be supported
- names are highly inconsistent, so there is no systematic robust 
solution that automates it
- only a few fonts provide optical sizes and the whole font machinery 
must not suffer (in performance) from this
- fonts can be combined in any way with other designs (and we also need 
to take math into account)


Now, the only case where optical sizes are really robustly implemented 
is in open type math as there the shapes are in one file and by opening 
this one file one gets all the information: no need to analyze names and 
whatever and deduce if/where the other sizes sit. The alternative set 
can have a smaller repertoire too.


This is more complex when sizes are spread over fonts. One cannot rely 
on the names of files (name8whatever vs name05whatever vs namewhatever4 
etc) so one has to analyze the font son the system but often internal 
names in the font also suffer from this. Then there are combinations of 
'bare name' (should have no number in it), weight, width, style, 
whatever and again this is not guaranteed consistent.


You really don't want to know how much time went into figuring out a 
decent way to analyze fonts on the system and make sure that users at 
least with a certain degree of certainty can use a 'name:' or even 
'spec:' locator. Personally I *never* use font names but only trust 
filenames because i don't want to be surprised by an updated where 
internal names changed and (in automated flows) fonts sort of dissappear 
due to this. And, the designsize feature combined with lfg files 
guarantee me that I can still use designsizes then (after all, texies 
expect lm designsizes to be supported).


So, back to optical sizes. As said, they are supported. If one has the 
goodie file (will be in next upload) and asks for the eb bodyfont in the 
way demonstrated in the typescript size matching logic will be applied. 
But in a controlled way, so you know what you get. But nevertheless it's 
automatic then. (In your sample code you used some size key, in context 
we specify that we want to use designsizes so it all boils down to 
specifying anyway.)


Any further automation will only make things worse: nothing is as 
frustrating as fighting built in cleverness. Now, I'll not go into 
details to much about eb (which is a nice font btw) but the fact that in 
a font file there is mention of a design size range is nothing special: 
many fonts in my texmf-fonts tree have such ranges and most of them have 
only one optical size, so one thing a selector then has to figure out 
is: are there more. And of course there are, if you look at some 
properties, because of inconsistent naming and tagging as mentioned, 
following some logic, all kind of antykwa fonts suddenly could end op in 
a pool of optical sizes but they are in fact all different in specific 
properties. The same is true for more fonts. So what should one look at? 
The filename: no universal system behind it. The font name? Idem, some 
have a number (size) in it some haven't. Qualifiers like Italic Ital Ita 
are all used mixed. Some fonts have extra flags? But often these have 
weird values so one cannot rely too much on it.


We see things like

 [design_range_bottom]=0,
 [design_range_top]=94,
 [design_size]=80,
 [encodingchanged]=0,
 [extrema_bound]=0,
 [familyname]=EB Garamond 08,
 [fontname]=EBGaramond08-Italic,
 [fontstyle_id]=2,
 [fontstyle_name]={
  {
   [lang]=1033,
   [name]=Italic,
  },
 },

and

[compatfull]=EB Garamond 08 Italic,
[family]=EB Garamond 08,
[fullname]=EB Garamond 08 Italic,
[postscriptname]=EBGaramond08-Italic,
[preffamilyname]=EB Garamond,
[prefmodifiers]=08 Italic,
[subfamily]=Italic,
[uniqueid]=FontForge 2.0 : EB Garamond 08 Italic : 2-1-2013,


So how is a system supposed to know to look for EBGaramond12-Italic or 
EBGaramond4Italic or whatever. Some heuristics have to be applied and as 
I mentioned in an earlier mail, I played a bit with it and although I 
can make you happy by supporting EB sizing automatic (of course with 
toms way to disable it) another user will be bitten by false matches and 
missing ones for other fonts (hard to trace).


To be honest: I'd already given up on fonts and names and whatever being 
systematic and logic etc ... Just as I've also given up on open type 
guaranteeing consistency or open type math 

Re: [NTG-context] [***SPAM***] Headers on Empty Page at End of Chapter

2013-06-25 Thread Wolfgang Schuster

Am 25.06.2013 um 07:24 schrieb Malte Stien ma...@stien.de:

 Hello,
 
 When you setup your chapters such that a chapter always starts on a right 
 page, you naturally get the occasional empty left page just before that. I 
 have my headers setup like this
 
  \setupheadertexts[chapter][section]
 
 I get the chapter and section name of the previous section printed in the 
 header of that empty page, but I want that page just empty. Is there a way?

You have to use

\setuphead
  [chapter]
  [page={yes,header,right}]

to disable the header on empty left pages before a new chapter.

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] [***SPAM***] Headers on Empty Page at End of Chapter

2013-06-25 Thread Malte Stien
That works, thank you.
Malte.

--
“The Electric Monk was a labour-saving device, like a dishwasher or a video 
recorder... Electric Monks believed things for you, thus saving you what was 
becoming an increasingly onerous task, that of believing all the things the 
world expected you to believe.”

― Douglas Adams, Dirk Gently's Holistic Detective Agency

On 25/06/2013, at 10:38 PM, Wolfgang Schuster schuster.wolfg...@gmail.com 
wrote:

 
 Am 25.06.2013 um 07:24 schrieb Malte Stien ma...@stien.de:
 
 Hello,
 
 When you setup your chapters such that a chapter always starts on a right 
 page, you naturally get the occasional empty left page just before that. I 
 have my headers setup like this
 
 \setupheadertexts[chapter][section]
 
 I get the chapter and section name of the previous section printed in the 
 header of that empty page, but I want that page just empty. Is there a way?
 
 You have to use
 
 \setuphead
  [chapter]
  [page={yes,header,right}]
 
 to disable the header on empty left pages before a new chapter.
 
 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
 ___

___
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] Bold Small Caps

2013-06-25 Thread Malte Stien
Hello,

I am trying for bold small caps, such like

  {\bf This is bold {\sc and bold small caps} and just bold again}

However, out of the box, the inner {\sc ...} part is not typeset in bold. So 
after a bit of looking I found this:

  http://wiki.contextgarden.net/Bold_small_caps

But it does not work for me. I noticed the module 
(http://pmrb.free.fr/work/OS/ConTeXt/) is from 2006, so the bit rot might have 
set in. Should it still work? Or is there a better way these days?

Thank you,
Malte.


--
“The Electric Monk was a labour-saving device, like a dishwasher or a video 
recorder... Electric Monks believed things for you, thus saving you what was 
becoming an increasingly onerous task, that of believing all the things the 
world expected you to believe.”

― Douglas Adams, Dirk Gently's Holistic Detective Agency

___
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] Bold Small Caps

2013-06-25 Thread Wolfgang Schuster

Am 25.06.2013 um 14:59 schrieb Malte Stien ma...@stien.de:

 Hello,
 
 I am trying for bold small caps, such like
 
  {\bf This is bold {\sc and bold small caps} and just bold again}
 
 However, out of the box, the inner {\sc ...} part is not typeset in bold. So 
 after a bit of looking I found this:
 
  http://wiki.contextgarden.net/Bold_small_caps
 
 But it does not work for me. I noticed the module 
 (http://pmrb.free.fr/work/OS/ConTeXt/) is from 2006, so the bit rot might 
 have set in. Should it still work? Or is there a better way these days?


When you have a opentype font with bold smallcaps you can enable them with the 
\feature command:

\setupbodyfont[pagella]

\starttext
{\bf This is bold {\feature[+][f:smallcaps] and bold small caps} and just bold 
again}
\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] Bold Small Caps

2013-06-25 Thread Malte Stien
Wolfgang,

Thank you. However, I am getting an undefined control sequence here:

l.4 {\bf This is bold {\feature
   [+][f:smallcaps] and bold small caps} and jus...

However, the wiki page http://wiki.contextgarden.net/Featuresets confirms your 
syntax. What am I missing?

Regards,
Malte.


--
“The Electric Monk was a labour-saving device, like a dishwasher or a video 
recorder... Electric Monks believed things for you, thus saving you what was 
becoming an increasingly onerous task, that of believing all the things the 
world expected you to believe.”

― Douglas Adams, Dirk Gently's Holistic Detective Agency

On 25/06/2013, at 11:08 PM, Wolfgang Schuster schuster.wolfg...@gmail.com 
wrote:

 
 Am 25.06.2013 um 14:59 schrieb Malte Stien ma...@stien.de:
 
 Hello,
 
 I am trying for bold small caps, such like
 
 {\bf This is bold {\sc and bold small caps} and just bold again}
 
 However, out of the box, the inner {\sc ...} part is not typeset in bold. So 
 after a bit of looking I found this:
 
 http://wiki.contextgarden.net/Bold_small_caps
 
 But it does not work for me. I noticed the module 
 (http://pmrb.free.fr/work/OS/ConTeXt/) is from 2006, so the bit rot might 
 have set in. Should it still work? Or is there a better way these days?
 
 
 When you have a opentype font with bold smallcaps you can enable them with 
 the \feature command:
 
 \setupbodyfont[pagella]
 
 \starttext
 {\bf This is bold {\feature[+][f:smallcaps] and bold small caps} and just 
 bold again}
 \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
 ___

___
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] Using \setupinterlinespace with \setuparranging[XY], and more

2013-06-25 Thread Pavneet Arora
By chance I found a possible, but not very satisfying, solution to the
\setupinterlinspace issue when trying to print labels using
\setuparranging[XY]. That is to explicitly set
\setupbodyfont[rm,18pt]\setupinterlinespace
once again outside the \framed directive for the specific label as in the
following MWE.

I haven't seen any answers on my other two questions from the original
post (included down below), so if anyone has any ideas, I would be most
grateful.

MWE:

\definepapersize
[Label]
[width=4in,height=3.33in]

\setuppapersize[Label][letter,portrait]

\setuppaper
[topspace=0.4688in,
backspace=0.1875in,
dx=0.1875in,
dy=0in,
nx=2,
ny=3]

\setuplayout
[topspace=0in,
backspace=0in,
margin=0in,
width=4in,
height=3.33in,
header=0in,
footer=0in]

\setuparranging[XY]

\setupframedtexts
[width=\textwidth,
height=\textheight,
alignment=center,
frame=off,
location=lohi,
alignment=center,
offset=0pt]

\setuplayout[location=middle]

\definelayer
[Label]
[width=\paperwidth,
height=\paperheight]

\usemodule[simplefonts]
\setmainfont[schola]
\setupbodyfont[rm,48pt]
\setupinterlinespace[line=2.8ex]

\showframe

\starttext
\the\baselineskip\page
\framed[frame=off,width=\textwidth,height=\textheight,aligment=center]{Label 
1}\page
\the\baselineskip\page
\framed[frame=off,width=\textwidth,height=\textheight,aligment=center]{\definedfont[Serif
 at 18pt]\setupinterlinespace \the\baselineskip\crlf A long description label 
that needs to be have its interline spacing adjusted.}\page
Label 2\page
\setupbodyfont[rm,18pt]
\setupinterlinespace
\framed[frame=off,width=\textwidth,height=\textheight,aligment=center]{ 
\the\baselineskip\crlf Another long description label that needs to be have its 
interline spacing adjusted.}\page
Label 3\page
Label 4\page
Label 5\page
Label 6\page
Label 7\page
Label 8\page
\stoptext




On 22Jun13, ntg-context-requ...@ntg.nl wrote:
 Hello,
 
 I am using Willi's MAPS 37 and the Example section from the \setuppaper 
 command:
 
 http://wiki.contextgarden.net/Command/setuppaper
 
 to print a set of labels, 2x6 configuration on U.S. Letter waterproof
 label paper.
 
 For the most part things are working well, but I have a number of questions:
 
 1.  A difference between MAPS 37 and wiki entry for \setuppaper is the
 inclusion of the following line in the later:
 
 \setuplayout[location=middle]
 
 which seems to play a significant role.  Otherwise, I cannot get the
 labels to honour the topspace and backspace specified in the setuppaper
 command.  My question is why is this significant?  What role does it
 play?  This can be tested by simply deleting the line in the MWE below.
 
 2.I would like to have every label centered, i.e.,
 \framed[alignment=center] should be set for all labels.  However,
 including it in the setupframedtexts command doesn't seem to have any
 effect as shown in the MWE down below.  Is there another way for all
 labels to inherit this alignment setting?
 
 3.  I cannot get interlinespacing to affect the line spacing even though
 the baselineskip variable is changed as shown in the MWE.
 
 advTHANKSance.
 
 

-- 

Pavneet Arora   m: 647.406.6843
Waroc Informatikt: 416.937.9276
___
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] Portrait vs. landscape orientation for Tabloid paper

2013-06-25 Thread Pavneet Arora
I believe that the definitions for portrait and landscape orientation
for Tabloid/Ledger paper are flipped.

In the following MWE using Hans' clue to using \scaling directive, I am
having to specify landscape in order for the page to be set in portrait.
This observation is confirmed when I retrieve the document properties
using evince under Bodhi Linux and under Ubuntu 12.04 (ALTENTER
brings up the document properties).  With this MWE, the properties under
both systems is shown as Tabloid, Portrait (11.00 x 17.00 inches)

Have I got this right?

MWE:

\setuppapersize[tabloid,landscape][tabloid,landscape]
\setuplayout[
backspace=0.5in,
width=10in,
topspace=1.0in,
header=0in, 
footer=0in,
height=16.5in]
\setuppagenumbering[location=,state=stop]

\usemodule[simplefonts]
\setmainfont[schola]
\setupbodyfont[rm,16pt]
\setupinterlinespace[line=2.8ex]

\starttext
%\showlayout[in,pt]

\setupMPinstance
[metafun]
[extensions=yes,
initializations=yes]

\startuseMPgraphic{Example}
u:=1cm;

pickup pencircle scaled 1pt;

draw (5u,0u) {dir 90}..(0u,5u) {dir 180};
draw (0u,5u) .. (-1.5u,10.5u) {dir 90} .. (0u,16u);
draw (0u,16u) {dir 0} .. (5u,21u) {dir 90};
draw (5u,21u) -- (39u,21u);
draw (39u,21u) {dir 270} .. (42u,18u) {dir 0};
draw (42u,18u) .. (43.5u,10.5u) {dir 270} .. (42u,3u);
draw (42u,3u) {dir 180} .. (39u,0u) {dir 270};
draw (39u,0u) -- (35u,0u);
draw (35u,0u) .. (22u,3u) {dir 180} .. (9u,0u);
draw (9u,0u) -- (5u,0u);
label(btex A POOL etex, (22u,10.5u));

\stopuseMPgraphic
\startalignment[middle]
\definedfont[Serif at 16pt]\setupinterlinespace
{\tfb\sc An Example Plumbing Schematic}
\blank[big]
{\tfb \tt [DRAFT---To Be Verified]}
\blank[2*big]
\stopalignment
\scale[width=10in]{\useMPgraphic{Example}}
\stoptext

-- 

Pavneet Arora   m: 647.406.6843
Waroc Informatikt: 416.937.9276
___
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] wrong page break if avoiding orphans and widows

2013-06-25 Thread Pablo Rodríguez
Dear list,

I have in a document in which I get a wrong page break
(http://www.ousia.tk/wrongpb.png) when I enable this code to avoid
widows and orphans:

\setuplayout[setups=*lessstrict,
cutspace=3cm,backspace=3cm]
\startsetups[*lessstrict]
\setup[reset]
\widowpenalty=1
\clubpenalty=1
\brokenpenalty=1
\stopsetups

I'm afraid that this causes that the first line from the page on the
right should be added to the page on the left. If I'm not wrong, there
is space available for it.

What am I doing wrong here?

Many thanks for your help,


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] Bold Small Caps

2013-06-25 Thread Sietse Brouwer
Malte wrote:
 Thank you. However, I am getting an undefined control sequence here:

 l.4 {\bf This is bold {\feature
[+][f:smallcaps] and bold small caps} and 
 jus...

 However, the wiki page http://wiki.contextgarden.net/Featuresets
 confirms your syntax. What am I missing?

The version you are using? The `\feature[+][...]` syntax has been
around only since about March 2013; before that you had to use
`\addfeature[...]`. Does that explain the error you're getting?

Cheers,
Sietse
___
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] What is the status of ConTeXt's various test suites?

2013-06-25 Thread Sietse Brouwer
On 25 June 2013 11:49, Procházka Lukáš Ing. - Pontex s. r. o.
l...@pontex.cz wrote:
 here are my scripts I'm using to test Ctx.

Thanks, Lukáš! Also thanks for the explanation of what files go where,
and what to run --- that's very helpful. I hope to be able to play
with this soon, and then add what I learn to the wiki.

All the best,
Sietse
___
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] Using \setupinterlinespace with \setuparranging[XY], and more

2013-06-25 Thread Wolfgang Schuster

Am 21.06.2013 um 22:27 schrieb Pavneet Arora pavneet_ar...@waroc.com:

 Hello,
 
 I am using Willi's MAPS 37 and the Example section from the \setuppaper 
 command:
 
 http://wiki.contextgarden.net/Command/setuppaper
 
 to print a set of labels, 2x6 configuration on U.S. Letter waterproof
 label paper.
 
 For the most part things are working well, but I have a number of questions:
 
 1.  A difference between MAPS 37 and wiki entry for \setuppaper is the
 inclusion of the following line in the later:
 
 \setuplayout[location=middle]
 
 which seems to play a significant role.  Otherwise, I cannot get the
 labels to honour the topspace and backspace specified in the setuppaper
 command.  My question is why is this significant?  What role does it
 play?  This can be tested by simply deleting the line in the MWE below.

The setups acts here as a keyword to enable the topspace/backspace keys.

 2.I would like to have every label centered, i.e.,
 \framed[alignment=center] should be set for all labels.  However,
 including it in the setupframedtexts command doesn't seem to have any
 effect as shown in the MWE down below.  Is there another way for all
 labels to inherit this alignment setting?

The global settings for \framed are changed with the \setupframed command,
the \setupframedtext commands changes the values for \startframedtext.

 3.  I cannot get interlinespacing to affect the line spacing even though
 the baselineskip variable is changed as shown in the MWE.

You have to add \par at the end of each paragraph, e.g. 
\framed{\definedfont[…]\setupinterlinespace …\par}

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] documents inside documents

2013-06-25 Thread Pablo Rodríguez
Dear list,

I need for a document explaining some ConTeXt features, to be able to
include a document inside (a page that includes the feature).

I know I can create another document and then insert the pages, but it
would be much easier for me to be able to have the code inside the main
the document.

Here is a sample of what I want to include scaled (the way an image is
included) within another document:

\mainlanguage[en]
\setuplanguage[en][patterns={en,agr}]
\definepapersize[mine][width=6in,height=2in]
\setuppapersize[mine]
\usemodule[simplefonts]
\setmainfont[Theano Didot]
\definelinenote[contxt]
\setupnote[contxt][paragraph=yes, inbetween=\hskip1.5em]
\setupnotation[contxt][numbercommand=,alternative=serried,distance=1em,compress=yes,compressseparator=]
\starttext

\startlinenumbering
οὐκ οἶσθ᾽\contxt{οἶσθ᾽: οἶσθα, 2nd sg.,
οἶσδα} ὅτι πολλῶν ἐτῶν\contxt{πολλῶν
ἐτῶν: for…; gen. time within} Ἀγάθων ἐνθάδε
οὐκ ἐπιδεδήμηκεν\contxt{ἐπιδεδήμηκεν: pf.
ἐπιδήμέω}, ἀφ᾽ οὗ\contxt{ἀφ᾽ οὗ: since;
“from which (time)”} δ᾽ ἐγὼ Σωκράτει
συνδιατρίβω\contxt{συνδιατρίβω: I have been
spending; pres. but pf. progressive in translation} καὶ
ἐπιμελὲς πεποίημαι\contxt{ἐπιμελὲς
πεποίημαι: I have made it my business; “have made it my
care,” pf.}
\stoplinenumbering

\stoptext

Is there a standard way to do it with ConTeXt?

Many thanks for your help,


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] documents inside documents

2013-06-25 Thread Wolfgang Schuster

Am 25.06.2013 um 21:31 schrieb Pablo Rodríguez oi...@web.de:

 Dear list,
 
 I need for a document explaining some ConTeXt features, to be able to
 include a document inside (a page that includes the feature).
 
 I know I can create another document and then insert the pages, but it
 would be much easier for me to be able to have the code inside the main
 the document.
 
 Here is a sample of what I want to include scaled (the way an image is
 included) within another document:
 
 \mainlanguage[en]
 \setuplanguage[en][patterns={en,agr}]
 \definepapersize[mine][width=6in,height=2in]
 \setuppapersize[mine]
 \usemodule[simplefonts]
 \setmainfont[Theano Didot]
 \definelinenote[contxt]
 \setupnote[contxt][paragraph=yes, inbetween=\hskip1.5em]
 \setupnotation[contxt][numbercommand=,alternative=serried,distance=1em,compress=yes,compressseparator=]
 \starttext
 
 \startlinenumbering
 οὐκ οἶσθ᾽\contxt{οἶσθ᾽: οἶσθα, 2nd sg.,
 οἶσδα} ὅτι πολλῶν ἐτῶν\contxt{πολλῶν
 ἐτῶν: for…; gen. time within} Ἀγάθων ἐνθάδε
 οὐκ ἐπιδεδήμηκεν\contxt{ἐπιδεδήμηκεν: pf.
 ἐπιδήμέω}, ἀφ᾽ οὗ\contxt{ἀφ᾽ οὗ: since;
 “from which (time)”} δ᾽ ἐγὼ Σωκράτει
 συνδιατρίβω\contxt{συνδιατρίβω: I have been
 spending; pres. but pf. progressive in translation} καὶ
 ἐπιμελὲς πεποίημαι\contxt{ἐπιμελὲς
 πεποίημαι: I have made it my business; “have made it my
 care,” pf.}
 \stoplinenumbering
 
 \stoptext
 
 Is there a standard way to do it with ConTeXt?


http://www.ntg.nl/pipermail/ntg-context/2013/072963.html

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] documents inside documents

2013-06-25 Thread Pablo Rodríguez
On 25/06/13 21:55, Wolfgang Schuster wrote:
 Am 25.06.2013 um 21:31 schrieb Pablo Rodríguez oi...@web.de:
 Dear list,

 I need for a document explaining some ConTeXt features, to be able to
 include a document inside (a page that includes the feature).

 I know I can create another document and then insert the pages, but it
 would be much easier for me to be able to have the code inside the main
 the document.

 Is there a standard way to do it with ConTeXt?
 
 http://www.ntg.nl/pipermail/ntg-context/2013/072963.html

Many thanks for your fast reply, Wolfgang.

I'm afraid I cannot get it working with the sample file I provided. I do
need to be able to get a complete document, not a TEXpage.

Is that possible?

Many thanks for your help,


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] wrong interlinespace or wrong font?

2013-06-25 Thread Sietse Brouwer
 I cannot compile your code either on my system or on
 http://live.contextgarden.net/. I don't know what the error might be,
 but I'm not able to compile it.

Yeah, that one's all my fault. I copy-pasted my working code to the
e-mail, then decided to add one little change (the extra \blackrule),
and promptly introduced an error. Forgot to close the \smash{ braces.
_ Correct code below.

Cheers,
Sietse

\setupinterlinespace[line=3.2ex]
\usemodule[simplefonts]
\setmainfont[UnifrakturMaguntia]
\starttext

xAAgfas\smash{\blackrule[height=1ex]}\smash{\blackrule[height=2mm]} \\
xAAgfas\smash{\blackrule[height=2ex]}  \\
xAAgfas\smash{\blackrule[height=3ex, color=red]}   \\
xAAgfas\smash{\blackrule[height=3.2ex, color=blue]}\\

\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] documents inside documents

2013-06-25 Thread Wolfgang Schuster

Am 25.06.2013 um 22:25 schrieb Pablo Rodríguez oi...@web.de:

 On 25/06/13 21:55, Wolfgang Schuster wrote:
 Am 25.06.2013 um 21:31 schrieb Pablo Rodríguez oi...@web.de:
 Dear list,
 
 I need for a document explaining some ConTeXt features, to be able to
 include a document inside (a page that includes the feature).
 
 I know I can create another document and then insert the pages, but it
 would be much easier for me to be able to have the code inside the main
 the document.
 
 Is there a standard way to do it with ConTeXt?
 
 http://www.ntg.nl/pipermail/ntg-context/2013/072963.html
 
 Many thanks for your fast reply, Wolfgang.
 
 I'm afraid I cannot get it working with the sample file I provided. I do
 need to be able to get a complete document, not a TEXpage.
 
 Is that possible?

\startbuffer[extract:before]

  \mainlanguage[en]
  \setuplanguage[en][patterns={en,agr}]
  \definepapersize[mine][width=6in,height=2in]
  \setuppapersize[mine]
  \usemodule[simplefonts]
  \setmainfont[Theano Didot]
  \definelinenote[contxt]
  \setupnote[contxt][paragraph=yes, inbetween=\hskip1.5em]
  
\setupnotation[contxt][numbercommand=,alternative=serried,distance=1em,compress=yes,compressseparator=]

\stopbuffer

% \startbuffer[extract:after]
%   % empty
% \stopbuffer

\def\startextract
  {\dosingleempty\dostartextract}

\def\dostartextract[#1]%
  {\edef\extractfilename{#1}%
   \grabbufferdata[extract:content][startextract][stopextract]}

\def\stopextract
  {\doifsomething\extractfilename
 
{\savebuffer[list={extract:before,extract:content,extract:after},file=\extractfilename.tex,prefix=no]%
  \typesetfile[\extractfilename][]}}

\starttext

\startextract[dummy]
\startlinenumbering
οὐκ οἶσθ᾽\contxt{οἶσθ᾽: οἶσθα, 2nd sg.,
οἶσδα} ὅτι πολλῶν ἐτῶν\contxt{πολλῶν
ἐτῶν: for…; gen. time within} Ἀγάθων ἐνθάδε
οὐκ ἐπιδεδήμηκεν\contxt{ἐπιδεδήμηκεν: pf.
ἐπιδήμέω}, ἀφ᾽ οὗ\contxt{ἀφ᾽ οὗ: since;
“from which (time)”} δ᾽ ἐγὼ Σωκράτει
συνδιατρίβω\contxt{συνδιατρίβω: I have been
spending; pres. but pf. progressive in translation} καὶ
ἐπιμελὲς πεποίημαι\contxt{ἐπιμελὲς
πεποίημαι: I have made it my business; “have made it my
care,” pf.}
\stoplinenumbering
\stopextract

\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] Auto selecting optical sizes for a font

2013-06-25 Thread Andres Conrado
Thank you so much Hans, for your answer. I understand how difficult it
is. The goodie file works very well, and I'm perfectly happy with
that. :) Thank you again.

Andrés Conrado Montoya
El Andi
andresconr...@gmail.com
http://chiquitico.org

Los fines no justifican los medios, porque la medida verdadera de
nuestro carácter está dada por los medios que estamos dispuestos a
utilizar, no por los fines que proclamamos.

Por favor, evite enviarme documentos adjuntos en formato Word o PowerPoint.
Lea http://www.gnu.org/philosophy/no-word-attachments.es.html

Naturalmente, la gente normal no desea la guerra, pero al final son
los líderes de una nación quienes determinan su política, y resulta
muy sencillo doblegar a la gente, sea una democracia, una dictadura
fascista, un parlamento o una dictadura comunista. Con voz o sin voz,
la gente siempre podrá entregarse a la voluntad de sus líderes. Es
fácil. Lo único que hay que hacer es decirles que están siendo
atacados, y denunciar a los pacifistas por su falta de patriotismo y
exponer el país al peligro. Funciona igual en todos los países.
---Hermann Goering, en los juicios de Nuremberg.
___
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] documents inside documents

2013-06-25 Thread Peter Münster
On Tue, Jun 25 2013, Pablo Rodríguez wrote:

 http://www.ntg.nl/pipermail/ntg-context/2013/072963.html

 I'm afraid I cannot get it working with the sample file I provided.

Hi,

Why not?

This works here:

--8---cut here---start-8---
\startbuffer[sample-document]
  \mainlanguage[en]
  \setuplanguage[en][patterns={en,agr}]
  \definepapersize[mine][width=6in,height=2in]
  \setuppapersize[mine]
  \usemodule[simplefonts]
  \setmainfont[Theano Didot]
  \definelinenote[contxt]
  \setupnote[contxt][paragraph=yes, inbetween=\hskip1.5em]
  
\setupnotation[contxt][numbercommand=,alternative=serried,distance=1em,compress=yes,compressseparator=]
  \starttext
  \startlinenumbering
  οὐκ οἶσθ᾽\contxt{οἶσθ᾽: οἶσθα, 2nd sg.,
  οἶσδα} ὅτι πολλῶν ἐτῶν\contxt{πολλῶν
  ἐτῶν: for…; gen. time within} Ἀγάθων ἐνθάδε
  οὐκ ἐπιδεδήμηκεν\contxt{ἐπιδεδήμηκεν: pf.
  ἐπιδήμέω}, ἀφ᾽ οὗ\contxt{ἀφ᾽ οὗ: since;
  “from which (time)”} δ᾽ ἐγὼ Σωκράτει
  συνδιατρίβω\contxt{συνδιατρίβω: I have been
  spending; pres. but pf. progressive in translation} καὶ
  ἐπιμελὲς πεποίημαι\contxt{ἐπιμελὲς
  πεποίημαι: I have made it my business; “have made it my
  care,” pf.}
  \stoplinenumbering
  \stoptext
\stopbuffer
\savebuffer[list=sample-document, file=sample-document.tex, prefix=no]
\starttext
bla bla bla
\typesetfile[sample-document.tex][width=10cm, frame=on]
bla bla bla
\stoptext
--8---cut here---end---8---

-- 
   Peter
___
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] documents inside documents

2013-06-25 Thread Pablo Rodríguez
On 25/06/13 23:28, Peter Münster wrote:
 On Tue, Jun 25 2013, Pablo Rodríguez wrote:
 
 http://www.ntg.nl/pipermail/ntg-context/2013/072963.html

 I'm afraid I cannot get it working with the sample file I provided.
 
 Hi,
 
 Why not?
 
 This works here:

Many thanks, Peter, it works also here.

One more question, the file belongs in the following code:

\startstandardmakeup[align=middle]
\typesetfile[sample-document.tex][width=10cm, frame=on]
\stopstandardmakeup

How can I get this horizontally centered It is vertically centered, and
it should be also horizontally aligned, but I don't know why doesn't it
work.

Many thanks for your help,


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] documents inside documents

2013-06-25 Thread Wolfgang Schuster

Am 26.06.2013 um 00:07 schrieb Pablo Rodríguez oi...@web.de:

 On 25/06/13 23:28, Peter Münster wrote:
 On Tue, Jun 25 2013, Pablo Rodríguez wrote:
 
 http://www.ntg.nl/pipermail/ntg-context/2013/072963.html
 
 I'm afraid I cannot get it working with the sample file I provided.
 
 Hi,
 
 Why not?
 
 This works here:
 
 Many thanks, Peter, it works also here.
 
 One more question, the file belongs in the following code:
 
 \startstandardmakeup[align=middle]
 \typesetfile[sample-document.tex][width=10cm, frame=on]
 \stopstandardmakeup
 
 How can I get this horizontally centered It is vertically centered, and
 it should be also horizontally aligned, but I don't know why doesn't it
 work.

You need \dontleavehmode, i.e. \dontleavehmode\typesetfile[…].

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
___