Re: [NTG-context] Bibliography - biblio error with the latest beta

2015-07-11 Thread Lukáš Procházka
, compresslevel 3, 
objectcompresslevel 3
mkiv lua stats   loaded fonts: 3 files: latinmodern-math.otf, 
lmmono12-regular.otf, lmroman12-regular.otf
mkiv lua stats   fonts load time: 0.212 seconds
mkiv lua stats   publications load time: 0.001 seconds, 515 bytes, 3 
definitions, 0 shortcuts
mkiv lua stats   used platform: mswin, type: windows, binary subtree: 
texmf-mswin
mkiv lua stats   luatex banner: this is luatex, version beta-0.79.1 (tex live 
2014/w32tex) (rev 5041)
mkiv lua stats   control sequences: 39036 of 65536 + 10
mkiv lua stats   lua properties: engine: lua, used memory: 29 MB (ctx: 28 MB), 
hash type: lua, hash chars: min(64,40), symbol mask: utf (¤ä╬Á¤ç)
mkiv lua stats   runtime: 0.605 seconds, 1 processed pages, 1 shipped pages, 
1.653 pages/second

mtx-context | fatal error: return code: 1


It seems to be related to the latest beta recoding.

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

Bib64.log
Description: Binary data


Bib64.mkiv
Description: Binary data
___
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 lua to define a macro with one optional parameter in brackets

2015-07-08 Thread Jaroslav Hajtmar

Thanks Taco very much.

At this point, it really works in simple situations, but in the event 
that this solution will incorporate into the existing system, then I 
have big problems with expansion (values are not updated in macros). I 
need more solutions using something like context.setgvalue, or at least 
according to the following example. If they could incorporate the 
remaining two definitions

ie
\def\simpleA {content when parameter is missing}
\def\complexA[#1]{parameter #1}

into luacode (probably encounter a problem with #), so it might work. 
Can not think of anyone, how it could be done differently?

Thanks Jaroslav Hajtmar

Here is minimal example:

\ctxlua{
xlsname='A'
content='content when parameter is missing'
context([[\definecomplexorsimple\]]..xlsname)
%context([[\def\simple]]..xlsname..[[{]]..content..[[}]])
%context([[\def\complex]]..xlsname..'[#1]'..[[{Neco: #1}]])
}

\def\simpleA {content when parameter is missing}
\def\complexA[#1]{parameter #1}



\type{\A}: \A

\type{\A[5]}: \A[5]


\stoptext




Dne 8. 7. 2015 v 14:11 Taco Hoekwater napsal(a):

On 08 Jul 2015, at 13:58, Jaroslav Hajtmar hajt...@gyza.cz wrote:

Thanx Taco for reply.

the minimal example see bellow not crashed, but \A macro is not created.
I don't Know in what could still be a problem. Example I am even more minimalize

It works for me after changing \directlua {} to \startluacode … \stopluacode

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] Accessibility and Tagged PDFs: Bugs and Feature Requests

2015-07-06 Thread Hans Hagen

On 7/5/2015 10:04 PM, Dr. Dominik Klein wrote:

Am 05.07.15 um 13:11 schrieb Hans Hagen:

On 7/4/2015 6:45 PM, Alan BRASLAU wrote:

On Fri, 3 Jul 2015 19:19:58 +0200
Hans Hagen pra...@wxs.nl wrote:

sure but in the meantime we need to find a way to determine what works
and what not, for instance, as i mentioned that context already adds a
rolemap

11 0 obj
 /ParentTree 12 0 R /K 29 0 R /RoleMap  /sectiontitle /H /section
/Sect /sectionnumber /H /document /Div  /Type /StructTreeRoot 
endobj

we have no way to check if that works (so maybe we need to have a page
on the wiki with a viewer/functionality matrix)



The whole rolemap thing and how Acrobat Pro handles it leaves me
somewhat puzzled.

Taking https://github.com/asdfjkl/tex-access/blob/master/rolemap.tex and
compiling will give the rolemap as Hans described above. Looking at the
Tag structure, this seems to be ignored by acrobat (but why?), see
https://github.com/asdfjkl/tex-access/blob/master/rolemap.PNG


i always suspect a chicken-egg issue there: someone wants a feature, it 
gets added to pdf, then there is waiting for some typesetting engine to 
support it, and then acrobat might do something with it and afterwards 
the spec gets adapted (or interpretation is adapted) .. it happened with 
widgets and such


the interesting thing about tex is that we can easily adapt to such new 
features but have no way of testing it


(some relates to the fact that pdf is both a document format and a 
storage format for e.g. illustrator so it's some hybrid)


maybe it's just: if we have tags it is accessible by definition, no 
matter if it can be used or not



What would be expected is this, right? After all, the rolemap should be
interpreted, shouldn't it (mapping /H to /H1 was a mistake of mine, but
it doesn't change the fact).
https://github.com/asdfjkl/tex-access/blob/master/rolemap2.PNG
After changing things manually in the tag editor in acrobat, and saving
the pdf again, this is obtained:
https://github.com/asdfjkl/tex-access/blob/master/rolemap_edited.pdf


maybe the H etc is only used with reflow ... and reflow is weird in 
itself as one can then better provide an html file alongside the pdf


it makes me wonder how a complex doc with mostly H's would look / be 
interpreted as that is then the dominant structure thing



Note this:
 /RoleMap  /document /Div /sectionnumber /H /sectiontitle /H
/section /Sect  /Type /StructTreeRoot /ParentTree 12 0 R /K 29 0 R 

and also the different structure elements at the start of the pdf...


the order of /Key values in the dicts is not important and hashes are 
often unordered (different per application or even per run for some 
applications for security reasons); when you play with widgets you will 
also observe that acrobat adds rendered content to the file as addition 
to the key/values


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] font features in XeTeX

2015-07-06 Thread Robert Zydenbos
Hans Hagen wrote:

 On 7/6/2015 9:13 AM, Robert Zydenbos wrote:
 Dear ConTeXt folk,

 Is there any simple way to pass font features as a parameter to
 XeConTeXt? i am thinking of things like what in LaTeX would be (between
 square brackets) \setromanfont [AutoFakeSlant=0.5, AutoFakeBold=0.5]
 {Doulos SIL Phon}.

 There has to be some way to do this, but I seem unable to find it in the
 documentatioin I have.
 
 you can just append the directives to the font names (see type -xtx.mkii
 for examples). I don't know if AutoFakeBold is some built in feature. Is
 there a reason why you can't use mkiv with luatex?

I would like to, but I need to use TrueType fonts for Indian scripts in
my work that are supported in XeTeX but not (yet) in LuaTeX.

As an experiment, I tried to use the so-called 'long s' in a Fraktur
font, which comes out well in XeTeX with LaTeX, but I must be doing
something wrong in ConTeXt.

Robert

Example:

% The 'StylisitcSet 11' in the font UnifrakturMaguntia should contain
the so-called 'long s'.
% Somehow it doesn't work.

\starttext

\definetypeface [hauptfont] [rm] [Xserif] [Charis SIL]
\definetypeface [schoenfont] [rm] [Xserif] [UnifrakturMaguntia]
[default] [features={StylisticSet=11}]

\switchtobodyfont [hauptfont]
Dies ist mit Features, denke ich.

{\switchtobodyfont [schoenfont] Und jetzt schreiben wir etwas in
Fraktur, das ist ja schöner.}

\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] font features in XeTeX

2015-07-06 Thread Hans Hagen

On 7/6/2015 9:13 AM, Robert Zydenbos wrote:

Dear ConTeXt folk,

Is there any simple way to pass font features as a parameter to
XeConTeXt? i am thinking of things like what in LaTeX would be (between
square brackets) \setromanfont [AutoFakeSlant=0.5, AutoFakeBold=0.5]
{Doulos SIL Phon}.

There has to be some way to do this, but I seem unable to find it in the
documentatioin I have.


you can just append the directives to the font names (see type -xtx.mkii 
for examples). I don't know if AutoFakeBold is some built in feature. Is 
there a reason why you can't use mkiv with luatex?


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] Accessibility and Tagged PDFs: Bugs and Feature Requests

2015-07-06 Thread Dr. Dominik Klein

Am 05.07.15 um 13:11 schrieb Hans Hagen:

On 7/4/2015 6:45 PM, Alan BRASLAU wrote:

On Fri, 3 Jul 2015 19:19:58 +0200
Hans Hagen pra...@wxs.nl wrote:

sure but in the meantime we need to find a way to determine what works
and what not, for instance, as i mentioned that context already adds a
rolemap

11 0 obj
 /ParentTree 12 0 R /K 29 0 R /RoleMap  /sectiontitle /H /section
/Sect /sectionnumber /H /document /Div  /Type /StructTreeRoot 
endobj

we have no way to check if that works (so maybe we need to have a page
on the wiki with a viewer/functionality matrix)



The whole rolemap thing and how Acrobat Pro handles it leaves me 
somewhat puzzled.


Taking https://github.com/asdfjkl/tex-access/blob/master/rolemap.tex and 
compiling will give the rolemap as Hans described above. Looking at the 
Tag structure, this seems to be ignored by acrobat (but why?), see

https://github.com/asdfjkl/tex-access/blob/master/rolemap.PNG

What would be expected is this, right? After all, the rolemap should be 
interpreted, shouldn't it (mapping /H to /H1 was a mistake of mine, but 
it doesn't change the fact).

https://github.com/asdfjkl/tex-access/blob/master/rolemap2.PNG
After changing things manually in the tag editor in acrobat, and saving 
the pdf again, this is obtained:

https://github.com/asdfjkl/tex-access/blob/master/rolemap_edited.pdf

Note this:
 /RoleMap  /document /Div /sectionnumber /H /sectiontitle /H 
/section /Sect  /Type /StructTreeRoot /ParentTree 12 0 R /K 29 0 R 


and also the different structure elements at the start of the pdf...

I am lost here...

cheers

- Dominik


___
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] Accessibility and Tagged PDFs: Bugs and Feature Requests

2015-07-05 Thread Hans Hagen

On 7/4/2015 6:45 PM, Alan BRASLAU wrote:

On Fri, 3 Jul 2015 19:19:58 +0200
Hans Hagen pra...@wxs.nl wrote:


(i'm pretty sure that context was one of the first to support for
instance field (widget) trees but support for that in viewers changes
each version so one never knows what is the right way as specs
predate support in viewers)

(in the same fashion tagging and layers is/are useless till it gets
supported in other viewers than acrobat)


Maybe a subject to discuss at the next ConTeXt meeting.


sure but in the meantime we need to find a way to determine what works 
and what not, for instance, as i mentioned that context already adds a 
rolemap


11 0 obj
 /ParentTree 12 0 R /K 29 0 R /RoleMap  /sectiontitle /H /section 
/Sect /sectionnumber /H /document /Div  /Type /StructTreeRoot 

endobj

we have no way to check if that works (so maybe we need to have a page 
on the wiki with a viewer/functionality matrix)


(ok, we could peek into files produced by word and see what gets added 
there but even then)


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] conTeXt Mkiv: the number of parameters can not be more than 9?

2015-07-04 Thread Jaroslav Hajtmar

Hi Dillon
There is also a purely plaintex solutions for example:


% Here is Peter Olsak solution (see TBN: 
ftp://math.feld.cvut.cz/olsak/tbn/tbn.pdf - czech only)


\def\terminator{*}
\def\usethereadvalues{}
\newcount\tempnum

\def\readparameters{\tempnum=0\let\next=\readonlyone \next}
\def\readonlyone #1, {\advance\tempnum by 1 \def\param{#1}%
%\the\tempnum - \param\par%
\ifx\param\terminator \let\next=\usethereadvalues
\else\expandafter\def \csname param\the\tempnum\endcsname{#1}%
\fi\next}

\def\var#1{\csname #1\endcsname}


\starttext

% Read any number of parameters, terminator is * now
\readparameters 471-44/2007, 474-44/2007, 464-44/2007, 465-44/2007, 
461-44/2007, 472-44/2007, 473-44/2007, 475-44/2007, 469-44/2007, 
455-44/2007, AA, BBB, 124,  *, %


Parameters are now in macros \type{\var{param1}}, \type{\var{param2}}, 
\type{\var{param3}},  \dots :


\blank[big]

\dorecurse{16}{parameter \recurselevel is : \var{param\recurselevel}\crlf}


\blank[big]

% OR

% put parameters into macro:
\def\parameters{A, B, XXL, QWE, 123, Hello, End, TeX, Solution, XSE, 
Flag, Prague, Paris, New York, last value, *, }

% and now read parameters:
\expandafter\readparameters\parameters


\dorecurse{16}{parameter \recurselevel is : \var{param\recurselevel}\crlf}




\stoptext


Jaroslav Hajtmar

Dne 5. 7. 2015 v 3:55 土卜皿 napsal(a):


hi, all

For testing, I have a definition:

|\define[9]\DEFINETEST{#1,#2,#3,#4,#5,#6,#7,#8,#9}|

|context test| can work fine, when I modify the above into:

|\define[10]\DEFINETEST{#1,#2,#3,#4,#5,#6,#7,#8,#9,#10}|

I got a error:

|test.tex: ! Illegal parameter number in definition of\DEFINETEST|

From StackExchange, I got a answer:

Since ConTeXt is based on TeX, the maximum number of 9 parameters is 
inherited


So, in Context mkiv, what should I do for more than 9 parameters?

Thanks!

Best Regards

Dillon



___
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] Accessibility and Tagged PDFs: Bugs and Feature Requests

2015-07-03 Thread Hans Hagen

On 7/3/2015 10:12 AM, Dominik Klein wrote:


On Wed Jul 1, 18:47:57 CEST 2015, Hans Hagen wrote:

/  /Artifact

// BMC
// ..
// EMC
/

i'll add the simple variant (i see no need to add properties to
something that is supposed to be ignored anyway)


thanks!



/  2.) Images without alternate text:

/

i'll pass the label to the tag as alt text

\externalfigure[t:/sources/cow.pdf][label=whatever]


Again, thanks!


/  3.) Tag names of the resulting tag structure:

//  Section 14.8.4 of [1] defines standard structure types,
//
/The set of those standard tags is rather limited and imo one of the

craziest things in pdf as we then end up with abuse of those html tags
(and probably endless discussions on what to map onto what). I don't
even have a clue what it would add to the concept either. Reflow is a
braindead thing anyway.


Indeed, the set of those tags is very limited. Unfortunately, as
far as I know, some screen readers (for the visually impaired)
use these as navigation aids, i.e. press button jump to next section,
and the reader will look for the next section marked as Sect or something.

Is it difficult to make the mapping user-defineable in the source tex-file?
Say, like such a command:
\definemapping[
   section=Sect,
   sectiontitle=H
   sectionnumber=H,
   ...
   tablerow=TR
   ...
]

It would then give users the control on what to map onto what, depending
on what kind of documents they create.


/  All in all, these seem to be the only issues that prevent accessible PDF

//  documents with context. For those within an organization where
//  accessibility is required legally for all publications, compliance to at
//  least Acrobat Pro's checks is a huge issue. I do not know how difficult
//  these things are to implement in Context (personally I am just lost in
//  the code), but looking at e.g. tex.stackexchange
//  for question related to accessibility, this is indeed a major obstacle
//  for several people.

/

In fact adding pdf tagging to context was rather easy. Some time was
So, it's not that difficult to add features, more a matter of priorities
and motivation (apart from the fact that my acrobat is a bit old by now
so I cannot really test).


I can fully understand that such things are not of the highest priority.
Nevertheless accessibility plays more and more a role, e.g. lately, even
conferences 
likehttp://chi2015.acm.org/authors/guide-to-an-accessible-submission/
require accessible pdfs (the workflow they suggest, i.e. tagging a pdf
by acrobat pro after compiling of course doesn't work at all - the generated
structure is useless).

Hence, for some users, it makes all the difference. For example for me and
some other friends, it would allow to change from using Microsoft Word to
a ConTeXt based workflow.


\nopdfcompression

\setuptagging[state=start]

\starttext

\chapter{whatever}

\stoptext

gives a pdf with a rolemap like:

11 0 obj
 /ParentTree 12 0 R /K 29 0 R /RoleMap  /sectiontitle /H /section 
/Sect /sectionnumber /H /document /Div  /Type /StructTreeRoot 

endobj

but as usual it's hard to check what gets done with such things

(i'm pretty sure that context was one of the first to support for 
instance field (widget) trees but support for that in viewers changes 
each version so one never knows what is the right way as specs predate 
support in viewers)


(in the same fashion tagging and layers is/are useless till it gets 
supported in other viewers than acrobat)




-
  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] Accessibility and Tagged PDFs: Bugs and Feature Requests

2015-07-01 Thread Hans Hagen

On 6/28/2015 12:59 PM, Dr. Dominik Klein wrote:


/Artifact
   BMC
   ..
   EMC

or in an advanced way with /Artifact PropertyList where the type of
Artifact can be defined. It would be nice if those elements that are not
included in the tag tree would be marked as artifacts by default. The
same holds for \startelement[ignore] when one wants to explicitly remove
something from the structure tree.


i'll add the simple variant (i see no need to add properties to 
something that is supposed to be ignored anyway)


-
  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] Accessibility and Tagged PDFs: Bugs and Feature Requests

2015-06-30 Thread Dr. Dominik Klein
Context is the only Tex-based system that allows to properly tag a pdf. 
Tagged PDFs are one major requirement for accessibility.


Indeed, in several large organizations/universities, accessibility is 
mandated by law, and this is a major obstacle for using Tex. In practice 
compliance is often assessed with Acrobat Pro's

accessibility checker.

Context produces a nice tag-structure, but there are some minor issues 
that prevent compliance to [1], and hence Acrobat Pro complains during 
the check. The main issues are:


1.) Elements that are not contained in the structure tree are not marked 
as an artifact. Consider this example:


---
\setuptagging[state=start]

\setuppagenumbering
[location=,
 alternative=doublesided]

\setupheadertexts
  [{Chapter~\getmarking[chapternumber]\hskip1em\getmarking[chapter]}]
  [{Header Right}]
  [{Header Left}]
  [{Chapter~\getmarking[chapternumber]\hskip1em\getmarking[chapter]}]

\setupfootertexts
  [Organization Name]
  [pagenumber]
  [pagenumber]
  [Organization Name]

\starttext
\startfrontmatter
something
\stopfrontmatter

\startbodymatter
some more text here
\stopbodymatter
\stoptext
---

Header, footer, pagenumber etc. will not be included in the tag 
structure. Of course this makes absolutely sense and is correct, however 
according to Section 14.8.2.2.2 of [1], then this content that is not in 
the structure tree should be marked as an artifact, i.e.


/Artifact
  BMC
  ..
  EMC

or in an advanced way with /Artifact PropertyList where the type of 
Artifact can be defined. It would be nice if those elements that are not 
included in the tag tree would be marked as artifacts by default. The 
same holds for \startelement[ignore] when one wants to explicitly remove 
something from the structure tree.


2.) Images without alternate text:
According to Section 14.9.3 of [1], alternate descriptions in human 
readable text should be provided for images. It would be really helpful,

if these could be defined in the source tex file, and then automatically
added when creating the object in the structure tree. I.e. it would be
nice to have something like:

\placefigure[top][Image Reference]{Caption}{
\externalfigure[cow.pdf][width=10cm][alternate text = This images shows 
a beautiful cow.]

}

The same holds for formulas: Whereas the mathml-like tagging of Context 
is very advanced, sometimes it might be still helpful to supply a 
textual description (alt-text =The definition of the Pythagorean 
theorem: a^2 + b^2 = c^2)


3.) Tag names of the resulting tag structure:
Section 14.8.4 of [1] defines standard structure types, such as H, 
P, Sect etc. Context creates a tag-tree that uses names directly 
representing the structure names of the context laguage, such as 
sectiontitle. This should however be mapped to something standard, 
such as H. Interestingly these mappings seem to have been considered 
in strc-tag.mkiv but I was unable to generate such a tagged pdf. 
Editing/Outcommenting things in strc-tag.mkiv didn't work for me. It 
would be nice if there was a switch somewhere, i.e. 
\setuptagging[state=start,tagnames=pdf17] - or maybe I overlooked something?


4.) Acrobat Pro always complains that the language for the whole 
document is not set.


5.) Tables
The generated structure looks something like this:
table
 tablerow
   tablecell
   ...
 tablerow
   tablecell
 ...

Here, not only are the tag names non-compliant, also the tag structure
should distinguish between the table header (THead), and table rows 
(TBody), c.f. Section 14.8.4.3.1 of [1]. A simple heuristic would be
to always put the first line into THead tags, and the rest of the able 
into TBody.


6.) It would be nice if a flat tag structure could be created 
optionally. This is not a required feature according to [1], and in fact 
a properly nested structure is surely preferable for the final output; 
for debugging or checking during document creation however, a flat 
structure tree sometimes is easier to browse through.


All in all, these seem to be the only issues that prevent accessible PDF 
documents with context. For those within an organization where 
accessibility is required legally for all publications, compliance to at 
least Acrobat Pro's checks is a huge issue. I do not know how difficult 
these things are to implement in Context (personally I am just lost in 
the code), but looking at e.g. tex.stackexchange
for question related to accessibility, this is indeed a major obstacle 
for several people.


cheers

- Dominik


[1] ISO 32000-1:2008, available at
http://www.adobe.com/devnet/pdf/pdf_reference.html
___
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

Re: [NTG-context] Accessibility and Tagged PDFs: Bugs and Feature Requests

2015-06-30 Thread luigi scarso
On Sun, Jun 28, 2015 at 12:59 PM, Dr. Dominik Klein 
dominik.kl...@outlook.com wrote:

 Context is the only Tex-based system that allows to properly tag a pdf.
 Tagged PDFs are one major requirement for accessibility.

 Indeed, in several large organizations/universities, accessibility is
 mandated by law, and this is a major obstacle for using Tex. In practice
 compliance is often assessed with Acrobat Pro's
 accessibility checker.

 Context produces a nice tag-structure, but there are some minor issues
 that prevent compliance to [1], and hence Acrobat Pro complains during the
 check. The main issues are:

 1.) Elements that are not contained in the structure tree are not marked
 as an artifact. Consider this example:

 ---
 \setuptagging[state=start]

 \setuppagenumbering
 [location=,
  alternative=doublesided]

 \setupheadertexts
   [{Chapter~\getmarking[chapternumber]\hskip1em\getmarking[chapter]}]
   [{Header Right}]
   [{Header Left}]
   [{Chapter~\getmarking[chapternumber]\hskip1em\getmarking[chapter]}]

 \setupfootertexts
   [Organization Name]
   [pagenumber]
   [pagenumber]
   [Organization Name]

 \starttext
 \startfrontmatter
 something
 \stopfrontmatter

 \startbodymatter
 some more text here
 \stopbodymatter
 \stoptext
 ---

 Header, footer, pagenumber etc. will not be included in the tag structure.
 Of course this makes absolutely sense and is correct, however according to
 Section 14.8.2.2.2 of [1], then this content that is not in the structure
 tree should be marked as an artifact, i.e.

 /Artifact
   BMC
   ..
   EMC

 or in an advanced way with /Artifact PropertyList where the type of
 Artifact can be defined. It would be nice if those elements that are not
 included in the tag tree would be marked as artifacts by default. The same
 holds for \startelement[ignore] when one wants to explicitly remove
 something from the structure tree.

 2.) Images without alternate text:
 According to Section 14.9.3 of [1], alternate descriptions in human
 readable text should be provided for images. It would be really helpful,
 if these could be defined in the source tex file, and then automatically
 added when creating the object in the structure tree. I.e. it would be
 nice to have something like:

 \placefigure[top][Image Reference]{Caption}{
 \externalfigure[cow.pdf][width=10cm][alternate text = This images shows a
 beautiful cow.]
 }

 The same holds for formulas: Whereas the mathml-like tagging of Context is
 very advanced, sometimes it might be still helpful to supply a textual
 description (alt-text =The definition of the Pythagorean theorem: a^2 +
 b^2 = c^2)

 3.) Tag names of the resulting tag structure:
 Section 14.8.4 of [1] defines standard structure types, such as H, P,
 Sect etc. Context creates a tag-tree that uses names directly
 representing the structure names of the context laguage, such as
 sectiontitle. This should however be mapped to something standard, such
 as H. Interestingly these mappings seem to have been considered in
 strc-tag.mkiv but I was unable to generate such a tagged pdf.
 Editing/Outcommenting things in strc-tag.mkiv didn't work for me. It would
 be nice if there was a switch somewhere, i.e.
 \setuptagging[state=start,tagnames=pdf17] - or maybe I overlooked something?

 4.) Acrobat Pro always complains that the language for the whole document
 is not set.

 5.) Tables
 The generated structure looks something like this:
 table
  tablerow
tablecell
...
  tablerow
tablecell
  ...

 Here, not only are the tag names non-compliant, also the tag structure
 should distinguish between the table header (THead), and table rows
 (TBody), c.f. Section 14.8.4.3.1 of [1]. A simple heuristic would be
 to always put the first line into THead tags, and the rest of the able
 into TBody.

 6.) It would be nice if a flat tag structure could be created optionally.
 This is not a required feature according to [1], and in fact a properly
 nested structure is surely preferable for the final output; for debugging
 or checking during document creation however, a flat structure tree
 sometimes is easier to browse through.

 All in all, these seem to be the only issues that prevent accessible PDF
 documents with context. For those within an organization where
 accessibility is required legally for all publications, compliance to at
 least Acrobat Pro's checks is a huge issue. I do not know how difficult
 these things are to implement in Context (personally I am just lost in the
 code), but looking at e.g. tex.stackexchange
 for question related to accessibility, this is indeed a major obstacle for
 several people.

 cheers

 - Dominik


 [1] ISO 32000-1:2008, available at
 http://www.adobe.com/devnet/pdf/pdf_reference.html

 ___




Thank you for the report .
It would be nice to have a pdf made by context using \nopdfcompression
that have all

Re: [NTG-context] Virtual font question

2015-06-24 Thread Zhichu Chen

Hi everybody,

I finally got my typescript work. It was the serif typeface that 
failed me. When I defined the fixed size type:

