[NTG-context] TikZ: align=left does not work

2014-10-05 Thread Joshua Krämer
Dear list,

there seems to be a bug regarding the alignment of text inside nodes.
If the TikZ picture is inside a centered or ragged left environment,
align=left is not interpreted correctly.  MWE attached.

Kind regards,
Joshua


\usemodule[tikz]
\starttext

\setupalign [right]
Ragged right alignment

\starttikzpicture
\node [draw=red, text width=5cm, align=left] at (0, 1) {left};
\node [draw=red, text width=5cm, align=center] at (0, 2) {center};
\node [draw=red, text width=5cm, align=right] at (0, 3) {right};
\stoptikzpicture

\setupalign [center]
Centered alignment

\starttikzpicture
\node [draw=red, text width=5cm, align=left] at (0, 1) {left};
\node [draw=red, text width=5cm, align=center] at (0, 2) {center};
\node [draw=red, text width=5cm, align=right] at (0, 3) {right};
\stoptikzpicture

\setupalign [left]
Ragged left alignment

\starttikzpicture
\node [draw=red, text width=5cm, align=left] at (0, 1) {left};
\node [draw=red, text width=5cm, align=center] at (0, 2) {center};
\node [draw=red, text width=5cm, align=right] at (0, 3) {right};
\stoptikzpicture

\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] Scientific paper boiler plate

2014-09-15 Thread Joshua Krämer
On 2014-09-12, 2:40, Kip Warner wrote:

 I'd like to write a short scientific paper describing an algorithm I
 discovered in the realm of computational geometry a few years ago
 before I forget it entirely. I've been meaning to do this for some
 time, but haven't had a chance. I'd like to use ConTeXt. 
 
 Does anyone have a sample source I could take a look at as a starting
 point? I will need to typeset some figures, pseudo code, references,
 etc. and this all takes much less time when someone much more clever
 than I, like Wolfgang or Hans already has a similar environment file
 and such setup.

At the moment, I am writing my MD thesis using ConTeXt.  I have
equations, figures, tables, diagrams, references.  There is also Lua
code embedded to prepare data tables from CSV files, round values etc.
Of course, there is a lot in my files that you will not need.  The
organization of my files  (preamble files, chapter files) may not
be suitable for your project.  The format of my document (thesis)
may not be what you want (journal article?).  On these grounds, I do not
think it is a good idea to take the files from somebody else and alter
them.  I know this is common in the LaTeX community, and I have seen
many times that it leads to inconsistent settings, conflicting packages
and other problems.  Instead, I suggest you to start with an empty file
and add everything *you* need.  However, if you really want, I can try
to strip down my files and send you a basic sample.

Kind regards,
Joshua Krämer


___
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] Separate italic font.

2014-09-06 Thread Joshua Krämer
On 2014-09-04, 15:42, john Culleton wrote:

 Now I have a related question. When I run:
 mtxrun --script fonts * foo
 The file foo has three columns. We only use the
 word in the right hand column with the suffix
 stripped off. So what is the purpose of the the
 other two columns? for example:
 
 minionproitalic minionproit MinionPro-It.otf
 
 but we only use MinionPro-It.
 
 Just curious.

You can check the recent mailing thread with subject the new
simplefonts stuff for some discussion of font names and mtxrun
output.

Kind regards
Joshua


___
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] the new simplefonts stuff

2014-09-03 Thread Joshua Krämer
On 2014-09-01, 21:20, Sandra Snan wrote:

 This is probably a pretty basic question, but how do I find out the
 name of the font that \definefontfamily expects in the third argument?

Hi Sandra,

the only reliable method I have found is to inspect the font with
FontForge.

Here is an example: the Swiss 721 font from Bitstream (Helvetica
digitization).

FontForge reports:

Font name:Swiss721BT-Roman
Family name:  Swis721 BT
Display name: Swiss 721 BT
Weight:   Book

mtxrun --script fonts --list --all --pattern=swiss result:

swiss721bt  swiss721btroman Swiss721.ttf
swiss721btroman swiss721btroman Swiss721.ttf

The only name which works in ConTeXt is the family name (which can be
seen in FontForge): Swis721 BT, note the single s.  However, this
name is *not* shown in the mtxrun output.

Interestingly, I have also seen mtxrun show the family name (different
from the font name) for other fonts, so I really do not know how it
makes up its output.  It is certainly not useful to find out the
name that is to be used in ConTeXt.

Kind regards,
Joshua


___
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 embedding code TikZ code

2014-08-30 Thread Joshua Krämer
On 2014-08-29, 20:22, Fabrice Couvreur wrote:

 In the code below, I do not understand why the label Arbre 2 does
 not have the color you want, that is to say the same as the label
 Arbre 1. Thank you.

I do not know why it does not work, but this is how it works:

\draw [text=H1prime, font=\bf] (-2.96,4.4) node {Arbre 2};

or

\node [text=H1prime, font=\bf] at (-2.96,4.4) {Arbre 2};

Kind regards,
Joshua Krämer


___
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] Distances between chapter and section titles and text

2014-08-17 Thread Joshua Krämer
On 2014-08-15, 19:56, Robert Blackstone wrote:

 A few days ago I posted this question. There were no reactions, but
 it is not an urgent matter for me anymore since I found an effective
 work-around. (Although I still wonder whether or not this possibility
 exists in mkiv,)

I have not seen the issue you have described myself.  The attached
example works for me.  You have to prepare a minimal working example
that shows the problem.  Maybe then somebody can identify the reason
for your issue.

Kind regards,
Joshua


\starttext

\startfrontmatter
\input knuth
\stopfrontmatter

\startbodymatter

\setuphead [chapter] [
number=yes,
alternative=middle,
style=\tfa \bf,
after={\blank[0.5cm]},
]

\chapter{One}
\input knuth

\setuphead [chapter] [
number=yes,
alternative=middle,
style=\tfa \bf,
after={\blank[0.1cm]},
]

\chapter{Two}
\input knuth

\stopbodymatter

\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] Hans will be offline for a few weeks

2014-08-07 Thread Joshua Krämer
My best wishes for a speedy recovery to Hans.
Joshua


___
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] Custom breakpoints for \hyphenatedurl

2014-08-07 Thread Joshua Krämer
On 2014-08-07, 12:58, Wolfgang Schuster wrote:

 The position of the \hyphenatedurlseparator symbol depends currently
 on the breakpoint in the url, when the break is allowed after a
 character at the end of line but when the break is allowed before a
 character the symbol appears at the begin of the line.
 The question is now if this is intended or can it be changed.

I can hardly imagine this to be intended.  The reader should be
informed about a break as soon as he reaches the break, so he knows the
word/token is not finished yet.  As we read from top to bottom, the
end of the top line is where this information should be.


 Another thing where we can discuss is the way to set the separator,
 e.g. \sethypehantedurlseparator{…} seems more appropriate than
 \def\hyphenatedurlseparator{…} because we already have other \setXXX
 commands.

Agreed.

  The second URL has a linebreak in front of the colon, which I do
  not want.
 
 The points where contexts is allowed to break a url at :/# etc. are
 predefined in the Lua code.
 
 When you want to change this you have to use the three commands
 
   - \sethyphenatedurlbefore{…}
   - \sethyphenatedurlafter{…}
   - \sethyphenatedurlnormal{…}

Could you please change my minimal example (attached at the
end) accordingly? I want an URL like http://optimist; to be wrapped
after :// only, not in front of the colon.  I couldn't find out how to
achieve this.  I also want no linebreak to occur between two slahes
(if this is possible with the current implementation).  By the way, I
also don't understand the meaning of \sethyphenatedurlnormal {...}.

Kind regards,
Joshua


\setuplayout[width=5cm]
\sethyphenatedurlafter {/}
\sethyphenatedurlbefore {}
\sethyphenatedurlnormal {}
\starttext

