Re: [NTG-context] Place footnote after reference

2019-07-22 Thread Wolfgang Schuster

Alan Braslau schrieb am 22.07.2019 um 16:37:

I do not know the details, but take a look at the following keywords
(which do the *opposite* of what you are seeking):

\setupnote
   [footnote]
   [split=verystrict,scope=page]


The scope setting isn't used in the current beta and the code is 
commented in the source.


Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] background problem with layers

2019-07-22 Thread Wolfgang Schuster

Peter Rolf schrieb am 22.07.2019 um 13:32:

Hi,

I have a problem with a not printed color background when using layers.
Small test file is attached.

Below is a simpler example of your problem.

The frame disappears when you repeat the layer which change how the content
if flushed, in the example below you can test it by changing \box\scratchbox
to \copy\scratchbox.

\starttext

\setbox\scratchbox\hbox{\frule width 6cm height 4cm \relax}

\dontleavehmode
\box\scratchbox % works
%\copy\scratchbox % fails

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] font switching commands

2019-07-21 Thread Wolfgang Schuster

Atsuhito Kohda schrieb am 20.07.2019 um 01:36:

Hi Wolfgang, thanks for your information.

It is a bit difficult for me to understand the difference among 
\switchtobodyfont,
\vii etc. and \tfa etc. with the explanation of cont-eni.pdf precisely 
and unfortunately

\vii etc. are no more available.
Thanks again.


In the example below I make a global change of the font size at the begin
with \setupbodyfont which changes the size of the running text (and also
of the header and footer texts) to 10pt.

With the \tfa and \tfx commands bigger and smaller text but the size of it
depends on the global size. The default scaling for \tfa is 1.2 and for \tfx
is 0.8, this means \tfa results in 12pt and \tfx in 8pt.

In the next line I change the global font size with the \switchtobodyfont
command to 14.4pt. The difference between \setupbodyfont and
\switchtobodyfont is that \setupodyfont changes the header and footer
while \switchtobodyfont doesn't.

Now I use again the \tfa and \tfx commands to change the font size which
use again the scaling factors mentioned above but here they use the new
global size of 14.4pt which result in 17.28pt for \tfa and 11.52pt for \tfx
(the actual size for \tfx is 12pt because ConTeXt uses fixed sizes for
a global font size of 8pt, 9pt, ..., 12pt, 14.4pt which presets for the 
smaller

and larger sizes).

The \vi, \ix etc. commands you mentioned are just shortcuts for
\switchtobodyfont[6pt], \switchtobodyfont[9pt] etc. and have been removed.

 begin example
\setupbodyfont[10pt]

\starttext

text {\tfa text} {\tfx text}

\switchtobodyfont[14.4pt]

text {\tfa text} {\tfx text}

\stoptext
 end example

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Quotation marks

2019-07-20 Thread Wolfgang Schuster

Atsuhito Kohda schrieb am 20.07.2019 um 01:58:

Hi all,
I think in the same way as Dmitry.
It might be obsolete but, as far as I searched, under the setup
\definefontfeature [texligatures] [tlig=yes]
\feature[+][texligatures]
{''} produces right quotation correctly but left quotation seems
not correct (I don't know why).

You're wrong here because ' is replaced with a apostrophe and what
you see are just two and the have a different space between then than
a normal double quotation mark.

 begin example
\starttext

\switchtobodyfont[100pt]

“

”

’

''

\stoptext
 end example

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Side figure bug in mkiv?

2019-07-19 Thread Wolfgang Schuster

Alan Braslau schrieb am 19.07.2019 um 16:06:

On Fri, 19 Jul 2019 13:52:37 +0200
Wolfgang Schuster  wrote:


Henri Menke schrieb am 18.07.2019 um 23:29:

For what it's worth, the MKIV way to switch to bold face is
\bold{text} instead of {\bf text} but it also doesn't fix your
problem because neither of the two start a new paragraph before the
first letter and therefore \the\everypar is still inside a group.

The normal switch to use bold style is \bf and \bold{...} (or {\bold
...}) is only  a alternative
switch which uses \bf to change the font. The same applies to
\italic{...}, \mono{...} etc.

BUT, \bold{...}, \italic{...} export (to xhtml, etc.)
whereas {\bf ...}, {\it ...} do not.

Are you sure?

Also, \setuphighlight [emphasis] [style=bold] and
\emphasis{...}
is a *functionally* better way of formatting text.

It depends on the document size, for a simple letter \bf etc. is enough but
for a bigger document it make sense.

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] font switching commands

2019-07-19 Thread Wolfgang Schuster

Henri Menke schrieb am 19.07.2019 um 01:56:

On 19/07/19 11:45 AM, Atsuhito Kohda wrote:

Hi all
"Manuals-ConTeXt wiki" provides us very important and useful
information and we find cont-eni.pdf in "overview".  In the manual,
font switching commands \vi, \vii, \viii, \ix, \x, \xi, \xii are
explained in p.113 but it seems they don't work except \vi and \xi.
 From my simple test with ConTeXt, \xi produces a greek letter "ξ"
as in traditional TeX and \vi seems to do nothing.

This manual is for MKII (it is dated 2001).  The new font size switches
are \tfa, \tfb, \tfc, and so on (or \bfa for bold etc.).  Generally, you
want to use them very sparingly and only in setup code.  Your document
content should not contain any explicit size switches.

\vi, \ix etc. and \tfa, \tfx etc. are two different types of font switches.

The no longer available commands \vi etc. change the global size and one
could replace them with \switchtobodyfont[6pt]. The other switches are local
changes of the font size which produce smaller or larger which depends on
the global size.

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Side figure bug in mkiv?

2019-07-19 Thread Wolfgang Schuster

Henri Menke schrieb am 18.07.2019 um 23:29:

For what it's worth, the MKIV way to switch to bold face is \bold{text}
instead of {\bf text} but it also doesn't fix your problem because
neither of the two start a new paragraph before the first letter and
therefore \the\everypar is still inside a group.
The normal switch to use bold style is \bf and \bold{...} (or {\bold 
...}) is only  a alternative
switch which uses \bf to change the font. The same applies to 
\italic{...}, \mono{...} etc.


Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Spacing after combination

2019-07-16 Thread Wolfgang Schuster

Willi Egger schrieb am 16.07.2019 um 20:46:

Marco,

there is a \setupcombination command:

\setupcombination [...,...] [..,..=..,..]
1 NAME
2 nx
ny
width height location distance alternative align continue before after 
inbetween style
color
OPT
= NUMBER
= NUMBER
= fit DIMENSION
= fit DIMENSION
= left middle right top bottom = DIMENSION
= label text
= inherits: \setupalign
= yes no
= COMMAND
= COMMAND
= COMMAND
= STYLE COMMAND
= COLOR

I hope this will enable you to get what you want.
None of these options is applied at the begin or end of the environment 
(use the following setup in the example).


\setupcombination
  [   before={\endgraf{\tttf    [before]}\endgraf},
   after={\endgraf{\tttf [after]}\endgraf},
   inbetween={\endgraf{\tttf [inbetween]}\endgraf}]


A alternative to using floats is to put the combination in a 
linecorrection environment, i.e.


\startlinecorrection
  \startcombination [2*2]
  ...
  \stopcombination
\stoplinecorrection

or

\startlinecorrection[blank]
  \startcombination [2*2]
  ...
  \stopcombination
\stoplinecorrection

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Columnsets not balanced

2019-07-15 Thread Wolfgang Schuster

Sytse knyps...@home.nl schrieb am 15.07.2019 um 13:09:

Dear list,

In the following example I would like to have the two columns balanced, i.e. 
with equal number of lines in both columns. But contrary to the option in the 
definition, all text is put in the leftmost column and the right-hand column 
remains empty.

\definecolumnset[Two][balance=yes]
\starttext
\startcolumnset[Two]
   \input knuth
\stopcolumnset
\stoptext

How can I automatically obtain balanced columns?

 Columnsets have no support for balanced columns.

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] reference containing parentheses causes trouble

2019-07-10 Thread Wolfgang Schuster

Sanjoy Mahajan schrieb am 10.07.2019 um 04:15:

Dear List,

Warning: The following may be a bug or feature or just my
misunderstanding!  It seems that parentheses cause trouble in
references.

Braces are used for the argument of reference actions.

\setupinteraction[state=start]

\starttext

\goto{Second page}[page(2)]

\page

\goto{ConTeXt garden}[url(http://wiki.contextgarden.net)]

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] From mkii to mkiv: MathML mtable alignment

2019-07-08 Thread Wolfgang Schuster

Duncan Hothersall schrieb am 08.07.2019 um 16:45:
The command \setupMMLappearance[mtable][alternative=b] used to give 
me, in mkii, MathML layouts in which the first column was ragged left, 
the second column centred, and the third column ragged right. It now 
seems to be ignored, and the output has all three columns centred.
Use the columnalign attribute: 
http://www.pragma-ade.nl/general/manuals/mmlprime.pdf#page=33


Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Strange behavior in somewhat complex layout (again)

2019-06-27 Thread Wolfgang Schuster

Andres Conrado Montoya schrieb am 27.06.2019 um 20:53:

Wolfgang... Thank you, man. Thank you so very much. This works perfectly.

As I understand it from your correction, my mistake was that I was not 
doing the page break before everything else, as I should, because in 
any case there will always be a page break in my layout. Then, let the 
rest of the algorithm decide if there will be a left or right page, 
headers and footers, etc. Am I correct?

Yes, it's important to do the page check before the section is inserted.

When you use the before key you perform the check after \startchapter 
finished the previous page and removed the header line, when you insert 
now the colored page the header setting is used for this page and one 
the following page with the section title you get the unwanted header text.


Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Strange behavior in somewhat complex layout (again)

2019-06-27 Thread Wolfgang Schuster

Andres Conrado Montoya schrieb am 27.06.2019 um 19:22:
Hi List, it seems my message went unnoticed, if you can help me out, 
please do. I'm an struggling with this layout.


I'm trying to make something using bits and examples found here and 
elsewhere, but I'm hitting a wall. I know there's a flawed logic in my 
approach, but I can't figure it out. Any help is appreciated.


Expected behavior of the following MWE:
When starting a new chapter, check if the page is even (left page), if 
so, fill it with color, and start the chapter in the next odd page 
(right page), removing the header but leaving the footer in that 
start-chapter page; and if this is a start-chapter page, use a 
specific graphic overlay for the page, but if if not (if its a regular 
page), use another graphic.


Result:
The header still appears in the start-chapter page, if it comes after 
the color filled page. But, if the start-chapter page comes after a 
regular (even) page, everything works as expected (no color-filled 
page, no header in the start-chapter page).


MWE:

%% START MWE

[...]

\startsetups [chapter:before]
   \doifoddpageelse
     {}
 {\pushbackground[page]
\setupbackgrounds[page][background=color,backgroundcolor=rojo]
\page[yes,right]
      \popbackground}
\stopsetups

\startsetups [chapter:before]
  \page
  \doifoddpageelse
    {}
    {\pushbackground[page]
   \setupbackgrounds[page][background=color,backgroundcolor=rojo]
   \page[yes,header,footer,right]
 \popbackground}
\stopsetups


\setuphead[chapter]
          [width=20em,
before=\directsetup{chapter:before},

Apply the above setup with

beforesection=\directsetup{chapter:before},

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Linefillers don't work

2019-06-26 Thread Wolfgang Schuster

Hi,

the linefiller mechanism is currently broken.

\starttext

\startlinefiller[filler]
\samplefile{ward}
\stoplinefiller

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] crosswords puzzles

2019-06-22 Thread Wolfgang Schuster

DesdeChaves schrieb am 22.06.2019 um 11:42:

Dear sirs,

Is there a way to make crosswords  or word puzzles in context?
In my hippocampus I have a vague idea that this has already been 
tried, but I can't find this code anymore.
AFAIK there are only packages for LaTeX to create crossword but you can 
use natural or extreme tables to create them. For the input Lua can be a 
better choice because you can put your words (or numbers) in a Lua table 
and use a loop to create a table for TeX.


Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Wrong breaks in footnote for column texts

2019-06-20 Thread Wolfgang Schuster
Am Do., 20. Juni 2019 um 17:00 Uhr schrieb Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com>:

> Hi Hans,
>
> as mentioned a few times by others long footnote entries have problems
> with line breaks.
>
> In mixed columns you get a single line for each entry and in page
> columns the width for the entries is wrong.
>
> \starttext
>
> \dorecurse{2}{\samplefile{dawkins}\footnote{\samplefile{jojomayer}} }
>
> \page
>
> \startmixedcolumns
> \dorecurse{2}{\samplefile{dawkins}\footnote{\samplefile{jojomayer}} }
> \stopmixedcolumns
>
> \page
>
> \setupnote[footnote][alternative=columns,n=2]
>

The setup above shouldn't be part of the example.

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Wrong breaks in footnote for column texts

2019-06-20 Thread Wolfgang Schuster

Hi Hans,

as mentioned a few times by others long footnote entries have problems 
with line breaks.


In mixed columns you get a single line for each entry and in page 
columns the width for the entries is wrong.


\starttext

\dorecurse{2}{\samplefile{dawkins}\footnote{\samplefile{jojomayer}} }

\page

\startmixedcolumns
\dorecurse{2}{\samplefile{dawkins}\footnote{\samplefile{jojomayer}} }
\stopmixedcolumns

\page

\setupnote[footnote][alternative=columns,n=2]

\startpagecolumns
\dorecurse{2}{\samplefile{dawkins}\footnote{\samplefile{jojomayer}} }
\stoppagecolumns

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] [dev-context] type key in \setupattachment