===
\definetypeface [mathtimespro] [rm] [serif] [times] [default]
\definetypeface [mathtimespro] [ss] [sans] [helvetica] 
[default] [rscale=0.9]
\definetypeface [mathtimespro] [tt] [mono] [courier]   
[default] [rscale=1.1]
\definetypeface [mathtimespro] [mm] [math] [mathtimespro]
[default]

===
where mathtimespro in the last line was defined as:
===
\definefontsynonym [MathTimeProA-Regular] 
[MTP06A-Regular@mtpro06a-regular]

===
Everything was fine. But the designsize version needs to be:
===
\definetypeface [mathtimespro] [rm] [serif] [times] 
[default][designsize=auto]
\definetypeface [mathtimespro] [ss] [sans]  [helvetica] 
[default] [rscale=0.9]
\definetypeface [mathtimespro] [tt] [mono]  [courier] [default] 
[rscale=1.1]
\definetypeface [mathtimespro] [mm] [math] [mathtimespro]
[default][designsize=auto]

===
Without the last parameter in the serif definition, the math font could 
not be remapped (WHY???).


Fix me if I'm wrong about this conclusion.


Best regards,
Zhichu

On 06/23/2015 01:20 PM, Zhichu Chen wrote:

Hi Aditya,


On 06/23/2015 11:57 AM, Aditya Mahajan wrote:
I don't have the fonts, so I cannot describe the exact method. But 
see below and also have a look at Section 5 of
https://www.tug.org/TUGboat/tb30-2/tb95mahajan-cmath.pdf The 
description is old, and some of the file locations have changes, but 
the basic infrastructure is still the same.

Thank you for sharing this article. It seems that the
===
return {
mathematics = {
mapfiles = {
mtpro2.map,
},
virtuals = {
[mtpro06a-regular] = {
...
===
codes may have done the job in the mathematics.make_font function.

In this snippet:
===
\definefontsynonym
  [LMMathRoman10-Regular]
  [LMMath10-Regular@lmroman10-math]
===
I know that LMMathRoman10-Regular will be used as the font synonym, 
@lmroman10-math is the
virtual font, but what does LMMath10-Regular stand for? I chose some 
random names in my typescript

but maybe there's some magic there?
The vectors mptpro2-mi etc are not defined. Look at math-ttv.lua for 
a list of predefined vectors (mapping type1 fonts to unicode symbols. 
It is quite likely that the mtpro fonts would follow the standard 
mappings; if not, you will need to create an approrpriate mapping for 
each font. This is not difficult (just monotonous).
I've already defined these vectors in the same .lfg file. What a 
tedious work it was, by the way. I thought
that would be irrelevant, so I skipped those codes. I'm sorry I didn't 
make that clear.


I almost forgot to mention. The font has its own \Relbar and \relbar 
characters rather than the equality
and the dash marks. What is the best way to use them? I currently put 
them in a private-use-area slot

in the vectors' definitions, but I'm not sure that's a good solution.



===
I guess the suffixes f s and t may correspond to five 
seven and ten, but that's
not important. I could use one of them as the virtual font in the 
typescript:


Once this is done, rest of the typescript should work. It may be a 
good idea to try to see if you can get roman letters from mtpro.

If I claimed the font synonym with the virtual font directly:
===
# typescripts
\definefontsynonym [\s!MathRoman] [MTPro10a-Regular@mtpro10a-regular]
===
the 10-size-version fonts were loaded without any problem. But if I 
want to use the designsize feature:

===
-- lfg
designsizes = {
[MathTimeProA-Regular] = {
[4pt]  = MTPro06a-Regular@mtpro06a-regular,
[5pt]  = MTPro06a-Regular@mtpro06a-regular,
[6pt]  = MTPro06a-Regular@mtpro06a-regular,
...
# typescripts
\definefontsynonym [\s!MathRoman] [\v!file:mathtimeproa-regular]
===
the mathtimeproa-regular font could not be remapped to the correct 
virtual font with the appropriate size.
I

[NTG-context] Virtual font question

2015-06-22 Thread Zhichu Chen

Hello list,

I was trying to use the Math Times Pro 2 fonts in ConTeXt MKIV. This 
Type1 font
contains a map file, a set of pfb files and the corresponding tfm files. 
I was managed

to write a .lfg file and a type-imp-xxx file, but here's my problem.

The font comes with three different sizes, the virtual fonts in my .lfg 
file look like:

===
virtuals = {
[mtpro06a-regular] = {
{ name = file:texgyretermes-regular.otf, features = 
virtualmath, main = true },
{ name = mt2mif.tfm, vector = mtpro2-mi, 
skewchar=0x7F },
{ name = mt2syf.tfm, vector = mtpro2-sy, 
skewchar=0x30, parameters = true },
{ name = mt2mbf.tfm, vector = mtpro2-mb, 
skewchar=0x7F },
{ name = mt2syaf.tfm, vector = mtpro2-sya, 
skewchar=0x7F },
{ name = mt2bbf.tfm, vector = mtpro2-bb, 
skewchar=0x7F },
{ name = mt2msf.tfm, vector = mtpro2-mca, 
skewchar=0x7F },
{ name = mt2bmsf.tfm, vector = mtpro2-bmca, 
skewchar=0x7F },
{ name = mt2mff.tfm, vector = mtpro2-mfa, 
skewchar=0x7F },
{ name = mt2bmff.tfm, vector = mtpro2-bmfa, 
skewchar=0x7F },
{ name = mt2bbif.tfm, vector = mtpro2-bbi, 
skewchar=0x7F },

},
[mtpro08a-regular] = {
{ name = file:texgyretermes-regular.otf, features = 
virtualmath, main = true },
{ name = mt2mis.tfm, vector = mtpro2-mi, 
skewchar=0x7F },
{ name = mt2sys.tfm, vector = mtpro2-sy, 
skewchar=0x30, parameters = true },
{ name = mt2mbs.tfm, vector = mtpro2-mb, 
skewchar=0x7F },
{ name = mt2syas.tfm, vector = mtpro2-sya, 
skewchar=0x7F },
{ name = mt2bbs.tfm, vector = mtpro2-bb, 
skewchar=0x7F },
{ name = mt2mss.tfm, vector = mtpro2-mca, 
skewchar=0x7F },
{ name = mt2bmss.tfm, vector = mtpro2-bmca, 
skewchar=0x7F },
{ name = mt2mfs.tfm, vector = mtpro2-mfa, 
skewchar=0x7F },
{ name = mt2bmfs.tfm, vector = mtpro2-bmfa, 
skewchar=0x7F },
{ name = mt2bbis.tfm, vector = mtpro2-bbi, 
skewchar=0x7F },

},
[mtpro10a-regular] = {
{ name = file:texgyretermes-regular.otf, features = 
virtualmath, main = true },
{ name = mt2mit.tfm, vector = mtpro2-mi, 
skewchar=0x7F },
{ name = mt2syt.tfm, vector = mtpro2-sy, 
skewchar=0x30, parameters = true },
{ name = mt2mbt.tfm, vector = mtpro2-mb, 
skewchar=0x7F },
{ name = mt2syat.tfm, vector = mtpro2-sya, 
skewchar=0x7F },
{ name = mt2bbt.tfm, vector = mtpro2-bb, 
skewchar=0x7F },
{ name = mt2mst.tfm, vector = mtpro2-mca, 
skewchar=0x7F },
{ name = mt2bmst.tfm, vector = mtpro2-bmca, 
skewchar=0x7F },
{ name = mt2mft.tfm, vector = mtpro2-mfa, 
skewchar=0x7F },
{ name = mt2bmft.tfm, vector = mtpro2-bmfa, 
skewchar=0x7F },
{ name = mt2bbit.tfm, vector = mtpro2-bbi, 
skewchar=0x7F },

},
===
I guess the suffixes f s and t may correspond to five seven 
and ten, but that's
not important. I could use one of them as the virtual font in the 
typescript:

===
\definefontsynonym [\s!MathRoman] [MTPro10a-Regular@mtpro10a-regular]
===
The output pdf used the 10-size font as expected.

I stole some codes from lm.lfg and added the following code:
===
designsizes = {
[MathTimeProA-Regular] = {
[4pt]  = MTPro06a-Regular@mtpro06a-regular,
[5pt]  = MTPro06a-Regular@mtpro06a-regular,
[6pt]  = MTPro06a-Regular@mtpro06a-regular,
[7pt]  = MTPro08a-Regular@mtpro08a-regular,
[8pt]  = MTPro08a-Regular@mtpro08a-regular,
[9pt]  = MTPro08a-Regular@mtpro08a-regular,
[10pt] = MTPro10a-Regular@mtpro10a-regular,
[11pt] = MTPro10a-Regular@mtpro10a-regular,
[12pt] = MTPro10a-Regular@mtpro10a-regular,
default  = MTPro10a-Regular@mtpro10a-regular
},
===
and modified the typescript:
===
\definefontsynonym [\s!MathRoman] [\v!name:MathTimeProA-Regular] 
[\s!goodies=math-times-pro-math]

===
It failed as expected:
===
fontsdefining  start stage one: MathRoman mo 1
fontsdefining  specification 'MathRoman

Re: [NTG-context] Virtual font question

2015-06-22 Thread Aditya Mahajan

On Tue, 23 Jun 2015, Zhichu Chen wrote:

I was trying to use the Math Times Pro 2 fonts in ConTeXt MKIV. This 
Type1 font contains a map file, a set of pfb files and the corresponding 
tfm files. I was managed to write a .lfg file and a type-imp-xxx file, 
but here's my problem.


I don't have the fonts, so I cannot describe the exact method. But see 
below and also have a look at Section 5 of
https://www.tug.org/TUGboat/tb30-2/tb95mahajan-cmath.pdf The description 
is old, and some of the file locations have changes, but the basic 
infrastructure is still the same.


The font comes with three different sizes, the virtual fonts in my .lfg 
file look like:

===
virtuals = {
[mtpro06a-regular] = {
{ name = file:texgyretermes-regular.otf, features = 
virtualmath, main = true },
{ name = mt2mif.tfm, vector = mtpro2-mi, 
skewchar=0x7F },

[...]

},


The vectors mptpro2-mi etc are not defined. Look at math-ttv.lua for a 
list of predefined vectors (mapping type1 fonts to unicode symbols. It is 
quite likely that the mtpro fonts would follow the standard mappings; if 
not, you will need to create an approrpriate mapping for each font. This 
is not difficult (just monotonous).



===
I guess the suffixes f s and t may correspond to five seven 
and ten, but that's
not important. I could use one of them as the virtual font in the 
typescript:


Once this is done, rest of the typescript should work. It may be a good 
idea to try to see if you can get roman letters from mtpro.


Aditya
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Virtual font question

2015-06-22 Thread Zhichu Chen

Hi Aditya,


On 06/23/2015 11:57 AM, Aditya Mahajan wrote:
I don't have the fonts, so I cannot describe the exact method. But see 
below and also have a look at Section 5 of
https://www.tug.org/TUGboat/tb30-2/tb95mahajan-cmath.pdf The 
description is old, and some of the file locations have changes, but 
the basic infrastructure is still the same.

Thank you for sharing this article. It seems that the
===
return {
mathematics = {
mapfiles = {
mtpro2.map,
},
virtuals = {
[mtpro06a-regular] = {
...
===
codes may have done the job in the mathematics.make_font function.

In this snippet:
===
\definefontsynonym
  [LMMathRoman10-Regular]
  [LMMath10-Regular@lmroman10-math]
===
I know that LMMathRoman10-Regular will be used as the font synonym, 
@lmroman10-math is the
virtual font, but what does LMMath10-Regular stand for? I chose some 
random names in my typescript

but maybe there's some magic there?
The vectors mptpro2-mi etc are not defined. Look at math-ttv.lua for a 
list of predefined vectors (mapping type1 fonts to unicode symbols. It 
is quite likely that the mtpro fonts would follow the standard 
mappings; if not, you will need to create an approrpriate mapping for 
each font. This is not difficult (just monotonous).
I've already defined these vectors in the same .lfg file. What a tedious 
work it was, by the way. I thought
that would be irrelevant, so I skipped those codes. I'm sorry I didn't 
make that clear.


I almost forgot to mention. The font has its own \Relbar and \relbar 
characters rather than the equality
and the dash marks. What is the best way to use them? I currently put 
them in a private-use-area slot

in the vectors' definitions, but I'm not sure that's a good solution.



===
I guess the suffixes f s and t may correspond to five seven 
and ten, but that's
not important. I could use one of them as the virtual font in the 
typescript:


Once this is done, rest of the typescript should work. It may be a 
good idea to try to see if you can get roman letters from mtpro.

If I claimed the font synonym with the virtual font directly:
===
# typescripts
\definefontsynonym [\s!MathRoman] [MTPro10a-Regular@mtpro10a-regular]
===
the 10-size-version fonts were loaded without any problem. But if I want 
to use the designsize feature:

===
-- lfg
designsizes = {
[MathTimeProA-Regular] = {
[4pt]  = MTPro06a-Regular@mtpro06a-regular,
[5pt]  = MTPro06a-Regular@mtpro06a-regular,
[6pt]  = MTPro06a-Regular@mtpro06a-regular,
...
# typescripts
\definefontsynonym [\s!MathRoman] [\v!file:mathtimeproa-regular]
===
the mathtimeproa-regular font could not be remapped to the correct 
virtual font with the appropriate size.
I just want to know how type-imp-ebgaramond.mkiv managed to remap the 
designsize filename

file:ebgaramond-regular to file:EBGaramond12-Regular.


Aditya
___ 

If your question is of interest to others as well, please add an entry 
to the Wiki!


maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context

webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


___
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] selecting font by (file) name

2015-06-12 Thread Thad Heltemes
Pablo,

I had a similar problem with the IM Fell fonts, here's what I had in my
file to get ConTeXt to see them:

\definefontfamily[mainface][serif][IMFellEnglishProRoman][tf=file:IMFEENRM29C.otf,
it=file:IMFEENIT29C.otf]

so I think you just need to add a tf= in front of the file declaration.

On Fri, Jun 12, 2015 at 1:01 PM, Pablo Rodriguez oi...@gmx.es wrote:

 Dear list,

 I have the following sample:

 \definefontfamily
 [mainface]
 [rm]
 [TeX Gyre Pagella]

 \definefontfamily
 [mainface]
 [tt]
 %~ [file:lmmonoproplt10-regular.otf]
 [name:lmmonoproplt10regular]

 \setupbodyfont
 [mainface]

 \starttext
 \type{monospace font}
 \stoptext

 Either by file or name, I’m not able to select the font.

 I get the following list from mtxrunjit:

 $ mtxrunjit --script font --list --file --pattern=lmmonoproplt10regular

 latinmodernmonoproplight   light   normal   normal   normal
 lmmonoproplt10regular   lmmonoproplt10-regular.otf

 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

 ___




-- 
Thad Heltemes, Ph.D.

http://theltemes.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] selecting font by (file) name

2015-06-12 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\definefontfamily
[mainface]
[rm]
[TeX Gyre Pagella]

\definefontfamily
[mainface]
[tt]
%~ [file:lmmonoproplt10-regular.otf]
[name:lmmonoproplt10regular]

\setupbodyfont
[mainface]

\starttext
\type{monospace font}
\stoptext

Either by file or name, I’m not able to select the font.

I get the following list from mtxrunjit:

$ mtxrunjit --script font --list --file --pattern=lmmonoproplt10regular

latinmodernmonoproplight   light   normal   normal   normal
lmmonoproplt10regular   lmmonoproplt10-regular.otf

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

2015-06-09 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

thank you, that's great.

One more question - how to use another symbol, bigstar (see symbols-a4.pdf 
or the attached image)?

I tried the following code, but with no success:


\starttext
Ttt \symbol[bigstar]

Aaa \bigstar

Bbb \symbol[mathabx][bigstar]

\stoptext


Best regards,

Lukas


On Tue, 09 Jun 2015 11:02:05 +0200, Wolfgang Schuster 
schuster.wolfg...@gmail.com wrote:




Am 09.06.2015 um 09:21 schrieb Procházka Lukáš Ing. - Pontex s. r. o. 
l...@pontex.cz:

Hello,

how to typeset centerd asterisk (*) in Ctx?

I mean the symbol which is used in the third level of itemization 
(http://wiki.contextgarden.net/Enumerations) or which can be typeset by 
\textasteriskcentered in LaTeX.

(I cannot find the symbol definition in Ctx itemize-command definition (source files) and 
simple writing \textasteriskcentered doesn't work.)


The symbols in different itemise levels can be shown with \symbol[1], 
\symbol[2] etc. but since these numbered symbols can be redefined it is better 
to use the named symbol to access the star with \symbol[star].

The following example shows a few of the predefined symbols.

\starttext

\starttabulate[|l|c|]
\NC \bf Command \NC \bf Symbol   \NC\NR
\TB
\NC \type{\symbol[1]}   \NC \symbol[1]   \NC\NR
\NC \type{\symbol[2]}   \NC \symbol[2]   \NC\NR
\NC \type{\symbol[3]}   \NC \symbol[3]   \NC\NR
\NC \type{\symbol[4]}   \NC \symbol[4]   \NC\NR
\NC \type{\symbol[5]}   \NC \symbol[5]   \NC\NR
\NC \type{\symbol[6]}   \NC \symbol[6]   \NC\NR
\NC \type{\symbol[7]}   \NC \symbol[7]   \NC\NR
\NC \type{\symbol[8]}   \NC \symbol[8]   \NC\NR
\TB
\NC \type{\symbol[bullet]}  \NC \symbol[bullet]  \NC\NR
\NC \type{\symbol[dash]}\NC \symbol[dash]\NC\NR
\NC \type{\symbol[star]}\NC \symbol[star]\NC\NR
\NC \type{\symbol[triangle]}\NC \symbol[triangle]\NC\NR
\NC \type{\symbol[circle]}  \NC \symbol[circle]  \NC\NR
\NC \type{\symbol[square]}  \NC \symbol[square]  \NC\NR
\NC \type{\symbol[diamond]} \NC \symbol[diamond] \NC\NR
\TB
\NC \type{\symbol[smallcircle]} \NC \symbol[smallcircle] \NC\NR
\NC \type{\symbol[medcircle]}   \NC \symbol[medcircle]   \NC\NR
\NC \type{\symbol[bigcircle]}   \NC \symbol[bigcircle]   \NC\NR
\stoptabulate

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



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

t-Ast.mkiv
Description: Binary data
___
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] Asterisk

2015-06-09 Thread Wolfgang Schuster

 Am 09.06.2015 um 09:21 schrieb Procházka Lukáš Ing. - Pontex s. r. o. 
 l...@pontex.cz:
 
 Hello,
 
 how to typeset centerd asterisk (*) in Ctx?
 
 I mean the symbol which is used in the third level of itemization 
 (http://wiki.contextgarden.net/Enumerations) or which can be typeset by 
 \textasteriskcentered in LaTeX.
 
 (I cannot find the symbol definition in Ctx itemize-command definition 
 (source files) and simple writing \textasteriskcentered doesn't work.)

The symbols in different itemise levels can be shown with \symbol[1], 
\symbol[2] etc. but since these numbered symbols can be redefined it is better 
to use the named symbol to access the star with \symbol[star].

The following example shows a few of the predefined symbols.

\starttext

\starttabulate[|l|c|]
\NC \bf Command \NC \bf Symbol   \NC\NR
\TB
\NC \type{\symbol[1]}   \NC \symbol[1]   \NC\NR
\NC \type{\symbol[2]}   \NC \symbol[2]   \NC\NR
\NC \type{\symbol[3]}   \NC \symbol[3]   \NC\NR
\NC \type{\symbol[4]}   \NC \symbol[4]   \NC\NR
\NC \type{\symbol[5]}   \NC \symbol[5]   \NC\NR
\NC \type{\symbol[6]}   \NC \symbol[6]   \NC\NR
\NC \type{\symbol[7]}   \NC \symbol[7]   \NC\NR
\NC \type{\symbol[8]}   \NC \symbol[8]   \NC\NR
\TB
\NC \type{\symbol[bullet]}  \NC \symbol[bullet]  \NC\NR
\NC \type{\symbol[dash]}\NC \symbol[dash]\NC\NR
\NC \type{\symbol[star]}\NC \symbol[star]\NC\NR
\NC \type{\symbol[triangle]}\NC \symbol[triangle]\NC\NR
\NC \type{\symbol[circle]}  \NC \symbol[circle]  \NC\NR
\NC \type{\symbol[square]}  \NC \symbol[square]  \NC\NR
\NC \type{\symbol[diamond]} \NC \symbol[diamond] \NC\NR
\TB
\NC \type{\symbol[smallcircle]} \NC \symbol[smallcircle] \NC\NR
\NC \type{\symbol[medcircle]}   \NC \symbol[medcircle]   \NC\NR
\NC \type{\symbol[bigcircle]}   \NC \symbol[bigcircle]   \NC\NR
\stoptabulate

\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] Bugs with minimals 2015.05.24 12:42

2015-06-02 Thread Mojca Miklavec
On Tue, Jun 2, 2015 at 2:26 PM, david.boerschl...@juno.com wrote:

 (*) tex errorerror on line 1 in file 
 /var/www/vhosts/door43.org/tools/nototest.tex: ! Undefined control sequence
 l.1 \useregime
 [utf]
 1   \useregime[utf]
 2 \enableregime[utf]
 Version: 2015.05.24 12:42

If you are using MkII (that is: if you are running texexec), you should use
\enableregime[utf-8]

If you use LuaTeX, there's no need to enable UTF-8. It's already the default.

 (*) Upgrading with first-setup.sh deleted all the third-party fonts which 
 we had spent months installing.

I'm sorry to hear that.

The idea is to install fonts to
texmf-local
or
texmf-fonts
or
texmf-project
or somewhere else. But the files get removed from texmf,
texmf-context, texmf-modules etc.

I'm sorry that that wasn't clear (or maybe not even mentioned) in the
documentation.

 (*) Installing the context=current installed a beta version of luatex:
 context --version
 mtx-context | current version: 2015.05.24 12:42
 luatex --version
 This is LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev 5238)

A non-beta version of LuaTeX doesn't exist.

 (*) http://tug.org/pracjourn/2005-2/schmitz/schmitz.pdf (none of the commands 
 texfont, ttf2afm, updmap, come with the latest ConTeXt minimals 2015.05.24 
 12:42) [Is this really the up-to-date documentation on how to install a 
 true-type font?]It does not seem to discuss what to do if all we have is 
 an .otf but no .ttf

The documentation is from 2005 as the URL suggests. So no, it's not
up-to-date. Use LuaTeX instead and you can forget about dirty
workarounds to get the fonts to work.

 (*) Documentation request: typescripts for ttf and otf files which may or 
 may not have bold, italics, etc with fallback-families and Unicode ranges and 
 separate files for Unicode-ranges (e.g., Google Noto fonts).

This is all possible (it might require a bit of work to get everything
set up properly), but you should definitely switch to LuaTeX.

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
___

[NTG-context] Bugs with minimals 2015.05.24 12:42

2015-06-02 Thread david.boerschl...@juno.com

(*) tex errorerror on line 1 in file 
/var/www/vhosts/door43.org/tools/nototest.tex: ! Undefined control sequence
l.1 \useregime
[utf]
1   \useregime[utf]
2 \enableregime[utf]
Version: 2015.05.24 12:42

(*) Upgrading with first-setup.sh deleted all the third-party fonts which we 
had spent months installing.

(*) Installing the context=current installed a beta version of luatex:
context --version
mtx-context | current version: 2015.05.24 12:42
luatex --version
This is LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev 5238)

(*) http://tug.org/pracjourn/2005-2/schmitz/schmitz.pdf (none of the commands 
texfont, ttf2afm, updmap, come with the latest ConTeXt minimals 2015.05.24 
12:42) [Is this really the up-to-date documentation on how to install a 
true-type font?]It does not seem to discuss what to do if all we have is an 
.otf but no .ttf

(*) Documentation request: typescripts for ttf and otf files which may or 
may not have bold, italics, etc with fallback-families and Unicode ranges and 
separate files for Unicode-ranges (e.g., Google Noto fonts).

David Boerschlein
(214) 412-3275 home office land
(585) 278-4687 cell
www.linkedin.com/in/davidboerschlein

Old School Yearbook Pics
View Class Yearbooks Online Free. Search by School  Year. Look Now!
http://thirdpartyoffers.juno.com/TGL3141/556da14029abe214072e9st01duc
___
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] Bugs with minimals 2015.05.24 12:42

2015-06-02 Thread Hans Hagen

On 6/2/2015 2:26 PM, david.boerschl...@juno.com wrote:


(*) tex errorerror on line 1 in file 
/var/www/vhosts/door43.org/tools/nototest.tex: ! Undefined control sequence
 l.1 \useregime
 [utf]
 1   \useregime[utf]
 2 \enableregime[utf]
 Version: 2015.05.24 12:42

(*) Upgrading with first-setup.sh deleted all the third-party fonts which we 
had spent months installing.


If you install extra fonts and files, you should put them in

tex/texmf-fonts
tex/texmf-project

as these are left untouched. That has always been the recommendation. 
The other trees will be synchronized in an update and that also includes 
deleting obsolete files.



(*) Installing the context=current installed a beta version of luatex:
 context --version
 mtx-context | current version: 2015.05.24 12:42
 luatex --version
 This is LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev 5238)

(*) http://tug.org/pracjourn/2005-2/schmitz/schmitz.pdf (none of the commands texfont, ttf2afm, 
updmap, come with the latest ConTeXt minimals 2015.05.24 12:42) [Is this really the up-to-date 
documentation on how to install a true-type font?]It does not seem to discuss what to do if all 
we have is an .otf but no .ttf

(*) Documentation request: typescripts for ttf and otf files which may or 
may not have bold, italics, etc with fallback-families and Unicode ranges and separate files for 
Unicode-ranges (e.g., Google Noto fonts).


you can put the fonts in

tex/texmf-fonts/fonts/data/someplace

and run

mtxrun --generate

and then try the selectfont command

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] Environment \starttikzpicture \stoptikzpicture like float

2015-05-24 Thread Hans Hagen

On 5/24/2015 2:36 PM, Aditya Mahajan wrote:




On May 24, 2015, at 5:48 AM, Mojca Miklavec mojca.miklavec.li...@gmail.com 
wrote:


On Sun, May 24, 2015 at 11:20 AM, Fabrice Couvreur wrote:

Hi,
Why the command \placerecipe{}{} does not with an environment
\starttikzpicture
\stoptikzpicture ?


In my opinion this is a bug in TikZ that has been pointed out a
while ago already. The picture creates a wrong type of the box. If I
remember correctly the behaviour is different in LaTeX.

An easy workaround (that I always use) is to enclose the graphic into
an \hbox{}, like this:

\hbox{\starttikzpicture
...
% content
...
\stoptikzpicture}

(With \placefigure or \placerecipe or whatever used as usual before
the \hbox{}.)

We might want to coordinate a patch with the TikZ team.


Yes, it is a two line change in t-tikz that would not affect the latex or plain 
tex behavior.


it all depends how sensitive the environment is with respect to spaces 
as unwanted one can creep in when in horizontal mode


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] Environment \starttikzpicture \stoptikzpicture like float

2015-05-24 Thread Aditya Mahajan


 On May 24, 2015, at 5:48 AM, Mojca Miklavec mojca.miklavec.li...@gmail.com 
 wrote:
 
 On Sun, May 24, 2015 at 11:20 AM, Fabrice Couvreur wrote:
 
 Hi,
 Why the command \placerecipe{}{} does not with an environment
 \starttikzpicture
 \stoptikzpicture ?
 
 In my opinion this is a bug in TikZ that has been pointed out a
 while ago already. The picture creates a wrong type of the box. If I
 remember correctly the behaviour is different in LaTeX.
 
 An easy workaround (that I always use) is to enclose the graphic into
 an \hbox{}, like this:
 
 \hbox{\starttikzpicture
 ...
 % content
 ...
 \stoptikzpicture}
 
 (With \placefigure or \placerecipe or whatever used as usual before
 the \hbox{}.)
 
 We might want to coordinate a patch with the TikZ team.

Yes, it is a two line change in t-tikz that would not affect the latex or plain 
tex behavior. 

Aditya 
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Environment \starttikzpicture \stoptikzpicture like float

2015-05-24 Thread Mojca Miklavec
On Sun, May 24, 2015 at 11:20 AM, Fabrice Couvreur wrote:

 Hi,
 Why the command \placerecipe{}{} does not with an environment
 \starttikzpicture
 \stoptikzpicture ?

In my opinion this is a bug in TikZ that has been pointed out a
while ago already. The picture creates a wrong type of the box. If I
remember correctly the behaviour is different in LaTeX.

An easy workaround (that I always use) is to enclose the graphic into
an \hbox{}, like this:

\hbox{\starttikzpicture
...
% content
...
\stoptikzpicture}

(With \placefigure or \placerecipe or whatever used as usual before
the \hbox{}.)

We might want to coordinate a patch with the TikZ team.

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

2015-05-24 Thread Meer, H. van der
\startbuffer[the-table]
?xml version=1.0 encoding=UTF-8?
root
table
tbody
trtdA/td/tr
trtdB/td/tr
trtdC/td/tr
trtdD/td/tr
/tbody
/table
/root
\stopbuffer
\midaligned{\xmlprocessbuffer{root}{the-table}{}}
\blank
The equalsign (=) is added to \type{\startxmlsetups xmlcommon:tr} in order to 
show the spurious whitespace injected.
\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] simplefonts vs typescripts

2015-05-13 Thread Hans Hagen

On 5/13/2015 6:09 PM, david.boerschl...@juno.com wrote:

I am still not able to set up the Noto fonts due mostly to sketchy/lack-of 
documentation on setting up ConTeXt fonts.

I understand I need to set up typescripts but do not understand the syntax 
and/or semantics of the different commands and how to map the font names/paths 
(otf and ttf files) to reference them in the typescripts.   I would like to 
create a utility that will create the typescript file for MKIV from the otf/ttf 
files themselves.

Please provide me with any help/documentation.


In addition to wolfgangs mail: there is not much science involved in 
typescripts, just take another type-imp-*.mkiv file as example ...


type-imp-noto.mkiv :

\starttypescriptcollection[noto]

\starttypescript [serif] [noto] [name]
\setups[font:fallback:serif]
\definefontsynonym
   [Serif]
   [file:notowhatever.ttf]
   [features=default]
\definefontsynonym [SerifBold]
   [file:notowhateverbold.ttf]
   [features=default]
\definefontsynonym
   [SerifItalic]
   [file:notowhateveritalic.ttf]
   [features=default]
\definefontsynonym
  [SerifBoldItalic]
  [file:notowhateverbolditalic.ttf]
  [features=default]
\stoptypescript

\starttypescript[noto]
\definetypeface [noto] [rm] [serif] [noto]   [default]
\definetypeface [noto] [ss] [sans]  [dejavu] [default]
\definetypeface [noto] [tt] [mono]  [dejavu] [default]
\definetypeface [noto] [mm] [math]  [times]  [default]
\stoptypescript

\stoptypescriptcollection

\setupbodyfont[noto]

You need to figure out the right filenames yourself (not that hard as 
you downloaded them I assume). But simplefonts is less lines of code and 
you only need such a typescript if you want to have long term guarantees 
(as it depends less on heuristics)



-
  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] Verbatim text.

2015-05-12 Thread John Culleton
The inline string quoted below produces a correct
result but also generates an error message:
\type{8 1/2 x 11}

Is there a better way to handle this situation?

-- 
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
Updated PDF e-book: Create Book Covers with
Scribus 1.4.5 coming soon at
http://www.booklocker.com/!
___
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] Verbatim text.

2015-05-12 Thread Hans Hagen

On 5/12/2015 9:11 PM, John Culleton wrote:

The inline string quoted below produces a correct
result but also generates an error message:
\type{8 1/2 x 11}

Is there a better way to handle this situation?


what error

-
  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] Bleeding pictures as floats?

2015-05-04 Thread Henning Hraban Ramm
Hi, I hope BachoTeX was a success!

Is it possible to use the float placing mechanisms for pictures that go beyond 
the type area or even beyond the page?

In the book I’m typesetting, most pictures need to fill the whole width of the 
page (i.e. plus 3mm bleed), but not all cover a full page.

I don’t know how to tell \externalfigure or \placefloat a negative offset.
Or can I use layers with floats? Of course the text should flow around the 
pictures.

BTW, what does the „object“ key of \setupexternalfigures do?

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Bleeding pictures as floats?

2015-05-04 Thread Wolfgang Schuster

 Am 04.05.2015 um 12:53 schrieb Henning Hraban Ramm te...@fiee.net:
 
 Hi, I hope BachoTeX was a success!
 
 Is it possible to use the float placing mechanisms for pictures that go 
 beyond the type area or even beyond the page?
 
 In the book I’m typesetting, most pictures need to fill the whole width of 
 the page (i.e. plus 3mm bleed), but not all cover a full page.
 
 I don’t know how to tell \externalfigure or \placefloat a negative offset.
 Or can I use layers with floats? Of course the text should flow around the 
 pictures.

Does the details manual  [1] answer your questions?

[1] http://pragma-ade.com/show-man-27.htm 
http://pragma-ade.com/show-man-27.htm

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] Bleeding pictures as floats?

2015-05-04 Thread Henning Hraban Ramm
Am 2015-05-04 um 17:10 schrieb Wolfgang Schuster schuster.wolfg...@gmail.com:

 Is it possible to use the float placing mechanisms for pictures that go 
 beyond the type area or even beyond the page?
 
 In the book I’m typesetting, most pictures need to fill the whole width of 
 the page (i.e. plus 3mm bleed), but not all cover a full page.
 
 I don’t know how to tell \externalfigure or \placefloat a negative offset.
 Or can I use layers with floats? Of course the text should flow around the 
 pictures.
 
 Does the details manual  [1] answer your questions?
 
 [1] http://pragma-ade.com/show-man-27.htm

Thank you, that helped, but not enough.

I have now:

\def\bleed{3mm}
\def\maxWidth{\dimexpr(\paperwidth+\bleed)}

\definefloat[bleedfigure][figure]
\setupfloat[bleedfigure]
[
outermargindistance=-\bleed, % does that exist?
leftmargindistance=-\bleed,
rightmargindistance=-\bleed,
default={cutspace,none},
maxwidth=\maxWidth
]

\def\topfig#1#2{\placebleedfigure[top]{#1}{\offset[topoffset=\dimexpr(-\topspace-\bleed)]{\externalfigure[#2][width=\maxWidth]}}}

With that my pictures start at 0,-3mm, but they should start at -3mm,-3mm on a 
left page. Their maximum width is only \paperwidth, without bleed.
Where’s my mistake?

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] alternative numerical \cite command

2015-05-04 Thread Csikos Bela
Hello list members:

For inserting citations ConTeXt offers several \cite command alternatives.
If I understand correctly citations can be inserted like:

\cite[key], when the document's default cite type is used, or:

\cite[authoryear][key], \cite[author][key] etc., where the citation style is 
set by the first option.

These citation styles are predefined in context.

What I would like to do is inserting alternative numerical citations:
normal superscript citations, like this^1, and occasionally inline citations in 
brackets,
like this one [2]. How could I define alternative numerical citation style, e.g.
\cite[inum][key] on the analogy of author, authoryear etc. styles?

Thanks,

bcsikos
___
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] simplefonts vs typescripts

2015-05-04 Thread Hans Hagen

On 5/4/2015 6:26 PM, david.boerschl...@juno.com wrote:

I have been trying for weeks to set up the Google Noto fonts for ConTeXt.   I 
have tried (but do not understand all the syntax and parameters of) typescripts 
and simplefonts.

It seems that I probably should gravitate towards typescripts because the 
typescripts seem to be what comes with the distribution of other fonts.

Is there detailed documentation describing all the parameters in detail and 
giving examples?   All I found is some vague examples without any explanations 
in the contextgarden.net wiki.

Is there a tool that I can use to look at the .ttf or .otf file and discern the 
values I need to put into the typescripts?   Is there a tool to generate 
typescripts from the .ttf and/or .otf files or would one be easy for me to 
write in say Korn, Perl, or Python?

Please advise!


- if you know the names of the fonts simplefonts is the way for a fast setup

- otherwise you can look at e.g. type-imp-mscore and make a typescript 
(in mkiv normally only a few lines so having that scripted is (1) 
overkill and (2) duplicates simplefonts)


typescripts used with filenames are a robust way to be future proof as 
fonts can change (for the same reason even system fonts can be be copied 
to tex/texmf-fonts/fonts/data)


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] Bleeding pictures as floats?

2015-05-04 Thread Wolfgang Schuster

 Am 04.05.2015 um 13:54 schrieb Henning Hraban Ramm te...@fiee.net:
 
 Am 2015-05-04 um 17:10 schrieb Wolfgang Schuster 
 schuster.wolfg...@gmail.com:
 
 Is it possible to use the float placing mechanisms for pictures that go 
 beyond the type area or even beyond the page?
 
 In the book I’m typesetting, most pictures need to fill the whole width of 
 the page (i.e. plus 3mm bleed), but not all cover a full page.
 
 I don’t know how to tell \externalfigure or \placefloat a negative offset.
 Or can I use layers with floats? Of course the text should flow around the 
 pictures.
 
 Does the details manual  [1] answer your questions?
 
 [1] http://pragma-ade.com/show-man-27.htm
 
 Thank you, that helped, but not enough.
 
 I have now:
 
 \def\bleed{3mm}
 \def\maxWidth{\dimexpr(\paperwidth+\bleed)}

Use \definemeasure and \measure to set your own dimensions.

It is also bad style to redefine the \bleed command.

 \definefloat[bleedfigure][figure]
 \setupfloat[bleedfigure]
 [
 outermargindistance=-\bleed, % does that exist?
 leftmargindistance=-\bleed,
 rightmargindistance=-\bleed,
 default={cutspace,none},
 maxwidth=\maxWidth
 ]
 
 \def\topfig#1#2{\placebleedfigure[top]{#1}{\offset[topoffset=\dimexpr(-\topspace-\bleed)]{\externalfigure[#2][width=\maxWidth]}}}
 
 With that my pictures start at 0,-3mm, but they should start at -3mm,-3mm on 
 a left page. Their maximum width is only \paperwidth, without bleed.
 Where’s my mistake?

Can you make a working minimal example.

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] No hyphenation in Bulgarian

2015-05-03 Thread Thomas Floeren
Hi,

I have to typeset a Bulgarian document but the hyphenation doesn’t work. The 
lang-bg.lua file is not loaded, according to the log. (All four lang-bg files 
are present in /tex/texmf-context/tex/context/patterns/)

\usetypescriptfile[type-gentium]
\usetypescript[gentium]
\setupbodyfont[gentium,12pt]
\mainlanguage [bg]
\starttext
\hyphenatedword{програмираната}
\stoptext


Do I have to do anything special, in addition to \mainlanguage [bg] ?

Russian hyphenation does work.

Thanks for any advice.

-- 
Tom


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] No hyphenation in Bulgarian