Word Word Word \hyphenatedurl {http://optimist.optimist}

Word Word Word W \hyphenatedurl {http://optimist.optimist}

Word Word Word Wo \hyphenatedurl {http://optimist.optimist}

(Only the first of these three linebreaks is desired.)

\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] Superscript Citation References

2014-08-07 Thread Joshua Krämer
On 2014-08-06, 23:54, Thangalin wrote:

 I would like to cite bibliography references using a superscript font.

The attached example is a hack using an \hbox nested inside a math
superscript.  It doesn't work with the text superscript command (\high)
for some reason.

Kind regards,
Joshua


\setupbibtex [database=sources]

\setuppublications[
  refcommand=num,
  numbering=yes
]

\setupcite[num][
  left={$^\bgroup\hbox\bgroup\tfx },
  right={\egroup\egroup$},
]

\starttext
  Word\cite[kattamuri@debate] Word
\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
___


[NTG-context] Custom breakpoints for \hyphenatedurl

2014-08-05 Thread Joshua Krämer
Dear list,

I could successfully configure ConTeXt to introduce linebreaks /after/
some characters in URLs with \sethyphenatedurlafter {...}

I would also like to disable linebreaks /before/ some of the predefined
characters.  For example, no linebreak should occur before :

Is this possible?  \sethyphenatedurlbefore {} (with empty braces)
does not work.

Unfortunately, usage of \sethyphenatedurlafter also introduced the
following problem:  the \hyphenatedurlseparator symbol now appears
after the linebreak, i.e. at the beginning of the new line.  Can I do
something about it?

Thanks and kind regards,
Joshua


___
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] Custom breakpoints for \hyphenatedurl

2014-08-05 Thread Joshua Krämer
On 2014-08-05, 22:54, Wolfgang Schuster wrote:

 Can you provide a working minimal example?

Sorry, please find an example at the end.

The first URL has the right linebreaks, but the arrow should be at the
end of the line.  Interestingly, it shows another problem:  the # is
repeated.

The second URL has a linebreak in front of the colon, which I do not
want.

Thanks and kind regards,
Joshua


\setuplayout[width=5cm]
\def\hyphenatedurlseparator{→}
\sethyphenatedurlafter {/.#}
\sethyphenatedurlbefore {}
\starttext

\hyphenatedurl
{http://optimist.optimist/optimist/optimist.optimist#optimist}

Word Word Word Word \hyphenatedurl {http://optimist.optimist}

\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] \os

2014-08-03 Thread Joshua Krämer
On 2014-08-02, 22:36, Procházka Lukáš wrote:

 OK, thanks for explanation.
 
 This means that one has to switch to \os only when a number is to be
 printed.
 
 So when I want all numbers in the document to be old-style (and also
 ligatures etc. be kept), I have to:
 
 1) switch to {\os } when writing a number manually,
 
 2) define old-style-making-commands wherever numbers are generated
 automatically, i.e. e.g.:

Just do it the way Wolfgang said, using features:


\definefontfeature [default] [default] [lnum=yes, onum=no]
\definefontfamily [latinmodern] [serif] [Latin Modern Roman]
\setupbodyfont[latinmodern, 12pt]

\definefontfeature[oldstyle][lnum=no, onum=yes]

\starttext

Regular figures: 0123456789

{\addfeature[oldstyle] Local oldstyle figures: 0123456789}

\stoptext


This way, lining figures are enabled by default, and you can change to
oldstyle figures locally.  if you wna tit the other way round, just
change the default feature to onum=yes, lnum=no and create a new
feature for local lining figures with onum=no, lnum=yes.

Kind regards,
Joshua


___
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] Hyphenatedurl: custom line-break symbol, disable stretching

2014-08-01 Thread Joshua Krämer
On 2014-07-31, 14:49, Wolfgang Schuster wrote:

 From what I can see in the code there is no option to disable the
 stretch values.

Thanks for checking.

Kind regards,
Joshua


___
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] Hyphenatedurl: custom line-break symbol, disable stretching

2014-07-31 Thread Joshua Krämer
On 2014-07-31, 6:42, Wolfgang Schuster wrote:
 \def\hyphenatedurlseparator{→}

Thanks, I've added it to the wiki.  Now only the question remains how
to disable URL stretching.

Kind regards,
Joshua


___
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] Hyphenatedurl: custom line-break symbol, disable stretching

2014-07-30 Thread Joshua Krämer
Dear list,

I typeset URLs with \hyphenatedurl, and have two questions.

(1) Is there a feature available to insert a custom symbol when a
line-break occurs, e.g. \hookleftarrow?

(2) How can I disable the stretching between characters?  I've tried
the following without success:

  \setupurl [space=no]

  \setupurl [urlspace=no]

  \unprotect
  \def\lang_url_space{}
  \protect

Thanks and kind regards,
Joshua


___
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] Alignment, indenting and font inside floats

2014-07-29 Thread Joshua Krämer
On 2014-07-28, 17:23, Rik Kabel wrote:
 You may be able to get away with style=ss instead of a new font 
 definition if the sans is linked to the main serif font.

This doesn't work for me, because I want the math to be typeset in the
new typeface, too.


 The contents of a float are styled according to the type of contents.

Thanks for your explanations.  I'm now using a macro, which I insert
manually at the beginning of every float, with the following definition:

\define \Figurestyle
{
\setupindenting [no]
\setupalign [center]
\switchtobodyfont [figurefamily]
}

Kind regards,
Joshua


___
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 make floats extend into the outer margin

2014-07-28 Thread Joshua Krämer
On 2014-07-27, 14:13, Aditya Mahajan wrote:
 On Sun, 27 Jul 2014, Joshua Krämer wrote:
  Thank you.  But this solution has the problem, too, that the
  alignment is ignored for tikz pictures (see example below).
 This is a known issue. Wrap your tikz pictures inside a \hbox:
 \hbox{\starttikzpicture ... \stoptikzpicture}

Great, thank you!

Kind regards,
Joshua


___
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 center floats (?) in standardmakeup?

2014-07-28 Thread Joshua Krämer
On 2014-07-27, 13:13, Thomas Kreuzer wrote:

 Hello everyone,
 
 I am trying to create a title page with
 
  \startstandardmakeup[align=middle]
 
 This works alright for text, but when I am trying to insert a
 \framed, a table or an \externalfigure, those items (floats?)
 don't get centered. How can I make them centered as well?

I don't know why, but \leavevmode helps:


\starttext
\startstandardmakeup[align=middle]
\input knuth

\framed {One}

\leavevmode\framed {Two}
\stopstandardmakeup
\stoptext


These items are not called floats.  Floats are objects like tables or
figures, which are not part of the main text, don't have a fixed
position, and are placed automatically.  Additionally, they are often
numbered and have some title (like Figure 1:  A sample picture.)
See the wiki:  http://wiki.contextgarden.net/Floating_Objects

Kind regards,
Joshua


___
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] Alignment, indenting and font inside floats

2014-07-28 Thread Joshua Krämer
Dear list,

I want to setup all my floats' contents to be middle-aligned, not
indented and typeset in a distinct font.  How can I do this?  The
attached example does not work.

Thank you and kind regards,
Joshua Krämer


\setupindenting [yes, \the\baselineskip]
\definefontfamily [figurefamily] [serif] [Latin Modern Sans]
\setupfloats [align=middle, style={\switchtobodyfont[figurefamily]},
indenting=no]

\starttext
\input knuth

\startplacefigure
Word
\stopplacefigure

\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] How to make floats extend into the outer margin

2014-07-27 Thread Joshua Krämer
On 2014-07-25, 16:18, Hans Hagen wrote:

 \showframe
 
 \starttext
 
 \startplacefigure
  \framed[width=.8\textwidth,framecolor=red]{one}
 \stopplacefigure
 
 \definefloat[widefigure][figure][figure]
 \setupfloat   [widefigure][location=flushleft]
 \setupcaptions[widefigure][width=\textwidth,align=middle]
 
 \startplacewidefigure
  \framed[width=1.2\textwidth,framecolor=blue]{two}
 \stopplacewidefigure
 
 \stoptext

Thanks, but this doesn't seem to be a solution to my problem, because
the figures extend into the right margin always, and I want them to
extend into the outer margin (i. e. left margin on left pages, right
margin on right pages).

I'm now using the following semi-automatic solution, but there is one
problem left:  The alignment is not applied to tikz pictures.  Does
somebody have an idea how to resolve this?

Thank you and kind regards,
Joshua


\setuppagenumbering[alternative=doublesided]

\setuplayout[backspace=4cm,width=12cm]

\definemeasure[Widetext][\textwidth+\rightmargindistance+\rightmarginwidth]

\define\WideFloatCommand
  {\dowithnextbox
 {\signalrightpage
  \ifdim\nextboxwd\textwidth  

\doifrightpageelse{\leftaligned{\flushnextbox}}{\rightaligned{\flushnextbox}}%
  \else
\midaligned{\flushnextbox}%
  \fi}
 \hbox}

\definefloat [widefigure] [figure] [figure]
\setupfloat [widefigure] [command=\WideFloatCommand]

\usemodule[tikz]

\showframe

\starttext

x

\page

\startplacewidefigure
\framed[width=\measure{Widetext}]{One}
\stopplacewidefigure

\startplacewidefigure
\framed[width=3cm]{Two}
\stopplacewidefigure