2019-06-20 Thread Wolfgang Schuster

Hans Hagen schrieb am 20.06.2019 um 10:46:

On 6/19/2019 9:28 PM, Pablo Rodriguez wrote:

Hi Wolfgang,

this comes from a previous message from this mailing list
(https://mailman.ntg.nl/pipermail/dev-context/2019/003574.html), which I
needed a long while to understand .

Would it be possible that the \setupattachment command has a "type" key
to specify its MIME type? (Default should be "application/octet-stream"
[or so it seems].)

This is required to add the value to the /Subtype entry in the
/Embeddedfile dictionary
(https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#nameddest=G6.1942814) 



This is optional information in PDF-1.7, but required in PDF/A-2.

Many thanks for your help,

there is a type key
I added it to the command but it shows only a generic name as argument 
because I can see no point to list all possible arguments.


@Hans: I put new files on your FTP server.

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Tagged blocks

2019-06-19 Thread Wolfgang Schuster

Jan Willem Flamma schrieb am 18.06.2019 um 20:17:

Dear list members,

I would like to add a tag to a block so I can easily select a few 
blocks and print them in another chapter.


In the below MWE I would like to print the normal (non-tagged) block 
in the first chapter. The second block with the tag [exam] should not 
be processed in the first chapter and only appear in the second chapter.


According to the wiki and reference manual it should be possible using 
either \useblocks or \selectblocks but I can't get it to work.

At this point you can hide tagged blocks.

\beginquestion
\startquestion
Normal question
\stopquestion
\endquestion
\beginanswer
\startanswer
Normal answer
\stopanswer
\endanswer

\beginquestion[exam]
\startquestion
Exam question
\stopquestion
\endquestion
\beginanswer[exam]
\startanswer
Exam answer
\stopanswer
\endanswer
This flushes all saved blocks and you can't exclude tagged blocks but 
it's possible to extend the mechanism an apply a default tag to each 
block which will allow selective output.

\startsection[title=Questions]
\useblocks[question][criterium=chapter]
\stopsection

\startsection[title=Answers]
\useblocks[answer][criterium=chapter]
\stopsection

\stopchapter

\startchapter[title=Chapter for exam questions]
This was a bug (do you get a error message in your document?) and should 
be fixed in the next beta.

\startsection[title=Exam Questions]
%\useblocks[question][exam]   %<--- does not work
\stopsection

\startsection[title=Exam Answers]
%\useblocks[answer][exam]     %<--- does not work
\stopsection

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Something wrong after ConTeXt installation, could somebody help me please?

2019-06-14 Thread Wolfgang Schuster

Ursula Hermann schrieb am 13.06.2019 um 10:10:


How can I do the changes you wrote me?

I don't use Winedt and have therefore no idea where you can change the 
compiler settings.


Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] aligning rotated text in a natural table

2019-06-12 Thread Wolfgang Schuster

Martin Althoff schrieb am 12.06.2019 um 13:11:

I am trying to align rotated text horizontally and vertically in a table cell. 
Vertically
is no problem, horizontally it fails. Non-rotated text is, of course, fine.

What can I do to fix the problem? Thanks for suggestions.

Martin

using: mtx-context | current version: 2019.05.18 10:42
PDF of my output is attached.

MWE:

\starttext
\setupTABLE[c][1][width=7mm]
\setupTABLE[c][2][width=30mm]
\setupTABLE[r][each][align={lohi,middle},height= 50mm]

\bTABLE
\bTR
\bTD \rotate[270]{\switchtobodyfont[8pt]a bit more text} \eTD

\bTD \dontleavehmode\rotate[...]{...} \eTD

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Something wrong after ConTeXt installation, could somebody help me please?

2019-06-12 Thread Wolfgang Schuster

Ursula Hermann schrieb am 12.06.2019 um 11:55:


Hello List!

\setuppapersize[A4]

\setupexternalfigures

  [location=default]

\setupbodyfont[Computer Modern Roman ,rm, tfx 7pt]


\setupbodyfont[7pt]

everything else can be removed because

1. "rm" is the default style in most typescripts

2. there is no typescript with the name "Computer Modern Roman"

3. "tfx" is a font switch in the document


\setupindenting

  [yes, small]

\setupwhitespace

  [small]

\setupcombination

   [location=top,

    distance=\spaceamount]

\bTABLE[align=flushleft,columndistance=0.1em]

   \bTR

 \bTD[width=.2\textwidth]Small \eTD

 \bTD[width=0.05\textwidth] \eTD

   \eTR

\eTABLE

\setupexternalfigures

  [location=default]

\setupindenting

  [yes, small]

\setupwhitespace

  [small]

\definecolor [rosybrown:1][h=FFBCB3]

\defineframedtext

[prettyblock]

  [width=10cm,

   indenting={yes, small},

   background=color, backgroundcolor=rosybrown:1,

   foreground=color, foregroundcolor=black,

   offset=2mm,

   align=flushleft]

\starttext

\startprettyblock[width=7.5 cm,align={flushleft}]

\noindentation  The Earth, as a habitat for animal life, is in old age 
and has a fatal illness. Several, in fact.


\stopprettyblock

Below, we have two separate columns; but up here, for the nonce, we 
have but the one.


\startcolumns [n=2]

  Text, text, text \dots

  all in the first column

\column

  Words, words, words \dots

  all in the second column.

\stopcolumns

\stoptext

\startcolumns[n=2]

\input ward

\column

\input weisman

\stopcolumns

After installing ConTeXt in WinEdt:

Command Line: C:\Users\Hermann\Downloads\context-mswin\bin\mtxrun.exe 
--synctex=-1 "melon.tex"



Change "mtxrun.exe" to "context.exe" or "mtxrun.exe --script context".

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] background color, was: CMYK Color profile

2019-05-31 Thread Wolfgang Schuster

Benjamin Koppe schrieb am 31.05.2019 um 21:23:

Hi Jan,

yes, I've read these texts once and they played a role in thinking 
about getting into ConTEXt.


Thank you for your answer, now I have something to investigate.

Another follow up question on background colors:

I try to setup the background color by

\setupbackgrounds[page][backgroundcolor=blue]

\setupbackgrounds [paper] [background=color,backgroundcolor=blue]

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Itemization formatting

2019-05-29 Thread Wolfgang Schuster

Taco Hoekwater schrieb am 29.05.2019 um 16:15:

Hi all,

I must be getting old :(

It used to be that I could get ConTeXt to do what I wanted, but that is 
increasingly getting harder.

Current problem: I would like to have itemizations that behave like in this 
dummy
ascii formatting:

   *   Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec dapibus 
turpis et
   nulla venenatis tincidunt. Curabitur sit amet vehicula nisi, sit amet

and so far it has been impossible for me to set up \setupitemize to do what I 
want.

In descriptive text, what I want is:

1. some global indentation to the left and/or right. That is what the margin= 
key does
2. the symbol (or number) typeset in a specific width. That is the width= key
3. some distance between the number box and the following text. That is the 
distance= key
4. on line 2 and forward to the end of the item, I want a *different* 
indentation from the first item line.

In this particular case, I want no extra indentation except for ‘margin’, but 
in other
cases I may like either more or less indentation than on line 1 of the first 
para of the item.

The desired effect is simple achieve with primitive operations, but I would 
like the input
to look nice (not to mention that I do not want to loose options for 
cross-referencing etc).

   \setupitemize[option=intext]

is nearly right for this case (with indentation equal to the left margin), so I 
assumed I would
be able to tweak that. But the problem there is that while it does 2-4, it 
ignores the extra
indentation required for nested itemizations (it even ignores explicit margin= 
settings for the
nested level). After fighting with this for hours, I am nearly ready to give up.

Anybody have any idea how to get itemizations to do what I want?

MWE attached.

Best wishes,
Taco
PS It seems that “indentnext=no” does not work for nested itemizations?


You can use the "text" option and add \par at the end of each item but 
your requirements (hanging text, different margin and before/after 
ssettings) are easier to solve with a description or enumeration.


\definesymbol
  [taco]
  [{\inframed[frame=off,width=2em,align=flushleft]{\textbullet}}]

\starttext

\samplefile{zapf}

\startitemize[text][symbol=taco]
  \item \samplefile{weisman}\par
  \startitemize
    \item \samplefile{ward}\par
  \stopitemize
\stopitemize

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Itemization formatting (different question)

2019-05-29 Thread Wolfgang Schuster

Taco Hoekwater schrieb am 29.05.2019 um 16:20:

Hi again,

Another question on nearly the same subject: how can I get nested itemizations
to listen to the before= and after= keys? AFAICT, they always use the inbetween=
instead of above= and below= keys?
ConTeXt supports before/after values for the inner itemizations but they 
are hidden by a conditional and there is no official way to change it 
(e.g. \setupitemize[spacing=local|global] or \setupitemize[method=1|2|3]).

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Extend figure to margin, or extend figure from margin to text

2019-05-29 Thread Wolfgang Schuster
Zhichu  schrieb am Mi., 29. Mai 2019, 10:30:

>
> Hi everyone,
>
> I am writing a book, in which all figures are placed in the margin. But
> some graphics are too big to fit in the margin. I was wondering whether
> there's an elegant way to use some room of the text body?
>

Take a look into the Details manual:
http://www.pragma-ade.nl/show-man-15.htm

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] bookmark expansion again