2015-05-03 Thread Thomas Floeren
 Do I have to do anything special, in addition to \mainlanguage [bg] ?

In reply to my own question: 

It seems I must add

\installlanguage
[bg]
[lefthyphenmin=2,
righthyphenmin=2,
patterns=bg,
…
…]

-- 
Tom




 On 03 May 15, at 08:27, Thomas Floeren t...@mac.com wrote:
 
 Hi,
 
 I have to typeset a Bulgarian document but the hyphenation doesn’t work. The 
 lang-bg.lua file is not loaded, according to the log. (All four lang-bg files 
 are present in /tex/texmf-context/tex/context/patterns/)
 
 \usetypescriptfile[type-gentium]
 \usetypescript[gentium]
 \setupbodyfont[gentium,12pt]
 \mainlanguage [bg]
 \starttext
 \hyphenatedword{програмираната}
 \stoptext
 
 
 Do I have to do anything special, in addition to \mainlanguage [bg] ?
 
 Russian hyphenation does work.
 
 Thanks for any advice.
 
 -- 
 Tom
 
 
 ___
 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] Check the character after a macro

2015-05-01 Thread Otared Kavian
Hi,

You have several commands in ConTeXt doing what you are seeking to do: please 
look at the examples below:

%%% begin do-if-inset.tex
\starttext
\type{\doifinset{A}{A,B,C}{should go}:} \doifinset{A}{A,B,C}{should go}

\type{\doifinset{D}{A,B,C}{should go}:}  \doifinset{D}{A,B,C}{should 
participate}


\type{\doifnotinset{}{A,B,C}{not in the set}:} \doifnotinset{}{A,B,C}{not in 
the set}

\type{\doifnotinset{D}{A,B,C}{not in the set}:} \doifnotinset{D}{A,B,C}{not in 
the set}

\doifinsetelse{D}{A,B,C}{it is in the set}{it is not in the set}

\define\test{B}

\type{\doifinsetelse{\test}{A,B,C}{\test\ is in the set}{\test\ is not in the 
set}}

\doifinsetelse{\test}{A,B,C}{\test\ is in the set}{\test\ is not in the set}
\stoptext
%%% end do-if-inset.tex

Best regards: OK

 On 01 May 2015, at 18:56, Sam Ḥilluc shil...@gmx.com wrote:
 
 Hello,
 
 Is it possible to check (in a macro definition) if the character following the
 macro is included in a set of characters?
 
 Something that could work like this:
 
\def\MyMacro#1{%
\ifNextCharIn{abcd} \dothis%
\else \dothat%
\fi%
}
 
 Cheers.
 ___
 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] Check the character after a macro

2015-05-01 Thread Wolfgang Schuster

 Am 01.05.2015 um 20:41 schrieb Sam Ḥilluc shil...@gmx.com:
 
 On 2015-05-01 19:38, Otared Kavian wrote:
 Hi,
 
 You have several commands in ConTeXt doing what you are seeking to do: 
 please look at the examples below:
 
 %%% begin do-if-inset.tex
 \starttext
 \type{\doifinset{A}{A,B,C}{should go}:} \doifinset{A}{A,B,C}{should go}
 
 \type{\doifinset{D}{A,B,C}{should go}:}  \doifinset{D}{A,B,C}{should 
 participate}
 
 
 \type{\doifnotinset{}{A,B,C}{not in the set}:} \doifnotinset{}{A,B,C}{not in 
 the set}
 
 \type{\doifnotinset{D}{A,B,C}{not in the set}:} \doifnotinset{D}{A,B,C}{not 
 in the set}
 
 \doifinsetelse{D}{A,B,C}{it is in the set}{it is not in the set}
 
 \define\test{B}
 
 \type{\doifinsetelse{\test}{A,B,C}{\test\ is in the set}{\test\ is not in 
 the set}}
 
 \doifinsetelse{\test}{A,B,C}{\test\ is in the set}{\test\ is not in the set}
 \stoptext
 %%% end do-if-inset.tex
 
 Best regards: OK
 
 This works for testing if a given character is in a set, but how can I 
 retrieve
 that character just after the defined macro.
 
 To give an example, a macro that adds a dot if the next character is not a
 comma.
 
\MyMacro{text1} text2 -  text1. text2
\MyMacro{text1}, text2-  text1, text2


You can use the \doifelsenextchar command to check the character after your 
command.

\define[1]\MyMacro
  {\doifelsenextchar{,}
 {#1}
 {#1. }}

\starttext

\MyMacro{left} right

\MyMacro{left}, right

\stoptext


The limitation of this method is that you check only for one character at a time
and when want to check for more you have to use multiple \doifelsenextchar 
lines.

\doifelsenextchar{,}
  {...}
  {\doifelsenextchar{.}
 {...}
 {...}}

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] Check the character after a macro

2015-05-01 Thread Sam Ḥilluc
On 2015-05-01 19:38, Otared Kavian wrote:
 Hi,
 
 You have several commands in ConTeXt doing what you are seeking to do: please 
 look at the examples below:
 
 %%% begin do-if-inset.tex
 \starttext
 \type{\doifinset{A}{A,B,C}{should go}:} \doifinset{A}{A,B,C}{should go}
 
 \type{\doifinset{D}{A,B,C}{should go}:}  \doifinset{D}{A,B,C}{should 
 participate}
 
 
 \type{\doifnotinset{}{A,B,C}{not in the set}:} \doifnotinset{}{A,B,C}{not in 
 the set}
 
 \type{\doifnotinset{D}{A,B,C}{not in the set}:} \doifnotinset{D}{A,B,C}{not 
 in the set}
 
 \doifinsetelse{D}{A,B,C}{it is in the set}{it is not in the set}
 
 \define\test{B}
 
 \type{\doifinsetelse{\test}{A,B,C}{\test\ is in the set}{\test\ is not in the 
 set}}
 
 \doifinsetelse{\test}{A,B,C}{\test\ is in the set}{\test\ is not in the set}
 \stoptext
 %%% end do-if-inset.tex
 
 Best regards: OK

This works for testing if a given character is in a set, but how can I retrieve
that character just after the defined macro.

To give an example, a macro that adds a dot if the next character is not a
comma.

\MyMacro{text1} text2 -  text1. text2
\MyMacro{text1}, text2-  text1, text2

Thanks.
___
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] setupheads separator and stopper

2015-04-24 Thread Wolfgang Schuster

 Am 24.04.2015 um 11:19 schrieb Csikos Bela bcsikos...@freemail.hu:
 
 Wolfgang Schuster  írta:
 
 Am 23.04.2015 um 16:34 schrieb Csikos Bela:
 
 Hello list members:
 
 contextgarden wiki site http://wiki.contextgarden.net/Command/setupheads 
 says
 that the \setupheads command has been reported non-working for some 
 people.
 
 For me the alternative=inmargin/normal options work, but the separator= and
 stopper= options have no effect. I would like my chapter, section etc 
 numbers to
 have a dot after them, eg 1. 1.1. etc. How could I achieve this? Just in 
 curiousity,
 how can I change the separator?
 
 \setuphead
 [sectionstarter=(,
  sectionstopper=)]
 
 %\setupreferencestructureprefix[default][prefixstarter={\symbol[none]},prefixstopper={\symbol[none]}]
 
 \starttext
 
 \chapter[sec:chapter]{Chapter}
 
 \section[sec:section]{Section}
 
 \subsection[sec:subsection]{Subsection}
 
 Reference to chapter \in[sec:chapter] and section \in[sec:section].
 
 \stoptext
 
 Thank you. This works for me. 
 
 Just two questions:
 
 1. The section part of the words sectionstarter and sectionstopper above is 
 just
 a general term for any heading type and does not correspond to the heading 
 type.
 Is this correct? (That is, there are no chapterstarter=, subsectionstarter= 
 etc. options).

No, it’s part of the key name and you have to use „sectionstopper” also for 
\part, \chapter etc.

 2. The command you commented, \setupreferencestructureprefix, what does it 
 supposed to do? It did not do anything for me, eg:
 \setupreferencestructureprefix[default][prefixstarter={\symbol[diamond]},prefixstopper={\symbol[none]}]

It comes the starter and stopper from the reference number in the text, compare 
the result from
\in with and without the \setupreferencestructureprefix setting.

 Based on the above I used this code tho achieve the required look:
 
 %%%
 \setuphead[sectionstopper=.]
 
 \starttext
 
 \chapter{Chapter}
 
 \section{Section}
 
 \subsection{Subsection}
 
 \stoptext
 %%%
 
 I found that \setupheads[sectionstopper=.] (plural) has the same effect.

\setupheads is only a synonym for \setuphead.

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] setupheads separator and stopper

2015-04-24 Thread Csikos Bela
Wolfgang Schuster  írta:

 Am 23.04.2015 um 16:34 schrieb Csikos Bela:
 
 Hello list members:
 
 contextgarden wiki site http://wiki.contextgarden.net/Command/setupheads says
 that the \setupheads command has been reported non-working for some people.
 
 For me the alternative=inmargin/normal options work, but the separator= and
 stopper= options have no effect. I would like my chapter, section etc 
 numbers to
 have a dot after them, eg 1. 1.1. etc. How could I achieve this? Just in 
 curiousity,
 how can I change the separator?

\setuphead
  [sectionstarter=(,
   sectionstopper=)]

%\setupreferencestructureprefix[default][prefixstarter={\symbol[none]},prefixstopper={\symbol[none]}]

\starttext

\chapter[sec:chapter]{Chapter}

\section[sec:section]{Section}

\subsection[sec:subsection]{Subsection}

Reference to chapter \in[sec:chapter] and section \in[sec:section].

\stoptext

Thank you. This works for me. 

Just two questions:

1. The section part of the words sectionstarter and sectionstopper above is 
just
a general term for any heading type and does not correspond to the heading type.
Is this correct? (That is, there are no chapterstarter=, subsectionstarter= 
etc. options).

2. The command you commented, \setupreferencestructureprefix, what does it 
supposed to do? It did not do anything for me, eg:
\setupreferencestructureprefix[default][prefixstarter={\symbol[diamond]},prefixstopper={\symbol[none]}]


Based on the above I used this code tho achieve the required look:

%%%
\setuphead[sectionstopper=.]

\starttext

\chapter{Chapter}

\section{Section}

\subsection{Subsection}

\stoptext
%%%

I found that \setupheads[sectionstopper=.] (plural) has the same effect.
I guess \setupheads is the general setup for all types of headings, and
\setupheads[heading-type][options] for the given heading-type.
But if in the latter command I don't specify heading-type it will apply
to all heading-types. Is this correct? 

By experimenting further I also found that:

\setuphead[section][] will apply to section, subsection and subsubsection but
not to chapter. 

\setuphead[chapter][] will apply to chapter only, and not to any ...section.

Thank you,

bcsikos


___
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] setupheads separator and stopper

2015-04-24 Thread Wolfgang Schuster

 Am 24.04.2015 um 14:07 schrieb Csikos Bela bcsikos...@freemail.hu:
 
 Wolfgang Schuster írta:
 
 1. The section part of the words sectionstarter and sectionstopper above 
 is just
 a general term for any heading type and does not correspond to the heading 
 type.
 Is this correct? (That is, there are no chapterstarter=, subsectionstarter= 
 etc. options).
 
 No, it’s part of the key name and you have to use „sectionstopper” also for 
 \part, \chapter etc.
 
 I see.
 
 2. The command you commented, \setupreferencestructureprefix, what does it 
 supposed to do? It did not do anything for me, eg:
 \setupreferencestructureprefix[default][prefixstarter={\symbol[diamond]},prefixstopper={\symbol[none]}]
 
 It comes the starter and stopper from the reference number in the text, 
 compare the result from
 \in with and without the \setupreferencestructureprefix setting.
 
 I compared the output of \in with commented and non-commented
 \setupreferencestructureprefix line. It does not make any difference, the two
 outputs are the same.

Without the the \setupreferencestructureprefix line you get

Reference to chapter (1) and section (1.1).

and with the line

Reference to chapter 1 and section 1.1.

 \setupheads is only a synonym for \setuphead.
 
 OK. I also tried to change the separator to dash but I couldn't.
 I tried with \setuphead[separator=-] and with \setuphead[sectionseparator=-]
 but they didn't work. How can I change that?


You have to create a list of the separators with \defineseparatorset which can
then be applied with the sectionseparatorset key.

\defineseparatorset[mysectionseparator][x,y,z][?]

\setuphead[sectionseparatorset=mysectionseparator]

\setuphead[part]   [placehead=yes,page=no]
\setuphead[chapter][page=no]

\starttext

\part{Part}

\chapter{Chapter}

\section{Section}

\subsection{Subsection}

\subsubsection{Subsubsection}

\subsubsubsection{Subsubsubsection}

\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] setupheads separator and stopper

2015-04-24 Thread Csikos Bela
Wolfgang Schuste írta:

 Am 24.04.2015 um 14:07 schrieb Csikos Bela:
 
 Wolfgang Schuster írta:
 
 1. The section part of the words sectionstarter and sectionstopper above 
 is just
 a general term for any heading type and does not correspond to the heading 
 type.
 Is this correct? (That is, there are no chapterstarter=, 
 subsectionstarter= etc. options).
 
 No, it’s part of the key name and you have to use „sectionstopper” also for 
 \part, \chapter etc.
 
 I see.
 
 2. The command you commented, \setupreferencestructureprefix, what does it 
 supposed to do? It did not do anything for me, eg:
 \setupreferencestructureprefix[default][prefixstarter={\symbol[diamond]},prefixstopper={\symbol[none]}]
 
 It comes the starter and stopper from the reference number in the text, 
 compare the result from
 \in with and without the \setupreferencestructureprefix setting.
 
 I compared the output of \in with commented and non-commented
 \setupreferencestructureprefix line. It does not make any difference, the two
 outputs are the same.