\startplacewidefigure
\starttikzpicture
\node [draw, minimum width=\measure{Widetext}] {Three};
\stoptikzpicture
\stopplacewidefigure

\startplacewidefigure
\starttikzpicture
\node [draw, minimum width=3cm] {Four};
\stoptikzpicture
\stopplacewidefigure

\startplacewidefigure
\rightaligned{%
\starttikzpicture
\node [draw, minimum width=\measure{Widetext}] {Five};
\stoptikzpicture}
\stopplacewidefigure

\startplacewidefigure
\midaligned{%
\starttikzpicture
\node [draw, minimum width=3cm] {Six};
\stoptikzpicture}
\stopplacewidefigure

\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] How to make floats extend into the outer margin

2014-07-27 Thread Joshua Krämer
On 2014-07-27, 16:57, Wolfgang Schuster wrote:
 Am 27.07.2014 um 16:54 schrieb Joshua Krämer
  Thanks, but this doesn't seem to be a solution to my problem,
  because the figures extend into the right margin always, and I want
  them to extend into the outer margin (i. e. left margin on left
  pages, right margin on right pages).
 
 \setupfloat[widefigure][location=inner]

Thank you.  But this solution has the problem, too, that the alignment
is ignored for tikz pictures (see example below).

Kind regards,
Joshua


\setuppagenumbering[alternative=doublesided]

\definefloat [widefigure] [figure] [figure]
\setupfloat [widefigure] [location=inner]

\usemodule[tikz]

\showframe

\starttext

x

\page

\startplacewidefigure
\framed[width=1.2\textwidth]{One}
\stopplacewidefigure

\startplacewidefigure
\framed[width=3cm]{Two}
\stopplacewidefigure

\startplacewidefigure
\starttikzpicture
\node [draw, minimum width=1.2\textwidth] {Three};
\stoptikzpicture
\stopplacewidefigure

\startplacewidefigure
\starttikzpicture
\node [draw, minimum width=3cm] {Four};
\stoptikzpicture
\stopplacewidefigure

\startplacewidefigure
\rightaligned{%
\starttikzpicture
\node [draw, minimum width=1.2\textwidth] {Five};
\stoptikzpicture}
\stopplacewidefigure

\startplacewidefigure
\midaligned{%
\starttikzpicture
\node [draw, minimum width=3cm] {Six};
\stoptikzpicture}
\stopplacewidefigure

\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] How to make floats extend into the outer margin

2014-07-24 Thread Joshua Krämer
Thank you, Wolfang, it works great.

There's only one problem:  I also have even bigger floats which I need
to turn.  For these turned floats, the left/right alignment leads to
undesired shifting, see the attached example.

How can I avoid the shifting for those?  I've tried to set command={}
manually, but it doesn't work.

May it be even possible to let Context automatically determine if the
float is to be turned right or left, depending on its page?

By the way, is \definemeasure meant as a replacement for \newdimen and
\dimexpr?  Are there caveats about switching to it?

Thanks and kind regards,
Joshua Krämer


\setuppagenumbering[alternative=doublesided]

\setuplayout[backspace=4cm,width=12cm]

\definemeasure[Widetext][\textwidth+\rightmargindistance+\rightmarginwidth]

\setupfloats[command=\FloatCommand]

\define\FloatCommand
  {\dowithnextbox
 {\signalrightpage
  \ifdim\nextboxwd\textwidth  

\doifrightpageelse{\leftaligned{\flushnextbox}}{\rightaligned{\flushnextbox}}%
  \else
\midaligned{\flushnextbox}%
  \fi}
 \hbox}

\showframe

\starttext

\startplacefigure[location={270, page}]
\framed[width=\textheight,framecolor=red]{Turned}
\stopplacefigure

\startplacefigure
\framed[width=\measure{Widetext},framecolor=red]{Left margin}
\stopplacefigure

\input knuth

\page

\startplacefigure
\framed[width=\measure{Widetext},framecolor=red]{Right margin}
\stopplacefigure

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

[NTG-context] How to make floats extend into the outer margin

2014-07-23 Thread Joshua Krämer
Dear list,

I have some big-width floats, and want them to span the regular text
width plus the outer margin.  I can position them manually with \kern.
Is there a way to make them automatically extend into the outer
margin?  I have tried different options for location=... without
success.

Thanks and kind regards,
Joshua Krämer


Example with manual positioning:


\setuplayout [backspace=3cm, width=13.5cm, topspace=2cm, height=24.7cm,
margin=1.5cm, margindistance=0cm, header=0cm, footer=0cm,
footerdistance=0cm]

\newdimen\Bigtextwidth \Bigtextwidth=15cm

\setuppagenumbering [alternative=doublesided]

\showframe

\starttext

\startplacefigure
\leavevmode\kern-1.5cm\framed [width=\Bigtextwidth, framecolor=red] %
{Left margin}
\stopplacefigure

\startplacefigure
\leavevmode\kern0cm\framed [width=\Bigtextwidth, framecolor=red] %
{Right margin}
\stopplacefigure

\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] Which Image quality should I use ?

2014-07-13 Thread Joshua Krämer
On 2014-07-12, 14:58, Pol Stra wrote:

 I wonder, what can I do to reduce the size of those files while
 keeping a printable quality document?

Besides reducing the resolution, you can reduce the number of colours
used in a PNG picture, which is called colour quantization.  For
example, we can differentiate between ca. 12 levels of gray (between
black and white) with our eyes.  So it is useless to differentiate
between hundreds of different colours in a gray picture.  I quantize
all my gray pictures to use 12 colours only, and the difference is
usually not visible, but it leads to a much smaller file size.  For
coloured pictures, you need of course more different colours, you have
to try different values with each picture to find the best number.  I
use the tool pngnq for quantization.

After quantization, one can further losslessy compress an image by
removing unnecessary meta informations from the file, which can be
done automatically with the tool Trimage.

I've got both pngnq and Trimage from the repositories of my Linux
distribution.

Kind regards,
Joshua


___
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] Latin Modern and optical sizes in math

2014-07-09 Thread Joshua Krämer
Dear list,

is it possible to get the correct optical sizes of Latin Modern (or
another math font) in formulae?

I'm using the Selectfont mechanism.

In the following example, the superscripts simply use the regular
font.


\definefontfamily [lm] [math] [Latin Modern Math]
\setupbodyfont [lm]
\starttext
\math{k^{k^{k}}}
\stoptext


Kind regards,
Joshua


___
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] Bibliography: only surname in small caps

2014-06-30 Thread Joshua Krämer
Dear list,

I would like to have in a bibliography only surnames in small
capitals, like this:

MÜLLER, B. and SCHNEIDER A.

(Müller and Schneider appear in small caps, but everything else
like and is still in the default typeface.)

At the moment, I'm using the old bibliography system.  I am a bit
overwhelmed by the new system, because I would have to setup everything
from the beginning, as I have setup my layouts with
\setuppublicationlayout.

Now my questions are:

Is it possible to achieve what I want (SC surnames) with the old and the
new system?

If I would do it with the old system, am I right that I would have to
redefine \normalauthor or define my own authorcommand?

How could it be done with the new system?  I've tried to understand the
file publ-imp-apa.mkvi, but there's only an author value, and I
don't understand how to access the name components (first name, last
name etc.).


Thanks and kind regards,
Joshua


___
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] bibliography tool

2014-06-30 Thread Joshua Krämer
On 2014-06-30, 17:47, Gour wrote:

 I'm using Debian (Sid), but there is, afaict, no such pdf.

In the ConTeXt minimals distribution, the file resides in the
folder /tex/texmf-context/doc/context/manuals/allkind/.

If you use a Debian package of ConTeXt, look in the system-wide texmf
directory, which should be something like /usr/share/texmf/, and in the
system-wide documentation directory, which should be something
like /usr/share/doc/.

Kind regards,
Joshua


___
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] Bibliography: only surname in small caps