2019-05-27 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 27.05.2019 um 20:33:

Hi Hans,

I have the following sample:

 \def\eap{expansion}
 \def\MyContent{Expanded \eap}
 %~ \enabledirectives[references.bookmarks.preroll]
 \setupinteraction[state=start, title={\MyContent}]
 \placebookmarks[section]
 \starttext
 \section{\MyContent}
 \startsection[title=\MyContent, bookmark=\MyContent]
 \stopsection
 \stoptext

I see that now PDF contents are prerolled by default (which I think it
is a great idea [I hope it isn’t a bug]).

But bookmarks alone (when aren’t prerolled. From strc-sec.mkiv, I see
that prerolling is only applied to \currentstructuretitle when
\currentstructurebookmark is empty.

Would it be possible that \currentstructurebookmark could have
prerolling when it is different from \currentstructuretitle?

Sorry for insisting, but I need this to avoid having "main:345{/h2}" as
bookmark for some chapters.

You can try

    \setuphead[section][expansion=yes]

or (for documents which use XML as input format)

    \setuphead[section][expansion=xml]

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] serial letters

2019-05-24 Thread Wolfgang Schuster

Jean-Philippe Rey schrieb am 24.05.2019 um 13:49:

Hello Everybody,


Le 8 avr. 2019 à 15:26, Henning Hraban Ramm  a écrit :

How would you approach serial letters, e.g. to all members of a club?
(Actually I need to send out donation receipts.)

I’d like to use the letter module, since my usual letter design is using it.

I can export the addresses to CSV, JSON, Lua tables or whatever or transfer 
them to a SQLite db.
Would it make more sense to read them in Lua and combine this data with a 
buffer, or to write a single tex file for every letter?
I know how to do the latter, but I’d like to learn a more ConTeXt-ish way.
Would it make sense to use the bibliographies module?

I have the same need. I tried a basic solution:

=== Start failing example
\usemodule[letter]

\setupletter[
   signature={JPR},
   closing={Sincerely yours,}
   ]

\def\GenLetter[#1]{
   \getparameters[GL][#1]
   \startletter[
  toname={\GLto},
  toaddress={\GLadr},
  opening={\GLciv},
  ]

   Blah blah \GLciv.

   \stopletter
}

\starttext

\GenLetter[civ={M.}, to={Pierre Durand}, adr={Trifouillis-les-Oies}]

\stoptext
=== End failing example

My idea being to generate as many letters I like by multiplying the \GenLetter 
line.

However, I get an error message I don’t understand. Can someone point to the 
thing I am doing wrong ?
The problem is that you put the letter-environment in a command but the 
environment uses the buffer mechanism to store the content which doesn't 
work when it is used in a command definition.


What you have to do is to move the content of the letters out of the 
\GenLetter command, you can use the lettercontent-environment for this. 
In the \GenLetter command you now use the \placeletter command to flush 
the content of the letter with the current values for the address etc.


 begin example
\usemodule[letter]

\setupletter
  [signature={JPR},
 closing={Sincerely yours,}]

\setupletter
  [   toname=\correspondenceparameter{to},
   toaddress=\correspondenceparameter{adr},
 opening=\correspondenceparameter{civ}]

\startlettercontent
  Blah blah \correspondenceparameter{civ}.
\stoplettercontent

\def\GenLetter[#1]%
  {\begingroup
 \setupletter[#1]%
 \placeletter
   \endgroup}

\starttext

\GenLetter[civ={M.}, to={Pierre Durand}, adr={Trifouillis-les-Oies}]

\stoptext
 end example

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Broken kerning if hz is turned on?

2019-05-20 Thread Wolfgang Schuster

Mikael P. Sundqvist schrieb am 20.05.2019 um 21:41:

Hi,

attached is the result of running latest lmtx on

\definefontfeature[default][default][protrusion=quality,expansion=quality]

\definefontfeature [default] [default] [threshold=20,expansion=quality]

\setupalign[hz]
\setupbodyfont[lucidaot]

\starttext
Gauss öppnade med denna studie ett helt nytt fält inom matematiken, 
det som

handlar om \emph{elliptiska funktioner} och \emph{modulära former}.
\stoptext

What happens with the space between the characters in "studie", that 
becomes "s tudie"? The spacing between some other characters are also 
off (ma tematiken), but not as much as in studie.
It's a problem with Lucida Opentype which lacks kerning (I reported the 
same problem a while ago).


Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] EB Garamond works in TL2016 ConTeXt but not in latest ConTeXt

2019-05-19 Thread Wolfgang Schuster

Hans Hagen schrieb am 19.05.2019 um 12:22:

On 5/19/2019 11:46 AM, Wolfgang Schuster wrote:

nyssus schrieb am 19.05.2019 um 11:31:

In my source ConTeXt file I have the lines:

\usetypescriptfile[type-ebgaramond]
\setupbodyfont[ebgaramond,10pt]


ConTeXt from TL 2016 correctly formats the text in EB Garamond, as can
be shown by the prescence of

mkiv lua stats  > loaded fonts: 2 files: ebgaramond12-regular.otf,
texgyrebonum-math.otf

whereas the latest ConTeXt gives:

fonts   > defining > font with asked name 
'EBGaramond12-Regular'

is not found using lookup 'file'
fonts   > defining > unknown font 'EBGaramond12-Regular',
loading aborted
fonts   > defining > unable to define 'EBGaramond12-Regular' as
'ebgaramond-10pt-rm-tf-0--0'

and typesets the text with TeX Gyre Bonum Math. I have the EBGaramond
fonts installed, set the OSFONTDIR path in setuptex, etc. What exactly
is wrong here?
There is a newer version of the fonts (from October 2017) which uses 
different files names than the older version (from 2014) but the 
predefined typescripts work only with the older names.


the names are mapped in a goodie file .. where did you find the new 
fonts?

https://github.com/octaviopardo/EBGaramond12/tree/master/fonts/

About the newer version: 
https://en.wikipedia.org/wiki/EB_Garamond#Implementation_History


Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] EB Garamond works in TL2016 ConTeXt but not in latest ConTeXt

2019-05-19 Thread Wolfgang Schuster

nyssus schrieb am 19.05.2019 um 11:31:

In my source ConTeXt file I have the lines:

\usetypescriptfile[type-ebgaramond]
\setupbodyfont[ebgaramond,10pt]


ConTeXt from TL 2016 correctly formats the text in EB Garamond, as can
be shown by the prescence of

mkiv lua stats  > loaded fonts: 2 files: ebgaramond12-regular.otf,
texgyrebonum-math.otf

whereas the latest ConTeXt gives:

fonts   > defining > font with asked name 'EBGaramond12-Regular'
is not found using lookup 'file'
fonts   > defining > unknown font 'EBGaramond12-Regular',
loading aborted
fonts   > defining > unable to define 'EBGaramond12-Regular' as
'ebgaramond-10pt-rm-tf-0--0'

and typesets the text with TeX Gyre Bonum Math. I have the EBGaramond
fonts installed, set the OSFONTDIR path in setuptex, etc. What exactly
is wrong here?
There is a newer version of the fonts (from October 2017) which uses 
different files names than the older version (from 2014) but the 
predefined typescripts work only with the older names.


Instead of using the existing typescripts you can use the 
\definefontfamily command to access the font.


\definefontfamily [ebgaramond] [serif] [EB Garamond]
\definefontfamily [ebgaramond] [math]  [TeX Gyre Bonum Math]

\setupbodyfont [ebgaramond,10pt]

\starttext
...
\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] xmldoif, \startSECTION ... \stopSECTION and \setuphead

2019-05-16 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 16.05.2019 um 18:43:

Dear list,

I have the following sample:

 \setuphead[chapter]
 [beforesection=\TeX,
  aftersection=\TeX]
 \starttext
 \startchapter[title=Chapter,
 beforesection=\ConTeXt,
 aftersection=\ConTeXt]
 This is my chapter.
 \stopchapter
 \stoptext

After checking i-context, the options for the second pair of brackets are:

   KEY = VALUE

Well, I think this is the standard case. Aren’t values inherited from
\setuphead? What would be the valid keys for this case?
The second argument is for userdata, i.e. you can use your own keys to 
store information for a section (e.g. the author or a subtitle).


Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] issues with rotated paper size

2019-05-15 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 14.05.2019 um 21:39:

On 5/14/19 8:05 PM, Wolfgang Schuster wrote:

Pablo Rodriguez schrieb am 14.05.2019 um 18:51:

[...]
I think it might be a bug.

When you add \setupinteractionscreen to your document ConTeXt uses a
more complex method to save the page size which includes calculations
for the different box types. Part of these calculations are the width
and height of the document and paper but when you rotate one of them you
get unexpected values for them.

Many thanks for your reply, Wolfgang.

I see that a more complex method is deployed to get the box sizes.

I simply thought that this could be a bug.
What is the reason for this page rotation, maybe there is a better 
solution for this?


Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] filling page to bottom

2019-05-15 Thread Wolfgang Schuster

Hans van der Meer schrieb am 15.05.2019 um 09:24:
I find that the current (default) settings tend to break pages early, 
leaving a fairly large amount of whitespace at the bottom of the 
pages. Obviously in order to avoid breaking paragraphs or to avoid 
small parts of a paragraph at the top of the page.


What parameters do I have to tweak to fill the pages more completely? 
Because I planned already to examine all pages individually for their 
appearance, inserting breaks by hand is not the problem here.


You have to change the penalty values for orphans, widows etc.

\startsetups [hvdm]
  \directsetup{*reset}
  \nopenalties
\stopsetups

\showgrid

\starttext

\dorecurse{10}{\samplefile{knuth}}

\page

\setuplayout[setups=hvdm]

\dorecurse{10}{\samplefile{knuth}}

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] issues with rotated paper size

2019-05-14 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 14.05.2019 um 18:51:

On 5/14/19 4:53 PM, Hans Hagen wrote:

i have no clue what you want to achieve

Hans and Wolfgang,

I think I have found a weird behaviour in ConTeXt (latest beta from
2019.05.12 19:05).

This is a sample of what I want to achieve (thanks to Wolfgang’s help):

 \setuppapersize [A4,landscape,90] [A4]
 \setupinteractionscreen[option={none, max}]
 \showframe
 \starttext
 \showlayout
 \stoptext

If I set "option=max" (instead of "option={none, max}", I get a square
paper of 210x210mm.

These are the right page dimensions in PDF with the sample above:

   /MediaBox [ 0 0 595.2756 841.8898 ]
   /CropBox [ 0 0 595.2756 841.8898 ]
   /TrimBox [ 0 0 595.2756 841.8898 ]

These are the dimensions with "\setupinteractionscreen[option=max]":

   /MediaBox [ 0 0 841.8898 595.2756 ]
   /CropBox [ 0 -246.61417 595.2756 595.2756 ]
   /TrimBox [ 0 -246.61417 595.2756 595.2756 ]

I think it might be a bug.
When you add \setupinteractionscreen to your document ConTeXt uses a 
more complex method to save the page size which includes calculations 
for the different box types. Part of these calculations are the width 
and height of the document and paper but when you rotate one of them you 
get unexpected values for them.


\setuppapersize [A4,landscape,90] [A4]

\starttext

\starttabulate
\NC Printpaperwidth  \EQ \the\printpaperwidth  \NC\NR
\NC Paperwidth   \EQ \the\paperwidth   \NC\NR
\TB
\NC Printpaperheight \EQ \the\printpaperheight \NC\NR
\NC Paperheight  \EQ \the\paperheight  \NC\NR
\stoptabulate

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] issues with rotated paper size