Without the the \setupreferencestructureprefix line you get

Reference to chapter (1) and section (1.1).

Yes.

and with the line

Reference to chapter 1 and section 1.1.

No. I get the very same output as without the  \setupreferencestructureprefix 
line.

I attach the pdf outputs. My context version is:

ConTeXt  ver: 2014.01.03 00:40 MKIV current  fmt: 2015.4.1  int: english/english

 I also tried to change the separator to dash but I couldn't.
 I tried with \setuphead[separator=-] and with \setuphead[sectionseparator=-]
 but they didn't work. How can I change that?


You have to create a list of the separators with \defineseparatorset which can
then be applied with the sectionseparatorset key.

\defineseparatorset[mysectionseparator][x,y,z][?]

\setuphead[sectionseparatorset=mysectionseparator]

\setuphead[part]   [placehead=yes,page=no]
\setuphead[chapter][page=no]

\starttext

\part{Part}

\chapter{Chapter}

\section{Section}

\subsection{Subsection}

\subsubsection{Subsubsection}

\subsubsubsection{Subsubsubsection}

\stoptext

This works nicely. Thanks,

bcsikos

commented.pdf
Description: Adobe PDF document


non-commented.pdf
Description: Adobe PDF 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] setupheads separator and stopper

2015-04-24 Thread Csikos Bela
Wolfgang Schuster írta:

 1. The section part of the words sectionstarter and sectionstopper above 
 is just
 a general term for any heading type and does not correspond to the heading 
 type.
 Is this correct? (That is, there are no chapterstarter=, subsectionstarter= 
 etc. options).

No, it’s part of the key name and you have to use „sectionstopper” also for 
\part, \chapter etc.

I see.

 2. The command you commented, \setupreferencestructureprefix, what does it 
 supposed to do? It did not do anything for me, eg:
 \setupreferencestructureprefix[default][prefixstarter={\symbol[diamond]},prefixstopper={\symbol[none]}]

It comes the starter and stopper from the reference number in the text, 
compare the result from
\in with and without the \setupreferencestructureprefix setting.

I compared the output of \in with commented and non-commented
\setupreferencestructureprefix line. It does not make any difference, the two
outputs are the same.

\setupheads is only a synonym for \setuphead.

OK. I also tried to change the separator to dash but I couldn't.
I tried with \setuphead[separator=-] and with \setuphead[sectionseparator=-]
but they didn't work. How can I change that?

Thank you again,

bcsikos

___
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 insert symbols into document?

2015-04-23 Thread Csikos Bela
Wolfgang Schuster írta:

 Am 18.04.2015 um 13:21 schrieb Csikos Bela:
 
 When you need characters like the mentioned losenge you should better look 
 for a font
 which contains it and create a new typeface for it or set a fallback font 
 which add the
 characters to the main font of your document.
 
 Before answering I wanted to find out how to make this fallback: Using a 
 given font
 and fall back to only one (or a few) specific characters in another font. 
 For example
 using Tex Gyre Pagella and fall back to Dejavu's black diamond, but not to 
 any other
 characters.
 
 To learn how to do this, in the last few days I read most of (if not all) 
 the related pages on
 the wiki site, and browsed the indicated pdf documents too. Unfortunately I 
 find the wiki
 pages confusing, and I couldn't find out how to solve the problem yet, but I 
 did not want
 to wait longer with the answer. I will study further the docs.

\definefallbackfamily [documentfont] [rm] [DejaVu Serif] [range=0x25C6]
\definefontfamily [documentfont] [rm] [TeX Gyre Pagella]
\definefontfamily [documentfont] [tt] [Latin Modern Mono] [features=none]
\definefontfamily [documentfont] [mm] [TeX Gyre Pagella Math]

\setupbodyfont[documentfont]

% \setupsymbolset[text]
%
% Using the predefined symbol for blackdiamond doesn’t work
% because context tests if the symbol exists in the text font
% before it displays it but we take it from the fallback font
% and therefore nothing is shown. To avoid this you can define
% your own symbol or just put the character in your document
% without the \symbol command.

\definesymbol[blackdiamond][◆]

\starttext

direct input: ◆

\type{\symbol[blacktriangle]}: \symbol[blackdiamond]

\stoptext

Thank you very much. Both approaches work on my system.

bcsikos
___
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] Oddity with \definereferenceformat

2015-04-20 Thread Wolfgang Schuster

 Am 20.04.2015 um 05:10 schrieb Rik Kabel cont...@rik.users.panix.com:
 
 A reference to the text of a multi-line heading takes on the line breaks of 
 the heading when \definereferenceformat[about] is used.
 \definereferenceformat[about][type=title,left=,right=]
 \starttext
 \startsection[reference={sec:one},
   title={Three\\line\\title}]
 \startparagraph
 See \about[sec:one].
 \stopparagraph
 \stopsection
 \stoptext
 Can this be repaired? Or, am I doing it wrong?

To avoid the line breaks in the reference context has to redefined the meaning 
of \crlf and \\ when
the reference content is shown in the text which happens at the moment only for 
the \about command.

\setupreferencing[left=,right=]

\starttext
\startsection[reference={sec:one},
  title={Three\\line\\title}]
\startparagraph
See \about[sec:one].
\stopparagraph
\stopsection
\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] Oddity with \definereferenceformat

2015-04-19 Thread Rik Kabel
A reference to the text of a multi-line heading takes on the line breaks 
of the heading when \definereferenceformat[about] is used.


   \definereferenceformat[about][type=title,left=,right=]
   \starttext
   \startsection[reference={sec:one},
  title={Three\\line\\title}]
   \startparagraph
   See \about[sec:one].
   \stopparagraph
   \stopsection
   \stoptext

Can this be repaired? Or, am I doing it wrong?

--
Rik
___
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 insert symbols into document?

2015-04-18 Thread Wolfgang Schuster

 Am 18.04.2015 um 13:21 schrieb Csikos Bela bcsikos...@freemail.hu:
 
 When you need characters like the mentioned losenge you should better look 
 for a font
 which contains it and create a new typeface for it or set a fallback font 
 which add the
 characters to the main font of your document.
 
 Before answering I wanted to find out how to make this fallback: Using a 
 given font
 and fall back to only one (or a few) specific characters in another font. For 
 example
 using Tex Gyre Pagella and fall back to Dejavu's black diamond, but not to 
 any other
 characters.
 
 To learn how to do this, in the last few days I read most of (if not all) the 
 related pages on
 the wiki site, and browsed the indicated pdf documents too. Unfortunately I 
 find the wiki
 pages confusing, and I couldn't find out how to solve the problem yet, but I 
 did not want
 to wait longer with the answer. I will study further the docs.

\definefallbackfamily [documentfont] [rm] [DejaVu Serif] [range=0x25C6]
\definefontfamily [documentfont] [rm] [TeX Gyre Pagella]
\definefontfamily [documentfont] [tt] [Latin Modern Mono] [features=none]
\definefontfamily [documentfont] [mm] [TeX Gyre Pagella Math]

\setupbodyfont[documentfont]

% \setupsymbolset[text]
%
% Using the predefined symbol for blackdiamond doesn’t work
% because context tests if the symbol exists in the text font
% before it displays it but we take it from the fallback font
% and therefore nothing is shown. To avoid this you can define
% your own symbol or just put the character in your document
% without the \symbol command.

\definesymbol[blackdiamond][◆]

\starttext

direct input: ◆

\type{\symbol[blacktriangle]}: \symbol[blackdiamond]

\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] imposition not working in latest beta

2015-04-18 Thread Pablo Rodriguez
On 04/17/2015 12:22 AM, Hans Hagen wrote:
 On 4/16/2015 11:21 PM, Pablo Rodriguez wrote:
 Hans,

 I’m afraid that imposition is not working with latest beta.
 
 indeed, also side effect of the mp upgrade .. fixed in next beta

Many thanks for your fix, Hans.

I’m afraid that it only works with the code sample I sent.

It doesn’t work with (.log file attached):

contextjit --extra=arrange --printformat=2UP
--paperformat=A4*A3,landscape a.pdf

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
$ contextjit --extra=arrange --printformat=2UP --paperformat=A4*A3,landscape a.pdf

mtx-context | processing extra: /home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mtx-context-arrange.tex
mtx-context | run 1: luajittex --fmt=/home/ousia/ctxbeta/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luajittex/cont-en --jobname=mtx-context-arrange --lua=/home/ousia/ctxbeta/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luajittex/cont-en.lui --no-parse-first-line --c:currentrun=1 --c:engine=luajittex --c:extra=arrange --c:files=a.pdf --c:fulljobname=/home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mtx-context-arrange.tex --c:input=/home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mtx-context-arrange.tex --c:kindofrun=1 --c:maxnofruns=8 --c:paperformat=A4*A3,landscape --c:printformat=2UP --c:purgeall --c:result=context-extra /home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mtx-context-arrange.tex
This is LuajitTeX, Version beta-0.80.0 (TeX Live 2015/dev) (rev 5225) 
 \write18 enabled.
open source  1  1  /home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mtx-context-arrange.tex

ConTeXt  ver: 2015.04.17 02:03 MKIV beta  fmt: 2015.4.18  int: english/english

system   'cont-new.mkiv' loaded
open source  2  2  /home/ousia/ctxbeta/tex/texmf-context/tex/context/base/cont-new.mkiv
close source 2  2  /home/ousia/ctxbeta/tex/texmf-context/tex/context/base/cont-new.mkiv
system   files  jobname 'mtx-context-arrange', input '/home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mtx-context-arrange', result 'context-extra'
fontslatin modern fonts are not preloaded
languageslanguage 'en' is active
open source  2  3  /home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mtx-context-common.tex
close source 2  3  /home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mtx-context-common.tex
close source 1  3  /home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mtx-context-arrange.tex