2014-06-30 Thread Joshua Krämer
On 2014-06-30, 16:24, Thomas A. Schmitz wrote:

 You would define your own command. Something like
 
 \def\myinvertedauthor#1#2#3#4#5%
 {{\sc #3}%
 \bibdoif{#1}{\bibalternative{surnamesep}#4\unskip}%
 \bibdoifelse{#2}{\bibalternative{vonsep}#2\unskip}{\unskip}%
 \bibdoifelse{#5}{\bibalternative{juniorsep}#5\unskip}{\unskip}%
 }

Thanks for your answer, Thomas.  This is how I've done it now:


\unprotect\def\myinvertedshortauthor#1#2#3#4#5%
  {\bibdoif{#2}{#2\bibalternative\c!vonsep}%
   {\smallcaps #3}%
   \bibdoif{#5}{\bibalternative\c!juniorsep#5}%
   \bibdoif{#4}{\bibalternative\c!surnamesep#4\unskip}}
\protect

\setuppublicationlist [artauthor=\myinvertedshortauthor,
author=\myinvertedshortauthor, editor=\myinvertedshortauthor]


It works perfectly.

I'm looking forward to the new bibliography system, but on the other
hand, I'm glad I can stick with the old system for this project,
because everything else is already set up as needed.

Kind regards,
Joshua


___
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] Bibliography: only surname in small caps

2014-06-30 Thread Joshua Krämer
On 2014-06-30, 19:36, Robert Blackstone wrote:

 There a in fact two tricks. The first is to put everything in the
 booklet category and enter everything except author names, year of
 publication and city (or publisher) in the title. The second is to
 make a .bbl file and edit that, including ordering small caps where
 you want them, just as in a normal .tex-file. In your project you
 input the edited .bbl-file, not the .bib-file.

Thanks for your answer, Robert.  But I'm reluctant to do such manual
hacks.  In this case, they would not make sense anyway, because my
database is too big (more than 200 entries), and I pull the entries from
Medline, I don't create them myself.  Minor tweaks are possible, but I
can't rearrange and manually format all the entries.

Anyway, it works now automatically (see my other mail), with a minimum
of work. That's why I love ConTeXt and automatic typesetting.  (-:

Kind regards,
Joshua


___
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] Pagebreak forced after mixedcolumns (new bug?)

2014-06-09 Thread Joshua Krämer
On 2014-06-08, 23:34, Hans Hagen wrote:
 does
 balance=yes
 help?

Yes, it helps.  Thank you!

Kind regards,
Joshua


___
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] Pagebreak forced after mixedcolumns (new bug?)

2014-06-08 Thread Joshua Krämer
Dear list,

I have updated to the latest beta today, and I can no longer put text
after \stopmixedcolumns on the same page.


\setuplayout[grid=yes]
\starttext
\startmixedcolumns
Left

\column

Right

Right
\stopmixedcolumns

Something after the columns
\stoptext


There should be no pagebreak after \stopmixedcolumns.  It works with
\start... \stopcolumns, but then the column break (\column) is ignored.

It worked before with mixedcolumns, but I don't know when I updated the
last time.

Kind regards,
Joshua


___
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] OT: looking for a soviet font

2014-04-17 Thread Joshua Krämer
On 2014-04-16, 9:45, Henning Hraban Ramm wrote:

 I don’t think Baltica is very legible, even if it fits the style.

It is based on Candida, which I find quite legible especially in small
texts for German.  It is for example used by the German Magazine
Focus, you can see an example here (from Focus Schule):

http://news.elli-e.de/Focus2000.jpg

However, I don't know how legible its cyrillic characters are.

Anyway, I have no objections against a sans serif like Journal!

Kind regards,
Joshua


___
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] OT: looking for a soviet font

2014-04-15 Thread Joshua Krämer
On 2014-04-15, 11:37, Henning Hraban Ramm wrote:

 for a new project I’m looking for a body font that fits Soviet
 Modernism. I’d like to have OpenType, high typographical quality,
 good readability as body text, latin and cyrillic glyphs. Free would
 be great, but I’d also buy.

The most used Soviet typeface is Literaturnaya.  You can find it here
for example:

http://www.myfonts.com/fonts/paratype/literaturnaya/

There is also a free digital version available.  (I think you can find
it on the CTAN).  But all digital versions I know of are not really
well-suited for body text (they are quite thin, obviously based on a
display size of the original typeface).

A derived typeface which is a bit better for text is Quant Antiqua:

http://www.myfonts.com/fonts/paratype/quant-antiqua/

While Literaturnaya/Quant are surely the best matches for Soviet
typography in general, they may not be the best match for Soviet
modernism. Maybe Baltica could fit better:

http://www.myfonts.com/fonts/paratype/baltica/

Generally, I suggest to search through the ParaType offerings.  They
have many nice typefaces, which are not expensive.

Kind regards,
Joshua Krämer


___
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] Insert text at end of every paragraph

2014-04-15 Thread Joshua Krämer
Dear list,

I want a text string to be inserted at the end of every paragraph.
I've tried it like that:

\define \par {Endstring\endgraf}
\starttext
\chapter {Chapter}
\section {Section}
\input knuth
\input zapf
\stoptext

This works, but it results in a lot of additional strings.  The string
Endstring should appear on paragraph ends only (it's acceptable to
appear after headings, too).

How can I achieve the desired result?

Is there maybe something like \EveryPar for the end of paragraphs?

Thanks and kind regards,
Joshua Krämer


___
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] frames, hrule, vfill and pagebreaks (was: Vertically stretched split table)

2014-04-14 Thread Joshua Krämer
Dear list, if somebody cares, the following solution works for me:

\hrule
\penalty1
\vfill
\penalty1
\dontleavehmode\framed{...}
\penalty1
\vfill
\penalty1
\hrule height 0pt
\par\penalty-5000

Joshua

___
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] URL macro with \bgroup ... \egroup

2014-04-14 Thread Joshua Krämer
Dear list,

I want to have better hyphenated and clickable URLs in my bibliography.
I have defined the following macro:

\define [1] \URL {\goto{\hyphenatedurl{#1}}[url(#1)]}

And I want to use it in the bibliography like that:

\setuppublicationlayout [electronic]
{
\inserturl{ URL:\ \URL\bgroup }{\egroup.}{}%
}

But the macro doesn't work with \bgroup ... \egroup, it works with
braces only.  Minimal non-working example:

\define [1] \URL {\goto{\hyphenatedurl{#1}}[url(#1)]}
\starttext
\URL \bgroup http://test.invalid\egroup
\stoptext

It complains about too many }.

How can I use my URL macro in the bibliography?

Thanks and kind regards,
Joshua Kraemer


___
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] frames, hrule, vfill and pagebreaks (was: Vertically stretched split table)

2014-04-08 Thread Joshua Krämer
Dear list,

at first, I thought the following code (simplified) with frames,
hrules and vfills between them would work to typeset my table.  However,
I have now realized that sometimes a pagebreak occurs before the final
(invisible) hrule, and then there's no vfill at the bottom of the page.
See this example:

\setuplayout [backspace=10mm, width=middle, topspace=10mm,
height=middle, header=0mm, headerdistance=0mm, footer=1mm,
footerdistance=0mm]
\setupframed[frame=on,framecolor=green,location=middle,align=right]
\define [2] \Tabline {

\hrule
\page[no]
\vfill
\dontleavehmode\framed[width=60mm]{#1}\framed[width=100mm]{#2}
\vfill
\hrule height 0pt
\par\page[bigpreference]
}

\setupbackgrounds[footer][text][topframe=on]

\starttext
\Tabline{\dorecurse{100}{word }}{\dorecurse{150}{word }}
\Tabline{\dorecurse{170}{word }}{\dorecurse{100}{word }}
\stoptext

How can I make sure a pagebreak occurs only between the Tablines?
The Tabline on the 1st page should appear centered, too.  \page[no]
before \hrule height 0pt has no effect.

Thank you and kind regards
Joshua Krämer


___
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] Vertically stretched split table

2014-04-07 Thread Joshua Krämer
Dear list,

if I specify option=height with an xtable, a single-page
table is stretched vertically to fill the whole textheight.  However, I
need this feature with a multipage table.  In the following example,
the table on the first page should be stretched, but isn't:

\showframe
\starttext
\startxtable [option=height, split=yes]
  \startxrow
\startxcell \input knuth \stopxcell
\startxcell \input ward \stopxcell
  \stopxrow
  \startxrow
\startxcell \input zapf \stopxcell
\startxcell \input ward \stopxcell
  \stopxrow
  \startxrow
\startxcell \input knuth \stopxcell
\startxcell \input ward \stopxcell
  \stopxrow
\stopxtable
\stoptext

The table parts on all the pages but the last page should be stretched
vertically.  If this isn't possible with xtable, is it possible in
another way?  I hope it is possible without splitting the table by
hand, because it is a big project with several hundred table pages,
and splitting by hand would make changes (additional rows) really hard.

Thanks for your help and kind regards,
Joshua Krämer


___
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] Vertically stretched split table

2014-04-07 Thread Joshua Krämer
On 2014-04-07, 23:18, Hans Hagen wrote:

 the height stretch is a special case and not interfaced with the 
 splitter (would demand multipass whihc in turn could lead to
 oscillation)

Thanks for the information, I've already feared it would be like that.
I have thus created a custom solution using frames, hrules and
vfills in between.  So far, it works well.  (A small problem is wrong
hrule spacing at the beginning of the page, and
start/stoplinecorrection leads to wrong vfill-spacing.  If I can't sort
it out, I'll write another message.)

Kind regards
Joshua Krämer


___
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] Stretching only specified columns with Natural Tables

2014-04-01 Thread Joshua Krämer
Hello list,

I'm using the Natural Table macros to typeset some tables in the
following way:

\starttext
\setupTABLE [frame=off, option=stretch, textwidth=\textwidth]
\setupTABLE [row] [odd] [background=color, backgroundcolor=gray]
\bTABLE
\bTR \bTD One \eTD \bTD Two \eTD \bTD Three \eTD \eTR
\eTABLE
\stoptext

Now I would like to have the additional space (which is gained by
stretching) be distributed only /between/ the columns, or, in other
words, leave the last column unstretched.  I would need something like
this:

\setupTABLE [column] [last] [width=default]

I don't want a fixed width on the last column, it should have the
default width.

I can't use \setupTABLE [column] [...] [width=broad] for all columns
but the last, because instead of distributing the space equally,
it makes all broad columns the same width, and instead of leaving
the other columns untouched, it makes them narrower.

Thanks and kind regards,
Joshua


___
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] Selectfont: extend and slant features

2014-03-05 Thread Joshua Krämer
On 2014-03-02, 0:59, Hans Hagen wrote:

 you can use dynamic features so apply additional ones any moment, but 
 some features line slanting and extending are font instance bound as 
 there the dimensions change and the abckend has to do some work

Thanks, I understand.

Joshua Krämer


___
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] Selectfont: extend and slant features

2014-03-05 Thread Joshua Krämer
On 2014-03-01, 12:48, Wolfgang Schuster wrote:

 Is there any real purpose for this feature? The letters in the second
 and third line don’t look beautiful because the horizontal and
 vertical strokes don’t match.

As I said, I'm working on a typeface design.  When one tries to
optically match an upright and a slanted (italic) font, several
factors that influence the apparent (optical) size of the letters have
to be considered:  the letters of a slanted font with the
same vertical x-height as an upright font are bigger along their slant
axis, but their counters (inner letter space) are smaller due to the
slant.  Additionally, the different letter forms play an important
role.  Very small differences mathematically in slant and letter-width
can make a big difference optically.  To try out different values, I
mathematically stretch and slant the letters by small amounts.
Afterwards, of course, when the right values have been found, the
letters have to be reworked by hand.

Another use-case for the extend feature could be to stretch/compress a
line (e.g. a title) to the desired length.  If the line is only a little
bit too long or too short, compressing or stretching all the letters by
for example less than 1% can be enough to add up to the desired amount.

Kind regards, Joshua


___
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] Selectfont: extend and slant features

2014-03-05 Thread Joshua Krämer
On 2014-03-05, 15:08, Hans Hagen wrote:

 On 3/5/2014 3:19 PM, Joshua Krämer wrote:
  Another use-case for the extend feature could be to
  stretch/compress a line (e.g. a title) to the desired length.  If
  the line is only a little bit too long or too short, compressing or
  stretching all the letters by for example less than 1% can be
  enough to add up to the desired amount.
 
 that's what hz is doing, but more advanced as it can be set up per 
 character

While hz is an automatic approach, I was thinking about manual
interventions, for example when designing a cover page.

But DTP applications may be better suited for this usecase.

Kind regards,
Joshua


___
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] \switchtobodyfont fails to load font with some sizes