2019-05-14 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 14.05.2019 um 16:12:

Dear list,

I have the following sample:

 \setuppapersize[A4, landscape][A4, 90]
 %~ \setupinteractionscreen[option=max]
 \showframe
 \starttext
 \showlayout
 \stoptext

For some reason, the page is displaced from the paper bottom.

\setuppapersize [A4,landscape,90] [A4] ?

Wolfgang


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] thumb index: \setlayer on every odd/even page?

2019-05-13 Thread Wolfgang Schuster

Henning Hraban Ramm schrieb am 13.05.2019 um 23:17:

Hai,

how must I setup layers that get repeated on every even/odd page?
Or should I use \doifoddpageelse with \setlayer?

Or do you have a different suggestion for thumb index “boxes”?

https://wiki.contextgarden.net/Thumb_index

You can also set backgrounds only for left or right pages.

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Alignment

2019-05-13 Thread Wolfgang Schuster



Fabrice Couvreur schrieb am 13.05.2019 um 22:45:

Hi,
Not having too many ideas, I did this: is there not a more elegant way ?

\definemathmatrix [pmatrix] [matrix:parentheses] [simplecommand=MATRIX]

\starttext

\startformula
  \startmathalignment
  \NC P \times M = P \NC \iff \MATRIX{x,y} \times 
\MATRIX{0.22,0.78;0.53,0.47} = \MATRIX{x,y} \NR

  \NC    \NC \iff
    \startmathcases
    \NC 0.22x + 0.53y = x \NR
    \NC 0.78x + 0.47y = y \NR
    \stopmathcases
  \NR
  \NC    \NC \iff 0.78x - 0.53y = 0 \NR
  \NC    \NC \iff   78x -   53y = 0 \NR
  \stopmathalignment
\stopformula

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] placing content in footers

2019-05-11 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 11.05.2019 um 16:35:

Dear list,

I have the following sample:

 \setuppapersize[A8]
 \setuppagenumbering
 [alternative=doublesized]
 \setupfootertexts
 [even-right]
 [even-left]
 [odd-right]
 [odd-left]
 %~ [even-middle]
 %~ [odd-middle]
 \starttext
 \mbox{}\page\mbox{}
 \stoptext

Where did you learn to use \mbox?

Is there any way to place content in the middle of doublesided footers,
besides left and right contents?

\setuppagenumbering
  [alternative=doublesided]

\setupfootertexts
  [\doifoddpageelse{right page}{left page}]

\setupfootertexts
  [inner margin] [outer margin]
  [outer margin] [inner margin]

\starttext
%\dorecurse{2}{\dontleavehmode\page}
\dorecurse{2}{\page[dummy]}
\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] font selection in LMTX

2019-05-09 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 09.05.2019 um 21:15:

Hi Hans,

using the following sample:

 \definefontfamily[mainface][rm][TeX Gyre Heros]
 \definefontfamily[mainface][mm][TeX Gyre Termes Math]
 \definefontfamily[mainface][ss][Gill Sans MT][tf=file:GIL_.TTF]
 \definefontfamily[mainface][tt][Cousine]
 \definefontfamily[mainface][cg][Arial Narrow][tf=file:ARIALN.TTF]
 \setupbodyfont[mainface]
 \startbuffer
 \ConTeXt\ is awesome!\par
 \stopbuffer
 \starttext
 \startTEXpage[offset=1em]
 \getbuffer
 \ss\getbuffer
 \tt\getbuffer
 \cg\getbuffer
 \stopTEXpage
 \stoptext

I have no problem to get all four fonts with MkIV, but with LMTX I don’t
get \cg or \ss.


What are the results for the following two calls:

mtxrun --find-file GIL_.TTF

mtxrun --script fonts --list --all gill*

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] pretty printers

2019-05-08 Thread Wolfgang Schuster



Tomas Hala schrieb am 08.05.2019 um 22:42:

Wed, May 08, 2019 ve 10:14:45PM +0200 Wolfgang Schuster napsal(a):
# Tomas Hala schrieb am 08.05.2019 um 21:58:
# >Hi all,
# >
# >according to our wiki, there are pretty printers in ConTeXt
# >implemented only for TEX, LUA, XML and MP.
# >
# >I am searching now for PHP pretty printer but I did not find
# >anything on the net (only C and Java). I would like to ask
# >whether is something for PHP (or for other programming languages)
# >available.
#
# 1. Use the scite module which provides additional styles (e.g. cpp
# or json) but php is still missing.
#
# 2. Use Aditya's vim module which uses vim to highlight source code.
#
# Wolfgang

Maybe it is a misunderstanding but how can use these modules
in ConTeXt? I had in mind typesetting the code in ConTeXt
like \startTEX etc.


1. Scite module

\usemodule [scite]

\starttext

\startCPP
#include

using namespace std;

int main()
{
    cout << "Hello World\n";
    return 0;
}
\stopCPP

\stoptext


2. Vim module

See Aditya's mail.


Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] pretty printers

2019-05-08 Thread Wolfgang Schuster

Tomas Hala schrieb am 08.05.2019 um 21:58:

Hi all,

according to our wiki, there are pretty printers in ConTeXt
implemented only for TEX, LUA, XML and MP.

I am searching now for PHP pretty printer but I did not find
anything on the net (only C and Java). I would like to ask
whether is something for PHP (or for other programming languages)
available.


1. Use the scite module which provides additional styles (e.g. cpp or 
json) but php is still missing.


2. Use Aditya's vim module which uses vim to highlight source code.

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] issue with page numbering

2019-05-08 Thread Wolfgang Schuster



Pablo Rodriguez schrieb am 08.05.2019 um 20:14:

Dear list,

inspired by strc-pag.mkiv, I have the following sample:

 \setuppagenumbering[alternative=doublesided]
 \setupsubpagenumber[way=bychapter]
 \starttext
 \dorecurse{5}{\startchapter[title=My Chapter]
 \userpagenumber/\lastuserpagenumber---
 \subpagenumber/\lastsubpagenumber
 \stopchapter}
 \stoptext

I need that chapters start on an odd page.

Is there any way to avoid that \lastsubpagenumber counts the blank page
that might be placed among two chapters?

You have to reset the subpage counter at the end of each chapter.

\startsetups [chapter:after]
  \page
  \resetsubpagenumber
\stopsetups

\setuphead
  [chapter]
  [aftersection=\directsetup{chapter:after}]

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Unicode mathematics in ConTeXt

2019-05-04 Thread Wolfgang Schuster

Hi Idris,

please read this: https://www.w3.org/TR/unicode-xml/#Superscripts

Wolfgang


Hamid,Idris schrieb am 03.05.2019 um 21:40:

Dear gang,

Ok, I've made some progress:

1. tex-gyre etc. *do* support Unicode mathematics, but the version of
ConTeXt I was using had produced the wrong encoding in the pdf output. For
example, U+1D4D2 (퓒) in the input was being mapped to U+2D4D2 in the
output.

Updating to the latest beta appears to have fixed this issue.

2. tex-gyre etc. appears to be missing some superscript characters, e.g.,
ⁿ (U+207F).

3. New example:

===
\setupbodyfont
[cambria,12pt]
% [pagella,12pt]
% [times,12pt]

% \starttext
\startTEXpage
\def\ANTI{{^{\rm nt}}}
\def\ANTIU{{^{\rm ⁿᵗ}}}

\def\CATCA{$\cal \bf C\ANTI$}
\def\CATCAU{$퓒\ANTIU$}

퓒 \CATCA \CATCAU
\stopTEXpage
% \stoptext
===

\CATCAU and \ANTIU use Unicode characters and superscripts directly,
instead of the old TeX method.

4. Issues. In the pdf output of \CATCAU:
i)   Why does ConTeXt make the second superscript larger than the first?
ii)  If one copies the text of the pdf output to an editor - even this
email client - the second superscript moves to a new line:

퓒 ⁿ
t

Why does this happen? Is this a bug?

5. Here is what we want: 퓒 ⁿᵗ

What is the proper or best way to get a character-superscript combination
in ConTeXt whose output can be copied and pasted to an editor and give the
correct result? What am I missing?

Thank you in advance.

Best wishes
Idris

On Wed, 01 May 2019 14:58:06 -0600, Hamid,Idris
 wrote:


Dear gang,

I need to convert a document from TeX-style to Unicode mathematics. For
example:

\starttext
\def\ANTI{{^{\rm nt}}}
\def\CATCA{$\cal \bf C\ANTI$}

\CATCA
\stoptext

Issues:

1. I need calligraphic characters, but the relevant characters in
latinmodern-math.otf are not encoded in (standard) Unicode. The same goes
for the tex-gyre-math fonts.

2. What comprehensive unicode-math fonts do you recommend as an
alternative?

3. In the above example, \cal is used.

4. Other issues may arise, e.g., getting subscripts and superscripts
correct. How might one rewrite the above with Unicode mathematics in
mind?
Is there a My Way or some other guide to Unicode mathematics in ConTeXt?

This writer has never had to think about this matter before so this is
all
new ground to learn. Thank you in advance for any guidance.

Best wishes
Idris




___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Hyphenation questions

2019-05-01 Thread Wolfgang Schuster

Henning Hraban Ramm schrieb am 01.05.2019 um 16:14:

2. how to switch language for just three words for correct hyphenation?

\starttext
English ... \language[de]{Deutsch}
\stoptext

Shouldn’t that be

\starttext
English ... {\language[de]Deutsch}
\stoptext

?
Yes, the brace should be before \language because the command is switch 
to change the language.


Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] placetable and localfootnotes

2019-05-01 Thread Wolfgang Schuster

Otared Kavian schrieb am 01.05.2019 um 12:01:

Thanks Alan for your attention.
In fact the footnote mechanism lacks the ability to work fine in a certain 
number of environments, including in framedtext. I don't know whether this can 
be overcome…

\starttext

One\footnote{First footnote}

\startframedtext
Two\footnote{Second footnote}
\stopframedtext

\startpostponingnotes
\startframedtext
Three\footnote{Second footnote}
\stopframedtext
\stoppostponingnotes

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] option=tex in setuptyping causes the background to be drawn twice

2019-04-28 Thread Wolfgang Schuster

Hans Hagen schrieb am 28.04.2019 um 18:42:

On 4/28/2019 5:56 PM, Aditya Mahajan wrote:

On Sun, 28 Apr 2019, Wolfgang Schuster wrote:

The problem are these settings in buff-imp-default.mkiv:

\setupstartstop
  [DefaultSnippet]
  [\c!before={\typingparameter\c!before},
   \c!after={\typingparameter\c!after},
   \c!style={\typingparameter\c!style}]

In buff-imp-tex.mkiv these values are inherited:

\definestartstop
    [TexSnippet]
    [DefaultSnippet]
So I can fix this locally by resetting before and after keys for 
TexSnippet. What would be a good fix in buff-imp-default?