*
(Please type a command or say `\end')
___
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] Index items

2015-04-16 Thread Hans Hagen

On 4/15/2015 11:41 PM, Robert Blackstone wrote:


On 15 Apr 2015, at 19:51 ,  Alan BRASLAU alan.bras...@cea.fr wrote

Hans Hagen pra...@wxs.nl wrote:


On 4/14/2015 1:48 PM, Robert Blackstone wrote:

Dear all,

The book I am typesetting contains a very extensive and detailed
index. The number of index items is probably around 1200, 16 pages.
A fair number of them occur in more than one chapter.
Like bibliography items, and for the sake of consistency, I have
stored them in some auxiliary files and it is a matter of copy and
paste to get them into the text in the proper place and way. (With
always a risk of accidentally deleting or adding a spurious brace
or bracket, with nasty results.)

I wonder therefore whether it would be possible to handle them like
bibliography items, by means of a key, and leave their expansion to
ConTeXt.

Would it be possible?
And if it is not (yet) possible, how could I perhaps tackle it?


so you want to remap given index entries to new ones? at what moment?


We index pretty heavily now in the new bibliography dataset subsystem,
that is one can create an index of authors, an index of keywords, an
index of titles, etc. as well as index the pages on which a reference
is cited. All of the information is there.

So say that you want to create a database of anything: words, images,
phrases. You can put these into the database structure and then insert
them or any associated information wherever you want in your text,
later producing lists and indexes.

Can you give an example of what type of information you extensively
index with detail?

Alan

Hi Alan,
  I realize that I have not yet reacted to Hans’ reply. So let me do that first 
(it was written but not yet sent).

  Hi Hans,
Do I want to remap given index entries? Assuming I understand your reply 
correctly the answer is: Yes, in principle. I would want to be able to change 
them if there are errors, or if some publisher has different views about the 
presentation of titles of items that are in the index (titles of songs, for 
instance). And also when (parts of) the text has (have) to be reused for other 
purposes. Change them in one operation, that is, not by digging up all 
occurrences in the book of the item that has to be changed.

In answer to Alan’s question: names, theoretical treatises and manuscripts, 
musical works, musical terms. Nearly all examples in the book have several 
features that have to be indexed: composer’s name, title of the published work 
(an opera for instance), title of the particular aria of which the example 
shows a fragment, and the special features that are shown in the example, 
parallel 7ths, for example.
The not-so-minimal example below (best processed iwth mkiv) gives an 
impression, also of the optical clumsiness that makes the unprocessed text 
practically unreadable. That is another reason why I would like to be able to 
call an index entry by means of some sort of key, like in bibliographic items 
for footnotes.


\startluacode

document.indexentries = {
[rule]  = [[Rule(s)]],
[ruleimperfect] = [[+ \quote{imperfect to perfect, from}]],
[galilei]   = [[Galilei, Vincenzo]],
}

function document.getindexentry(n)
context(\\index[%s]{%s},n,document.indexentries[n] or ( .. 
n .. ))

end

\stopluacode

\unexpanded\def\InEn[#1]%
  {\ctxlua{document.getindexentry(#1)}}

\starttext
That this rule
\InEn[rule]
\InEn[ruleimperfect] was not applied by everybody is for example shown 
in {\em Fronimo}%

\InEn[galilei]

etc etc


Kind regards,

Robert Blackstone

\starttext
That this rule%
\index[Rule]{Rule(s)}%%
\index[RuleImperfect]{ + \quote{imperfect to perfect, from}} was not applied by 
everybody is for example shown in {\em Fronimo}%
\index[Galilei]{Galilei, Vincenzo}%
\index[GalileiFronimo]{ +{\em Fronimo}}%
\index[Cadence]{cadence(s)}%%
\index[CadenceP]{ + plagal}%
\index[PlagalCad]{plagal cadence}%
\index[Fronimo]{{\em Fronimo} (Galilei)} (1584), Vincenzo Galileo's treatise on 
lute playing and the intabulation%
\index[Intabulation]{intabulation}  of vocal music.
\page
Artusi\index[Artusi]{Artusi, Giovanni Maria}  showed examples (Ex.~4.34) with 
parallel 4th%
\index[Dissonance]{dissonance(s)}%
\index[Dissonance4]{ + 4th(s)}%
\index[Dissonance4Parall]{ + +  parallel}s and 7th%
\index[Dissonance]{dissonance(s)}%
\index[Dissonance7]{ + 7th(s)}%
\index[Dissonance7Paral]{ + +   parallel}s in a contrapuntally oriented 
fashion. These parallels were to appear in works with basso continuo around 
1610 but now between the bass and the solo part. They occur in vocal and 
instrumental music as well as in works for keyboard solo. Most examples have 
parallel 7th%
\index[Dissonance]{dissonance(s)}%
\index[Dissonance7]{ + 7th(s)}%
\index[Dissonance7Paral]{ + +   parallel}s but some examples of parallel 4th%
\index[Dissonance]{dissonance(s)}%
\index[Dissonance4

Re: [NTG-context] Index items

2015-04-16 Thread Robert Blackstone

On 16 Apr 2015, at 15:38 , Hans Hagen pra...@wxs.nl wrote
 To: mailing list for ConTeXt users ntg-context@ntg.nl
 Subject: Re: [NTG-context] Index items
 Message-ID: 552fbb35.9050...@wxs.nl
 Content-Type: text/plain; charset=utf-8; format=flowed
 
 On 4/15/2015 11:41 PM, Robert Blackstone wrote:
 
 On 15 Apr 2015, at 19:51 ,  Alan BRASLAU alan.bras...@cea.fr wrote
 Hans Hagen pra...@wxs.nl wrote:
 
 On 4/14/2015 1:48 PM, Robert Blackstone wrote:
 Dear all,
 
 The book I am typesetting contains a very extensive and detailed
 index. The number of index items is probably around 1200, 16 pages.
 A fair number of them occur in more than one chapter.
 Like bibliography items, and for the sake of consistency, I have
 stored them in some auxiliary files and it is a matter of copy and
 paste to get them into the text in the proper place and way. (With
 always a risk of accidentally deleting or adding a spurious brace
 or bracket, with nasty results.)
 
 I wonder therefore whether it would be possible to handle them like
 bibliography items, by means of a key, and leave their expansion to
 ConTeXt.
 
 Would it be possible?
 And if it is not (yet) possible, how could I perhaps tackle it?
 
 so you want to remap given index entries to new ones? at what moment?
 
 We index pretty heavily now in the new bibliography dataset subsystem,
 that is one can create an index of authors, an index of keywords, an
 index of titles, etc. as well as index the pages on which a reference
 is cited. All of the information is there.
 
 So say that you want to create a database of anything: words, images,
 phrases. You can put these into the database structure and then insert
 them or any associated information wherever you want in your text,
 later producing lists and indexes.
 
 Can you give an example of what type of information you extensively
 index with detail?
 
 Alan
 Hi Alan,
  I realize that I have not yet reacted to Hans’ reply. So let me do that 
 first (it was written but not yet sent).
 
  Hi Hans,
 Do I want to remap given index entries? Assuming I understand your reply 
 correctly the answer is: Yes, in principle. I would want to be able to 
 change them if there are errors, or if some publisher has different views 
 about the presentation of titles of items that are in the index (titles of 
 songs, for instance). And also when (parts of) the text has (have) to be 
 reused for other purposes. Change them in one operation, that is, not by 
 digging up all occurrences in the book of the item that has to be changed.
 
 In answer to Alan’s question: names, theoretical treatises and manuscripts, 
 musical works, musical terms. Nearly all examples in the book have several 
 features that have to be indexed: composer’s name, title of the published 
 work (an opera for instance), title of the particular aria of which the 
 example shows a fragment, and the special features that are shown in the 
 example, parallel 7ths, for example.
 The not-so-minimal example below (best processed iwth mkiv) gives an 
 impression, also of the optical clumsiness that makes the unprocessed text 
 practically unreadable. That is another reason why I would like to be able 
 to call an index entry by means of some sort of key, like in bibliographic 
 items for footnotes.
 
 \startluacode
 
 document.indexentries = {
 [rule]  = [[Rule(s)]],
 [ruleimperfect] = [[+ \quote{imperfect to perfect, from}]],
 [galilei]   = [[Galilei, Vincenzo]],
 }
 
 function document.getindexentry(n)
 context(\\index[%s]{%s},n,document.indexentries[n] or ( .. 
 n .. ))
 end
 
 \stopluacode
 
 \unexpanded\def\InEn[#1]%
   {\ctxlua{document.getindexentry(#1)}}
 
 \starttext
 That this rule
 \InEn[rule]
 \InEn[ruleimperfect] was not applied by everybody is for example shown 
 in {\em Fronimo}%
 \InEn[galilei]
 
 etc etc

Wow, this is super! Great improvement, also for the readability of the text.
Thank you very much, Hans.

Kind regards,
Robert

___
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] Index items

2015-04-15 Thread Alan BRASLAU
On Tue, 14 Apr 2015 18:50:49 +0200
Hans Hagen pra...@wxs.nl wrote:

 On 4/14/2015 1:48 PM, Robert Blackstone wrote:
  Dear all,
 
  The book I am typesetting contains a very extensive and detailed
  index. The number of index items is probably around 1200, 16 pages.
  A fair number of them occur in more than one chapter.
  Like bibliography items, and for the sake of consistency, I have
  stored them in some auxiliary files and it is a matter of copy and
  paste to get them into the text in the proper place and way. (With
  always a risk of accidentally deleting or adding a spurious brace
  or bracket, with nasty results.)
 
  I wonder therefore whether it would be possible to handle them like
  bibliography items, by means of a key, and leave their expansion to
  ConTeXt.
 
  Would it be possible?
  And if it is not (yet) possible, how could I perhaps tackle it?  
 
 so you want to remap given index entries to new ones? at what moment?

We index pretty heavily now in the new bibliography dataset subsystem,
that is one can create an index of authors, an index of keywords, an
index of titles, etc. as well as index the pages on which a reference
is cited. All of the information is there.

So say that you want to create a database of anything: words, images,
phrases. You can put these into the database structure and then insert
them or any associated information wherever you want in your text,
later producing lists and indexes.

Can you give an example of what type of information you extensively
index with detail?

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] Index items

2015-04-15 Thread Robert Blackstone

On 15 Apr 2015, at 19:51 ,  Alan BRASLAU alan.bras...@cea.fr wrote
 Hans Hagen pra...@wxs.nl wrote:
 
 On 4/14/2015 1:48 PM, Robert Blackstone wrote:
 Dear all,
 
 The book I am typesetting contains a very extensive and detailed
 index. The number of index items is probably around 1200, 16 pages.
 A fair number of them occur in more than one chapter.
 Like bibliography items, and for the sake of consistency, I have
 stored them in some auxiliary files and it is a matter of copy and
 paste to get them into the text in the proper place and way. (With
 always a risk of accidentally deleting or adding a spurious brace
 or bracket, with nasty results.)
 
 I wonder therefore whether it would be possible to handle them like
 bibliography items, by means of a key, and leave their expansion to
 ConTeXt.
 
 Would it be possible?
 And if it is not (yet) possible, how could I perhaps tackle it?  
 
 so you want to remap given index entries to new ones? at what moment?
 
 We index pretty heavily now in the new bibliography dataset subsystem,
 that is one can create an index of authors, an index of keywords, an
 index of titles, etc. as well as index the pages on which a reference
 is cited. All of the information is there.
 
 So say that you want to create a database of anything: words, images,
 phrases. You can put these into the database structure and then insert
 them or any associated information wherever you want in your text,
 later producing lists and indexes.
 
 Can you give an example of what type of information you extensively
 index with detail?
 
 Alan
Hi Alan,
 I realize that I have not yet reacted to Hans’ reply. So let me do that first 
(it was written but not yet sent).

 Hi Hans, 
Do I want to remap given index entries? Assuming I understand your reply 
correctly the answer is: Yes, in principle. I would want to be able to change 
them if there are errors, or if some publisher has different views about the 
presentation of titles of items that are in the index (titles of songs, for 
instance). And also when (parts of) the text has (have) to be reused for other 
purposes. Change them in one operation, that is, not by digging up all 
occurrences in the book of the item that has to be changed.

In answer to Alan’s question: names, theoretical treatises and manuscripts, 
musical works, musical terms. Nearly all examples in the book have several 
features that have to be indexed: composer’s name, title of the published work 
(an opera for instance), title of the particular aria of which the example 
shows a fragment, and the special features that are shown in the example, 
parallel 7ths, for example.
The not-so-minimal example below (best processed iwth mkiv) gives an 
impression, also of the optical clumsiness that makes the unprocessed text 
practically unreadable. That is another reason why I would like to be able to 
call an index entry by means of some sort of key, like in bibliographic items 
for footnotes.

Kind regards,

Robert Blackstone

\starttext
That this rule%
\index[Rule]{Rule(s)}%%
\index[RuleImperfect]{ + \quote{imperfect to perfect, from}} was not applied by 
everybody is for example shown in {\em Fronimo}%
\index[Galilei]{Galilei, Vincenzo}%
\index[GalileiFronimo]{ +{\em Fronimo}}%
\index[Cadence]{cadence(s)}%%
\index[CadenceP]{ + plagal}%
\index[PlagalCad]{plagal cadence}%
\index[Fronimo]{{\em Fronimo} (Galilei)} (1584), Vincenzo Galileo's treatise on 
lute playing and the intabulation%
\index[Intabulation]{intabulation}  of vocal music.
\page
Artusi\index[Artusi]{Artusi, Giovanni Maria}  showed examples (Ex.~4.34) with 
parallel 4th%
\index[Dissonance]{dissonance(s)}%
\index[Dissonance4]{ + 4th(s)}%
\index[Dissonance4Parall]{ + +  parallel}s and 7th%
\index[Dissonance]{dissonance(s)}%
\index[Dissonance7]{ + 7th(s)}%
\index[Dissonance7Paral]{ + +   parallel}s in a contrapuntally oriented 
fashion. These parallels were to appear in works with basso continuo around 
1610 but now between the bass and the solo part. They occur in vocal and 
instrumental music as well as in works for keyboard solo. Most examples have 
parallel 7th%
\index[Dissonance]{dissonance(s)}%
\index[Dissonance7]{ + 7th(s)}%
\index[Dissonance7Paral]{ + +   parallel}s but some examples of parallel 4th%
\index[Dissonance]{dissonance(s)}%
\index[Dissonance4]{ + 4th(s)}%
\index[Dissonance4Parall]{ + +  parallel}s and 2nd%
\index[Dissonance]{dissonance(s)}%
\index[Dissonance2Parall]{ + + parallel}s can be found as well. 

\setupregister[index][indicator=yes]
\completeindex[compress=yes]
\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

Re: [NTG-context] bug in \setuptype?

2015-04-14 Thread Wolfgang Schuster

 Am 14.04.2015 um 20:30 schrieb Pablo Rodriguez oi...@gmx.es:
 
 Hans,
 
 I have this sample:
 
  \definetype[TeXcode][option=TEX]
  \starttext
  \TeXcode{\ConTeXt}
  \stoptext
 
 With beta from 2015.04.14 19:03, there is no color, no bold font or
 monospace typeface.
 
 I’m afraid it may be a bug.


Make the following change in buff-ver.miv (the name of the option parameter has 
to be changed to method):

\def\buff_verbatim_type_normal#1%
  {\buff_verbatim_initialize_type_two
   \dostarttaggedchained\t!verbatim\currenttype\??type
   \clf_type
 data{\detokenize{#1}}%
 tab {\typeparameter\c!tab}%
-option  {\p_buff_option}%
+method  {\p_buff_option}%
 compact {\typeparameter\c!compact}% % none | all | last (all needed in 
tabulate etc for manuals)
 escape  {\typeparameter\c!escape}%  % new but rather useless imo (escaping 
in general is not used much)
   % nature  {inline}% is default
   \relax
   \dostoptagged
   \buff_verbatim_right_of_type
   \egroup}

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] how to insert symbols into document?

2015-04-13 Thread Csikos Bela
Otared Kavian  írta:

 On 13 Apr 2015, at 01:29, Csikos Bela  wrote:
 
 Hello context users:
 
 I would like to insert symbols into my document, especially black-diamond 
 and losenge
 symbols. I read symbols page at contextgarden but still don't know how to do 
 it.
 
 I also tried \showsymbolset[was] etc but the symbols but I did not find 
 these (and many
 other symbols either) in the output pages.
 
 I found that symb-imp-mis.mkiv file defines this symbol (line 49) but I 
 don't know how to
 make it show. Do I have to load specific symbol fonts? If yes how can I find 
 out which font has the given symbols? 
 
 What I tried so far included:
 
 % begin code
 \usesymbols[imp-mis]
 \starttext
 
 ◆
 
 \blackdiamond
 
 \symbol [blackdiamond]
 % end code
 
 None of these show anything.

Hi,

You can use the mathmode to access those characters, as in the following 
example:

\starttext
This is \type{$\blacklozenge$} $\blacklozenge$

This is \type{$\lozenge$} $\lozenge$
\stoptext

Hi,

The above example works.
But if I try it with \blackdiamond, I get error and context stops:

This is the tex file:

% begin code
\starttext
This is \type{$\blackdiamond$} $\blackdiamond$

This is \type{$\diamond$} $\diamond$
\stoptext
% end code

And the compilation:

 context symbols.tex

mtx-context | run 1: luatex 
--fmt=/usr/local/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en
 --jobname=symbols 
--lua=/usr/local/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui
 --no-parse-first-line --c:currentrun=1 --c:fulljobname=./symbols.tex 
--c:input=./symbols.tex --c:kindofrun=1 --c:maxnofruns=8 cont-yes.mkiv
This is LuaTeX, Version beta-0.80.0 (TeX Live 2015/dev) (rev 5195)
 \write18 enabled.
(/usr/local/context/tex/texmf-context/tex/context/base/cont-yes.mkiv

ConTeXt  ver: 2014.01.03 00:40 MKIV current  fmt: 2015.3.31  int: 
english/english

system   'cont-new.mkiv' loaded
(/usr/local/context/tex/texmf-context/tex/context/base/cont-new.mkiv)
system   files  jobname 'symbols', input './symbols', result 'symbols'
fontslatin modern fonts are not preloaded
languageslanguage 'en' is active
(/symbols.tex{/usr/local/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fontspreloading latin modern fonts (second stage)
fontstypescripts  unknown library 'loc'
{/usr/local/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/usr/local/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
fonts'fallback modern rm 12pt' is loaded
fontstreatment  fixing some wrong widths
! Undefined control sequence

system   tex  error on line 4 in file .../symbols.tex: Undefined 
control sequence ...

1
2
3 \starttext
4   This is \type{$\blackdiamond$} $\blackdiamond$
5
6 This is \type{$\diamond$} $\diamond$
7 \stoptext
8
9


?
backend  xmp  using file 
'/usr/local/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
pagesflushing realpage 1, userpage 1
))/usr/local/context/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf/usr/local/context/tex/texmf/fonts/opentype/public/lm/lmmono12-regular.otf/usr/local/context/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf

mkiv lua stats   used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats   used cache path: readable: 
'/usr/local/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e'
 | readable+writable: 
'/tmp/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e'
mkiv lua stats   resource resolver: loadtime 0.019 seconds, 1 scans with 
scantime 0.002 seconds, 5 shared scans, 14 found files, scanned paths: 
/texmf
mkiv lua stats   stored bytecode data: 338 modules (0.450 sec), 69 tables 
(0.010 sec), 407 chunks (0.460 sec)
mkiv lua stats   cleaned up reserved nodes: 42 nodes, 9 lists of 442
mkiv lua stats   node memory usage: 2 glue, 2 penalty, 9 attribute, 28 
glue_spec, 3 attribute_list
mkiv lua stats   node list callback tasks: 6 unique task lists, 6 instances 
(re)created, 45 calls
mkiv lua stats   used backend: pdf (backend for directly generating pdf output)
mkiv lua stats   loaded patterns: en::2, load time: 0.000
mkiv lua stats   jobdata time: 0.000 seconds saving, 0.000 seconds loading
mkiv lua stats   callbacks: 145 direct, 174 indirect, 319 total
mkiv lua stats   result saved in file: symbols.pdf, compresslevel 3, 
objectcompreslevel 3
mkiv lua stats   loaded fonts: 3 files: latinmodern-math.otf, 
lmmono12-regular.otf, lmroman12-regular.otf
mkiv lua stats   fonts load time: 0.653 seconds for 5 fonts, 2 shared in 
backend, 2 common vectors, 0 common hashes
mkiv lua stats   used platform: linux-64, type: unix, binary subtree: 
texmf-linux-64
mkiv lua stats   luatex banner: this is luatex, version beta-0.80.0 (tex live 
2015/dev) (rev 5195)
mkiv lua stats   control sequences: 38352 of 65536

Re: [NTG-context] how to insert symbols into document?

2015-04-13 Thread Otared Kavian
Hi,

There is no \blackdiamond defined beforehand, but there is \diamondsuit (as 
well as \heartsuit, \spadesuit, \clubsuit):

If you want a filled black diamond, you may use \blacklozenge, or find its 
corresponding UTF code and then insert it with a special command:

 begin diamond.tex
\define\blackdiamond{\utfchar{2666}}
\starttext
This is \type{$\diamondsuit$} $\diamondsuit$

This is \type{$\diamond$} $\diamond$

This is \type{$\blackdiamond$} $\blackdiamond$
\stoptext
 end diamond.tex

Best regards: OK

 On 13 Apr 2015, at 13:14, Csikos Bela bcsikos...@freemail.hu wrote:
 
 Otared Kavian  írta:
 
 On 13 Apr 2015, at 01:29, Csikos Bela  wrote:
 
 Hello context users:
 
 I would like to insert symbols into my document, especially black-diamond 
 and losenge
 symbols. I read symbols page at contextgarden but still don't know how to 
 do it.
 
 I also tried \showsymbolset[was] etc but the symbols but I did not find 
 these (and many
 other symbols either) in the output pages.
 
 I found that symb-imp-mis.mkiv file defines this symbol (line 49) but I 
 don't know how to
 make it show. Do I have to load specific symbol fonts? If yes how can I 
 find out which font has the given symbols? 
 
 What I tried so far included:
 
 % begin code
 \usesymbols[imp-mis]
 \starttext
 
 ◆
 
 \blackdiamond
 
 \symbol [blackdiamond]
 % end code
 
 None of these show anything.
 
 Hi,
 
 You can use the mathmode to access those characters, as in the following 
 example:
 
 \starttext
 This is \type{$\blacklozenge$} $\blacklozenge$
 
 This is \type{$\lozenge$} $\lozenge$
 \stoptext
 
 Hi,
 
 The above example works.
 But if I try it with \blackdiamond, I get error and context stops:
 
 This is the tex file:
 
 % begin code
 \starttext
 This is \type{$\blackdiamond$} $\blackdiamond$
 
 This is \type{$\diamond$} $\diamond$
 \stoptext
 % end code
 
 And the compilation:
 
 context symbols.tex
 
 mtx-context | run 1: luatex 
 --fmt=/usr/local/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en
  --jobname=symbols 
 --lua=/usr/local/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui
  --no-parse-first-line --c:currentrun=1 --c:fulljobname=./symbols.tex 
 --c:input=./symbols.tex --c:kindofrun=1 --c:maxnofruns=8 cont-yes.mkiv
 This is LuaTeX, Version beta-0.80.0 (TeX Live 2015/dev) (rev 5195)
 \write18 enabled.
 (/usr/local/context/tex/texmf-context/tex/context/base/cont-yes.mkiv
 
 ConTeXt  ver: 2014.01.03 00:40 MKIV current  fmt: 2015.3.31  int: 
 english/english
 
 system   'cont-new.mkiv' loaded
 (/usr/local/context/tex/texmf-context/tex/context/base/cont-new.mkiv)
 system   files  jobname 'symbols', input './symbols', result 
 'symbols'
 fontslatin modern fonts are not preloaded
 languageslanguage 'en' is active
 (/symbols.tex{/usr/local/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
 fontspreloading latin modern fonts (second stage)
 fontstypescripts  unknown library 'loc'
 {/usr/local/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/usr/local/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
 fonts'fallback modern rm 12pt' is loaded
 fontstreatment  fixing some wrong widths
 ! Undefined control sequence
 
 system   tex  error on line 4 in file .../symbols.tex: 
 Undefined control sequence ...
 
 1
 2
 3 \starttext
 4   This is \type{$\blackdiamond$} $\blackdiamond$
 5
 6 This is \type{$\diamond$} $\diamond$
 7 \stoptext
 8
 9
 
 
 ?
 backend  xmp  using file 
 '/usr/local/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
 pagesflushing realpage 1, userpage 1
 ))/usr/local/context/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf/usr/local/context/tex/texmf/fonts/opentype/public/lm/lmmono12-regular.otf/usr/local/context/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf
 
 mkiv lua stats   used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
 mkiv lua stats   used cache path: readable: 
 '/usr/local/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e'
  | readable+writable: 
 '/tmp/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e'
 mkiv lua stats   resource resolver: loadtime 0.019 seconds, 1 scans with 
 scantime 0.002 seconds, 5 shared scans, 14 found files, scanned paths: 
 /texmf
 mkiv lua stats   stored bytecode data: 338 modules (0.450 sec), 69 tables 
 (0.010 sec), 407 chunks (0.460 sec)
 mkiv lua stats   cleaned up reserved nodes: 42 nodes, 9 lists of 442
 mkiv lua stats   node memory usage: 2 glue, 2 penalty, 9 attribute, 28 
 glue_spec, 3 attribute_list
 mkiv lua stats   node list callback tasks: 6 unique task lists, 6 instances 
 (re)created, 45 calls
 mkiv lua stats   used backend: pdf (backend for directly generating pdf 
 output)
 mkiv lua stats   loaded patterns: en::2, load time: 0.000

Re: [NTG-context] how to insert symbols into document?

2015-04-12 Thread Otared Kavian
Hi,

You can use the mathmode to access those characters, as in the following 
example:

\starttext
This is \type{$\blacklozenge$} $\blacklozenge$

This is \type{$\lozenge$} $\lozenge$
\stoptext

If you want to know the name of some specific characters you can use the 
following code, typeset in mkii.
(Unfortunately in mkiv the command \showmathcharacters is made unavailable… 
There is another command which gives a huge amount of informations on all such 
characters, but not a simple table like the one you get in mkii).

 begin show-math-mkii.tex
% To see all the math characters available in a font
% typeset this in mkii
\starttext
\showmathcharacters
\stoptext
 begin show-math-mkii.tex


Best regards: OK


 On 13 Apr 2015, at 01:29, Csikos Bela bcsikos...@freemail.hu wrote:
 
 Hello context users:
 
 I would like to insert symbols into my document, especially black-diamond and 
 losenge
 symbols. I read symbols page at contextgarden but still don't know how to do 
 it.
 
 I also tried \showsymbolset[was] etc but the symbols but I did not find these 
 (and many
 other symbols either) in the output pages.
 
 I found that symb-imp-mis.mkiv file defines this symbol (line 49) but I don't 
 know how to
 make it show. Do I have to load specific symbol fonts? If yes how can I find 
 out which font has the given symbols? 
 
 What I tried so far included:
 
 % begin code
 \usesymbols[imp-mis]
 \starttext
 
 ◆
 
 \blackdiamond
 
 \symbol [blackdiamond]
 % end code
 
 None of these show anything.
 
 Thanks in advance,
 
 bcsikos
 ___
 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] (hindi) font questions

2015-04-09 Thread Pablo Rodriguez
On 04/08/2015 11:47 PM, Harald Koenig wrote:
 Hi,
 
 I'd like to type set a single hindi/devanagari word in a chapter
 heading (using standalone MkVI), where I need your help for some
 questions/problems:

 - which (free) font do you suggest ? right now I'm using Lohit-Devanagari.
   text font is 11pt Palatino, Lohit doesn't match too good, and a bold
   version would be nice for the chapter head.

Hi Harald,

as an alternative to the font proposed by Wolfgang (seems to be only
available for Mac), FreeSerif may be an option
(https://ftp.gnu.org/gnu/freefont/).

I hope it helps,


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] (hindi) font questions

2015-04-09 Thread Wolfgang Schuster

 Am 08.04.2015 um 23:47 schrieb Harald Koenig 
 koe...@tat.physik.uni-tuebingen.de:
 
 Hi,
 
 I'd like to type set a single hindi/devanagari word in a chapter heading 
 (using standalone MkVI),
 where I need your help for some questions/problems:
 
 - which (free) font do you suggest ?  right now I'm using Lohit-Devanagari. 
  text font is 11pt Palatino, Lohit doesn't match too good, and a bold version
  would be nice for the chapter head.
 
 - font size: how do I define this font to get automatic/matching font sizes
  for both the chapter head and the title of contents ?
 
 right now I use
 
  \definefont [hindib] [Lohit-Devanagari at 24pt]
  ...
  \mychapter{Danke -- {\hindib  धन्यवाद}}
 
 which gives a reaosonable font size for the chapter title,
 but of course that's way too large for the TOC:-(
 
 
 what's the right way to define a scalable single font (or two, if you have 
 a suggestion
 for a normal+bold devanagari font) in ConTeXt ?


You can use the fallback mechanism to use a different font for characters which 
aren’t available in the main font.

\definefallbackfamily [mainface] [rm] [Devanagari MT] 
[range=devanagari,scale=1.2]
\definefontfamily [mainface] [rm] [TeX Gyre Pagella]

\definefontfamily [mainface] [mm] [TeX Gyre Pagella Math]

\setupbodyfont[mainface]

\starttext
Danke – धन्यवाद
\stoptext

Wolfgang


test.pdf
Description: Adobe PDF 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
___

[NTG-context] (hindi) font questions

2015-04-08 Thread Harald Koenig
Hi,

I'd like to type set a single hindi/devanagari word in a chapter heading (using 
standalone MkVI),
where I need your help for some questions/problems:

- which (free) font do you suggest ?  right now I'm using Lohit-Devanagari. 
  text font is 11pt Palatino, Lohit doesn't match too good, and a bold version
  would be nice for the chapter head.

- font size: how do I define this font to get automatic/matching font sizes
  for both the chapter head and the title of contents ?

right now I use

  \definefont [hindib] [Lohit-Devanagari at 24pt]
  ...
  \mychapter{Danke -- {\hindib  धन्यवाद}}

which gives a reaosonable font size for the chapter title,
but of course that's way too large for the TOC:-(


what's the right way to define a scalable single font (or two, if you have a 
suggestion
for a normal+bold devanagari font) in ConTeXt ?
  

thanks,

Harald
-- 
I hope to die  ___   _
before I *have* to use Microsoft Word.,   0--,|/OOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen._/  /  /OOO\
\  \/OOO\
  \ O|//
   \/\/\/\/\/\/\/\/\/
Harald Koenig   //  / \\  \
koe...@tat.physik.uni-tuebingen.de ^   ^
___
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] line spacing (\setupinterlinespace) with grid

2015-04-08 Thread Csikos Bela
Pablo Rodriguez írta:
On 04/08/2015 05:54 PM, Csikos Bela wrote:
 Hello:
 
 When I set grid layout on (\setuplayout[grid=yes]) \setupinterlinespace has 
 no effect.

Hi Csikos,

I guess this is intended. \setuplayout[grid=yes] may impose that all
lines have to be exactly over the grid lines.

It is only an educated guess, but type at the top of your document:

\showgrid

The difference (even if you add a \title or a \chapter) may be revealng.

Just in case I’m not wrong :-),

I see what you mean. But in my opinion it should apply only if I want to change
line spacing within the text. But I would like to change the default line 
spacing in my
document. I think the default grid should be set based on the default line 
spacing.
The question here is, I guess, how the grid is set.

I think there is setting to change the default line spacing to which the grids 
are adjusted.
The question is how?

Thanks,

bcsikos
___
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] line spacing (\setupinterlinespace) with grid

2015-04-08 Thread Pablo Rodriguez
On 04/08/2015 05:54 PM, Csikos Bela wrote:
 Hello:
 
 When I set grid layout on (\setuplayout[grid=yes]) \setupinterlinespace has 
 no effect.

Hi Csikos,

I guess this is intended. \setuplayout[grid=yes] may impose that all
lines have to be exactly over the grid lines.

It is only an educated guess, but type at the top of your document:

\showgrid

The difference (even if you add a \title or a \chapter) may be revealng.

Just in case I’m not wrong :-),

Pablo


 Here is an example:
 
 \setuplayout[grid=yes] % or grid=no
 \starttext
 \input tufte \par
 \setupinterlinespace[small]
 \input tufte \par
 \setupinterlinespace[medium]
 \input tufte \par
 \setupinterlinespace[big]
 \input tufte \par
 \setupinterlinespace[1]
 \input tufte \par
 \setupinterlinespace[1.3]
 \input tufte \par
 \setupinterlinespace[1.5]
 \input tufte \par
 \setupinterlinespace[2]
 \input tufte \par
 \setupinterlinespace[3]
 \input tufte
 \stoptext
 
 I attach the correpsonding pdf outputs (with grid on and off).
 My context version according to the log files:
 
 tex/texmf-context/tex/context/base/cont-yes.mkiv
 
 ConTeXt  ver: 2014.01.03 00:40 MKIV current  fmt: 2015.4.1  int: 
 english/english
 
 system   'cont-new.mkiv' loaded
 
 How can I change/set line spacing when grid layout is turned on?
 
 Thanks,
 
 bcsikos
 
 
 
 ___
 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
 ___
 


-- 
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] RAL colours

2015-04-06 Thread luigi scarso
On Mon, Apr 6, 2015 at 6:11 AM, Henning Hraban Ramm te...@fiee.net wrote:

 Am 2015-04-04 um 22:00 schrieb Pavneet Arora pavneet_ar...@waroc.com:

  This is great insight into the printing world.  Of course, Pantone has a
  dominant position on this continent at least, but as you stated, its
  proprietary nature keeps the palette from being distributed easily.

 The same is probably true for RAL.
 Be aware that RAL is no color system, but just an arbitrary and
 historically grown collection. In this regard it’s even worse than X11
 colors.
 There’s also RAL design system, that would be better, but it’s still
 copyrighted and not suitable for CMYK or RGB devices.

 See e.g.
 http://en.wikipedia.org/wiki/RAL_colour_standard
 http://de.wikipedia.org/wiki/RAL-Farbe

 Conversions of RAL colors (that are defined in CIE L*a*b) are just
 approximations for one special RGB color space, most probably sRGB, and
 can’t cover everything, since every color space is rather limited.

 Conversions of L*a*b or any RGB colors into CMYK depend on several
 parameters (rendering intent, GCR/UCR), because CMYK color spaces are
 generally quite small, and you can hit the same color spot with different
 mixtures of CMYK inks.


  So the question remains:  if the X11 colourspace is found inadequate, is
  there another one that we might look for inspiration to create decent
  spot colours for document processing?  Even if RAL colours are used for
  varnish, does that mitigate the use of their RGB values for other
  paints?  Note, that I am not seeking exact calibration of colours, say
  for branding across different media; just a more expressive palette for
  print applications.
 
  Unfortunately, I don't have access to the Adobe products that you
  mention, and in any case would just want a convenient set of colours
  inside ConTeXt to create documents on the fly.
 
  For this type of work, are there any other open source palettes that
  we might look towards?

 Spot colors for printing rely on manufacturers that produce those
 inks/paints.
 The existing palettes are defined by (or in cooperation with)
 manufacturers.
 There exists nothing like open source paint recipes, AFAIK, so it would
 make no sense to define an open source (i.e. freely licensed)
 palette/system of spot colors.

 Of course it’s possible to define a system of (anyhow) matching colors.
 But that’s so much a matter of taste and application that I wouldn’t start
 with such an enterprise.
 There are some good online tools that help you finding matching design
 colors, at least for (s)RGB, e.g. Adobe Kuler or paletton.com.
 If you need spot colors for printing, you need a (digital or physical)
 palette from the manufacturers.


 Interesting topic.
I just add for the record
http://wiki.scribus.net/canvas/How_to_legally_obtain_spot_colour_palettes_for_use_in_Scribus_1.3.3.x_and_later_versions
http://www.selapa.net/swatchbooker/

-- 
luigi
___
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] RAL colours

2015-04-06 Thread Pavneet Arora
Again, thank you for educating me on these principles.  This really is 
great stuff!  Just the type of insight that I need.  I am sure that many 
of us struggle with production issues and it would be good to develop 
design patterns on how to overcome them.

In response to Luigi's follow up post, let me describe what I have done, 
and ask your opinions (and indulgence) as to its usefulness.

Let me preface all this by pointing you to an old video from ATT 
archives, now to be found on YouTube where Brian Kernighan describes 
some of the distinctions of Unix.  Although the entire video is 
worthwhile even at 27m+ long if you just want to skip to his part, that 
starts at the 4m09s mark.  It is a nostalgic (but still valid) look at 
the elegance of pipes and redirection.

Okay, what I have done is create two 'bash' scripts which rely heavily 
on 'sed' to massage the text data retrieved using 'w3m' to create 
suitable colo-imp-ral.mkiv (RAL Classic colours; 223 colours) and 
colo-imp-pantone.mkiv (Pantone Coated colours; 1341 colours) files on 
demand using the values found on Carlos Cabo's rgb.to website.

The generated file for the RAL colours includes both the RAL number and 
the *English* name of the colour; one can easily modify the script to 
use a different language version of the name if so desired.  So, for 
example:

\definecolor[ral1000]   [h=cdba88]
\definecolor[greenbeige][h=cdba88]

The script for the Pantone colours will only use the published name, 
whether it have a name or number or both.  So Pantone Coated Orange 021 
C will be found in the file as:

\definecolor[pantoneorange-021-c]   [h=fe5000]

and Pantone Coated 801 C

\definecolor[pantone801-c]  [h=009ace]

I won't, for the time being at least, publish the colour files in case 
there is any issue about the proprietary nature of colours, but offer up 
these two shell scripts.  With these scripts one can generate the colour 
files as needed for personal use.  If Hans feels that these scripts are 
appropriate to be published on the list, then I am happy to do so.

I will wait to hear back.

Best wishes.

PS:  I can already see some inconsistency in the sed processing as there 
is no dash prefix before 801...*sigh*.  Will have to work on that ;).

On 06Apr15, Henning Hraban Ramm wrote:
 Spot colors for printing rely on manufacturers that produce those 
inks/paints.
 The existing palettes are defined by (or in cooperation with) manufacturers.
 There exists nothing like open source paint recipes, AFAIK, so it would make 
 no sense to define an open source (i.e. freely licensed) palette/system of 
 spot colors.
 
 Of course it’s possible to define a system of (anyhow) matching colors. But 
 that’s so much a matter of taste and application that I wouldn’t start with 
 such an enterprise.
 There are some good online tools that help you finding matching design 
 colors, at least for (s)RGB, e.g. Adobe Kuler or paletton.com.
 If you need spot colors for printing, you need a (digital or physical) 
 palette from the manufacturers.
 
 
 Greetlings, Hraban

-- 

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
___

Re: [NTG-context] RAL colours

2015-04-05 Thread Henning Hraban Ramm
Am 2015-04-04 um 22:00 schrieb Pavneet Arora pavneet_ar...@waroc.com:

 This is great insight into the printing world.  Of course, Pantone has a 
 dominant position on this continent at least, but as you stated, its 
 proprietary nature keeps the palette from being distributed easily.

The same is probably true for RAL.
Be aware that RAL is no color system, but just an arbitrary and historically 
grown collection. In this regard it’s even worse than X11 colors.
There’s also RAL design system, that would be better, but it’s still 
copyrighted and not suitable for CMYK or RGB devices.

See e.g.
http://en.wikipedia.org/wiki/RAL_colour_standard
http://de.wikipedia.org/wiki/RAL-Farbe

Conversions of RAL colors (that are defined in CIE L*a*b) are just 
approximations for one special RGB color space, most probably sRGB, and can’t 
cover everything, since every color space is rather limited.

Conversions of L*a*b or any RGB colors into CMYK depend on several parameters 
(rendering intent, GCR/UCR), because CMYK color spaces are generally quite 
small, and you can hit the same color spot with different mixtures of CMYK inks.


 So the question remains:  if the X11 colourspace is found inadequate, is 
 there another one that we might look for inspiration to create decent 
 spot colours for document processing?  Even if RAL colours are used for 
 varnish, does that mitigate the use of their RGB values for other 
 paints?  Note, that I am not seeking exact calibration of colours, say 
 for branding across different media; just a more expressive palette for 
 print applications.
 
 Unfortunately, I don't have access to the Adobe products that you 
 mention, and in any case would just want a convenient set of colours 
 inside ConTeXt to create documents on the fly.
 
 For this type of work, are there any other open source palettes that 
 we might look towards?

Spot colors for printing rely on manufacturers that produce those inks/paints.
The existing palettes are defined by (or in cooperation with) manufacturers.
There exists nothing like open source paint recipes, AFAIK, so it would make no 
sense to define an open source (i.e. freely licensed) palette/system of spot 
colors.

Of course it’s possible to define a system of (anyhow) matching colors. But 
that’s so much a matter of taste and application that I wouldn’t start with 
such an enterprise.
There are some good online tools that help you finding matching design colors, 
at least for (s)RGB, e.g. Adobe Kuler or paletton.com.
If you need spot colors for printing, you need a (digital or physical) palette 
from the manufacturers.


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] RAL colours

2015-04-04 Thread Pavneet Arora
Many thanks Hraban!

This is great insight into the printing world.  Of course, Pantone has a 
dominant position on this continent at least, but as you stated, its 
proprietary nature keeps the palette from being distributed easily.

So the question remains:  if the X11 colourspace is found inadequate, is 
there another one that we might look for inspiration to create decent 
spot colours for document processing?  Even if RAL colours are used for 
varnish, does that mitigate the use of their RGB values for other 
paints?  Note, that I am not seeking exact calibration of colours, say 
for branding across different media; just a more expressive palette for 
print applications.

Unfortunately, I don't have access to the Adobe products that you 
mention, and in any case would just want a convenient set of colours 
inside ConTeXt to create documents on the fly.

For this type of work, are there any other open source palettes that 
we might look towards?

Warm regards.

On 04Apr15, Henning Hraban Ramm wrote:
 Am 2015-04-04 um 17:31 schrieb Pavneet Arora pavneet_ar...@waroc.com:
 
  1.  Is the RAL colour space a decent one for printing purposes?  What 
 would be disadvantages, if not?
 
 No, it’s not. RAL colors are defined only for surface colors, like lacquer 
 (varnish? paint).
 
 Printing colors work differently, they’re mostly transparent.
 A parallel to RAL in printing colors would be Pantone (or HKS in Germany, 
 Toyo in Japan).
 But these are copyrighted, so we would be most probably not allowed to ship a 
 library of these.
 (If I need some spot color, I look up the CMYK/RGB mix in Photoshop or 
 InDesign.)
 
  2.  Does colo-imp-ral.mkiv exist already?
 
 That would make no sense IMO.

--

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
___

Re: [NTG-context] lua code prevents compilation

2015-04-01 Thread Hans Hagen

On 4/2/2015 1:21 AM, Pablo Rodriguez wrote:

On 03/30/2015 10:33 PM, Hans Hagen wrote:

On 3/30/2015 5:19 PM, Pablo Rodriguez wrote:

[...]
For some reason unknown to me, the only way to compile the sample is to
remove the luacode snippet.

I need the lua code to have underscore hyphenation in type commands. And
I need two extra \definehyphenationfeatures and \sethyphenationfeatures
to invoke it.

Have I hit a bug or what am I missing?


I don't know as i see nothing at all with that code .. this is more fun:


Many thanks for your reply, Hans,

The following code shows the problem:

\startluacode

 function document.addfunnyhyphen(tfmdata)
 local underscore = utf.byte(_)
 local char   = tfmdata.characters[underscore]
 tfmdata.characters[0xFE000]   = {
 width= 0,
 height   = 0,
 depth= 0,
 commands = {
 { right, -char.width },
 { down, char.depth },
 { slot, 1, underscore },
 }
 }
 end


utilities.sequencers.appendaction(aftercopyingcharacters,after,document.addfunnyhyphen)

\stopluacode
%~ \definefontfamily[ornamenta][rm][TypographyTribute]
\definehyphenationfeatures[underscore][righthyphenchar=FE000]
\setuphyphenation[method=traditional]
\sethyphenationfeatures[strict]
\setupbodyfont[ornamenta]
\starttext
\hsize\zeropoint
{\sethyphenationfeatures[underscore]\tt pandoc}
A
\stoptext

If you uncomment the line with the font definition, font loading crashes
compilation. It only crashes with this font
(http://www.dafont.com/typographytribute.font) or FontAwesome
(http://www.fontawesome.io).

Both lack the underscore glyph. This causes the crash, since it works
fine if I replace the glyph with an existing glyph in the font.

Error message:

code.tex: ! LuaTeX fatal error error in error handling
\font_helpers_low_level_define ...\scaledfontmode
   \relax \ifcase
\scaledfont...
\font_helpers_trigger_define ..._identifier_class
   \csname
\v_font_identifier...
\applyfontclassstrategies ...\fontface \endcsname
   \else \expandafter
\font_h...
\font_helpers_synchronize_font ...classstrategies
   \fi \setfalse
\c_font_auto...
\rm -\ifmmode \mathrm \else \normalrm
\fi
\font_basics_switch_style ...ntstyle #1\endcsname
   \edef \fontstyle
{#1}\ifmm...
...

Would it be possible that ConTeXt silently ignores that the font doesn’t
contain the glyph?


the message is fuzzy (and i have to check a lua stack issue maybe but 
not now) ... if char is nil then char.depth is an error



I think this might be a bug.


  function document.addfunnyhyphen(tfmdata)
  local underscore = utf.byte(_)
  local char   = tfmdata.characters[underscore]

   if not char then return end

  tfmdata.characters[0xFE000]   = {
  width= 0,
  height   = 0,
  depth= 0,
  commands = {
  { right, -char.width },
  { down, char.depth },
  { slot, 1, underscore },
  }
  }
  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
___

Re: [NTG-context] lua code prevents compilation

2015-04-01 Thread Pablo Rodriguez
On 03/30/2015 10:33 PM, Hans Hagen wrote:
 On 3/30/2015 5:19 PM, Pablo Rodriguez wrote:
 [...]
 For some reason unknown to me, the only way to compile the sample is to
 remove the luacode snippet.

 I need the lua code to have underscore hyphenation in type commands. And
 I need two extra \definehyphenationfeatures and \sethyphenationfeatures
 to invoke it.

 Have I hit a bug or what am I missing?
 
 I don't know as i see nothing at all with that code .. this is more fun:

Many thanks for your reply, Hans,

The following code shows the problem:

\startluacode

function document.addfunnyhyphen(tfmdata)
local underscore = utf.byte(_)
local char   = tfmdata.characters[underscore]
tfmdata.characters[0xFE000]   = {
width= 0,
height   = 0,
depth= 0,
commands = {
{ right, -char.width },
{ down, char.depth },
{ slot, 1, underscore },
}
}
end


utilities.sequencers.appendaction(aftercopyingcharacters,after,document.addfunnyhyphen)

\stopluacode
%~ \definefontfamily[ornamenta][rm][TypographyTribute]
\definehyphenationfeatures[underscore][righthyphenchar=FE000]
\setuphyphenation[method=traditional]
\sethyphenationfeatures[strict]
\setupbodyfont[ornamenta]
\starttext
\hsize\zeropoint
{\sethyphenationfeatures[underscore]\tt pandoc}
A
\stoptext

If you uncomment the line with the font definition, font loading crashes
compilation. It only crashes with this font
(http://www.dafont.com/typographytribute.font) or FontAwesome
(http://www.fontawesome.io).

Both lack the underscore glyph. This causes the crash, since it works
fine if I replace the glyph with an existing glyph in the font.

Error message:

code.tex: ! LuaTeX fatal error error in error handling
\font_helpers_low_level_define ...\scaledfontmode
  \relax \ifcase
\scaledfont...
\font_helpers_trigger_define ..._identifier_class
  \csname
\v_font_identifier...
\applyfontclassstrategies ...\fontface \endcsname
  \else \expandafter
\font_h...
\font_helpers_synchronize_font ...classstrategies
  \fi \setfalse
\c_font_auto...
\rm -\ifmmode \mathrm \else \normalrm
   \fi
\font_basics_switch_style ...ntstyle #1\endcsname
  \edef \fontstyle
{#1}\ifmm...
...

Would it be possible that ConTeXt silently ignores that the font doesn’t
contain the glyph?

I think this might be a bug.

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
___

[NTG-context] lua code prevents compilation

2015-03-30 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\startluacode

function document.addfunnyhyphen(tfmdata)
local underscore = utf.byte(_)
local char   = tfmdata.characters[underscore]
tfmdata.characters[0xFE000]   = {
width= 0,
height   = 0,
depth= 0,
commands = {
{ right, -char.width },
{ down, char.depth },
{ slot, 1, underscore },
}
}
end


utilities.sequencers.appendaction(aftercopyingcharacters,after,document.addfunnyhyphen)

\stopluacode


\def\CoverImageFile{}%\externalfigure[TypeWriter][width=\textwidth]}
\definefontfamily[ornamenta][rm][FontAwesome]
\def\CoverImageFont{\scale[width=\textwidth]{\ornamenta }}
\def\CoverImage{\doifsomethingelse{\CoverImageFile}{\CoverImageFile}{\CoverImageFont}}

\starttext
\CoverImage
\stoptext

For some reason unknown to me, the only way to compile the sample is to
remove the luacode snippet.

I need the lua code to have underscore hyphenation in type commands. And
I need two extra \definehyphenationfeatures and \sethyphenationfeatures
to invoke it.

Have I hit a bug or what am I missing?

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] lua code prevents compilation

2015-03-30 Thread Hans Hagen

On 3/30/2015 5:19 PM, Pablo Rodriguez wrote:

Dear list,

I have the following sample:

\startluacode

 function document.addfunnyhyphen(tfmdata)
 local underscore = utf.byte(_)
 local char   = tfmdata.characters[underscore]
 tfmdata.characters[0xFE000]   = {
 width= 0,
 height   = 0,
 depth= 0,
 commands = {
 { right, -char.width },
 { down, char.depth },
 { slot, 1, underscore },
 }
 }
 end


utilities.sequencers.appendaction(aftercopyingcharacters,after,document.addfunnyhyphen)

\stopluacode


\def\CoverImageFile{}%\externalfigure[TypeWriter][width=\textwidth]}
\definefontfamily[ornamenta][rm][FontAwesome]
\def\CoverImageFont{\scale[width=\textwidth]{\ornamenta }}
\def\CoverImage{\doifsomethingelse{\CoverImageFile}{\CoverImageFile}{\CoverImageFont}}

\starttext
\CoverImage
\stoptext

For some reason unknown to me, the only way to compile the sample is to
remove the luacode snippet.

I need the lua code to have underscore hyphenation in type commands. And
I need two extra \definehyphenationfeatures and \sethyphenationfeatures
to invoke it.

Have I hit a bug or what am I missing?


I don't know as i see nothing at all with that code .. this is more fun:

\startluacode

function document.addfunnyhyphen(tfmdata)
local underscore = utf.byte(_)
local char   = tfmdata.characters[underscore]
tfmdata.characters[0xFE000]   = {
width= 0,
height   = 0,
depth= 0,
commands = {
{ right, -char.width },
{ down, char.depth },
{ slot, 1, underscore },
}
}
tfmdata.characters[0xFE001]   = {
width= 0,
height   = 0,
depth= 0,
commands = {
{ down, char.depth },
{ slot, 1, underscore },
{ right, char.width },
}
}
end



utilities.sequencers.appendaction(aftercopyingcharacters,after,document.addfunnyhyphen)

\stopluacode

\setuplanguage[en][righthyphenchar=FE000,lefthyphenchar=FE001]

\starttext
\input tufte
\stoptext


-
  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] Selecting fonts using the built-in simplefonts module

2015-03-29 Thread Jörg Weger
Your mistake was that you did not use the correct font family name in 
the third pair of square brackets. It is simply “Junction”.


I have yet to find out if ConTeXt itself can show a font’s true family name.

On Linux I am either  using a command line tool called otfinfo (that 
also shows me what opentype features are there) or I open the font with 
fontforge (if I want to find out more about the details of opentype 
features) or I open it with mate-font-viewer (fork of 
gnome-font-viewer). In the latter the family name is shown in the first 
line on the right.


Name: Junction

What desktop environment are you using?


As far as I have understood by default the built in font-selection 
module uses the “family members” named “Regular” and “Bold” of a 
selected font family, e.g. in


\definefontfamily[mainface][ss][Junction]

\ss gives Junction Regular and \ss \bf gives Junction Bold

If you want to use different font weights you have to define them 
yourself in a fourth pair of square brackets.


The League of Movable Type’s Junction font family offers three weights: 
Light, Regular and Bold.


Assuming that you want to use Junction Light as your “regular sans 
serif” font and Junction Regular as your “bold sans serif” you define 
for sans serif:


\definefontfamily[mainface][ss][Junction]
[regularfont=Junction Light, boldfont=Junction Regular]

Now \ss should give Junction Light and \ss \bf should give Junction Regular.

You can define italics as well, as the following definition for Google’s 
Roboto shows where I am using light and black instead of regular and 
bold. (Junction does not offer italic or slanted, that is why I use 
Roboto as an example of a family with many weights and styles. 
https://developer.android.com/design/style/typography.html should have 
the reworked 2014 version for download.)


\definefontfamily[mainface][ss][Roboto]
[regularfont=Roboto Light, italicfont=Roboto Light Italic,
 boldfont=Roboto Black, bolditalicfont=Roboto Black Italic]

(You could even mix weights and styles from different font families.)


Hope that helps.


Greetings Jörg


On 29.03.2015 14:40, Pavneet Arora wrote:

Hello everyone,

After a long time I have some typesetting work in front of me...yippeee!

I am struggling with adapting my templates to the new integrated
simplefonts module, and hope that someone can help.

The three issues I am having are:

1.  How does one find the proper expanded long name of the desired font.
 For this project, I am using some fonts from The League of Moveable
 Type (https://www.theleagueofmoveabletype.com/).

 I have reloaded the fonts, and can list them, in the traditional
 manner.  What I don't know is how to find the proper name for---say
 Junction Light---to use as the third argument in
 '\definefontfamily[mainface][ss][Junction Light]'

 The use of 'Junction Light' doesn't work, and neither does
 'Junction-Light', nor 'junctionlight', nor even 'Junction, Light'
 which I retrieve from Font Viewer under Linux.  MWE follows at the
 end of this email.  I reference Wolfgang's response stating that the
 expanded name must be used
 (http://www.ntg.nl/pipermail/ntg-context/2014/077321.html).

 $ mtxrun --script fonts --list --all --pattern=junction

 resolvers   | trees | analyzing 'home:texmf'
 resolvers   | caching | skipping 'files' for 'home:texmf' from
 
'/opt/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/54be04d87dd160089f572b19cb5c97e9'
 (version mismatch)
 junction  junctionbold  
/home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/junction-master/Junction-bold.otf
 junctionbold  junctionbold  
/home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/junction-master/Junction-bold.otf
 junctionlight junctionlight 
/home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/junction-master/Junction-light.otf
 junctionregular   junctionregular   
/home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/junction-master/Junction-regular.otf
2.  How does one switch fonts in-line for small snippets of text?  I
 used to use '{\simplefont[heydingsicons] q}123.345.67890', but this
 now results in an error.

 tex errorerror on line 7 in file virtual://buffer.noname.1: ! 
Undefined control sequence

 l.7 {\simplefont [heydingsicons] q}~123.456.7890 
{\simplefont[heydingsicons..
3.  This may be a more generic typescript mapping issue, but I still
 struggle with understanding font mappings.  I don't quite get how
 the default mappings are done.

 Look, for example, at Junction above.  'junction' is mapped to
 'junctionbold' rather than 'junctionregular'.  Is this just done by
 taking the first in the list in alphabetic order?

 Or how the League Gothic font is processed below.  How is it that
 leaguegothic is mapped to leaguegothiccondenseditalic

[NTG-context] Selecting fonts using the built-in simplefonts module

2015-03-29 Thread Pavneet Arora
Hello everyone,

After a long time I have some typesetting work in front of me...yippeee!

I am struggling with adapting my templates to the new integrated 
simplefonts module, and hope that someone can help.

The three issues I am having are:

1.  How does one find the proper expanded long name of the desired font.  
For this project, I am using some fonts from The League of Moveable 
Type (https://www.theleagueofmoveabletype.com/).

I have reloaded the fonts, and can list them, in the traditional 
manner.  What I don't know is how to find the proper name for---say 
Junction Light---to use as the third argument in 
'\definefontfamily[mainface][ss][Junction Light]'

The use of 'Junction Light' doesn't work, and neither does 
'Junction-Light', nor 'junctionlight', nor even 'Junction, Light' 
which I retrieve from Font Viewer under Linux.  MWE follows at the 
end of this email.  I reference Wolfgang's response stating that the 
expanded name must be used 
(http://www.ntg.nl/pipermail/ntg-context/2014/077321.html).

$ mtxrun --script fonts --list --all --pattern=junction

resolvers   | trees | analyzing 'home:texmf'
resolvers   | caching | skipping 'files' for 'home:texmf' from 

'/opt/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/54be04d87dd160089f572b19cb5c97e9'
 (version mismatch)
junction  junctionbold  
/home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/junction-master/Junction-bold.otf
junctionbold  junctionbold  
/home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/junction-master/Junction-bold.otf
junctionlight junctionlight 
/home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/junction-master/Junction-light.otf
junctionregular   junctionregular   
/home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/junction-master/Junction-regular.otf
2.  How does one switch fonts in-line for small snippets of text?  I 
used to use '{\simplefont[heydingsicons] q}123.345.67890', but this 
now results in an error.

tex errorerror on line 7 in file virtual://buffer.noname.1: ! 
Undefined control sequence

l.7 {\simplefont [heydingsicons] q}~123.456.7890 
{\simplefont[heydingsicons..
3.  This may be a more generic typescript mapping issue, but I still 
struggle with understanding font mappings.  I don't quite get how 
the default mappings are done.

Look, for example, at Junction above.  'junction' is mapped to 
'junctionbold' rather than 'junctionregular'.  Is this just done by 
taking the first in the list in alphabetic order?

Or how the League Gothic font is processed below.  How is it that 
leaguegothic is mapped to leaguegothiccondenseditalic by default?  
What is the recommended way in this new simplefont scheme to set the 
mappings for a document?

$ mtxrun --script fonts --list --all --pattern=leaguegothic

resolvers   | trees | analyzing 'home:texmf'
resolvers   | caching | skipping 'files' for 'home:texmf' from 

'/opt/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/54be04d87dd160089f572b19cb5c97e9'
 (version mismatch)
leaguegothic   leaguegothiccondenseditalic
/home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/theleagueof-league-gothic-64c3ede/LeagueGothic-CondensedItalic.otf
leaguegothiccondenseditalicleaguegothiccondenseditalic
/home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/theleagueof-league-gothic-64c3ede/LeagueGothic-CondensedItalic.otf
leaguegothiccondensedregular   leaguegothiccondensedregular   
/home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/theleagueof-league-gothic-64c3ede/LeagueGothic-CondensedRegular.otf
leaguegothicitalic leaguegothicitalic 
/home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/theleagueof-league-gothic-64c3ede/LeagueGothic-Italic.otf
leaguegothicregularleaguegothicregular
/home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/theleagueof-league-gothic-64c3ede/LeagueGothic-Regular.otf

Many thanks.

 MWE

\definefontfamily[mainface][rm][Prociono]
\definefontfamily[mainface][ss][Junction Light]
%\definefontfamily[mainface][ss][junctionlight]
%\definefontfamily[mainface][ss][Junction-Light]
%\definefontfamily[mainface][ss][Junction, Light]
\definefontfamily[mainface][mm][TeX Gyre Pagella Math]
\setupbodyfont[mainface,9pt]

\setupwhitespace[medium]

\starttext
\input lorem

\ss\input lorem

%{\simplefont[heydingsicons] q}~123.456.7890
\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

Re: [NTG-context] Selecting fonts using the built-in simplefonts module

2015-03-29 Thread Jörg Weger



On 29.03.2015 19:47, Wolfgang Schuster wrote:



Am 29.03.2015 um 14:40 schrieb Pavneet Arora pavneet_ar...@waroc.com
mailto:pavneet_ar...@waroc.com:

Hello everyone,

After a long time I have some typesetting work in front of me...yippeee!

I am struggling with adapting my templates to the new integrated
simplefonts module, and hope that someone can help.

The three issues I am having are:

1.  How does one find the proper expanded long name of the desired font.
   For this project, I am using some fonts from The League of Moveable
   Type (https://www.theleagueofmoveabletype.com/).

   I have reloaded the fonts, and can list them, in the traditional
   manner.  What I don't know is how to find the proper name for---say
   Junction Light---to use as the third argument in
   '\definefontfamily[mainface][ss][Junction Light]'

   The use of 'Junction Light' doesn't work, and neither does
   'Junction-Light', nor 'junctionlight', nor even 'Junction, Light'
   which I retrieve from Font Viewer under Linux.  MWE follows at the
   end of this email.  I reference Wolfgang's response stating that the
   expanded name must be used
   (http://www.ntg.nl/pipermail/ntg-context/2014/077321.html).


You need the familyname of the font, you use the font manager of your OS
to get the name.

\definefontfamily [junction] [rm] [Junction]
\definefontfamily [junction] [mm] [Latin Modern Math]

\definefontfamily [junction-light] [rm] [Junction]
[tf=style:light,bf=style:regular]


I just had it made working this way:

\definefontfamily[mainface]
[ss]
[EgalobhierFarinUrlaubodersonstwasoderwersteht] 
[tf=Junction Light, bf=Junction Regular]

It seems that as soon as you define your own weights (which you can mix 
from different font families) in the fourth pair of brackets, there can 
be anything in the third pair of brackets (family name).


\definefontfamily[mainface]
[sans]
[Anything]  
[regularfont=Junction Light, boldfont=Junction Regular]

works as well and is more self-explaining.

An advantage of your way

 \definefontfamily [junction-light] [rm] [Junction]
 [tf=style:light,bf=style:regular]

is that you have to type the family name only once if you re-define 
weights from the same family.


Are there any reasons why one should not use any of all those synonyms?


Greetings Jörg


\definefontfamily [junction-light] [mm] [Latin Modern Math]

\setupbodyfont[junction]

\starttext

\input ward \bf \input ward

\blank \switchtobodyfont[junction-light]

\tf \input ward \bf \input ward

\stoptext



2.  How does one switch fonts in-line for small snippets of text?  I
   used to use '{\simplefont[heydingsicons] q}123.345.67890', but this
   now results in an error.

   tex errorerror on line 7 in file
virtual://buffer.noname.1: ! Undefined control sequence

   l.7 {\simplefont [heydingsicons] q}~123.456.7890
{\simplefont[heydingsicons..


When you use a symbol font define a command for it with \definesymbol
and access it with \symbol.

The example below uses the Font Awesome [1] font for the symbols (the
symbols are defined in the attached file).

\usesymbols[fontawesome]

\defineframed
   [SymbolFrame]
   [strut=no,
width=1em,
height=1em,
background=color,
backgroundcolor=black,
corner=round,
radius=.5ex,
foregroundcolor=white]

\definesymbol
   [mysymbol]
   [\SymbolFrame{\directsymbol{fontawesome}{question}}]

\starttext

\startlines
\symbol[fontawesome][question]
\symbol[fontawesome][question-circle]
\framed[strut=no,width=1em,height=1em,background=color,backgroundcolor=black,corner=round,radius=.5ex,foregroundcolor=white]{\symbol[fontawesome][question]}
\symbol[mysymbol]
\stoplines

\stoptext



3.  This may be a more generic typescript mapping issue, but I still
   struggle with understanding font mappings.  I don't quite get how
   the default mappings are done.

   Look, for example, at Junction above.  'junction' is mapped to
   'junctionbold' rather than 'junctionregular'.  Is this just done by
   taking the first in the list in alphabetic order?

   Or how the League Gothic font is processed below.  How is it that
   leaguegothic is mapped to leaguegothiccondenseditalic by default?
   What is the recommended way in this new simplefont scheme to set the
   mappings for a document?

   $ mtxrun --script fonts --list --all --pattern=leaguegothic

   resolvers   | trees | analyzing 'home:texmf'
   resolvers   | caching | skipping 'files' for 'home:texmf' from
   
'/opt/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/54be04d87dd160089f572b19cb5c97e9'
(version mismatch)
   leaguegothic   leaguegothiccondenseditalic
   
/home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/theleagueof-league-gothic-64c3ede/LeagueGothic-CondensedItalic.otf
   leaguegothiccondenseditalicleaguegothiccondenseditalic
   
/home/pavneet/.fonts/opentype

Re: [NTG-context] Selecting fonts using the built-in simplefonts module

2015-03-29 Thread Pablo Rodriguez
On 03/29/2015 02:40 PM, Pavneet Arora wrote:
 Hello everyone,
 
 After a long time I have some typesetting work in front of me...yippeee!
 
 I am struggling with adapting my templates to the new integrated 
 simplefonts module, and hope that someone can help.
 
 The three issues I am having are:
 
 1.  How does one find the proper expanded long name of the desired font.  
 For this project, I am using some fonts from The League of Moveable 
 Type (https://www.theleagueofmoveabletype.com/).

Hi Pavneet,

the long name should be displayed in any GUI application from your OS.

inkscape should to the work here (I warmly recommend version 0.91).

 I have reloaded the fonts, and can list them, in the traditional 
 manner.  What I don't know is how to find the proper name for---say 
 Junction Light---to use as the third argument in 
 '\definefontfamily[mainface][ss][Junction Light]'

I have just downloaded and installed the OTF version from
https://www.theleagueofmoveabletype.com/junction.

I don’t make it work either. I suspect this due to crappy font naming.

 2.  How does one switch fonts in-line for small snippets of text?  I 
 used to use '{\simplefont[heydingsicons] q}123.345.67890', but this 
 now results in an error.
 
 tex errorerror on line 7 in file virtual://buffer.noname.1: ! 
 Undefined control sequence
 
 l.7 {\simplefont [heydingsicons] q}~123.456.7890 
 {\simplefont[heydingsicons..

You have to load in the preamble:

   \usemodule[simplefonts]

This is required to use the \simplefont command.

But with the new interface you should use:

   \definefontfamily[heydingsicons][rm][Humeur]

And then, in text:

   {\switchtobodyfont[heydingsicons] q}~123.456.7890

 3.  This may be a more generic typescript mapping issue, but I still 
 struggle with understanding font mappings.  I don't quite get how 
 the default mappings are done.
 
 Look, for example, at Junction above.  'junction' is mapped to 
 'junctionbold' rather than 'junctionregular'.  Is this just done by 
 taking the first in the list in alphabetic order?

The problem is wrong font naming.

 MWE

This should work better (ss font doesn’t work):

\definefontfamily[mainface][rm][Prociono]
\definefontfamily[mainface][ss][Junction-Light]
\definefontfamily[mainface][mm][TeX Gyre Pagella Math]
\definefontfamily[heydingsicons][rm][Humeur]
\setupbodyfont[mainface,9pt]

\setupwhitespace[medium]

\starttext
\input lorem

\ss\input lorem

{\switchtobodyfont[heydingsicons] q}~123.456.7890
\stoptext

Just in case it helps,


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] Selecting fonts using the built-in simplefonts module

2015-03-29 Thread Wolfgang Schuster
Am 29.03.2015 um 14:40 schrieb Pavneet Arora pavneet_ar...@waroc.com:Hello everyone,After a long time I have some typesetting work in front of me...yippeee!I am struggling with adapting my templates to the new integrated simplefonts module, and hope that someone can help.The three issues I am having are:1. How does one find the proper expanded long name of the desired font.  For this project, I am using some fonts from The League of Moveable  Type (https://www.theleagueofmoveabletype.com/). I have reloaded the fonts, and can list them, in the traditional  manner. What I don't know is how to find the proper name for---say  Junction Light---to use as the third argument in  '\definefontfamily[mainface][ss][Junction Light]' The use of 'Junction Light' doesn't work, and neither does  'Junction-Light', nor 'junctionlight', nor even 'Junction, Light'  which I retrieve from Font Viewer under Linux. MWE follows at the  end of this email. I reference Wolfgang's response stating that the  expanded name must be used  (http://www.ntg.nl/pipermail/ntg-context/2014/077321.html).You need the familyname of the font, you use the font manager of your OS to get the name.\definefontfamily [junction] [rm] [Junction]\definefontfamily [junction] [mm] [Latin Modern Math]\definefontfamily [junction-light] [rm] [Junction] [tf=style:light,bf=style:regular]\definefontfamily [junction-light] [mm] [Latin Modern Math]\setupbodyfont[junction]\starttext\input ward \bf \input ward\blank \switchtobodyfont[junction-light]\tf \input ward \bf \input ward\stoptext2. How does one switch fonts in-line for small snippets of text? I  used to use '{\simplefont[heydingsicons] q}123.345.67890', but this  now results in an error. tex error  error on line 7 in file virtual://buffer.noname.1: ! Undefined control sequence l.7 {\simplefont [heydingsicons] q}~123.456.7890 {\simplefont[heydingsicons..When you use a symbol font define a command for it with \definesymbol and access it with \symbol.The example below uses the Font Awesome [1] font for the symbols (the symbols are defined in the attached file).\usesymbols[fontawesome]\defineframed [SymbolFrame] [strut=no, width=1em, height=1em, background=""> backgroundcolor=black, corner=round, radius=.5ex, foregroundcolor=white]\definesymbol [mysymbol] [\SymbolFrame{\directsymbol{fontawesome}{question}}]\starttext\startlines\symbol[fontawesome][question]\symbol[fontawesome][question-circle]\framed[strut=no,width=1em,height=1em,background="">\symbol[mysymbol]\stoplines\stoptext3. This may be a more generic typescript mapping issue, but I still  struggle with understanding font mappings. I don't quite get how  the default mappings are done. Look, for example, at Junction above. 'junction' is mapped to  'junctionbold' rather than 'junctionregular'. Is this just done by  taking the first in the list in alphabetic order? Or how the League Gothic font is processed below. How is it that  leaguegothic is mapped to leaguegothiccondenseditalic by default?  What is the recommended way in this new simplefont scheme to set the  mappings for a document? $ mtxrun --script fonts --list --all --pattern=leaguegothic resolvers | trees | analyzing 'home:texmf' resolvers | caching | skipping 'files' for 'home:texmf' from  '/opt/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/54be04d87dd160089f572b19cb5c97e9' (version mismatch) leaguegothic leaguegothiccondenseditalic /home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/theleagueof-league-gothic-64c3ede/LeagueGothic-CondensedItalic.otf leaguegothiccondenseditalic leaguegothiccondenseditalic /home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/theleagueof-league-gothic-64c3ede/LeagueGothic-CondensedItalic.otf leaguegothiccondensedregular leaguegothiccondensedregular /home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/theleagueof-league-gothic-64c3ede/LeagueGothic-CondensedRegular.otf leaguegothicitalic leaguegothicitalic /home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/theleagueof-league-gothic-64c3ede/LeagueGothic-Italic.otf leaguegothicregular leaguegothicregular /home/pavneet/.fonts/opentype/TheLeagueOfMoveableType/theleagueof-league-gothic-64c3ede/LeagueGothic-Regular.otfThere mappings are only relevant when you create your own typescripts where you access fontswith the name method, e.g. \definefontsynonym [Serif] [name:leaguegothic] but simplefonts doesn’tuse of them.[1]http://fontawesome.ioWolfgang

symb-fontawesome.mkiv
Description: Binary data
___
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] Selecting fonts using the built-in simplefonts module

2015-03-29 Thread Jörg Weger



On 29.03.2015 21:31, Wolfgang Schuster wrote:



Am 29.03.2015 um 20:33 schrieb Jörg Weger joerg73@googlemail.com
mailto:joerg73@googlemail.com:


You need the familyname of the font, you use the font manager of your OS
to get the name.

\definefontfamily [junction] [rm] [Junction]
\definefontfamily [junction] [mm] [Latin Modern Math]

\definefontfamily [junction-light] [rm] [Junction]
[tf=style:light,bf=style:regular]


I just had it made working this way:

\definefontfamily[mainface]
[ss]
[EgalobhierFarinUrlaubodersonstwasoderwersteht]
[tf=Junction Light, bf=Junction Regular]


\definefontfamily [mainface] [ss] [Junction] [tf=* Light,bf=* Regular]


It seems that as soon as you define your own weights (which you can
mix from different font families) in the fourth pair of brackets,
there can be anything in the third pair of brackets (family name).

\definefontfamily[mainface]
[sans]
[Anything]
[regularfont=Junction Light, boldfont=Junction Regular]

works as well and is more self-explaining.


This will only work when you set a upright font or you will get problems.



What problems do you mean?

The following seems to work, only that there is a fallback to the fonts 
defined as upright fonts (which are in fact italic fonts) for the \em 
parts which seems to be the default behaviour if no italic fonts are 
defined in the fourth bracket pair:


%%% MWE 

\definefontfamily[mainface][ss][EgalobhierFarinUrlaubodersonstwassteht][tf=Roboto 
Light Italic, bf=Roboto Black Italic]


\setupbodyfont[mainface,9pt]


\starttext

\ss \input lorem

\ss \bf \input lorem

\ss \tf \em \input lorem

\ss \bf \em \input lorem

\stoptext


%% End of MWE %


Of course these font definitions do not make much sense but they work as 
I had expected from previous observations. And of course you should 
define all styles (\rm, \ss, \mm).




An advantage of your way

 \definefontfamily [junction-light] [rm] [Junction]
 [tf=style:light,bf=style:regular]

is that you have to type the family name only once if you re-define
weights from the same family.


When you use the keywords for the style you don’t have to look for the
right names and simpelfonts has fallbacks when the requested style isn’t
available.


That is a nice option.




Are there any reasons why one should not use any of all those synonyms?


What do you mean?


I mean that for example inside the second bracket pair “rm” equals 
“serif”, ”ss“ equals “sans” etc., in the fourth bracket pair 
“regularfont” equals “tf” etc.


Are there recommendations to not use some of those apart from personal 
taste? Or is “rm” simply a shorter plain TeX heritage while “serif” is 
more self-explaining?




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] Selecting fonts using the built-in simplefonts module

2015-03-29 Thread Wolfgang Schuster

 Am 29.03.2015 um 22:29 schrieb Jörg Weger joerg73@googlemail.com:
 
 
 
 On 29.03.2015 21:31, Wolfgang Schuster wrote:
 
 Am 29.03.2015 um 20:33 schrieb Jörg Weger joerg73@googlemail.com 
 mailto:joerg73@googlemail.com
 mailto:joerg73@googlemail.com mailto:joerg73@googlemail.com:
 
 You need the familyname of the font, you use the font manager of your OS
 to get the name.
 
 \definefontfamily [junction] [rm] [Junction]
 \definefontfamily [junction] [mm] [Latin Modern Math]
 
 \definefontfamily [junction-light] [rm] [Junction]
 [tf=style:light,bf=style:regular]
 
 I just had it made working this way:
 
 \definefontfamily[mainface]
 [ss]
 [EgalobhierFarinUrlaubodersonstwasoderwersteht]
 [tf=Junction Light, bf=Junction Regular]
 
 \definefontfamily [mainface] [ss] [Junction] [tf=* Light,bf=* Regular]
 
 It seems that as soon as you define your own weights (which you can
 mix from different font families) in the fourth pair of brackets,
 there can be anything in the third pair of brackets (family name).
 
 \definefontfamily[mainface]
 [sans]
 [Anything]
 [regularfont=Junction Light, boldfont=Junction Regular]
 
 works as well and is more self-explaining.
 
 This will only work when you set a upright font or you will get problems.
 
 
 What problems do you mean?

When you write nonsense as font name without setting a upright font nothing 
will show up in your document because the fonts aren’t loaded.

 The following seems to work, only that there is a fallback to the fonts 
 defined as upright fonts (which are in fact italic fonts) for the \em parts 
 which seems to be the default behaviour if no italic fonts are defined in the 
 fourth bracket pair:

The \em command uses the slanted and not the italic alternative by default.

When there is no italic or slanted style in the font the regular style is used 
and when there is no bolditalic or boldslanted style the bold style is used.

 %%% MWE 
 
 \definefontfamily[mainface][ss][EgalobhierFarinUrlaubodersonstwassteht][tf=Roboto
  Light Italic, bf=Roboto Black Italic]
 
 \setupbodyfont[mainface,9pt]
 
 
 \starttext
 
 \ss \input lorem
 
 \ss \bf \input lorem
 
 \ss \tf \em \input lorem
 
 \ss \bf \em \input lorem
 
 \stoptext
 
 
 %% End of MWE %
 
 
 Of course these font definitions do not make much sense but they work as I 
 had expected from previous observations. And of course you should define all 
 styles (\rm, \ss, \mm).

You don’t need a serif and a sans font in your document, one of them is enough 
but math should be always present because some symbols like bullets (but you 
can force context to take them from the text font) are taken from math.

 An advantage of your way
 
  \definefontfamily [junction-light] [rm] [Junction]
  [tf=style:light,bf=style:regular]
 
 is that you have to type the family name only once if you re-define
 weights from the same family.
 
 When you use the keywords for the style you don’t have to look for the
 right names and simpelfonts has fallbacks when the requested style isn’t
 available.
 
 That is a nice option.
 
 
 Are there any reasons why one should not use any of all those synonyms?
 
 What do you mean?
 
 I mean that for example inside the second bracket pair “rm” equals “serif”, 
 ”ss“ equals “sans” etc., in the fourth bracket pair “regularfont” equals “tf” 
 etc.
 
 Are there recommendations to not use some of those apart from personal taste? 
 Or is “rm” simply a shorter plain TeX heritage while “serif” is more 
 self-explaining?

It doesn’t matter whether you use rm or serif in the second argument because 
the argument is checked and converted to a internal name.

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] Selecting fonts using the built-in simplefonts module

2015-03-29 Thread Wolfgang Schuster

 Am 29.03.2015 um 20:33 schrieb Jörg Weger joerg73@googlemail.com:
 
 You need the familyname of the font, you use the font manager of your OS
 to get the name.
 
 \definefontfamily [junction] [rm] [Junction]
 \definefontfamily [junction] [mm] [Latin Modern Math]
 
 \definefontfamily [junction-light] [rm] [Junction]
 [tf=style:light,bf=style:regular]
 
 I just had it made working this way:
 
 \definefontfamily[mainface]
   [ss]
   [EgalobhierFarinUrlaubodersonstwasoderwersteht] 
   [tf=Junction Light, bf=Junction Regular]

\definefontfamily [mainface] [ss] [Junction] [tf=* Light,bf=* Regular]

 It seems that as soon as you define your own weights (which you can mix from 
 different font families) in the fourth pair of brackets, there can be 
 anything in the third pair of brackets (family name).
 
 \definefontfamily[mainface]
   [sans]
   [Anything]  
   [regularfont=Junction Light, boldfont=Junction Regular]
 
 works as well and is more self-explaining.

This will only work when you set a upright font or you will get problems.

 An advantage of your way
 
  \definefontfamily [junction-light] [rm] [Junction]
  [tf=style:light,bf=style:regular]
 
 is that you have to type the family name only once if you re-define weights 
 from the same family.

When you use the keywords for the style you don’t have to look for the right 
names and simpelfonts has fallbacks when the requested style isn’t available.

 Are there any reasons why one should not use any of all those synonyms?

What do you mean?

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] Selecting fonts using the built-in simplefonts module

2015-03-29 Thread Pavneet Arora
Perfect.  This is an appropriately succinct syntax.

 \definefontfamily [mainface] [ss] [Junction] [tf=* Light,bf=* Regular]

 Message: 3
 Date: Sun, 29 Mar 2015 21:31:30 +0200
 From: Wolfgang Schuster schuster.wolfg...@gmail.com
 To: mailing list for ConTeXt users ntg-context@ntg.nl
 Subject: Re: [NTG-context] Selecting fonts using the built-in
   simplefonts module
 Message-ID: 12dc7a91-4a01-4a28-b578-4327cbc64...@gmail.com
 Content-Type: text/plain; charset=utf-8
 
 
  Am 29.03.2015 um 20:33 schrieb Jörg Weger joerg73@googlemail.com:
  
  You need the familyname of the font, you use the font manager of your OS
  to get the name.
  
  \definefontfamily [junction] [rm] [Junction]
  \definefontfamily [junction] [mm] [Latin Modern Math]
  
  \definefontfamily [junction-light] [rm] [Junction]
  [tf=style:light,bf=style:regular]
  
  I just had it made working this way:
  
  \definefontfamily[mainface]
  [ss]
  [EgalobhierFarinUrlaubodersonstwasoderwersteht] 
  [tf=Junction Light, bf=Junction Regular]
 
 \definefontfamily [mainface] [ss] [Junction] [tf=* Light,bf=* Regular]
 
  It seems that as soon as you define your own weights (which you can mix 
  from different font families) in the fourth pair of brackets, there can be 
  anything in the third pair of brackets (family name).
  
  \definefontfamily[mainface]
  [sans]
  [Anything]  
  [regularfont=Junction Light, boldfont=Junction Regular]
  
  works as well and is more self-explaining.
 
 This will only work when you set a upright font or you will get problems.
 

-- 

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] extra space in footnotes (XML)

2015-03-28 Thread Pablo Rodriguez
Hi Hans,

the issue I described in a previous message with extra space with
footnote is related to XML handling:

\startbuffer[demo]
doc
 pText
 a href=#fn1 class=footnoteRef id=fnref1sup1/sup/a and
 a href=#fn2 class=footnoteRef id=fnref2sup2/sup/a
 /p
 div class=footnotes
 hr /
 ol
 li id=fn1pthis is a footnote/p
pthis is a footnote/p
pthis is a footnote/p
a class=footnoteBack href=#fnref1↩/a/li
 li id=fn2pA second footnote.a class=footnoteBack
href=#fnref2↩/a/p/li
 /ol
 /div
/doc
\stopbuffer

\starttext

\startxmlsetups xml:initialize
 \xmlsetsetup{#1}{doc|p}{xml:*}
\xmlsetsetup{\xmldocument}{a[@class='footnoteRef']}{xml:footnote:ref}
\xmlsetsetup{\xmldocument}{div[@class='footnotes']}{}
\xmlsetsetup{\xmldocument}{a[@class='uri']}{xml:autolink}
\xmlsetsetup{\xmldocument}{a[@class='footnoteBack']}{}
\xmlsetsetup{\xmldocument}{a[text()='↩']}{}
\stopxmlsetups

\xmlregistersetup{xml:initialize}

\startxmlsetups xml:doc
 \setuppapersize[A8]
 \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:p
\xmldoifnotselfempty {#1} {
\dontleavehmode
\ignorespaces
\xmlflush{#1}
\removeunwantedspaces
}
\par
\stopxmlsetups
\startxmlsetups xml:footnote:set
 \startfootnote
 \xmlflush{#1}
 \stopfootnote
\stopxmlsetups

\startluacode
 local gsub = string.gsub
 function xml.expressions.idstring(str)
 return type(str) == string and gsub(str,^#,) or 
 end
\stopluacode

\startxmlsetups xml:footnote:ref

\xmlfilter{main}{div[@class='footnotes']/ol/li[@id=idstring('\xmlatt{#1}{href}')]/command(xml:footnote:set)}
\stopxmlsetups

\xmlprocessbuffer{main}{demo}{}

\stoptext

Beta from 2015.03.28 16:30 adds an unwanted empty paragraph after each
footnote. Previous beta from 2015.03.25 22:13 added no extra space.

Is this a bug or how should I change my definition of xml:p?

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
___

[NTG-context] tabulate and header=repeat

2015-03-21 Thread Alan BRASLAU
Hello,

I have a simple problem with headers and tabulate spread over multiple
pages. In the following MWE, the header's \HL gets rendered twice on
its first instance (the first page). My error must be something simple
(and obvious)?

Thanks

Alan




\setupbodyfont [dejavu,12pt]

\setuptabulate[split=yes,header=repeat]

\starttext
\starttabulatehead
\NC \type{\input} \NC text \NC\NR
\HL
\stoptabulatehead
\starttabulate [|r|p|]
\NC knuth   \NC \input knuth   \NC\NR
\NC tufte   \NC \input tufte   \NC\NR
\NC ward\NC \input ward\NC\NR
\NC darwin  \NC \input darwin  \NC\NR
\NC dawkins \NC \input dawkins \NC\NR
\NC reich   \NC \input reich   \NC\NR
\HL
\stoptabulate
\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] tabulate and header=repeat

2015-03-21 Thread Wolfgang Schuster

 Am 21.03.2015 um 18:22 schrieb Alan BRASLAU alan.bras...@cea.fr:
 
 Hello,
 
 I have a simple problem with headers and tabulate spread over multiple
 pages. In the following MWE, the header's \HL gets rendered twice on
 its first instance (the first page). My error must be something simple
 (and obvious)?

There are actually three different rule command (\FL, \ML and \LL)
which are used from the \HL dependent on the position in the table
and in the table header this auto selection can be wrong because
ConTeXt uses \ML while \LL should be used instead. To fix the double
rule on the first page use \LL as last rule in the header.

\starttabulatehead
\NC \type{\input} \NC text \NC\NR
\LL
\stoptabulatehead

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] mkiv versus mkii: whitespace issues

2015-03-15 Thread Gerben Wierda
} --- --- ---}}

%
\setuptolerance[horizontal=strict]
\setupcolors[state=start]
\setupcolor[rgb]
%
\setupquote[style=small]

%
\usetypescript[serif,sans,mono] [hanging] [normal]

% Bypassing type-gtamacfonts.tex
\starttypescript [sans,serif] [optima] [texnansi,ec]
\definefontsynonym [Optima-Regular] [\typescriptthree-OptimaRegular]
[encoding=\typescriptthree]
\definefontsynonym [Optima-Italic] [\typescriptthree-OptimaItalic]
[encoding=\typescriptthree]
\definefontsynonym [Optima-Bold] [\typescriptthree-OptimaBold]
[encoding=\typescriptthree]
\definefontsynonym [Optima-BoldItalic] [\typescriptthree-OptimaBoldItalic]
[encoding=\typescriptthree]
\definefontsynonym [Optima-ExtraBlack] [\typescriptthree-OptimaExtraBlack]
[encoding=\typescriptthree]
\stoptypescript
\starttypescript [sans,serif] [optima] [name]
\setups[font:fallback:\typescriptone]
\definefontsynonym [\typescriptprefix\typescriptone] [Optima-Regular]
\definefontsynonym [\typescriptprefix\typescriptone Italic] [Optima-Italic]
\definefontsynonym [\typescriptprefix\typescriptone Bold]   [Optima-Bold]
\definefontsynonym [\typescriptprefix\typescriptone BoldItalic]
[Optima-BoldItalic]
\definefontsynonym [\typescriptprefix\typescriptone Black] [Optima-ExtraBlack]
\stoptypescript
\definetypeface[allsans][rm][serif][optima][default][encoding=texnansi]
\definetypeface[allsans][ss][sans][optima][default][encoding=texnansi]
%\definetypeface[allsans][rm][serif][optima][default][encoding=ec]
%\definetypeface[allsans][ss][sans][optima][default][encoding=ec]
\loadmapfile [gtamacfonts.map]
\setupbodyfont[allsans,10pt]

\setupalign[hanging]
\setupfootnotes[conversion=set 2,way=bypage,align=flushleft]

%

%\def\doalignline#1#2% \\ == newline
% {\ifhmode\hfil\break\fi
%  \begingroup
%  \setlocalhsize % new
%  \def\\{\egroup\par\doalignline{#1}{#2}\bgroup}%
%  \dowithnextbox
%{\noindent
% \hbox to \localhsize
%   {\ifcase\alignstrutmode\or\strut\fi
% #1\unhbox\nextbox#2}\endgroup}
%\hbox}

\def\startBookQuote
 {\par\bgroup
  \setupnarrower[before=]\startnarrower\indenting[never]\tfx}
\def\stopBookQuote{\stopnarrower\egroup}
%
\startmode[standalone]
  \setupfootertexts[pagenumber][{\jobname-\filename{\currentcomponent}}]
  \def\maybeendnotes
 {\subsubject{Notes} \placenotes[endnote] \subsubject{Bibliography}
\switchtobodyfont[9pt]
\placepublications[criterium=all]}
  \appendtoks \maybeendnotes \to \everystoptext
\stopmode
%
\setupcaption[figure][style=small]
\setupinteraction[state=start]

\definemeasure[CAindent][12pt]
\setupindenting[yes,\measure{CAindent}]
\setupnarrower
  [ left=\measure{CAindent},
right=\measure{CAindent},
   middle=\measure{CAindent}]
\setupitemize[each][margin=\measure{CAindent},width=\measure{CAindent}]

\defineenumeration[Step][headstyle=slanted,
location=hanging,width=fit,stopper=:,margin=\measure{CAindent},]
\defineenumeration[Phase][headstyle=slanted,
location=hanging,width=fit,stopper=:,margin=\measure{CAindent},]
\definedescription[Member][headstyle=bold,
location=hanging,indenting={yes},margin=\measure{CAindent},width=fit]

\setupnotedefinition[footnote][indenting={yes,medium}]
\setupnotedefinition[endnote][indenting={yes,medium},style={\switchtobodyfont[10pt]}]

\setupbibtex[database=gwierda,sort=author]
\setuppublications[numbering=short,sorttype=bbl,refcommand=short,autohang=yes]
\setupcite[short]

\useURL[masteringarchimateblog][http://masteringarchimate.com]
\useURL[masteringarchimatebook][http://masteringarchimate.com/mastering-archimate-edition-ii/]

\setupinteraction
 [style=,
  color=,
  contrastcolor=]

%\setupbackend[export=yes,xhtml=yes]

\definelist[chaptertext]
\setuplist[chaptertext][margin=1.3em,pagecommand=\gobbleoneargument]
\define[1]\ChapterAbstract{\writetolist[chaptertext]{}{\start\itx#1\stop}}

\stopenvironment
=

test.tex mkii 
\showgrid
\startcomponent c_loosely
\product prd_book
\project project_cataoia

\starttext
\startbuffer [chapter:quote]
In software, the chain isn't as strong as its weakest link; it's as weak as
all the weak links multiplied together\crlf
{\tf Steve McConnell --- Code Complete}\crlf\crlf
Nothing is as dangerous in architecture as dealing with separated problems\crlf
{\tf Alvar Aalto}
\stopbuffer

\chapter[h:loosely]{Prologue:\\Loosely Coupled Spaghetti}
\ChapterAbstract{Starting with an example of how things can go wrong in a
current Business-IT landscape, we notice that these kinds of problems have
existed almost for as long as IT has existed, and that no proposed `silver
bullet' has ever solved them. The goal of the book is introduced.}

\lettrine{S}{\kap{\bf uppose we}} have a system for the approval of loans. The
business logic has been put into a Business Rule Engine (BRE)
system\footnote{If you are not technical and terms like `application server',
`caught exceptions', or `web proxy' in the fragment that follows, do not
immediately get you

[NTG-context] Exporting highlights

2015-03-15 Thread Idris Samawi Hamid ادريس سماوي حامد
 */

break {
	display   : block ;
	margin-bottom : 0.5em ;
}

/* construct : inline */
/* highlight : inline */

construct {
}

construct[detail=important] {
	font-weight : bold ;
}
	
highlight [detail=emphasis]{
	font-weight : italic ;
}

highlight [detail=important]{
	font-weight : bold ;
}

highlight [detail=regular]{
	font-weight : regular ;
}

/* section: display */
/* sectiontitle   : mixed   */
/* sectionnumber  : mixed   */
/* sectioncontent : display */

section {
	display : block ;
}

sectioncontent {
	display   : block ;
	margin-top: 1em ;
	margin-bottom : 1em ;
}

section[detail=chapter], section[detail=title] {
	margin-top: 3em ;
	margin-bottom : 2em ;
}

section[detail=section], section[detail=subject] {
	margin-top: 2.5em ;
	margin-bottom : 2.5em ;
}

section[detail=subsection], section[detail=subsubject] {
	margin-top: 2em ;
	margin-bottom : 2em ;
}

section[detail=subsubsection], section[detail=subsubsubject] {
	margin-top: 1em ;
	margin-bottom : 0em ;
}

section[detail=summary], section[detail=subsummary] {
	margin-top: 1em ;
	margin-bottom : 1em ;
}

section[detail=chapter]sectionnumber {
	display  : inline-block ;
	margin-right : 1em ;
	font-size: 3em ;
	font-weight  : bold ;
}

section[detail=chapter]sectiontitle, section[detail=title]sectiontitle {
	font-size   : 3em ;
	font-weight : bold ;
}

section[detail=section]sectiontitle, section[detail=subject]sectiontitle {
	font-size   : 2.5em ;
	font-weight : bold ;
}

section[detail=subsection]sectiontitle, section[detail=subsubject]sectiontitle{
	font-size   : 2em ;
	font-weight : bold ;
}

section[detail=subsubsection]sectiontitle, section[detail=subsubsubject]sectiontitle{
	font-size   : 1em ;
	font-weight : bold ;
}

section[detail=section]sectionnumber {
	display  : inline-block ;
	margin-right : 1em ;
	font-size: 2.5em ;
	font-weight  : bold ;
}

section[detail=summary]sectiontitle {
	display : block ;
	margin-top  : 1em ;
	margin-bottom   : 1em ;
	font-weight : bold ;
	border-bottom-style : solid ;
	border-color: rgb(50%,50%,100%) ;
	border-width: .15em;
}

section[detail=subsection]sectionnumber {
	display  : inline-block ;
	margin-right : 1em ;
	font-size: 2em ;
	font-weight  : bold ;
}

section[detail=subsection]sectionnumber {
	display  : inline-block ;
	margin-right : 1em ;
	font-size: 1em ;
	font-weight  : bold ;
}

section[detail=subsummary]sectiontitle {
	display : block ;
	margin-top  : 1em ;
	margin-bottom   : 1em ;
	font-weight : bold ;
	border-color: rgb(50%,50%,100%) ;
	border-bottom-style : dotted ;
	border-width: .15em ;
}

/* itemgroup   : display */
/* item: display */
/* itemtag : mixed   */
/* itemcontent : mixed   */

itemgroup {
	display   : block ;
	margin-bottom : 0.5em ;
	margin-top: 0.5em ;
}

itemgroup[symbol=1] { list-style-type : disc ; }
itemgroup[symbol=2] { list-style-type : square ; }
itemgroup[symbol=3] { list-style-type : square ; }
itemgroup[symbol=4] { list-style-type : square ; }
itemgroup[symbol=5] { list-style-type : circ ; }
itemgroup[symbol=a] { list-style-type : lower-alpha ; }
itemgroup[symbol=A] { list-style-type : alpha ; }
itemgroup[symbol=r] { list-style-type : lower-roman ; }
itemgroup[symbol=R] { list-style-type : upper-roman ; }
itemgroup[symbol=n] { list-style-type : decimal ; }
itemgroup[symbol=g] { list-style-type : lower-greek ; }
itemgroup[symbol=G] { list-style-type : upper-greek ; }

item {
	display   : list-item ;
	margin-left   : 1em ;
	margin-bottom : 0.5em ;
	margin-top: 0.5em ;
}

itemtag {
	display: none ;
}

itemcontent {
}

/* description: display */
/* descriptiontag : mixed   */
/* descriptioncontent : mixed   */
/* descriptionsymbol  : inline  */

description {
	display   : block ;
	margin-bottom : 1em ;
	margin-top: 1em ;
}

descriptiontag {
float: left ;
clear: left ;
	margin-right : 1em ;
text-align   : left ;
font-weight  : bold ;
}

descriptioncontent {
}

descriptionsymbol {
}

/* verbatimblock  : display */
/* verbatimlines  : display */
/* verbatimline   : mixed   */
/* verbatim   : inline  */

verbatimblock {
	background-color : rgb(50%,50%,100%) ;
	display  : block ;
	padding  : 1em ;
	margin-bottom: 1em ;
	margin-top   : 1em ;
	font-family  : Lucida Console, DejaVu Sans Mono, monospace ;
}

verbatimlines+verbatimlines {
	display: block ;
	margin-top : 1em ;
}

verbatimline {
	display : block ;
	white-space : pre-wrap ;
}

verbatim {
	white-space : pre-wrap ;
	color   : rgb(60%,60%,0%) ;
	font-family : Lucida Console, DejaVu Sans Mono, monospace ;
}

/* lines : display */
/* line  : mixed   */

lines {
	display   : block ;
	margin-bottom : 1em ;
	margin-top: 1em ;
}

lines+lines {
	display: block ;
	margin-top : 1em ;
}

line {
	display

Re: [NTG-context] How to Centre Multi-line Verbatim Text

2015-03-14 Thread Wolfgang Schuster

 Am 13.03.2015 um 21:32 schrieb Emmanuel Asante emmanuela.asa...@gmail.com:
 
 Hello All,
 
 I am trying to centre a multi-line verbatim text horizontally on the page but 
 I cannot figure out how to do that. With the code below how can I centre the 
 whole block horizontally on the page?
 
 \setuptyping[TEX]
 
 \startTEX
RSpec.describe Post, :type = :model do
 end
  \stopTEX

You can add a framedtext environment around the verbatim text and use 
“location=middle” to center it.

\setuptyping
  [TEX]
  [before={\startframedtext[location=middle]},
   after=\stopframedtext]

\starttext

\startTEX
   RSpec.describe Post, :type = :model do
end
\stopTEX

\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] How to Centre Multi-line Verbatim Text

2015-03-14 Thread Emmanuel Asante
Thank you Wolfgang.

On Saturday, March 14, 2015, Wolfgang Schuster schuster.wolfg...@gmail.com
wrote:


  Am 13.03.2015 um 21:32 schrieb Emmanuel Asante 
 emmanuela.asa...@gmail.com javascript:;:
 
  Hello All,
 
  I am trying to centre a multi-line verbatim text horizontally on the
 page but I cannot figure out how to do that. With the code below how can I
 centre the whole block horizontally on the page?
 
  \setuptyping[TEX]
 
  \startTEX
 RSpec.describe Post, :type = :model do
  end
   \stopTEX

 You can add a framedtext environment around the verbatim text and use
 “location=middle” to center it.

 \setuptyping
   [TEX]
   [before={\startframedtext[location=middle]},
after=\stopframedtext]

 \starttext

 \startTEX
RSpec.describe Post, :type = :model do
 end
 \stopTEX

 \stoptext

 Wolfgang


 ___
 If your question is of interest to others as well, please add an entry to
 the Wiki!

 maillist : ntg-context@ntg.nl javascript:; /
 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] How to Centre Multi-line Verbatim Text

2015-03-13 Thread Emmanuel Asante
Hello All,

I am trying to centre a multi-line verbatim text horizontally on the page
but I cannot figure out how to do that. With the code below how can I
centre the whole block horizontally on the page?

\setuptyping[TEX]

\startTEX
   RSpec.describe Post, :type = :model do
end
 \stopTEX

Thanks
Emmanuel
___
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] setupformulas options (or defineformula) and effort to reduce the font in math formulas