2014-02-28 Thread Joshua Krämer
On 2014-02-26, 22:57, Wolfgang Schuster wrote:

 Add \definebodyfontenvironment[50pt] before \starttext.

Thanks, that does the trick.

Kind regards, Joshua

___
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] Selectfont: extend and slant features

2014-02-28 Thread Joshua Krämer
On 2014-02-26, 23:13, Wolfgang Schuster wrote:

 2. When you apply your “testfeature” to a certain font alternative
 (e.g. italic) it will work.
 [...]

Thanks.  It's a bit inconvenient, because for each feature you want to
apply, you have to define a separate typeface.  Is it a bug, or is it
intended to be like that?

(I understand that this feature may not be needed often.  I need it to
apply different stretch values to a typeface I'm designing for testing
purposes.)

Kind regards, Joshua


___
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] Additional typeface styles/alternatives with Selectfont

2014-02-26 Thread Joshua Krämer
Dear List,

I think Selectfont is great -- thank you, Wolfgang, for your work.
However, I miss the features to define and use additional typeface
styles and alternatives.

Not everything fits in the predefined scheme of rm, ss, tt, hw, cg and
mm, so it would be nice to have the possibility to define additional
typeface styles.  (I'm thinking for example about blackletter here.)

It would also be nice if one could access arbitrary typeface
alternatives, however the typeface creator has named them (e.g.
something like semicondensed-ultrabold).  At the moment, I think, it is
only possible to map a few alternatives to the predefined switches.

Kind regards,
Joshua

___
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] \switchtobodyfont fails to load font with some sizes

2014-02-26 Thread Joshua Krämer
Dear list,

with some font sizes, \switchtobodyfont loads Latin Modern Roman
instead of the specified typeface:


\definefontfamily [firstfamily] [serif] [TeX Gyre Bonum]
\definefontfamily [secondfamily] [serif] [TeX Gyre Termes]

\setupbodyfont [firstfamily, 60pt]

\starttext

abc {\switchtobodyfont [secondfamily, 60pt] abc} abc

abc {\switchtobodyfont [secondfamily, 50pt] abc} abc

\stoptext


Kind regards,
Joshua Krämer


___
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] Selectfont: extend and slant features

2014-02-26 Thread Joshua Krämer
Dear list,

the (fake) extend and slant features seem to be missing with Selectfont.
Will they be made available sometimes in the future?  Or am I simply
doing something wrong?  With simplefonts, they work.


\definefontfeature [mainfeature] [default] [onum=yes]
\definefontfeature [testfeature] [onum=no, extend=2, slant=0.25]

\definefontfamily [mainfamily] [serif] [Latin Modern Roman]
  [features={mainfeature}]

\setupbodyfont [mainfamily, 50pt]

\starttext

1236

\addfeature [testfeature]

1236

\stoptext


Kind regards,
Joshua Krämer


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

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

Re: [NTG-context] A default editor for ConTeXt standalone?

2014-02-16 Thread Joshua Krämer
On 2014-02-05, 7:41, Marcin Borkowski wrote:

 Hi all,
 
 just a thought.  Some time ago wise people decided to include TeXworks
 into TeXlive, so that newbies installing TeXlive can get a
 batteries-included package (not having to choose/install an editor).
 Would it be (a) reasonable and (b) not too much time-consuming to do a
 similar move with ConTeXt standalone?

I think, people who want a batteries-included distribution should
install TeXlive, which also includes ConTeXt.  In my opinion, it's
great to have ConTeXt Standalone as a more lightweight package that
doesn't include all the stuff I don't need.  There is also a Wiki page
with informations about editors and their ConTeXt support, which I think
should be enough for the strange users that don't have an editor yet
(or for users looking for an editor with better ConTeXt support).

Kind regards,
Joshua Krämer


___
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] Tabulator in database file not passed to Lua

2014-01-24 Thread Joshua Krämer
Am Thu, 23 Jan 2014 23:17:24 +0100
schrieb Hans Hagen pra...@wxs.nl:
 \startluacode
 
  local f = io.open(test.dat)
 
  for line in f:lines() do
  local t = string.split(line,;) -- or \t for tabs
  context(% /t,t) -- context(table.concat(t, / )
  context.par()
  end
 
 \stopluacode
 
 \stoptext

Thanks, I was not aware of the Context Lua extensions.  Should have read
the wiki more thoroughly ...

While I'm new to Lua, I already enjoy it.  It opens a whole new world
of possibilities to ConTeXt, making this great software even better!
Thank you very much for all the hard work.

Kind regards,
Joshua Krämer


___
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] Tabulator in database file not passed to Lua

2014-01-23 Thread Joshua Krämer
Dear list,

I use the database module to load the lines of a file with some
data.  The lines are then separated with a lua script.  I use lua,
because I need to do some other things with the data (rounding
numbers, combining some fields etc.)  Please consider the following
minimal working example:

\usemodule[database]
\defineseparatedlist [Data]
[
before=,
after=,
separator={},
commentchar=\letterpercent,
command=\Tabrow,
]

\startluacode
function explode(sep,str)
if (sep==) then return false end
  local pos,arr = 0,{}
  -- for each separator found
  for st,sp in function() return string.find(str,sep,pos,true) end do