I assume Wolfgang will cook up a patch ...
The best solution is to remove the values from all three keys because 
for now each of them is applies twice (even the style).


\setuptyping
  [before=\hairline,
    after=\hairline,
    style=\tt\em]

\starttext

\starttyping[option=tex]
\donothing
\stoptyping

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] option=tex in setuptyping causes the background to be drawn twice

2019-04-28 Thread Wolfgang Schuster

The problem are these settings in buff-imp-default.mkiv:

\setupstartstop
  [DefaultSnippet]
  [\c!before={\typingparameter\c!before},
   \c!after={\typingparameter\c!after},
   \c!style={\typingparameter\c!style}]

In buff-imp-tex.mkiv these values are inherited:

\definestartstop
    [TexSnippet]
    [DefaultSnippet]

Wolfgang


Aditya Mahajan schrieb am 28.04.2019 um 17:00:

Hi,

The following minimal example:

\definetextbackground
    [EXAMPLE]
    [
  location=paragraph,
 rulethickness=1pt,
    leftoffset=5em,
   rightoffset=0mm,
    ]

\setuptyping[option=tex, before=\startEXAMPLE, after=\stopEXAMPLE]

\starttext
\starttyping
  A = B + C
\stoptyping
\stoptext

gives the attached output where the background is repeated twice. The 
bug is present with both mkiv and ltmx.


Aditya


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Strange backgroundcolors with showgrid and luacode

2019-04-27 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 27.04.2019 um 16:07:

I found this code in ConTeXt (syst-aux.mkiv):
 \starttext
 \doloopoverlist {red,green,blue} {
  \setuppalet[\recursestring]
  \doloopoverlist {light,normal,dark} {
  \blackrule[color=\recursestring, width=\textwidth]\par
  }
  }
 \stoptext

Is it intended that all nine lines are black?


Yes, because there are no predefined palets with the names red, green or 
blue.


\definepalet
  [red]
  [ light=lightred,
   normal=middlered,
 dark=darkred]

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Strange backgroundcolors with showgrid and luacode

2019-04-27 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 27.04.2019 um 13:25:

On 4/27/19 12:21 PM, Wolfgang Schuster wrote:

Marcus Vinicius Mesquita schrieb am 27.04.2019 um 12:18:

\definepalet[layout][grid=black]

\setuppalet
    [layout]
    [grid=black]

Many thanks, Marcus Vinicius and Wolfgang, for your replies.

This is the only way it works:

 \definepalet[layout][grid=black]
 %~ \setuppalet[layout] [grid=black]
 \showgrid
 \starttext
 \ConTeXt\ is awesome!
 \stoptext

I don’t know whether I’m missing something, but \showsetups{setuppalet}
only shows this:

 \setuppalet [.*.]

 * NAME

Many thanks for your help,


It's my fault, in this case there is only a single command to create and 
change palet values.


Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Strange backgroundcolors with showgrid and luacode

2019-04-27 Thread Wolfgang Schuster

Marcus Vinicius Mesquita schrieb am 27.04.2019 um 12:18:

\definepalet[layout][grid=black]

\setuppalet
  [layout]
  [grid=black]

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] problems with "pagecomment"

2019-04-26 Thread Wolfgang Schuster

Mohammad Hossein Bateni schrieb am 27.04.2019 um 05:16:

Hi,

Look at the following MWE:


\setuppagecomment[state=start,location=right]
%\definestartstop[Notes]
%[before=\startpagecomment,after=\stoppagecomment]
\def\startNotes{\startpagecomment}
\def\stopNotes{\stoppagecomment}

\starttext
\input knuth
\startpagecomment
Hello
\stoppagecomment
\page
\input tufte
\startNotes
Testing
\stopNotes
\stoptext


This snippet does not compile.  Page comments work when I use the 
commands \startpagecomment and \stoppagecomment directly (like in the 
first page), but when I invoke via macros (as in the second page), 
ConTeXt produces errors.


What is wrong there?


The pagecomment environment uses the buffer mechanism to store the content
of the environment but a limitation of buffers is that you can't put 
them into other

commands because the scan for a certain delimiter, e.g. \stoppagecomment.

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Strange backgroundcolors with showgrid and luacode

2019-04-26 Thread Wolfgang Schuster

Otared Kavian schrieb am 26.04.2019 um 14:10:

Dear all,

When typesetting an old list of exercises, I noticed that when \showgrid is 
active and a luafunction is called, there is some unwanted and strange 
background colors (gray and blue, or yellow and blue). Thes background colors 
seems to show up on an unfilled page when a lua function is used, and I could 
come up with the following minimal example which gives the attached PDF.

Could someone, please, tell me what I am doing wrong?


\showgrid highlights different page elements with colors but you can 
change the output


https://www.mail-archive.com/ntg-context@ntg.nl/msg90312.html

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] calling up chapter title

2019-04-26 Thread Wolfgang Schuster



Hans van der Meer schrieb am 26.04.2019 um 12:21:

This does not what I have in mind:
\setupheadertexts[text][chapter][\pagenumber chapter][pagenumber][chapter]

Instead of [\pagenumber chapter] I thought [\pagenumber \chapter] 
would give me in the header both the pagenumber and the recorded 
chapter title.
However \chapter turns out to be undefined, neither did \chaptertitle. 
What is the macro to be called?


I doubt \chapter is undefined otherwise you can add a chapter title to 
your document.


What you're looking for is the \getmarking marking which is used to 
access section

titles and number in the header and footer lines, e.g.

\setupheadertexts
  [chapter] [pagenumber]
  [\prefixedpagenumber] [{\getmarking[chapter]}]

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Text around a figure

2019-04-24 Thread Wolfgang Schuster

Fabrice Couvreur schrieb am 24.04.2019 um 19:51:

Hi Wolfgang,
Thank you t works but why should you add this command ?


ConTeXt has to update the number of remaining lines for side floats at
the begin each each paragraph but when you start a paragraph in a group,
e.g. {\bf ...} to information is lost after the closing brace. When you add
now \dontleavehmode before the group starts you flushed to information
because the paragraph already started.

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Text around a figure

2019-04-24 Thread Wolfgang Schuster



Fabrice Couvreur schrieb am 24.04.2019 um 19:44:

Hi,
Why does bold text touch the figure ?
Thank you.
Fabrice


\definefloat
   [recipe]
   [figure]

\setupfloat
[recipe]
   [default={right,none}]


\starttext

\placerecipe{}{
  \setupbodyfont[8pt,pagella]
\startMPcode

    path p, q ;
    p:= unitsquare xyscaled (1.5cm,1.5cm) ;
    q:= unitsquare xyscaled (2.5cm,2.5cm) shifted (1.5cm,0);

    draw p withpen pencircle scaled 1pt ;
    draw q withpen pencircle scaled 1pt ;

    label.llft("$A$", p) ;
    label.lrt("$M$", p) ;
label.ulft("$P$", p) ;
    label.urt("$N$", p) ;
label.lrt("$B$", q) ;
    label.urt("$Q$", q) ;
label.ulft("$R$", q) ;

  \stopMPcode
    }
 Sur la figure ci-contre, \m{[AB]} est un segment de longueur 4.

\m{M} est un point mobile sur le segment \m{[AB]} .

    \m{AMNP} et \m{MBQR} sont deux carrés.

    On note \m{x} la distance \m{AM}.
    \blank
  {\bf On cherche les positions de \m{M} telles que la surface 
constituée par les deux carrés soit supérieure à 10.}


I guess this should work (untested).

\dontleavehmode{\bf ...}

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Hyphenation questions

2019-04-24 Thread Wolfgang Schuster

Dmitry Starostin schrieb am 24.04.2019 um 19:34:
1. is there an analog to \hyp{} command from the 'hyphenat' package? 
Double words with a dash happen all too often.


1. Add \setbreakpoints[compound] to enable a line break at a hyphen.

\setbreakpoints[compound]

\starttext
electromagnetic-endioscopy
\stoptext

2. Use || to insert a breakable hyphen.

\starttext
electromagnetic||endioscopy
\stoptext


2. how to switch language for just three words for correct hyphenation?


\starttext
English ... \language[de]{Deutsch}
\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] tikz is not found

2019-04-24 Thread Wolfgang Schuster

Gour schrieb am 24.04.2019 um 18:57:

That I spotted and corrected, but I'm getting another error, I suppose:
$ cat  mp.tex
\starttext
Lorem Ipsum…

\startMPcode
draw ( (0,0)--(1,0)--(0,1)) with color red ;

Change "with color" to "withcolor" (no space).

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Manipulating the pagenumber in the TOC

2019-04-21 Thread Wolfgang Schuster

Willi Egger schrieb am 21.04.2019 um 19:28:

Hi all,

"when manipulating in one area you will have to manipulate also in other aeras” 
I must confess.

I asked some time ago about manipulating the pagenumber. Wolfgang provide me 
the following approach:


\cldcontext{“\letterpercent.0f”,(\pagenumber+1)/2}

This works indeed fine. However now I am confronted with the fact, that in the 
TOC the manipulated pagenumbers should be taken into account.


\def\dwarsliggernumber#1%
  {\number\numexpr(#1+1)/2\relax}

\defineconversion [dwarsligger] [\dwarsliggernumber]

\setuppapersize[A5,landscape]

\setupuserpagenumber[numberconversion=dwarsligger]

\setuppagenumbering[location=none]

\setupheadertexts [\doifoddpageelse{}{\prefixedpagenumber}]
\setupfootertexts [\doifoddpageelse{\prefixedpagenumber}{}]

\usemodule [visual]

\starttext

\completecontent

\dorecurse{10}
  {\chapter{\fakewords{5}{10}}
   \fakelines{50}{100}}

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] \abovedisplayshortskip

2019-04-20 Thread Wolfgang Schuster

Mikael P. Sundqvist schrieb am 20.04.2019 um 15:30:

On Mon, Apr 15, 2019 at 1:42 PM Mikael P. Sundqvist  wrote:

Hi,

is \abovedisplayshortskip inserted in formulas that come after short
lines? Or is there a more ConTeXt-way to tune this? Small example file
below, but I see no change after I set it, so I guess it is not used?

/Mikael

\starttext
Foo
\startformula
1+1=2
\stopformula

\abovedisplayshortskip = -12pt

Foo
\startformula
1+1=2
\stopformula
\stoptext

Bump. Nobody knows?
ConTeXt inserts always the same vertical space before a formula 
independent of the length of the previous line.


Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Font expansion breaks interword spacing

2019-04-19 Thread Wolfgang Schuster

Hi,

I have a document where I use font expansion to get better line breaks
but as a result the spacing between the letters is completely messed up
in some words.

\definefontfeature [default] [default] [expansion=quality]

\setupbodyfont [lucidaot]

\setupalign [hz]

\starttext

\dorecurse{20}{appeared }

\dorecurse{20}{around }

\dorecurse{20}{accompanying }

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Error concerning "pdfmapline"

2019-04-18 Thread Wolfgang Schuster

Rudolf Bahr schrieb am 18.04.2019 um 20:26:
Now, for going another way in order to print Fraktur texts I 
downloaded various

"yfonts" from ctan [1] again and stored them in 
"~/context-lmtx/tex/texmf-local":

yfrak.tfm,
yfrak.mf  for instance.

"mtxrun --script fonts --reload" and
"mtxrun --script fonts --list --all --pattern=yfrak"

are in vain. The downloaded fonts aren't recognized. This is strange, because
fonts with extensions ".mf" and ".tmf" are fonts how Knuth developed them. There
are no files with other Fraktur file extensions in CTAN.

Please, how to continue with ConTeXt? I'd like to continue to use exactly the
same fonts because of a standard nature with my older Fraktur texts.
1. Use the Type1 version of the fonts: 
https://ctan.org/tex-archive/fonts/ps-type1/yfonts


2. Use a font in Truetype/Opentype format: 
http://unifraktur.sourceforge.net/


Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Variable space with hanging description

2019-04-16 Thread Wolfgang Schuster

Cedric Tissieres schrieb am 16.04.2019 um 06:16:

Dear all,

I recently switched to mkiv and experienced some problems with
descriptions when set with alternative=hanging. The horizontal space
between the description title and the rest of the text varies a lot and
looks ugly. When the same code is compiled with mkii, this space is
almost constant (replace alternative=hanging by location=hanging in mkii).


The different distances after each title comes from the fact that MkIV
adds shrink and stretch values to the space but you can disable these
values with the shrink and stretch keys.

\setupdescription [...] [shrink=0,stretch=0]

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] index entries printed over each other