2015-03-10 Thread Jaroslav Hajtmar

Thanks Hans for the reply.
I take to type some formulas larger font, so that's why I opted to frame 
their own definition of a formula environment with small print. Switch 
entire mathematical text on small I don't want.

Therefore, I would like to have both:

\startformula

\stopformula

and

\startsmallformula

\stopsmallformula

Thanx
Jaroslav Hajtmar


Dne 10.3.2015 v 23:57 Hans Hagen napsal(a):

On 3/10/2015 11:45 PM, Jaroslav Hajtmar wrote:

Hello List.
I would like some elegant way to diminished font in math formulas...

Is there possibility anything as
\setupformulas[before={\switchtobodyfont[small]} ]?
I need to align formulas, so are not enough to \mathematics {}

Below is my fallback. You can do something smarter?


define a bodyfont (rm,mm,tt) where the math has an rscale of 0.8

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] jpeg problem: Dimension too large

2015-03-10 Thread Harald Koenig
-yes.mkiv
 usedmethod=database
used file   2: filename=publ-imp-apa.lua filetype=lua 
foundname=/home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/publ-imp-apa.lua
 usedmethod=database
used file   3: filename=cont-new.mkiv filetype=tex 
foundname=/home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/cont-new.mkiv
 usedmethod=database
used file   4: filename=lang-us.lua filetype=lua 
foundname=/home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/patterns/lang-us.lua
 usedmethod=database