-- Attach chars left of current separator 
table.insert(arr,string.sub(str,pos,st-1))
-- Jump past current separator
pos = sp + 1
  end
  -- Attach chars right of last separator
  table.insert(arr,string.sub(str,pos))
return arr
end

function tabrow(fileline)
local tabarray = explode(;,fileline)
local tabline = 
for index,value in ipairs(tabarray) do
tabline = tabline ..  /  .. value
end
return tabline
end
\stopluacode

\define[1]\Tabrow{\ctxlua{context(tabrow(#1))}}

\starttext
\processseparatedfile[Data][Test.dat]
\stoptext

This is the content of the file Test.dat:
Eins;zwei;drei;vier


Of course the line separation could be done easier with the database
module.  However, I thought this way I could use the tabulator as the
separator in my file.  But when I change the separator from ; to
\\t, it doesn't work.  I suppose this is because the tabulators are
passed to Lua as spaces.  Or is \\t the wrong code?  Would it be
possible to use tabulators as separators, if I load the file with lua
and not with the database module?

Kind regards,
Joshua Krämer


___
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] Comment after \startseparatedlist[...]

2014-01-21 Thread Joshua Krämer
Am Mon, 20 Jan 2014 23:41:55 +0100
schrieb Hans Hagen pra...@wxs.nl:

 in fact you get:
 
 \startTest Eins, zwei, drei
 \stopTest
 
 because of the comment and we ignore all till the end of the first
 line

I still don't understand it.  This works:

\startTest Eins, zwei, drei \stopTest

This doesn't work (context stops with error):

\startTest %Test
Eins, zwei, drei \stopTest

It seems that context fails whenever there is a comment inside the
database listing (or database file).

I actually would like to read in a database file and skip the first
row, but because of this problem it doesn't work.

Kind regards,
Joshua


___
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] Comment after \startseparatedlist[...]

2014-01-21 Thread Joshua Krämer
Am Tue, 21 Jan 2014 17:51:17 +0100
schrieb Hans Hagen pra...@wxs.nl:

 has to do with catcode changes so % is no longer %

Thanks for the hint.  I have tried to do it like that (from Mojca
Miklavec's My Way):

\usemodule[database]

\unprotect
\startsetups Data:unix
\catcode`\%=\@@comment
\stopsetups
\protect

\defineseparatedlist [Data]
[
separator=tab,
before=\bTABLE, after=\eTABLE,
first=\bTR, last=\eTR,
left=\bTD, right=\eTD,
setups=unix
]

\starttext

\startData
% time  LG  LG-SD   HG  HG-SD   p
24  0.740.361.190.510.15
48  0.900.651.450.540.21
72  1.230.351.590.590.27
\stopData

\stoptext

... but still, context stops with an error.  I have also tried to use
\# like in the My Way example without success.

Is this supposed to work?

Kind regards,
Joshua Krämer


___
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] New header

2014-01-21 Thread Joshua Krämer
Am Tue, 21 Jan 2014 20:02:19 +0100
schrieb Fabrice Couvreur fabrice1.couvr...@gmail.com:

 I would also fit the dimensions of my papers as I used to do
 (\usepackage [ a4paper, hmargin = 1.5cm, vmargin =1.5cm] {geometry})
 Thank you.

There is a wiki page about setting up the page layout:
http://wiki.contextgarden.net/Layout

The following sets the space around the type area to 1.5cm:

\setuplayout
[
backspace=1.5cm,
width=middle,
topspace=1.5cm,
height=middle,
]
\showframe % very useful when setting up the layout
\starttext
\input{knuth}
\stoptext

Kind regards,
Joshua Krämer


___
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] Comment after \startseparatedlist[...]

2014-01-21 Thread Joshua Krämer
Am Tue, 21 Jan 2014 23:19:43 +0100
schrieb Wolfgang Schuster schuster.wolfg...@gmail.com:

 You can add “commentchar=\letterpercent” to your separatedlist
 definition which will make % the character for comments, the setups
 hack isn’t necessary.  

Thank you, I have added it to the Wiki.

Kind regards,
Joshua Krämer


___
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] error bar gap with pgfplots/tikz and custom colour

2014-01-20 Thread Joshua Krämer
Dear list,

I'm using pgfplots to create some bar charts with error bars, and I
want to use custom colours for them.  This works, but if I mix a
custom colour with another colour, it results in a gap between the
error bar line and the error bar mark.  If two custom colours are
mixed, the gap seems to be doubled.  Mixing with predefined colours
works normally.  MWE:

\usemodule[tikz]
\usemodule[pgfplots]

\definecolor[Blue]  [h=3465a4]
\definecolor[White] [h=ff]

\pgfplotsset{compat=newest}

\starttext
\starttikzpicture
\startaxis[ybar, error bars/y dir=both, error bars/y explicit]
\addplot+[blue!50!white] coordinates {(1,5) +- (0,3)};
\addplot+[Blue] coordinates {(1,5) +- (0,3)};
\addplot+[Blue!50!white] coordinates {(1,5) +- (0,3)};
\addplot+[Blue!50!White] coordinates {(1,5) +- (0,3)};
\stopaxis
\stoptikzpicture
\stoptext

Kind regards,
Joshua Krämer


___
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] Comment after \startseparatedlist[...]

2014-01-20 Thread Joshua Krämer
Dear list,

if there is a comment after \startseparatedlist[...] from the database
module, context fails.  Thus, this example in the wiki doesn't work:
http://wiki.contextgarden.net/M-database

Minimal example:

\usemodule[database]
\defineseparatedlist[Test]
[
before=\bTABLE,
after=\eTABLE,
left=\bTD,
right=\eTD,
first=\bTR,
last=\eTR
]

\starttext

\startTest % problematic comment
Eins, zwei, drei
\stopTest

\stoptext

Kind regards,
Joshua Krämer


___
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] Rotated table shifted on the layout

2014-01-17 Thread Joshua Krämer
Am Fri, 17 Jan 2014 00:38:04 +0100
schrieb Wolfgang Schuster schuster.wolfg...@gmail.com:
 \startplacetable [location={force,90,none}]

Thanks, it works.  Interestingly, it works also if I write
location={90, page} instead of location={page, 90}.

Kind regards,
Joshua

___
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] Disable balancing of page bottoms

2014-01-16 Thread Joshua Krämer
Thanks, Marco, I have adopted your solution, which works fine.

Kind regards,
Joshua


___
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] Rotated table shifted on the layout

2014-01-16 Thread Joshua Krämer
Dear list!

In the following MWE, the table is shifted a bit.

\showframe
\starttext
Hello World!
\startplacetable [location={page, 90}, title=none]
\bTABLE [textwidth=\textheight]
\bTR
\bTD \input knuth \eTD
\bTD \input tufte \eTD 
\eTR
\eTABLE
\stopplacetable
\stoptext

Btw, without Hello World!, ConTeXt doesn't create a PDF file.

Kind regards,
Joshua Krämer


___
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] Disable balancing of page bottoms

2014-01-15 Thread Joshua Krämer
I have found out that I had interpreted the problem wrongly.  It is
not a problem of balancing, it is a problem of the layout macros.  I
use a different page layout for the titlepage and switch to the main
layout later.  This switch is in the front matter part, which results
in the new layout being respected for one page only.  Somehow for
subsequent pages, the layout is wrong.

Here's a MWE:

\definelayout[Titlelayout][width=10cm,height=10cm,header=0cm,footer=0cm]
\definelayout[Mainlayout][width=10cm,height=25cm,header=0cm,footer=0cm]
\showframe

\definestartstop[Titlepage][
before={\setuplayout[Titlelayout]},
after={
\page[yes]
\setuplayout[Mainlayout]
}]

\starttext

\startfrontmatter
\startTitlepage
Title
\stopTitlepage
\stopfrontmatter

\dorecurse{5}{\input{knuth}}

\placetable[270,page]{none}
{\setupTABLE[option=stretch, textwidth=25cm]
\bTABLE \bTR \bTD 1 \eTD \bTD 2 \eTD \eTR \eTABLE}

\dorecurse{5}{\input{knuth}}

\stoptext

The frames are drawn correctly on all pages.  But only page 2 is filled
with text completely.  On subsequent pages, the real layout seems to be
too short.  If I remove \startfrontmatter and \stopfrontmatter, the
problem disappears.  It also works if I input \setuplayout[Mainlayout]
in the preamble, which is cleaner anyway because it is independent of
the titlepage macros.

Kind regards,
Joshua Krämer


___
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] Disable balancing of page bottoms

2014-01-15 Thread Joshua Krämer
Thank you, Marco.  The problem with your solution is that in
doublesided mode, after \startmakeup ... \stopmakeup, an empty page is
inserted, but I need to have text on the back of the page.  Do you
maybe know how to solve this?  MWE:

\definemakeup
  [Titlelayout]
  [top=]

\definelayout
  [Titlelayout]
  [width=10cm,
   height=10cm,
   header=0cm,
   footer=0cm]

\setuplayout
  [width=10cm,
   height=26cm,
   header=0cm,
   footer=1cm,
   footerdistance=0cm]

\setuppagenumbering[alternative=doublesided]

\showframe
\starttext

\startfrontmatter
  \startmakeup [Titlelayout]
Title
  \stopmakeup

This text should be on the back of the title page.

\stopfrontmatter
\stoptext

Kind regards, Joshua


___
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] Disable balancing of page bottoms

2014-01-14 Thread Joshua Krämer
Dear list!

Context (Mk IV) balances the bottoms of doublesided pages, even if I
use \raggedbottom.  How can I disable this?  I'm thinking of something
like balance=no for columns, only for pages.

My problem is that I have a one-page float (rotated table) with the size
of the textheight.  The opposite page is not completely filled with
text, which makes context crop the height of the page with the float,
too, resulting in a shift of the float into the upper margin.  That's
why I want to disable balancing.

Kind regards,
Joshua Krämer


___
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] autohang doesn't work (Mk IV)

2014-01-13 Thread Joshua Krämer
Dear list,

I'm using an updated Context minimals beta, and can't get autohang to
work (in Mark IV).  autohang=yes seems to be ignored.  It doesn't
help to add totalnumber=

\setupbibtex[database=sample]

\setuppublications
[alternative=apa,
criterium=all,
numbering=yes,
autohang=yes]

\setuppublicationlist[totalnumber=1000]

\starttext
\completepublications
\stoptext

Kind regards,
Joshua Krämer


___
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] Mixing math and text font

2014-01-09 Thread Joshua Krämer
Thanks for your hard work!  I have a few additional questions regarding 
the new system and font fallbacks.


(1) How can I replace the hyphen automatically inserted at linebreaks?  
If I use the following, only manually inserted hyphens are replaced:

\definefallbackfamily[mainface][serif][TeX Gyre Termes][range={0x0002d}]


(2) What effect does force=yes have?  It doesn't seem to make a 
difference for me.


(3) I have a typeface that uses unusual style names: roman1, roman2, 
italic1, italic2;  1 is regular, 2 is bold weight.  The following 
works:

\definefontfamily[xxxface][serif][xxx][regularfont=xxxroman1, 
italicfont=xxxitalic1, boldfont=xxxroman2]
\setupbodyfont[xxxface]
\starttext
abc {\it abc} {\bf abc}
\stoptext

This works for roman1 only:

\definefontfamily[xxxface][serif][xxx][regularfont=spec:roman1, 
italicfont=spec:italic1, boldfont=spec:roman2]

Even this works for roman1 only:

\definefontfamily[xxxface][serif][xxx][regularfont=spec:roman1, 
italicfont=xxxitalic1, boldfont=xxxroman2]


(4) Now I want to use this typeface for math fallback.  In the following 
example, the upright glyphs are replaced, but not the italic glyphs:

\definefontfamily[xxxface][serif][xxx][regularfont=xxxroman1, 
italicfont=xxxitalic1, boldfont=xxxroman2]
\definefallbackfamily[xxxface][math][xxx][regularfont=xxxroman1, 
preset=math:lowercasenormal]
\definefallbackfamily[xxxface][math][xxx][regularfont=xxxroman1, 
preset=math:uppercasenormal]
\definefallbackfamily[xxxface][math][xxx][italicfont=xxxitalic1, 
preset=math:lowercaseitalic]
\definefallbackfamily[xxxface][math][xxx][italicfont=xxxitalic1, 
preset=math:uppercaseitalic]
\definefallbackfamily[xxxface][math][xxx][regularfont=xxxroman1, 
preset=math:digitsnormal]
\definefontfamily[xxxface][math][TeX Gyre Termes Math]
\setupbodyfont[xxxface]
\starttext
$ \coprod \leftrightarrow ABC abc {\mathupright ABC abc} 123 $ 
\stoptext


Kind regards,
Joshua

___
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] Mixing math and text font

2014-01-09 Thread Joshua Krämer
Am Thu, 09 Jan 2014 11:01:16 + schrieb Joshua Krämer:
 (2) What effect does force=yes have?  It doesn't seem to make a
 difference for me.

I've read in another mail that force=yes is now set by default, so this 
is clear to me now.

Joshua

___
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] Mixing math and text font

2014-01-09 Thread Joshua Krämer
Am Thu, 9 Jan 2014 20:41:15 +0100
schrieb Wolfgang Schuster schuster.wolfg...@gmail.com:

  (3) I have a typeface that uses unusual style names: roman1,
  roman2, italic1, italic2;  1 is regular, 2 is bold weight.
  The following works:
  
  \definefontfamily[xxxface][serif][xxx][regularfont=xxxroman1, 
  italicfont=xxxitalic1, boldfont=xxxroman2]
  \setupbodyfont[xxxface]
  \starttext
  abc {\it abc} {\bf abc}
  \stoptext
  
  This works for roman1 only:
  
  \definefontfamily[xxxface][serif][xxx][regularfont=spec:roman1, 
  italicfont=spec:italic1, boldfont=spec:roman2]
  
  Even this works for roman1 only:
  
  \definefontfamily[xxxface][serif][xxx][regularfont=spec:roman1, 
  italicfont=xxxitalic1, boldfont=xxxroman2]
 
 The name of the font files has nothing to do with way how
 \definefontfamily collects the individual files for each style, to do
 this it uses internal names and values from the font.

I've got the values from the output of mtxrun --script fonts --list
--all --pattern=xxx (and compared with the name/style values in
Fontforge), so I don't understand why spec:roman1 works, but
spec:italic1 doesn't.

Additionally, what I think must be a bug is that
italicfont=file:xxxitalic1, boldfont=file:xxxroman2 works but stops
working if I add regularfont=spec:roman1:

\definefontfamily[xxxface][serif][xxx][regularfont=spec:roman1,
italicfont=file:xxxitalic1, boldfont=file:xxxroman2]

Maybe if one of the values uses the spec: selector, all the values
are treated as spec values despite the file: selector given?


 When you use a opentype math font the upright, italic, bold etc.
 characters are all in the same file which uses only the regular style
 (a few math fonts provide also a bold style which can be useful in
 headings).
 
 Because there is only a upright math font you have to set a fallbacks
 also for the upright style even when the font you’re using is italic,
 e.g.
 
 \definefallbackfamily[xxxface][math][xxx][tf=file:xxxitalic1,preset=math:lowercaseitalic]

Thanks, this works.  For some reason, tf= works, but regularfont=
doesn't.

And by the way, this works:
\definefontfamily[leitura][serif][Leitura News][regularfont=spec:roman2]

and this doesn't work:
\definefontfamily[leitura][serif][Leitura News][tf=spec:roman2]

So in some cases only regularfont seems to work, and in some cases
only tf.

Kind regards,
Joshua


___
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] Fallback for mathematical lowercase h and hyphen

2014-01-09 Thread Joshua Krämer
Dear list!

(1) With the following example, only manually inserted hyphens are
replaced. How can I replace the hyphen automatically inserted at
linebreaks?

\definefontfeature[extended][default][extend=3]
\definefallbackfamily[mainface][serif][TeX Gyre Termes]
[range={0x0002d}, features=extended]
\definefontfamily[mainface][serif][Latin Modern Roman]
\setupbodyfont[mainface, 30pt]
\starttext
line-break \dorecurse{100}{linebreak }
\stoptext

I have added the feature extended only for better distinction.


(2) In the following example, the lowercase h is not replaced. I think
this may be because it is separately encoded as Planck
constant (U+210E) in math fonts.

\definefontfamily[mainface][serif][Latin Modern Roman]
\definefallbackfamily[mainface][math][Latin Modern Roman]
[preset=math:lowercaseitalic]
\definefontfamily[mainface][math][TeX Gyre Termes Math]
\setupbodyfont[mainface, 30pt]
\starttext
$ abch $
\stoptext

Kind regards,
Joshua Krämer


___
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] Mixing math and text font

2014-01-09 Thread Joshua Krämer
Dear Wolfgang,

thanks for your clarifications.  I will avoid the spec method.  The
remaining question is, if regularfont= should be avoided, too, in
favour of tf=, or will this be made to work in the future?

 \definefallbackfamily[xxxface][math][xxx][regularfont=file:xxxitalic1,preset=math:lowercaseitalic]

Kind regards,
Joshua

___
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] Mixing math and text font

2014-01-08 Thread Joshua Krämer
Am Sat, 04 Jan 2014 19:50:24 +0100 schrieb Wolfgang Schuster:

 You have to switch from the simplefonts module to the new fontfamily
 command (a new built-in system which replaces simplefonts) to set the
 fonts for your document. [...]

Thank you, it functions as intended.  I suppose this mechanism works with 
Opentype math fonts only?

However, I'm glad to know ConTeXt's font handling is evolving!

Kind regards,
Joshua

___
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] Mixing math and text font

2014-01-04 Thread Joshua Krämer
Dear list,

in my math, I would like one font (the text font) to be used for letters 
and digits and another font (the math font) to be used for mathematical 
symbols.  I have tried it like that:

% Example 1
\usemodule[simplefonts][size=40pt]
\setmathfont[termes]
\setmainfont[latinmodernroman]
\starttext
123\\$ 123 \coprod \leftrightarrow $
\stoptext

% Example 2
\definetypeface [fonttest]  [rm][serif] [modern]
\definetypeface [fonttest]  [mm][math]  [termes]
\setupbodyfont[fonttest, 40pt]
\starttext
123\\$ 123 \coprod \leftrightarrow $
\stoptext

In both examples, the math font is used for the whole formula.  How can I 
mix the fonts?

Kind regards and best wishes for 2014,
Joshua Krämer

___
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] Mixing math and text font

2014-01-04 Thread Joshua Krämer
Am Sat, 04 Jan 2014 17:44:22 +0100 schrieb Wolfgang Schuster:

 This is possible but you have to use the context suite [1] and not
 texlive or miktex because the context version they provide doesn’t
 include the necessary mechanism.
 
 [1] http://wiki.contextgarden.net/ConTeXt_Standalone
 
 Wolfgang

Thanks for your answer.  I already use context standalone, but even after 
an update (first-setup.sh), the fonts are not mixed.  What are the 
additional steps to do?

Kind regards,
Joshua Krämer

___
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] Mixing math and text font

2014-01-04 Thread Joshua Krämer
Am Sat, 04 Jan 2014 12:47:24 -0500 schrieb Aditya Mahajan:

 You ask for modern as the text font and termes as the math font, and
 that is what you get. Can you elaborate what do you mean by 'mix the
 fonts'?
 What output do you want to get.

For the text font I use (it's a commercial typeface), a matching math 
font doesn't exist.  Now if I use for example Termes as the math font, 
the formulae don't match the regular text, because the letters and digits 
differ.  That's why I want in the formulae math symbols like special 
arrows and operators to be taken from Termes, but regular alphanumeric 
characters from my text font.  So in my minimal examples, 123 should 
look the same in the text and the formula.

Kind regards,
Joshua Krämer

___
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] widowpenalty in mixedcolumns

2013-11-12 Thread Joshua Krämer
Dear list,

while \widowpenalty is respected in conventional columns, inside or 
outside \startmixedcolumns and \stopmixedcolumns, it is ignored.  How can 
I make ConTeXt avoid widows in mixedcolumns?

(I can't use conventional columns, some things like distance=... don't 
work there.)

Thank you,
Joshua Krämer

MWE:

\starttext

\startmixedcolumns
%\startcolumns

\widowpenalty1

\dorecurse{290}{word }

\dorecurse{250}{second }

\stopmixedcolumns
%\stopcolumns

\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] widowpenalty in mixedcolumns

2013-11-12 Thread Joshua Krämer
Dear Wolfgang,

thanks for your answer.  Please compare:

\starttext

\startcolumns[distance=5pt]
\input knuth
\stopcolumns

\startmixedcolumns[distance=5pt]
\input knuth
\stopmixedcolumns

\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] widowpenalty in mixedcolumns

2013-11-12 Thread Joshua Krämer
Am Tue, 12 Nov 2013 19:00:52 +0100 schrieb Wolfgang Schuster:

 \stoptext You have to set the values of the offset key to 0pt to use
 only the values for distance:

Thanks, that did the trick.  However, I still wonder why \widowpenalty 
doesn't work in mixedcolumns.  This should be revised.  Maybe penalty 
keys for \setupmixedcolumns and \startmixedcolumns would be even better.

Kind regards,
Joshua Krämer

___
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] textreference in a protocol (minutes)

2013-11-11 Thread Joshua Krämer
Dear list members,

I use ConTeXt MkIV to typeset the protocol (minutes) of a meeting.  In my 
macros, I use \textreference and \about to reuse the text from the agenda 
list in the actual sections.  It's like the regular table of contents, 
but reversed (see the below MWE).  I do it like that because sometimes 
entries in the agenda list are skipped in the meeting, and that means 
they have to appear in the agenda list, but there is no corresponding 
section.  Now my problem is that the \textreference content is cut off if 
it is too long, as seen in the below MWE.  How can I disable the 
cropping?  Additionally, if somebody can think of a better solution than 
my \textreference approach, please let me know.

Thank you,
Joshua Krämer

Minimal Working Example:

\def\Agendaentry#1#2{\sym{#1}\textreference[Agendaentry#1]{#2}#2}
\setupreferencing[left={},right={}]
\newcount\Agendaentrynr
\def\Agendasection#1%
{%
\Agendaentrynr=#1%
\advance\Agendaentrynr -1\relax
\setupheadnumber[section][\the\Agendaentrynr]%
\section{\about[Agendaentry#1]}%
}

\starttext

Agenda
\startitemize
\Agendaentry{4}{Berichte des Vorsitzers, des Schatzmeisters und des 
Schriftleiters}
\stopitemize

\Agendasection{4} 
\input zapf

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

[NTG-context] Simplefonts and inherited style

2013-11-11 Thread Joshua Krämer
Dear list members,

I need a second font in my text for the purpose of mark-up.  This font is 
defined with \definesimplefonttypeface.  If I switch to a font variant 
like bold and afterwards to the second font, the second font doesn't 
inherit this style.  It only works the other way around (switching to the 
second font first, then to another style).  In the following example, the 
whole section title should be typeset in bold, but the part using the 
second font is typeset in the regular style.  How can I make it inherit 
the bold style?

Thank you,
Joshua Krämer

\usemodule[simplefonts]
\setmainfont[dejavuserif]
\definesimplefonttypeface[Secondfont][dejavusans]
\setuphead[section][style={\tf\bf}]

\starttext
\section{One {\Secondfont Two} Three}
\input zapf
\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 and inherited style

2013-11-11 Thread Joshua Krämer
Dear Wolfgang,

thank you, this does the trick.  I didn't try \setsansfont, because in 
reality I don't use serif and sans fonts but blackletter and roman.  Does 
a more general solution exist?  If not, I will misuse \setsansfont.

By the way, is this new simplefonts version only available in the context 
beta?  I've made an update but still the new commands don't work.

Kind regards,
Joshua Krämer

___
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] Problems with columns and grid

2013-06-03 Thread Joshua Krämer
Hello list,

in the following minimal working example (using Mark IV), the \column 
command is ignored. It works if the grid is disabled or balance=no is 
set. I need the grid, and regarding the balance: without balance, the 
columns use the whole type area height, but I want additional text to 
appear underneath the columns. The height parameter doesn't seem to 
control the columns' height. So my question is: How can I make \column to 
work or how can I at least set the column height as a workaround?

\setuplayout[grid=yes]
\starttext
\startcolumns%[balance=no]
left
\column
right 1\\right 2
\stopcolumns
\stoptext

Kind regards,
Joshua

___
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] Problems with columns and grid

2013-06-03 Thread Joshua Krämer
On Mon, 03 Jun 2013 21:00:49 +0200, Wolfgang Schuster has written:
 Use mixed columns:
 
 \setuplayout[grid=yes]
 \starttext \startmixedcolumns left \column right 1\\right 2
 \stopmixedcolumns \stoptext

Thank you very much, this works!  Now I wonder what the difference 
between regular and mixed columns is.  I have not found any information 
about it; mixed columns aren't even mentioned in the manual.  Can you 
tell me where to find a description?

I have an additional problem with columns:  If I set distance=
\baselineskip, it is bigger then \baselineskip.  Even with distance=0pt, 
there is still a gap, maybe because of some minimum distance value.  How 
can I get a smaller distance?

Kind regards,
Joshua

___
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] Problems with columns and grid

2013-06-03 Thread Joshua Krämer
One other problem has appeared:  \startmixedcolumns[align=right] doesn't 
work (align=... works with \startcolumns).  How can I change the 
alignment?

Kind regards,
Joshua

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