2019-04-14 Thread Wolfgang Schuster

Henning Hraban Ramm schrieb am 14.04.2019 um 21:11:

Hi,
on the last page of my index, there are two entries printed over each 
other, see attached screenshot.


How can this happen? Any hints how to avoid it?

Sorry, no MWE yet, probably hard to reproduce...

Latest, i.e. yesterday’s beta with LuaTeX; the same with the previous 
version.
This can be a problem with the columns mechanism. You can try to disable 
balancing with


\setupindex[balance=no]

or disable columns for the index and flush the content within a columns 
environment.


\startmixedcolumns %[grid=no]
\placeindex[n=1]
\stopmixedcolumns
Also the same problem with lmtx, except that the text is garbage (I’m 
using Cambria.ttc).

Fonts in ttc format will work as expected in the next release.

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Lmtx and Cambria font

2019-04-14 Thread Wolfgang Schuster

Lutz Haseloff schrieb am 14.04.2019 um 13:57:

Hi Hans, hi all,

my fresh installation of lmtx for win64 on Win 10 seems to have a 
problem with the Windows font cambria. I get no readeable text in the 
pdf. Other fonts work o.k.


It's a problem with fonts which use the ttc format.

\starttext

\definedfont[file:cambria.ttc(Cambria)]Cambria

\definedfont[file:meiryo.ttc(Meiryo)]Meiryo

\definedfont[file:meiryo.ttc(Meiryo Italic)]Meiryo Italic

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Text in the margin

2019-04-10 Thread Wolfgang Schuster

Fabrice Couvreur schrieb am 10.04.2019 um 11:58:

Hi,
Wolfgang suggested this to put text in the margin but since some 
updates it does not work anymore :


\setuplayout
[width=12cm,
   rightmargin=5cm]

\defineuserdata [margintext] [alternative=margintext]

\defineuserdataalternative [margintext] 
[renderingsetup=userdata:margintext]


\startsetups [userdata:margintext]
  \margindata
    [inright]
[%style=\smallbodyfont,
 style={\switchtobodyfont[9pt]},
width=\rightmarginwidth,
 align={flushleft,broad}]
    {{\bf Exemple — }\getinlineuserdata}
\stopsetups

\starttext
\startuserdata[margintext]
 \input ward
\stopuserdata
\stoptext


Put text (\dontleavehmode works also because it starts a paragraph)
after \stopuserdata to flush the content of the margin block.

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] DIN lang folder with crop marks

2019-04-10 Thread Wolfgang Schuster

Benjamin Koppe schrieb am 10.04.2019 um 20:33:

Hallo,

I'm new to ConTeXt and am crazy enough to start with something
nonstandard.

Of course I got stuck pretty fast. I started out with this:

https://wiki.contextgarden.net/DIN_lang_folder

and then found some info on crop marks here:

https://wiki.contextgarden.net/PaperSetup#Crop_marks


I tried different options (marked=on, market=colour, marked=color...,
something with \setuplayout[location={middle,middle}]...)

Some times the crop marks don't show at all, sometimes they are set off
a bit so they don't fit with the actual document.

I added the whole file as I really do not knwo (yet) how to reduce
things...


When you increase the size of the printed paper

\definepapersize
    [A4-flyer]
    [width=\dimexpr297mm+10\measured{bleed}\relax,
 height=\dimexpr210mm+10\measured{bleed}\relax]

and center the arranged pages

\setuplayout
  [marking=on,
   location=middle]

you can see the shifting moves everything away from the marks.

BTW: You forgot the = for the marking settings in \startttitle.

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] serial letters

2019-04-09 Thread Wolfgang Schuster

Henning Hraban Ramm schrieb am 08.04.2019 um 15:26:

How would you approach serial letters, e.g. to all members of a club?
(Actually I need to send out donation receipts.)

I’d like to use the letter module, since my usual letter design is using it.

I can export the addresses to CSV, JSON, Lua tables or whatever or transfer 
them to a SQLite db.
Would it make more sense to read them in Lua and combine this data with a 
buffer, or to write a single tex file for every letter?
I know how to do the latter, but I’d like to learn a more ConTeXt-ish way.
Would it make sense to use the bibliographies module?


You can use the letter module when you drop the normal 
letter-environment which is to limited in this case because it uses the 
buffer mechanism to store the content.


To have more control over the content for the opening etc. you can 
switch to the setups alternative (even the content can be set in this 
way instead of the default buffer) and set all texts with a setups-block.


The letter itself can be flushed with the \placeletter command, below is 
a simple example where I flush the letter after each variables setting 
but you should be able to do the same with a lua table or csv file.


\usemodule[letter]

\setuplettersection
  [opening]
  [alternative=setups]

\startsetups [letter:section:opening]
  \doifelse{\getvariable{address}{sex}}{male}
    {Dear Sir,}
    {Dear Madam,}
\stopsetups

\setvariable{address}{set}{\placeletter}

\starttext

\startlettercontent
\unknown
\stoplettercontent

\setvariables
  [address]
  [name=John,
   sex=male]

\setvariables
  [address]
  [name=Anna,
   sex=female]

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] endnotes customizing how?

2019-04-09 Thread Wolfgang Schuster

Hans van der Meer schrieb am 09.04.2019 um 17:19:
In typesetting my endnotes with \placenotes[endnote] I seem unable to 
unfluence the text characteristics.

I tried things like
(1) \setupnotes[endnote][textcolor=blue]
(2) changed fonts before the \ bgroup\bf\placenote\egroup call
(3)
\startsetups[setups:endnotes]
\setupwhitespace[0pt]
\stopsetups
% textstyle influences endnotemarker in the text.
\setupnote[endnote][textcommand=\hifnmarker,before=\directsetup{setups:endnotes}]

\setupnote [endnote] [setups=setups:endnotes]

(4)\setupnotes[endnote][bodyfont=italic]

Where (3) made a difference in linespacing, nothing else does.
How can one determine the text characteristics of the endnotes?

\setupnotation [endnote] [style=italic]

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Troubles with the \cldcontext command

2019-04-02 Thread Wolfgang Schuster

Willi Egger schrieb am 02.04.19 um 21:17:

Hello!

I have the following code, which should manipulate the page number. However I 
get an error:


MWE:

\setuppapersize [A6] [A6]

\setuppagenumbering[location=none]

\startsetups [Pagenumber]
   \doifrightpageelse
 {\cldcontext{"\letterpercent d",(\pagenumber+1)/2}}
 {}
\stopsetups

[...]

What do i miss here? I am stumid…


I guess %d wasn’t the right way to round the number, you can use

\startsetups [Pagenumber]
  \doifoddpageelse
{\cldcontext{"\letterpercent.0f",(\pagenumber+1)/2}}
{}
\stopsetups

or

\startsetups [Pagenumber]
  \doifoddpageelse
{\cldcontext{"\letterpercent r",(\pagenumber+1)/2}}
{}
\stopsetups

Search in cld-mkiv.pdf for formatters to find more options.

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] optional hyphenation patterns in ancient Greek

2019-03-31 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 30.03.19 um 15:40:

On 3/26/19 9:42 AM, Arthur Reutenauer wrote:

On Mon, Mar 25, 2019 at 08:57:40PM +0100, Pablo Rodriguez wrote:

I read your original message when you sent it, but the issue with that
kind of hyphenation exceptions is that they are document-based

   No.  Why would they be restricted to a single document?

Where should I add it to have it in all my documents?

I guess that even in that case it would be restricted to the
distribution I’m using. (I mean, I had to add them again if I use
another computer.)

For me, adding the command to the document (or the distribution) would
be easier. But this isn’t about my documents or myself.


You can put your extensions in a module and put it on the garden
or ctan when it should be part of tex live.

When you make a new installation you can download the module together
with the base files and afterwards load the module in your document.

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] additional space with sidebar and narrower

2019-03-26 Thread Wolfgang Schuster

Henning Hraban Ramm schrieb am 26.03.19 um 16:04:

Thank you, I found that myself (could have written).

But the problem is that there’s space introduced if I use both environments, 
but not if I use only one. And I didn’t find how I can avoid that.

Change the order of both environment and put sidebar in the narrower block.

The reason for the extra lien is that \startsidebar begins a new 
paragraph but \startnarrower end the lest paragraph which results in a 
single empty line.


Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Spacing between text and footnote line

2019-03-24 Thread Wolfgang Schuster

Huseyin Özoguz schrieb am 24.03.19 um 16:23:
Thank you both, that was my mistake: Instead of copy I wrote: 
"setupnotation" (which I used already), not setupnote.


Btw: The default setup seems to be two lines distance, is that a 
correct understanding?
It’s only a single line but the rule itself adds additional vertical 
space which results in two lines.


Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Spacing between text and footnote line

2019-03-24 Thread Wolfgang Schuster

Huseyin Özoguz schrieb am 24.03.19 um 15:50:



Hello,

one way could be

\setupnote[footnote][before={\blank[10*big]}]

Best wishes,

Tomáš

Thanks, but that does not work. It only changes the distance between 
the footnote-line and the footnote-text. But I want to manipulate the 
distance above the footnote-line: between the (standard) text and the 
footnote-line.




Can you give a example for this because Tomas solution works for me.

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Small pages and large framed texts

2019-03-20 Thread Wolfgang Schuster

Willi Egger schrieb am 20.03.19 um 22:11:

It’s me again…

I appears that I was not clear enough, though I am happy about the possibility 
of using textbackground.

What I must do is to prepare a list of ConTeXt commands on a very small page. 
So the specific question is, how I can influence the 
\placelistofsorts[texcommand] in such a way, that the framed pieces break over 
the page.


\usemodule [setups]

\setuppapersize [A6] [A6]

\setupbodyfont [pagella,9pt]

\definetextbackground
  [SetupsParameter]
  [before=\blank,
   after=\blank,
   topoffset=10pt,
   leftoffset=10pt,
   location=paragraph,
   frame=on]

\startsetups [xml:setups:start]
  \starttextbackground [SetupsParameter]
\stopsetups

\startsetups [xml:setups:stop]
  \stoptextbackground
\stopsetups

\starttext

\startsection[title={Short Version of the Command}]

  \cmdshortsetup [setupframed]
  \cmdshortsetup [setupinteraction]