used file   5: filename=/home/harald/tex/Indien-2015/j1.tex 
foundname=/home/harald/tex/Indien-2015/j1.tex usedmethod=direct
used file   6: filename=lm.lfg filetype=tex 
foundname=/home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/fonts/lm.lfg
 usedmethod=database
used file   7: filename=lmroman12-regular filetype=otf format=otf 
foundname=/home/harald/tex/Indien-2015/ct/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf
 usedmethod=database
used file   8: filename=latinmodern-math.otf filetype=opentypefonts 
foundname=/home/harald/tex/Indien-2015/ct/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf
 usedmethod=database
used file   9: filename=/home/harald/tex/Indien-2015/IMG_9712c1_ok.jpg 
format=tex foundname=/home/harald/tex/Indien-2015/IMG_9712c1_ok.jpg 
usedmethod=direct
used file  10: 
filename=/home/harald/tex/Indien-2015/IMG_9712c1_bad.jpg format=tex 
foundname=/home/harald/tex/Indien-2015/IMG_9712c1_bad.jpg usedmethod=direct
used file  11: filename=lpdf-pdx.xml filetype=tex 
foundname=/home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/lpdf-pdx.xml
 usedmethod=database

system   files  stop used files


system   options  start commandline options

used option  currentrun=1
used option  fulljobname=./j1.tex
used option  input=./j1.tex
used option  kindofrun=1
used option  maxnofruns=8
used option  no-parse-first-line=true