\stopsection

\startsection[title={\TEX-commands}]

  \placesetup

\stopsection

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] inmargin for only Roman-numbered items

2019-03-20 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 20.03.19 um 20:43:

On 3/20/19 8:09 PM, Wolfgang Schuster wrote:

Pablo Rodriguez schrieb am 20.03.19 um 20:03:

[...]
Is there a way to get only [option=inmargin] for the items that are
Roman-numbered?


\startitemize[I,inmargin]


Many thanks for your reply, Wolfgang.

I need a \setup... command, since I’m going to use it in an environment
file to typeset XML sources.

Is there a way with a \setupitemize (or \setupitemgroup) to configure
only one kind of numbered (or unnumbered, for that matter) item groups?


You have to create a new itemgroup environment/instance.

\defineitemgroup [romanitemize]
\setupitemgroup  [romanitemize] [R,inmargin]

\starttext

\startromanitemize
\dorecurse{5}{\item item}
\stopromanitemize

\startitemgroup [romanitemize]
\dorecurse{5}{\item item}
\stopitemgroup

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] inmargin for only Roman-numbered items

2019-03-20 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 20.03.19 um 20:03:

Dear list,

I have the following sample:

 \showframe
 \setupitemize[each][option=inmargin]
 \starttext
 \startitemize[n]
 \dorecurse{5}{\item item}
 \stopitemize

 \startitemize
 \dorecurse{5}{\item item}
 \stopitemize

 \startitemize[I]
 \dorecurse{5}{\item item}
 \stopitemize
 \stoptext

Is there a way to get only [option=inmargin] for the items that are
Roman-numbered?


\startitemize[I,inmargin]

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Small pages and large framed texts

2019-03-20 Thread Wolfgang Schuster

Willi Egger schrieb am 20.03.19 um 18:26:

Hi,

I deal with a small project, in which I should be able to make a framed text 
break over the page. — Does anyone have an idea how to achieve this?

\setuppapersize[A6][A6]

\setupbodyfont[pagella,rm,10pt]


\starttext
\framedtext
{\dorecurse{3}{\input ward\blank}}
\stoptext


Any hints would be welcome


Use the textbackground environment.

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] LuaJitTeX doesn’t work any more

2019-03-20 Thread Wolfgang Schuster

Hans van der Meer schrieb am 20.03.19 um 18:20:

Last login: Wed Mar 20 08:23:38 on ttys000
Wed Mar 20 18:17:51 CET 2019
21 ~: cdg
22 Genealogie: contexjit family-note.tex
-bash: contexjit: command not found
23 Genealogie:

mmm... contextjit doesn't come with the beta install? Or do I miss 
something?


You forgot the t at the end of context.

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] LuaJitTeX doesn’t work any more

2019-03-20 Thread Wolfgang Schuster

Henning Hraban Ramm schrieb am 20.03.19 um 17:27:

With the latest beta, context --jit stopped working on my Mac (OSX 10.9.5):


This is LuajitTeX, Version 1.09.2 (TeX Live 2019/dev)
  system commands enabled.

---! 
/Users/hraban/Library/texmf/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.fmt
 was written by luatex