system   options  stop commandline options

system   options  start commandline files

used file   1: ./j1.tex

system   options  stop commandline files


mkiv lua stats   used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats   used cache path: 
/home/harald/tex/Indien-2015/ct/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats   resource resolver: loadtime 0.014 seconds, 0 scans with 
scantime 0.000 seconds, 0 shared scans, 11 found files, scanned paths: none
mkiv lua stats   stored bytecode data: 364 modules (0.265 sec), 76 tables 
(0.007 sec), 440 chunks (0.272 sec)
mkiv lua stats   running in nuts mode: yes
mkiv lua stats   cleaned up reserved nodes: 44 nodes, 439 lists of 438
mkiv lua stats   node memory usage: 2 glue, 2 penalty, 9 attribute, 37 
glue_spec, 3 attribute_list, 2 temp
mkiv lua stats   node list callback tasks: 6 unique task lists, 5 instances 
(re)created, 81 calls
mkiv lua stats   used backend: pdf (backend for directly generating pdf output)
mkiv lua stats   loaded patterns: en::2, load time: 0.000
mkiv lua stats   jobdata time: 0.000 seconds saving, 0.001 seconds loading
mkiv lua stats   callbacks: 273 direct, 243 indirect, 516 total
mkiv lua stats   randomizer: resumed with value 0.91750514736283
mkiv lua stats   result saved in file: j1.pdf, compresslevel 3, 
objectcompresslevel 3
mkiv lua stats   loaded fonts: 2 files: latinmodern-math.otf, 
lmroman12-regular.otf
mkiv lua stats   fonts load time: 0.260 seconds 
mkiv lua stats   graphics processing time: 11.089 seconds including tex, 2 
processed images, 2 unique asked, 2 bad names
mkiv lua stats   used platform: linux-64, type: unix, binary subtree: 
texmf-linux-64
mkiv lua stats   luatex banner: this is luatex, version beta-0.79.3 (tex live 
2015/dev) (rev 5140)
mkiv lua stats   control sequences: 40447 of 65536 + 10
mkiv lua stats   lua properties: engine: lua, used memory: 58 MB (ctx: 58 MB), 
hash type: lua, hash chars: min(64,40), symbol mask: utf (τεχ)
mkiv lua stats   runtime: 12.827 seconds, 2 processed pages, 2 shipped pages, 
0.156 pages/second

___
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] setupformulas options (or defineformula) and effort to reduce the font in math formulas

2015-03-10 Thread Wolfgang Schuster

 Am 11.03.2015 um 00:07 schrieb Jaroslav Hajtmar hajt...@gyza.cz:
 
 Thanks Hans for the reply.
 I take to type some formulas larger font, so that's why I opted to frame 
 their own definition of a formula environment with small print. Switch entire 
 mathematical text on small I don't want.
 Therefore, I would like to have both:
 
 \startformula
 
 \stopformula
 
 and
 
 \startsmallformula
 
 \stopsmallformula


\startformula has a optional argument which let you change the font, e.g. 
\startformula[9pt].

\definestartstop[smallformula]
  [before={\startformula[small]},
   after=\stopformula]

\starttext

\startformula
c^2 = a^2 + b^2
\stopformula

\startformula[small]
c^2 = a^2 + b^2
\stopformula

\startsmallformula
c^2 = a^2 + b^2
\stopsmallformula

\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] Does a half-space or small space exist in ConTeXt?

2015-03-08 Thread Robert Blackstone

On 8 Mar 2015, at 14:12 ,  Wolfgang Schuster schuster.wolfg...@gmail.com wrote
 To: mailing list for ConTeXt users ntg-context@ntg.nl
 Subject: Re: [NTG-context] Does a half-space or small space exist in
   ConTeXt?
 Message-ID: 49ac1148-387a-4934-932a-334cadbb5...@gmail.com
 Content-Type: text/plain; charset=utf-8
 
 
 Am 08.03.2015 um 13:55 schrieb Robert Blackstone 
 blackstone.rob...@gmail.com:
 
 
 On 8 Mar 2015, at 13:04 , Wolfgang Schuster schuster.wolfg...@gmail.com 
 wrote
 
 12:24 schrieb Robert Blackstone blackstone.rob...@gmail.com:
 
 Hi all,
 
 I would like to use something like a half-space or small space in a 
 situation where neither no space, nor a normal space is ideal.
 
 You can use \thinspace or \, which is the short form of \thinspace.
 
 
 
 Oddly enough, \, gives no comma and a normal space, \. gives no period and 
 no space with mkiv, and a superscript period with mkii.
 Could these forms for \thinspace perhaps be obsolete? 
 
 
 I have no problem to use \, as a space command but when you use don’t put a 
 space between the command and the following character.


My mistake: I forgot to add a comma after \, !
 \,, indeed works beautifully for my purpose. 
And thanks for the list of possibilities for spaces of various sizes.

Best regards,

Robert Blackstone


___
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] Problem with MkIV and TikZ picture remembering

2015-03-07 Thread Jörg Weger
Thank you very much Hans and Aditya for your efforts and sorry for only 
replying now — momentarily I am writing a paper (of course typeset with 
ConTeXt :-) ) that has to get finished.


For now I have dropped the idea of using that certain type of 
illustration in the paper as your METAPOST examples are working, but I 
had forgotten to say that I need effectively two arrows from one part of 
a sentence two two others (I am trying to illustrate a linguistic 
ambiguity problem) and I did not manage to get that working starting 
from your examples. Then I need a shape other than a tight frame to 
surround the words, TikZ’ rounded rectangles were too nice for that. In 
the moment I don’t have the time to dive deeper into METAPOST which 
seems to be a mighty beast from what I see in the Metafun manual, but in 
future I shurely will.


The nice thing about TikZ are that you can use the self explaining 
commands rather intuitively (at least having some experience in Lilypond 
and now ConTeXt), that there are many different building blocks 
predefined that you can use and that there are hundreds of examples in 
the internet that you can use as starting point. So I managed to get 
some things working after a self-tought one day crash course – 
Metapost’s learnig curve seems to be a lot steeper to me. It is really a 
pity that ConTeXt mkiv does not save the node coordinates correctly as 
Wolfgang found out.


Greetings Jörg

On 03.03.2015 20:28, Aditya Mahajan wrote:

On Tue, 3 Mar 2015, Hans Hagen wrote:


On 3/3/2015 6:12 PM, Aditya Mahajan wrote:

2. The metafun alternative is a bit inconvenient. Suppose you want to
draw a bunch of such graphics (words connected by arrows). Then, you
will need to ensure that node names are unique. (Is there a way to get
around that?)


\newcounter\connectedwordcounter

\starttexdefinition unexpanded fromword [#1]#2
\expandafter\pushmacro\csname cwc#1\endcsname % nesting hack
\doglobal\increment\connectedwordcounter
\setxvalue{cwc#1}{\connectedwordcounter}%
\startpositionoverlay{highlightoverlay}
\setMPpositiongraphic
  {\getvalue{cwc#1}f}
  {highlightgraphic}
  {from=\getvalue{cwc#1}f,to=\getvalue{cwc#1}t}
\stoppositionoverlay
\hpos{\getvalue{cwc#1}f}{#2}%
\stoptexdefinition

\starttexdefinition unexpanded toword [#1]#2
\hpos{\getvalue{cwc#1}t}{#2}
\expandafter\popmacro\csname cwc#1\endcsname % nesting hack
\stoptexdefinition


Thanks.

Aditya
___

If your question is of interest to others as well, please add an entry
to the Wiki!

maillist : ntg-context@ntg.nl /
http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

___
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 the standalone ConTeXt, how do I add access to my texmf-local tree

2015-03-04 Thread Hans Hagen

On 3/4/2015 2:52 PM, Ulrike Fischer wrote:

Am Mon, 02 Mar 2015 09:36:57 +0100 schrieb Hans Hagen:


Can I adapt that in some way, so I can add a few texmfs to the search
path? I have no problem with adapting a file or setting an environment
variable.


texmfcnf.lua (can be in your texmf-local tree) or the TEXMF env var; not
so different from regular texlive, only in a different configuration file


I have a question regarding texmcnf.lua + TEXMCNF:

On my system TEXMFCNF points to a folder where I have a special
texmf.cnf that I need for texlive.

This disturbs context:

resolvers   | resolving | looking for 'texmfcnf.lua' on weird
path 'D:/texmfcnf/' from specification 'D:/texmfcnf/'

and as there is not texmfcnf.lua the search pathes can't be setup.


the weird is just reported because normally there is something texmf or 
web2c in the name which isn't the case there



I would like to add a texmfcnf.lua there which helps context to find
and load the standard configuration. What should be the content of
such a texmfcnf.lua?

I tried with

return {
 type= configuration,
 version = 1.,
 date= 2015-03-04,
 time= 14:00:00,
 comment = ConTeXt MkIV configuration file,
 author  = Ulrike Fischer,
 content = {
variables = {
TEXMFCNF =
{D:/context-minimals/context/tex/texmf/web2c}
}
}
 }


but it didn't work ;-(. This doesn't setup the pathes.

I also tried
dofile(D:/context-minimals/context/tex/texmf/web2c/texmfcnf.lua)

which didn't work either.


You can try in texmf-local/web2c:

return {
type= configuration,
version = 1.,
date= 2015-03-04,
time= 14:00:00,
comment = ConTeXt MkIV configuration file,
author  = Ulrike Fischer,
content = {
variables = {

-- texroot/texmf-mine/...

TEXMFMINE = selfautoparent:texmf-mine,
TEXMF = 
{$TEXMFHOME,!!$TEXMFPROJECT,!!$TEXMFFONTS,!!$TEXMFLOCAL,!!$TEXMFMODULES,!!$TEXMFCONTEXT,!!$TEXMFSYSTEM,!!$TEXMFMAIN,!!$TEXMFMINE},

}
}
}

-
  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] Using the standalone ConTeXt, how do I add access to my texmf-local tree

2015-03-04 Thread Ulrike Fischer
Am Mon, 02 Mar 2015 09:36:57 +0100 schrieb Hans Hagen:

 Can I adapt that in some way, so I can add a few texmfs to the search
 path? I have no problem with adapting a file or setting an environment
 variable.
 
 texmfcnf.lua (can be in your texmf-local tree) or the TEXMF env var; not 
 so different from regular texlive, only in a different configuration file

I have a question regarding texmcnf.lua + TEXMCNF:

On my system TEXMFCNF points to a folder where I have a special
texmf.cnf that I need for texlive. 

This disturbs context:

resolvers   | resolving | looking for 'texmfcnf.lua' on weird
path 'D:/texmfcnf/' from specification 'D:/texmfcnf/'

and as there is not texmfcnf.lua the search pathes can't be setup.

I would like to add a texmfcnf.lua there which helps context to find
and load the standard configuration. What should be the content of
such a texmfcnf.lua?

I tried with

return {
type= configuration,
version = 1.,
date= 2015-03-04,
time= 14:00:00,
comment = ConTeXt MkIV configuration file,
author  = Ulrike Fischer,
content = {
   variables = {
   TEXMFCNF =
{D:/context-minimals/context/tex/texmf/web2c}
   }
   }
}


but it didn't work ;-(. This doesn't setup the pathes.

I also tried
dofile(D:/context-minimals/context/tex/texmf/web2c/texmfcnf.lua)

which didn't work either. 

-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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] mkiv and lettrine

2015-03-01 Thread Hans Hagen

On 3/1/2015 11:39 AM, Gerben Wierda wrote:

Nobody?

On 27 Feb 2015, at 18:01, Gerben Wierda gerben.wie...@rna.nl
mailto:gerben.wie...@rna.nl wrote:


I am using lettrine in mkii. I am trying to convert a project to mkiv.
I’d like to use lettrine here too.

\usemodule[lettrine]
\setuplettrine[Lines=3,
   Hang=.5,
   Oversize=0,
   Raise=0,
   Findent=0pt,
   Nindent=0em,
   Slope=0em,
   Ante=,
   FontHook=,
   TextFont=\sc,
   Image=no]

\lettrine{S}{\kap{\bf uppose we}} have a system

What do I have to change for mkiv?


search for 'initials' (probably on the wiki somewhere) .. from the sources:

%D \starttyping
%D \placeinitial \input ward \par \input ward \par \placeinitial \input 
tufte

%D
%D \setupinitial
%D   [location=text,
%Dn=2,
%Dcolor=darkred,
%Ddistance=-1em,
%Dhoffset=1em,
%Dvoffset=-3ex,
%Dbefore=\blank]
%D
%D \placeinitial \input ward \par \input ward \placeinitial \input tufte

% \setupbodyfont[dejavu,9pt]
%
% \startbuffer
% \setinitial[two]D. E. Knuth   \ignorespaces\input knuth \par
% \setinitial[two]  Knuth   \ignorespaces\input knuth \par
% \setinitial[two] \quotation{D. E. Knuth}  \ignorespaces\input knuth \par
% \setinitial[two] \quotation  {Knuth}  \ignorespaces\input knuth \par
% \setinitial[two]  [text={D.E. Knuth}] \ignorespaces\input knuth \par
% \setinitial[two]   [m=4] D. E. Knuth  \ignorespaces\input knuth \par
% \stopbuffer
%
% \type{m=2}  \start 
\defineinitial[two][m=2,method=none]  \getbuffer \page \stop
% \type{m=1,method=auto}  \start 
\defineinitial[two][m=1,method=auto]  \getbuffer \page \stop
% \type{m=1,method={auto,first,last}} \start 
\defineinitial[two][m=1,method={first,auto,last}] \getbuffer \page \stop




___
If your question is of interest to others as well, please add an entry
to the Wiki!

maillist : ntg-context@ntg.nl mailto: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
___




--

-
  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] No escape to TeX for inline typing?

2015-02-28 Thread Christoph Reller
On Wed, Wed, 18 Feb 2015 07:03:27 +0100, christoph.rel...@gmail.com wrote:


 On Tue, Feb 17, 2015 at 16:30:13 +0100, Wolfgang Schuster 
 schuster.wolfg...@gmail.com wrote:

   Am 17.02.2015 um 16:04 schrieb Christoph Reller 
  christoph.rel...@gmail.com:
   How do I escape to TeX from inside an inline typing command? It works
  fine from a typing environment.
 
  The \type command doesn’t support a escape function but it can be added
 an
  additional line in the code (buff-ver.miv):
 
  \def\buff_verbatim_type_normal#1%
{\buff_verbatim_initialize_type_two
 \dostarttaggedchained\t!verbatim\currenttype\??type
 \ctxcommand{typestring{
   data= \!!bs\detokenize{#1}\!!es,
   tab = \typeparameter\c!tab,
   method  = \typeparameter\c!option,
  +escape  = \!!bs\typeparameter\c!escape\!!es,
   nature  = inline,
   compact = \typeparameter\c!compact, % none | all | last (all
 needed
  in tabulate etc for manuals)
  }}%
 \dostoptagged
 \buff_verbatim_right_of_type
 \egroup}
 
  To enable the function add „escape=yes” (or your own delimiters) to
  \definetype.
 
  Wolfgang
 

 Thanks a lot, Wolfgang!

 Dear Hans,

 Can you please add the above patch, or is there a particular reason for not
 doing so?

 Kind regards,

 Christoph


Dear Hans,

Please say at least yes or no. I am not very keen on maintaining my own
version of ConTeXt so I would like to know if I can count on this feature
being added.

Thanks for your effort and kind regards,

Christoph
___
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] handling code in XML

2015-02-23 Thread Hans Hagen

On 2/22/2015 6:37 PM, Pablo Rodriguez wrote:

Dear list,

I have the following sample:

 \startbuffer[demo]
 doc
  pcodelt;divgt;foolt;/divgt;/code/p
 precodefor a gt; b
 amp; c/code/pre
 /doc
 \stopbuffer

 \starttext

 \startxmlsetups xml:initialize
  \xmlsetsetup{#1}{p|doc|code}{xml:*}
  \xmlsetsetup{#1}{pre/code}{xml:pre}
 \stopxmlsetups

 \xmlregistersetup{xml:initialize}

 \startxmlsetups xml:doc
  \xmlflush{#1}
 \stopxmlsetups

 \startxmlsetups xml:p
  \xmlflush{#1}\par
 \stopxmlsetups

 \startxmlsetups xml:code
  \begingroup\tt\xmlflush{#1}\endgroup\par

  \xmlinlineverbatim{#1}
 \stopxmlsetups

 \startxmlsetups xml:pre
  \xmlverbatim{#1}
 \stopxmlsetups

 \xmlprocessbuffer{main}{demo}{}

 \stoptext

And I experience two issues:

Is there a way to handle code (or pre) as verbatim, but translating
the five entities that need to be escaped in XML?

Which is the right way to link a pre or code to a type or typing
command?

\startxmlsetups xml:code
 \begingroup
 \tt
 \xmlflushspacewise{#1}
 \endgroup
\stopxmlsetups

\startxmlsetups xml:pre
\begingroup
\tt
\xmlflushspacewise{#1}
\endgroup
\stopxmlsetups



--

-
  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] handling code in XML

2015-02-23 Thread Pablo Rodriguez
On 02/23/2015 03:56 PM, Hans Hagen wrote:
 On 2/22/2015 6:37 PM, Pablo Rodriguez wrote:
 [...]
 Is there a way to handle code (or pre) as verbatim, but translating
 the five entities that need to be escaped in XML?

 Which is the right way to link a pre or code to a type or typing
 command?
 [...]
 \startxmlsetups xml:pre
  \begingroup
  \tt
  \xmlflushspacewise{#1}
  \endgroup
 \stopxmlsetups

Many thanks for your reply, Hans.

Your code works fine, but I forgot to mention another issue.

Here is another sample:

\startbuffer[demo]
doc
precodefor a gt; bamp; c/code/pre
pre class=texcode\ConTeXt\ rocks!/code/pre
/doc
\stopbuffer

\starttext

\startxmlsetups xml:initialize
 \xmlsetsetup{#1}{doc}{xml:*}
 \xmlsetsetup{#1}{pre/code}{xml:pre}
 \xmlsetsetup{#1}{pre[@class='tex']/code}{xml:texcode}
\stopxmlsetups

\xmlregistersetup{xml:initialize}

\startxmlsetups xml:doc
 \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:pre
\begingroup
  \tt
  \xmlflushspacewise{#1}
\endgroup\par
\stopxmlsetups

\startxmlsetups xml:texcode
\startΤΕΧ
\xmlflushspacewise{#1}
\stopTEX
\stopxmlsetups

\xmlprocessbuffer{main}{demo}{}

\stoptext

And two questions:

Is there no way to get xml:texcode with a TEX typing?

Isn’t \xmlflushspacewise supposed to respect blank spaces? (Sorry, but I
don’t see any differences with \xmlflushlinewise.)

Many thanks for your help again,


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
___

<    13   14   15   16   17   18   19   20   21   22   >