(Fatal format file error; I'm stymied)mtx-context | fatal error: return 
code: 1


I can simply not use JIT, but maybe there’s something to fix?


contextjit 

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Size of itemize symbols

2019-03-16 Thread Wolfgang Schuster

Hi,

the change from a while ago to get the symbols for bullet etc. from the 
text font when available
leads to where unpleasant results for a few fonts. A good example for 
this are first level items
where the symbol is too symbols in my opinion which looks even worse for 
smaller font sizes.


While I can understand the change to use the text font for the symbols I 
miss a simple way

to switch back to the math font for the symbols, e.g. \usesymbols[math].


\starttext

\startitemize[packed]
\item First item
\item Second item
\item Third item
\stopitemize

\startitemize[packed]
\sym{\m{\bullet}} First item
\sym{\m{\bullet}} Second item
\sym{\m{\bullet}} Third item
\stopitemize

\blank

Latin Modern: \symbol[bullet] \m{\symbol[bullet]}

\setupbodyfont[pagella]

TeX Gyre Pagella: \symbol[bullet] \m{\symbol[bullet]}

\setupbodyfont[dejavu]

DejaVu Serif: \symbol[bullet] \m{\symbol[bullet]}

\stoptext


Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Question and Answer Iteration

2019-03-12 Thread Wolfgang Schuster

Jeroen schrieb am 12.03.19 um 18:16:

Dear list

The configuration below is what I found for a question and answer 
section. If would like the text to start immediately after "question 
1", "question2", etc. and not below it and the same for the answers. 
Is there an easy way to achieve this?


Regards, Jeroen


\setupinteraction[state=start]

\define[1]\QuestionTextCommand
{\doglobal\increment\QuestionCounter
\pagereference[question:\QuestionCounter]%
\doifreferencefoundelse{answer:\QuestionCounter}
{\goto{#1}[answer:\QuestionCounter]}
  {#1}}

\define[1]\AnswerTextCommand
{\doglobal\increment\AnswerCounter
\pagereference[answer:\AnswerCounter]%
\doifreferencefoundelse{question:\AnswerCounter}
{\goto{#1}[question:\AnswerCounter]}
  {#1}}

\defineenumeration
[question]
   [text=Question,

alternative=serried,

    headcommand=\QuestionTextCommand]

\defineenumeration
[answer]
   [text=Answer,

alternative=serried,

    headcommand=\AnswerTextCommand]

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Printing 3 din lang pages on one dina4 page

2019-03-12 Thread Wolfgang Schuster

Jan U. Hasecke schrieb am 12.03.19 um 13:04:

Hi,

I managed to print din long flyers (100mmx210mm with 97mmx210mm fold
page) with 6 pages using a lot of pageshifts etc.

But how can I print one simple din long page (99mmx210mm) three times on
a din a4 page so that I can cut it myself?

The following does not work.

\definepapersize
[flyer]
[width=99mm,height=210mm]

\setuppapersize [flyer] [a4]

\setuparranging[1*3]

The option [1*3] does not exist for \setuparranging.
But I thought this could be what I want one sheet three pages.


Use the XY arrangement method and set the number of columns with the 
nx-key of \setuppaper.



\definepapersize [A4/3] [width=99mm,height=210mm]

\setuppapersize [A4/3] [A4,landscape]

\setuppaper [nx=3,ny=1]

\setuparranging [XY]

\setupbodyfont [10pt]

\showframe[page]

\starttext
\dorecurse{10}{\samplefile{tufte}}
\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] single command for \ctxlua{context(...)}

2019-03-11 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 11.03.19 um 22:23:

Dear list,

I know this has been already posted to the list, but I cannot find it
right now.

Is there a single command for \ctxlua{context(...)}?

\cldcontext{...}

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Meptapost Drawing not showing-up in Context Letter Style

2019-03-11 Thread Wolfgang Schuster

Context NTG schrieb am 10.03.19 um 16:59:
I am trying to get a metapost drawing as logo added to right upper 
corner of a DIN B style letterhead, but it does not show up, just the 
letter itself. Is there anything to change to the layers for the MP toe 
reveal itself?


The letter module uses local settings for the page background to place 
all the layer for the header, footer etc. and your own background setup 
is overloaded by the module.



What you can do in this case is to use the predefined but unused 
lettermain layer to place your logo in the background.



\usemodule[letter][style=dinb]

\startuseMPgraphic{mpglogo}
  path p;
  p := (0,0)--(100,0)--(100,100)--(0,100)--cycle ;
  path q;
  q := p cornered 30pt;
  draw q withcolor black withpen pencircle scaled 7pt ;
\stopuseMPgraphic

\startsetups[letter:layer:lettermain]
  \scale[width=25mm,height=25mm]{\useMPgraphic{mpglogo}}
\stopsetups

\setupletterlayer
  [lettermain]
  [alternative=setups,
   x=160mm,
   y=17mm]

\startletter
\dorecurse{3}{\input knuth \par}
\stopletter


Another way to place content in the background is to use the “paper” (or 
“text”) background which isn’t used by the letter module and your 
settings won’t be overloaded.


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] expansion inside PDF annotations

2019-03-06 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 05.03.19 um 17:44:

Dear list,

I have the following sample:

 \setupinteraction[state=start]
 \starttext
 \startTEXpage[offset=1em]
 Attached on \currentdate.
 \attachment
 [http://pragma-ade.com/general/manuals/xtables-mkiv.pdf]
 [author={Attached on \currentdate},
  title={Attached on \currentdate}]
 \stopTEXpage
 \stoptext

How can I get \currentdate expanded in the PDF annotation?


Can you try \rawdate[] (the argument is mandatory).

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] issue with \startattachment...\stopattachment

2019-03-05 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 05.03.19 um 20:57:

Dear list,

I have the following sample:

 \setupinteraction[state=start]
 \starttext
 \startTEXpage[offset=1em]
 \startattachment
 [http://pragma-ade.com/general/manuals/xtables-mkiv.pdf]
 Attached file.
 \stopattachment
 Attached on \currentdate.
 \stopTEXpage
 \stoptext

I have a question: shouldn’t be “Attached file.” typeset on the main text?


No because

\startattachment
...
\stopattachment

is the same as

\startbuffer[...]
...
\stopbuffer

\attachment[buffer=...]

where you combine the buffer and \attachment in a single construct.

This does also mean the argument you pass to \startattachment is wrong.

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Question to key commnad at \setuphead

2019-03-04 Thread Wolfgang Schuster

Tomas Hala schrieb am 04.03.19 um 18:42:

Hi all,

compiling the ME below (ConTeXt from TeXlive) I got this error message:

! Argument of \MyChapterCommand has an extra }

and I do not know why. What am I doing wrong?

Best wishes,

Tomáš

===
\starttext
\def\MyChapterCommand#1#2{::#1//#2==}


Use

\define[2]\MyChapterCommand{::#1//#2==}

or

\unexpanded\def\MyChapterCommand#1#2{::#1//#2==}

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Distance between two Columns

2019-02-28 Thread Wolfgang Schuster

Ursula Hermann schrieb am 28.02.19 um 11:43:

Dear List!

I have the following example. I would like to have two columns that are 
in the distance small. So I have tried:


\setuppapersize[A5]

\startcolumns

\defineframed

    [tightframed][width=5cm,width.1\textwidth,align=right]

\tightframed{Small}

\column

\tightframed{A really really long line that is split at 5cm}

If I take the example with only \tightframed, without the columns, I 
have the small distance, but I would like to have a left and right 
column with small distance.


Are you looking for something like the examples below?

\setupcombination
  [location=top,
   distance=\spaceamount]

\starttext

\startcombination[2*1]
{\framed[width=5cm,align=flushleft]{Small}}{}
	{\framed[width=5cm,align=flushleft]{A really really long line that is 
split at 5cm}}{}

\stopcombination

\blank

\placesidebyside
{\framed[width=5cm,align=flushleft]{Small}}
	{\framed[width=5cm,align=flushleft]{A really really long line that is 
split at 5cm}}


\blank

\bTABLE[width=5cm,align=flushleft,columndistance=\spaceamount]
  \bTR
\bTD Small \eTD
\bTD A really really long line that is split at 5cm \eTD
  \eTR
\eTABLE

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to define a new language?

2019-02-28 Thread Wolfgang Schuster

Paul Hoffman schrieb am 27.02.19 um 23:05:

I'm trying to define a new language for use in a bilingual document, but
my hyphenation patterns are being ignored and I'm sure I must be doing
something wrong.


For which Language do you need patterns?

Did you try to contact Arthur or Mojca to add the missing pattern to 
their repository which includes the hyphenation pattern for the other 
languages.


When this is done you can ask Hans to add support for your missing 
language in ConTeXt.


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Setting tabulate table width with \textwidth inside an item group

2019-02-27 Thread Wolfgang Schuster

Clyde Johnston schrieb am 27.02.19 um 22:49:

Dear List:

I have a tabulate table inside an indented item group and I would like 
to set the width of the table to the \hbox size of the surrounding 
text.  If I use \textwidth as a width parameter, the table spills into 
the right margin (see attached).


What is the correct parameter to use to set the width of the table to 
the width of the text in the item group?


_MWE_

\starttext

\showframe

\startitemize[n,3*broad]

     \startitem{%

     \input ward

     \starttabulate[|cp(.25\textwidth)|cp(.75\textwidth)|]

     \HL

     \NC Column A \NC Column B \NC \NR

     \HL

     \NC 1 \NC 2 \NC \NR

     \NC 2 \NC 3 \NC \NR

     \NC 3 \NC 4 \NC \NR

     \NC 4 \NC 5 \NC \NR

     \NC 5 \NC 6 \NC \NR

     \BL

     \stoptabulate

     \input ward

     }

     \stopitem

\stopitemize

\stoptext



1. There is a space between the columns which has to taken into account 
when you set the width of the columns, in your example your tables has a 
width of textwidth plus the distance between the columns.


2. \textwidth doesn’t in the argument for the items but you can use the 
\localhsize length to get the current width of the text block.


3. You can let ConTeXt calculate the width of the second column which 
saves you from guessing the needed value for the column width.


4. You don’t need braces around the content for the items.

\showframe

\starttext

\startitemize[n,3*broad]
\startitem
\input ward
\starttabulate[|cp(.25\localhsize)|cp|]
\FL
\NC Column A \NC Column B \NC \NR
\ML
\NC 1 \NC 2 \NC \NR
\NC 2 \NC 3 \NC \NR
\NC 3 \NC 4 \NC \NR
\NC 4 \NC 5 \NC \NR
\NC 5 \NC 6 \NC \NR
\LL
\stoptabulate
\input ward
\stopitem
\stopitemize

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Latest changes in some size registers

2019-02-25 Thread Wolfgang Schuster

Willi Egger schrieb am 25.02.19 um 22:44:

Hi Wolfgang,

that is a nice coincidence! I was stuck just today with this very issue! Thank 
you for this information.


You can try the two solutions (“grid=no” or “strut=no”) from this old 
thread: https://mailman.ntg.nl/pipermail/ntg-context/2018/093250.html


Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Latest changes in some size registers

2019-02-25 Thread Wolfgang Schuster

Martin Bruchanov schrieb am 22.02.19 um 04:37:

Hi all,

I have some very condensed documents which should fit on one page:

http://gnulinux.guru/bash_cheatsheet.pdf

Without any major change in style definition, there is more space 
around sections or itemize:


http://gnulinux.guru/bash_cheatsheet_diff.pdf

Source code is here:

https://github.com/BruXy/gnulinux.guru/tree/master/bash_tahak

Did I miss some update which has introduced some different length 
settings?


I have version: 2019.02.14 16:57


The columns-environment uses now the newer mixedcolumns code
which create by default different spaces around section titles.

The old columns code can be loaded as a module with
\usemodule[old-multicolumns]

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Latest changes in some size registers

2019-02-25 Thread Wolfgang Schuster

Martin Bruchanov schrieb am 25.02.19 um 17:39:

I have just done some manual  changes to solve this:

  before={\blank[1*small]} to  before={\blank[-5pt]},%

Btw, is there any way to display values of these visual attributes when 
I need to debug "setupsection" setting?


(I am usually changing a lot of stuff and comparing it with Wiki and 
output, but it is quite lame approach.)


\usemodule [setups]

\starttext

% \setuphead [..,..=..,..]
\showrootvalues [head]

% \setuphead [chapter] [..,..=..,..]
\showinstancevalues [head] [chapter]

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] cross references to chapters in a book

2019-02-23 Thread Wolfgang Schuster

Robert Zydenbos schrieb am 22.02.19 um 22:13:

Still nicer would be the following, but I do not know whether this is 
technically possible –

I have the following text:

% start of example: in chapter 4, pp. 38, I have
\subject [wild-stuff]{Wild stuff}
Now comes a lot of weird stuff which I want to refer to later.
…
% end of stuff in one chapter

% in another chapter:
As we already saw in \in{chapter}[wild-stuff], on p.~\at[wild-stuff]
% that was in the other chapter
% end of example

and the result would be: “As we already saw in chapter 4, on p.~38”…

Can such a thing be done?


Can’t you just add a reference to the chapter title and refer to it 
instead of the the subject.


When you goal is to show the value of the chapter for the current 
subject you should switch to MkIV where this can be done (although we 
have to cheat to because we have to create numbered subject’s and hide 
the counter).


Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] cross references to chapters in a book

2019-02-23 Thread Wolfgang Schuster



Robert Zydenbos schrieb am 22.02.19 um 22:04:

Hmm… although I got your example to work after some tweaking (changing \samplefile to {input and 
placing knuth.tex and zapf.tex in the same folder as the test file), I could not reproduce this 
with my book. I want to get "chapter 4" but keep getting "chapter 4.0".


You have to create a minimal working example for this because I can’t 
tell why you get this output.



Is this because I am using MkII with XeTeX?


Is there a reason why you stick with MkII or XeTeX.

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Insert "minipage"

2019-02-22 Thread Wolfgang Schuster

Lizardo M. Reyna Bowen schrieb am 22.02.19 um 18:20:

Hi all,

How to insert a sample code and the result in a "minipage" in a
presentation? For example, I need to show the result of a
startdarmakeup, as in the following pdf.

http://www.pragma-ade.com/show-art.pdf#[0,{%22name%22:%22Fit%22}]


\setuppapersize[A4,landscape]

\starttext

\startbuffer[standardmakeup]
\startstandardmakeup
Hello
\stopstandardmakeup
\stopbuffer

\typesetbuffer[standardmakeup][frame=on,height=\textheight]

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] cross references to chapters in a book

2019-02-22 Thread Wolfgang Schuster

Robert Zydenbos schrieb am 22.02.19 um 17:14:

Dear wizards of ConTeXt,

In the final stage of completing a book project, I was wondering how to 
automatize cross references to chapters. I’ve already figured out how to refer 
to pages (using “\at[REFERENCE]”), but how is this done with chapters? I’m 
apparently too simple-minded to understand the manual (and I don’t understand 
the differences between \reference, \textreference, \in, \about).


When you use \chapter:

\starttext

\chapter[sec:knuth]{Knuth}

\samplefile{knuth}

See \in{chapter}[sec:zapf] at \at{page}[sec:zapf].

\chapter[sec:zapf]{Zapf}

\samplefile{zapf}

See \in{chapter}[sec:knuth] at \at{page}[sec:knuth].

\stoptext


When you use \startchapter:

\starttext

\startchapter[title={Knuth},reference={sec:knuth}]

\samplefile{knuth}

See \in{chapter}[sec:zapf] at \at{page}[sec:zapf].

\stopchapter

\startchapter[title={Zapf},reference={sec:zapf}]

\samplefile{zapf}

See \in{chapter}[sec:knuth] at \at{page}[sec:knuth].

\stopchapter

\stoptext


Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Frame

2019-02-21 Thread Wolfgang Schuster

Marco Patzer schrieb am 21.02.19 um 12:19:

On Thu, 21 Feb 2019 10:50:21 +
Ursula Hermann  wrote:


Here is my example:

\setuppapersize[A5]
\setupcolors[state=start]

This is the default, no need to start the colours any longer.


{\framed
[width=10cm,
background=color,backgroundcolor=darkblue,
foreground=color,foregroundcolor=white,
align={flushleft}]
{The Earth, as a habitat for animal life, is in old age and has a
fatal illness. Several, in fact.\par \setupindenting[yes, small]
It would be happening whether humans had ever evolved or not.

\externalfigure[cow.pdf][width=1cm]}

\setupwhitespace[small]
\starttext
Below, we have two separate columns; but up here, for the nonce, we
have but the one.

\startcolumns[n=2]  % Two columns, please
 Text, text, text \dots
 all in the first column
\column
 Words, words, words \dots
all in the second column.
 And look ye here! Even more words!
\stopcolumns
\stoptext
Why can‘t I see the cow?

You're missing

   \setupexternalfigures
 [location=default]

Without setting the location context doesn't check the system
directories for the sample images.

Furthermore, you're typesetting before \starttext. That's why your
font is monospaced.

And I try to separate content from style. That's why I move all
style information before \starttext and after \starttext comes only
content and markup (if possible). Nothing wrong with mixing it, but
it's easier to read and easier to change the layout after the fact.
I'd write your example as follows.

\setuppapersize
   [A5]

\setupexternalfigures
   [location=default]

\setupindenting
   [yes, small]

\setupwhitespace
   [small]

\defineframedtext
   [prettyblock]
   [width=10cm,
indenting={yes, small},
background=color, backgroundcolor=darkblue,
foreground=color, foregroundcolor=white,
offset=2mm,
align=flushleft]

\starttext

\startprettyblock
   \noindentation


You don’t need \noindentation when you add “next” to the indenting options.

Wolfgang

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] A strange request...

2019-02-20 Thread Wolfgang Schuster

Willi Egger schrieb am 20.02.19 um 17:23:

Hi all,

I am siting with a project of making a “dwarsligger”, you know these books, 
printed on bible-thin-printing paper, which are about  12 x 8 cm. One opens 
them while holding them ‘landscape’ with the spine on the top…

Now there is of course a little struggle with the page numbering. The reading 
page consists out of the even page together with the following uneven page. It 
is easy to print on the uneven page a page number, however this will result in 
uneven page numbers only throughout the book.

My question is, whether there is an algorithm to print page numbers as follows:


1  2  3  4  5  6  7  8  9 (this is the ordinary numbering)
1 2 3 4 5 (this is the requested numbering)

Does someone have an idea how to solve this?


Variant 1:

\setuppapersize[A5,landscape]

\setuppagenumbering[location=none]

\startsetups [pagenumber]
  \doifoddpageelse
{\cldcontext{"\letterpercent d",(\pagenumber+1)/2}}
{}
\stopsetups

\setupheadertexts [\directsetup{pagenumber}]

\starttext
\dorecurse{10}{\samplefile{knuth}}
\stoptext


Variant 2:

\defineexpandable[1]\DwarsliggerNumber
  {\cldcontext{"\letterpercent d",(#1+1)/2}}

\defineconversion [dwarsligger] [\DwarsliggerNumber]

\setuppapersize[A5,landscape]

\setupuserpagenumber[numberconversion=dwarsligger]

\setuppagenumbering[location=none]

\setupheadertexts [\doifoddpageelse{\prefixedpagenumber}{}]

\starttext
\dorecurse{10}{\samplefile{knuth}}
\stoptext


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


  1   2   3   4   5   6   7   8   9   10   >