[NTG-context] Drawing calligraphy practice grid in metafun

2023-11-20 Thread Andres Conrado Montoya
Hello list
I've been working on a little project of mine. I give calligraphy workshops
and I have been using a nice tool created by Josselin Cuette, available at
http://ductus.josselincuette.com/ to generate practice templates for
interested people.

However, I would prefer to have an offline solution. This adventure started
with the usual insidious idea: "I could do this in ConTeXt! And this is a
great opportunity to learn metafun!"

A couple weeks later, I have an almost ready product! It compiles fine, but
I have the following issue: The template creates a Line, composed of
Sections. And uses variables to assign a measurement for the nib-width, and
an amount of ascender, x-height and descender Sections (nib-widths), to
compose a Line.

But also, I would like to, if needed, display nib-width marks on the left
side. My code so far generates marks, but only for the first Line. I think
they are generated but maybe they are placed on top of each other, maybe?
I'm not sure why my logic is not working.

Also, if I change the amount for ascenders, descenders of x-height, the
marks are not drawn correctly.

My current path for a mark is a custom path emulating two unit squares,
nib-width size, on top of each other, with the top one shifted a nib-width
to the right. A little bit like a chess board, or a scale ruler on a map.
But this would only work in Lines that have an even amount of Sections. I'm
not sure how to proceed with that... I tried using unit squares, but that
made things very complex, and after fumbling around I managed to get this
far.

If you can take a look, or have some advice, it would be greatly
appreciated. I hope it is understandable.

My code:

%%
\setuppapersize[letter,landscape][letter,landscape]
\setuplayout[backspace=15mm,width=250mm,header=0mm,footer=0mm]

\startreusableMPgraphic{pauta}
  % Global variables:

  % Show nib-width marks
  boolean marks ; marks := true ;

  % Path for nib-width
  path mark ; mark := (0,0) -- (1,0) -- (1,2) -- (2,2) -- (2,1) -- (0,1) --
cycle ;

  % Line width
  numeric line ; line := \the\textwidth ;

  % Type box
  numeric box ; box := \the\textheight ;

  % Nib width (distance between lines)
  numeric nib ; nib := 3mm ;

  % Ascenders for writing line
  numeric asc ; asc := 3 ;

  % x-height for writing line
  numeric med ; med := 4 ;

  % Descenders for writing line
  numeric dsc ; dsc := 3 ;

  % Total height of a writing line in mm (including asc, med, and dsc)
  numeric lineHeight ;
  lineHeight = (asc + med + dsc) * nib ;

  % Available lines on a page
  numeric availableLines ;
  availableLines = round(box / lineHeight) - 1 ;

  % Starting position
  numeric start ; start := 0 ;

  % Macros

  % Draw a section of a line (ascender, x-height or descender)
  vardef Section(expr lines, initial) =
draw (0, initial) -- (line, initial) withpen pencircle scaled 0.2mm ;
for i=0 step 1 until lines :
  save final ; final = i*nib ;
  pair a; a = (0, final + initial) ;
  pair b; b = (line, final + initial) ;
  draw a -- b withpen pencircle scaled 0.1mm ;
  % If marks=true show nib-width marks
  if marks = true:
fill mark scaled nib yshifted (final*2) ;
  fi ;
endfor ;
  draw (0, final + initial) -- (line, final + initial)
withpen pencircle scaled 0.2mm ;
final + initial
  enddef ;

  % Draw a line with the three secions (asc, med, dsc)
  vardef Line(expr descender, ascender, xheight, initial) =
numeric dd, oo, aa ;
% Líneas
dd = Section(descender, initial) ;
oo = Section(xheight, dd) ;
aa = Section(ascender, oo) ;
% Devolver posicion final con espacio para siguiente renglon
aa + nib*2
  enddef ;

  % Llenar la página con renglones
  for i=1 upto availableLines :
start := Line(dsc, asc, med, start) ;
  endfor ;
\stopreusableMPgraphic

\startdocument
  \startstandardmakeup
\reuseMPgraphic{pauta}
  \stopstandardmakeup
\stopdocument
%%

-- 
Andrés Conrado Montoya
Andi Kú
andresconr...@gmail.com
http://sesentaycuatro.com
http://messier87.com
http://chiquitico.org

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


“You develop an instant global consciousness, a people orientation, an
intense dissatisfaction with the state of the world, and a compulsion to do
something about it. From out there on the moon, international politics look
so petty. You want to grab a politician by the scruff of the neck and drag
him a quarter of a million miles out and say, ‘Look at that, you son of a
bitch.’” — Apollo 14 astronaut Edgar Mitchell
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 

[NTG-context] Re: learning about the grid

2023-11-20 Thread Wolfgang Schuster

madiazm.eo...@gmail.com schrieb am 19.11.2023 um 23:17:

Thanks, Pablo and Henning

I suppose I am making a mistake with my setupinterlinearspace. My school asks 
for Times New Roman (I use termes) 12pt and onehalfspacing. In latex I used 
linespread{1.3} and so I supposed setting ConTeXt with 
setupinterlinearspace[1.3ex] was the right way (I read somewhere that vertical 
spaces should be measured in ex and horizontal spaces in em; maybe it's not 
widely accepted).
I tried setting my interlinearspace to 3ex and it looked much better, but I 
must compare it with a onehalfspacing of wordprocessors to be sure it is not 
such different.


The unit ex uses the x-height value of the font as dimension, the 
x-height is the height of the lowercase x (actually it's a value in the 
font which is most cases equal to the height of the lowercase x) as can 
be seen in the output of the following example.


\starttext

\heightofstring{x}

\the\exheight

\stoptext

To get one and a half line of interlinespace with ConTeXt you can set a 
fixed value with the \setupinterlinespace command.


\setupinterlinespace[line=18pt]

\showgrid

\starttext
\samplefile{lorem}
\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: learning about the grid

2023-11-20 Thread Pablo Rodriguez via ntg-context
On 11/19/23 23:17, madiazm.eo...@gmail.com wrote:
> Thanks, Pablo and Henning
>
> I suppose I am making a mistake with my setupinterlinearspace. My
> school asks for Times New Roman (I use termes) 12pt and
> onehalfspacing. In latex I used linespread{1.3} and so I supposed
> setting ConTeXt with setupinterlinearspace[1.3ex] was the right way.

Hi Miguel,

sorry, but I don’t have any idea what \linespread might mean for LaTeX
in plain English.

Some ConTeXt users may also use LaTeX too, but don’t rely on that.

> (I read somewhere that vertical spaces should be measured in ex and
> horizontal spaces in em; maybe it's not widely accepted).

As far as I know, em is defined by the width of the capital 'M' and ex
is defined by the height of the lowercase 'x'.

With your requirements, I think it is easier to set line spacing to one
and a half line with 1.5em, such as in:

  \setupbodyfont[termes]
  \starttext
  \the\exheight\\
  \the\dimexpr3\exheight\\
  \the\emwidth
  \the\dimexpr1.5\emwidth\\
  \stoptext

Just in case it might help,

Pablo

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: learning about the grid

2023-11-19 Thread Henning Hraban Ramm

Am 19.11.23 um 23:17 schrieb madiazm.eo...@gmail.com:

Thanks, Pablo and Henning

I suppose I am making a mistake with my setupinterlinearspace. My school asks 
for Times New Roman (I use termes) 12pt and onehalfspacing. In latex I used 
linespread{1.3} and so I supposed setting ConTeXt with 
setupinterlinearspace[1.3ex] was the right way (I read somewhere that vertical 
spaces should be measured in ex and horizontal spaces in em; maybe it's not 
widely accepted).
I tried setting my interlinearspace to 3ex and it looked much better, but I 
must compare it with a onehalfspacing of wordprocessors to be sure it is not 
such different.

Sorry for not providing an example (again my lack of experience), I will do it 
from now on.
thanks, I will try to learn a little more to get an idea of how ConTeXt ist 
built


It’s \setupinterlinespace, and the default is 2.8ex, so 1.3ex is too small.

Try to understand https://wiki.contextgarden.net/Command/setupinterlinespace

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: learning about the grid

2023-11-19 Thread madiazm . eoicc
Thanks, Pablo and Henning

I suppose I am making a mistake with my setupinterlinearspace. My school asks 
for Times New Roman (I use termes) 12pt and onehalfspacing. In latex I used 
linespread{1.3} and so I supposed setting ConTeXt with 
setupinterlinearspace[1.3ex] was the right way (I read somewhere that vertical 
spaces should be measured in ex and horizontal spaces in em; maybe it's not 
widely accepted).
I tried setting my interlinearspace to 3ex and it looked much better, but I 
must compare it with a onehalfspacing of wordprocessors to be sure it is not 
such different.

Sorry for not providing an example (again my lack of experience), I will do it 
from now on.
thanks, I will try to learn a little more to get an idea of how ConTeXt ist 
built
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: learning about the grid

2023-11-19 Thread Henning Hraban Ramm

Am 19.11.23 um 13:27 schrieb Miguel Diaz:
1. Why are the lines printed one over the other when grid=no? how do 
profis then use context without grid?


That usually only happens in one of the column modes that requires the 
grid. It doesn’t happen in usual one-column typesetting. There must be 
something wrong in your setup.


Please make a minimal example (MWE).

2. Is there a document where I can read how the grid is conceived to 
work for the many options in a simple way?


AFAIK, the details manual is the only documentation for it.

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: learning about the grid

2023-11-19 Thread Pablo Rodriguez via ntg-context
On 11/19/23 13:27, Miguel Diaz wrote:
> [...]

Hi Miguel,

I don’t use the grid. This is also the default in ConTeXt.

I’m not sure whether I’m getting your point here.

See what the difference between not enabling the grid and enabling it:

  \showframe\showgrid
  \setupwhitespace[medium]
  \starttext
\input knuth
  \setuplayout[grid=yes]\page
\input knuth
  \stoptext

> 1. Why are the lines printed one over the other when grid=no? how do
> profis then use context without grid?

As said, ConTeXt is \setuplayout[grid=no] by default.

As far as I can recall it, the default value is
\setupinterlinespace[line=2.85ex].

I have just discovered that with values such as line=1.3ex,
\setuplayout[grid=yes] behaves very differently than with values such as
line=2ex (and above).

I mean, lines follow the grid when the text fits. See the difference with:

  \showframe\showgrid
  \setupinterlinespace[line=1.3ex]
  \starttext
\dorecurse{25}{asa aeo eau}
  \setuplayout[grid=yes]\page
\dorecurse{25}{asa aeo eau}
  \stoptext

According to https://wiki.contextgarden.net/Grid_typesetting (feel free
to improve the article), a way of solving this would be to wrap your
stuff inside:

  \startlinecorrection
  ...
  \stoplinecorrection

The problem is that your interline space is too small to prevent line
collapsing.

ex is the height of the lowercase 'x'. Are you sure that your school
doesn’t require 1.3em (height of capital 'M') as interline space instead?

You can get yourself the values:

  \starttext
  \the\exheight\\
  %\the \dimexpr1.3\exheight\\
  \the\emwidth
  \stoptext

The first line will give you 1ex is about 5.7pt (with the default font
used by ConTeXt). 1.3ex would be less than 6.75pt.

The value of 1em is the value of the font size. Default for ConTeXt is
12pt, so 1em has to be 12pt.

I think it is clear now that an interline space of 1.3ex calls for line
overlapping.

That being said, I don’t know why the grid avoids collapsing them (if
the person explicitly asks for this).

> 2. Is there a document where I can read how the grid is conceived to
> work for the many options in a simple way?

See the wiki article above. The mailing list is also a way of getting help.

One suggestion, please always provide a minimal working sample (that can
be copied, pasted and compiled automatically), when you ask for help.

How minimal? Well, they cannot lack essential parts to be compiled.
Other than that, they should only contain required content to reproduce
your issue.

This minimal working sample helps the one who reads to understand what
you are dealing with.

Otherwise, it is really hard to understand which kind of issue you might
be facing (consider that no one else may read your mind or be in front
of your computer).

I hope it might help,

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] learning about the grid

2023-11-19 Thread Miguel Diaz
Hi everyone,
being a newbie I just discovered how different setups for the grid may
affect my (very simple) document.
In the Details manual (which of course I don't understand because of my
unexperience) I read that many people don't use the grid, but when I
configure grid=no the whole lines of a section are printed one over the
other.
Playing with the options and setupinterlinespace I got the unhappily
desired 1.3ex that may school requieres for the teaching programs
(grid=line, interlinespace=1.3ex), but I somehow feel that's not the right
way to go.

1. Why are the lines printed one over the other when grid=no? how do profis
then use context without grid?

2. Is there a document where I can read how the grid is conceived to work
for the many options in a simple way?

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


Re: [NTG-context] Chapter number and titles in separate lines with grid layout

2023-02-15 Thread Alex Leray via ntg-context
I somehow found a way. It doesn't work on my minimal example but it does 
in my real doc. I tested a lot of thing but I think it was thanks to the 
offset=none parameters


For the record:

###

\define[2]\MySection{
\framed[
location=top,
strut=no,
offset=none,
frame=none,
width=broad,
height=fit,
align=middle]{#1.\\#2}}

\setuphead[section][
conversion=Romannumerals,
style={\bf\kerncharacters[0.075]\WORDS},
align=middle,
command=\MySection,
]

###

Thanks!

Le 15/02/23 à 19:11, Rik Kabel via ntg-context a écrit :


On 2023-02-15 08:44, Alex Leray via ntg-context wrote:


\showframe
\showlayout
\showgrid

\setuplayout[
    grid=yes,
]

\define[2]\MySection{\framed[
    location=keep,
    frame=on,
    width=broad,
    % height=22pt,
    align=middle
]{{#1.\\#2}}}

\setuphead[section][
    strut=no,
    conversion=Romannumerals,
    style={\bf\WORDS},
    align=middle,
    command=\MySection,
]

\starttext
\startsection[title={First section}]
this is the text
\stopsection
\stoptext



Have you tried it with \framedtext in the place of \framed ?



--
Alexandre Leray
+32 487 947 030

Avez-vous pensé à (vous) offrir Médor ?
https://medor.coop/ideescadeau
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Chapter number and titles in separate lines with grid layout

2023-02-15 Thread Rik Kabel via ntg-context


On 2023-02-15 08:44, Alex Leray via ntg-context wrote:


\showframe
\showlayout
\showgrid

\setuplayout[
    grid=yes,
]

\define[2]\MySection{\framed[
    location=keep,
    frame=on,
    width=broad,
    % height=22pt,
    align=middle
]{{#1.\\#2}}}

\setuphead[section][
    strut=no,
    conversion=Romannumerals,
    style={\bf\WORDS},
    align=middle,
    command=\MySection,
]

\starttext
\startsection[title={First section}]
this is the text
\stopsection
\stoptext



Have you tried it with \framedtext in the place of \framed ?

--
Rik

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

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


Re: [NTG-context] Chapter number and titles in separate lines with grid layout

2023-02-15 Thread Rik Kabel via ntg-context


On 2023-02-15 08:44, Alex Leray via ntg-context wrote:


\showframe
\showlayout
\showgrid

\setuplayout[
    grid=yes,
]

\define[2]\MySection{\framed[
    location=keep,
    frame=on,
    width=broad,
    % height=22pt,
    align=middle
]{{#1.\\#2}}}

\setuphead[section][
    strut=no,
    conversion=Romannumerals,
    style={\bf\WORDS},
    align=middle,
    command=\MySection,
]

\starttext
\startsection[title={First section}]
this is the text
\stopsection
\stoptext



Have you tried it with \framedtext in the place of \framed ?

--
Rik

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

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


[NTG-context] Chapter number and titles in separate lines with grid layout

2023-02-15 Thread Alex Leray via ntg-context

Hello again,

I'm having another issue: I'd like Chapter/Section number and titles in 
separate lines but with grid alignement. I followed that advice:


https://wiki.contextgarden.net/Titles#Chapter_number_and_titles_in_separate_lines

I'm having an issue though: I can't get rid of the space above the 
(framed) title and align the section number with the first line (it's on 
the second line)


Any idea? Many thanks.

###

\showframe
\showlayout
\showgrid

\setuplayout[
grid=yes,
]

\define[2]\MySection{\framed[
location=keep,
frame=on,
width=broad,
% height=22pt,
align=middle
]{{#1.\\#2}}}

\setuphead[section][
strut=no,
conversion=Romannumerals,
style={\bf\WORDS},
align=middle,
command=\MySection,
]

\starttext
\startsection[title={First section}]
this is the text
\stopsection
\stoptext

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

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


Re: [NTG-context] floats disturb grid setting

2022-10-03 Thread Max Chernoff via ntg-context

Hi Hraban,

> > As soon as I use floats, text isn’t typeset on the grid any more:
> > 
> > 
> > \setuppaper[A5]
> > \setuplayout[grid=yes]
> > \showframe\showgrid
> 
> Oops, my bad: It must be "grid=on".
> But didn’t work "yes" in earlier versions?

I just tested:

 MkIV  MkXL
[grid=yes]   BrokenBroken
 [grid=on]   BrokenWorks

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

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


Re: [NTG-context] floats disturb grid setting

2022-10-03 Thread Henning Hraban Ramm via ntg-context

Am 03.10.22 um 14:02 schrieb Henning Hraban Ramm via ntg-context:

As soon as I use floats, text isn’t typeset on the grid any more:


\setuppaper[A5]
\setuplayout[grid=yes]
\showframe\showgrid


Oops, my bad: It must be "grid=on".
But didn’t work "yes" in earlier versions?

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

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


[NTG-context] floats disturb grid setting

2022-10-03 Thread Henning Hraban Ramm via ntg-context

As soon as I use floats, text isn’t typeset on the grid any more:


\setuppaper[A5]
\setuplayout[grid=yes]
\showframe\showgrid

\setupexternalfigure[
  location={local,global,default},
]

\starttext
\samplefile{lorem}
\startplacefigure[location=left,title=left]%
\externalfigure[mill][width=.25\textwidth]
\stopplacefigure

\samplefile{lorem}
\startplacefigure[location=bottom,title=bottom]%
\externalfigure[cow][width=.25\textwidth]
\stopplacefigure

\startplacefigure[location=right,title=right]%
\externalfigure[mill][width=.25\textwidth]
\stopplacefigure
\samplefile{lorem}

\startplacefigure[location=left,title=left]%
\externalfigure[mill][width=.25\textwidth]
\stopplacefigure
\samplefile{lorem}

\stoptext


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

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


Re: [NTG-context] Offseting the baseline grid, and irregular columnsets

2022-05-27 Thread Stefan Nedeljkovic via ntg-context
So as I understand there are two grids: The baseline grid, and the main
grid. The baseline grid is shifted upward by an amount called depth in
order to accommodate descenders. I want to be able to control that
parameter. That is the space between the last red line (no 16) and the
bottom of the text frame (black line).

On Fri, May 27, 2022 at 10:32 PM Aditya Mahajan via ntg-context <
ntg-context@ntg.nl> wrote:

> On Fri, 27 May 2022, Stefan Nedeljkovic via ntg-context wrote:
>
> > Thanks Rik, that fixed the issue with at which line the text begins, but
> I
> > still get the grid offset.
>
> What do you mean by grid offset?
>
> 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] Offseting the baseline grid, and irregular columnsets

2022-05-27 Thread Aditya Mahajan via ntg-context
On Fri, 27 May 2022, Stefan Nedeljkovic via ntg-context wrote:

> Thanks Rik, that fixed the issue with at which line the text begins, but I
> still get the grid offset.

What do you mean by grid offset?

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
___


[NTG-context] How to adjust depth (height) when using grid layout

2022-05-27 Thread Stefan Nedeljkovic via ntg-context
Dear list,

I would like to know if there is a way to adjust the depth and height
exactly when typesetting in grid layout (LMTX)?

Sincerely,
Stefan
___
If your question is of interest to others as well, please add an 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] Offseting the baseline grid, and irregular columnsets

2022-05-27 Thread Stefan Nedeljkovic via ntg-context
Thanks Rik, that fixed the issue with at which line the text begins, but I
still get the grid offset.

On Fri, May 27, 2022 at 6:33 PM Rik Kabel via ntg-context <
ntg-context@ntg.nl> wrote:

> You left out the comma after the backspace setting. WIth that in, all is
> well.
> On 2022-05-27 12:03, Stefan Nedeljkovic via ntg-context wrote:
>
> Thank you very much Aditya for looking into this. But I still have the
> same baseline grid offset problem. Interestingly, when I remove the
> columns, the text shifts downwards by two lines.
> My code:
>
> \definemeasure[xheight][0.1in]
>
> \definemeasure[base][3\measured{xheight}]
>
> % Since all distances are in terms of base units, specify the paper size
> in those
>
> % terms as well.
>
> \definepapersize[slide][width=26\measured{base},height=20\measured{base}]
>
> \setuppapersize[slide]
>
> \setupinterlinespace[line=\measure{base}]
>
> \setuplayout
>
> [
>
> topspace=2\measured{base},
>
> header=\zeropoint,
>
> headerdistance=\zeropoint,
>
> height=middle, % Space for 20-4=16 lines
>
> footerdistance=\zeropoint,
>
> footer=\zeropoint,
>
> bottomspace=2\measured{base},
>
> %
>
> cutspace=2\measured{base},
>
> leftmargin=\zeropoint,
>
> leftmargindistance=\zeropoint,
>
> width=middle, % space for 26-4=22 col
>
> rightmargindistance=\zeropoint,
>
> rightmargin=\zeropoint,
>
> backspace=2\measured{base}
>
> grid=yes,
>
> ]
>
> \showframe
>
> \showgrid
>
> \starttext
>
> \input tufte
>
> \stoptext
>
> I'm attaching the pdf output.
>
> On Fri, May 27, 2022 at 5:00 PM Aditya Mahajan  wrote:
>
>> On Wed, 25 May 2022, Stefan Nedeljkovic via ntg-context wrote:
>>
>> > Dear list,
>> >
>> > My adventures into the world of grids continue. In the linked file
>> > (slide_grid_overlay.pdf) there are two things I cannot yet achieve:
>> >
>> > 1. I want the baseline grid to evenly (vertically) divide the text
>> > area, but my code produces a smaller height of the first line and an
>> > additional space at the bottom.
>>
>> You did not set footerdistance to zero. So, that takes up some space.
>>
>> > 2. The number of columns is 21.5, that is the first column is 0.5
>> units
>> > wide and the rest are 1 unit wide.
>>
>> I believe that columns has to be an integer. Why do you want fractional
>> columns? Columns are useful because you can say:
>>
>> \setlayer[name][line=2,column=3]{}
>>
>> for absolute positioning of layers. So, you can always use:
>>
>> \setlayer[name][line=2,column=3,x=0.5\measured{base}]{}
>>
>> to move everything to the right by 0.5 units.
>>
>> Another option is not to use columns at all, and simply do:
>>
>> \setlayer[name][line=2,x=3.5\measured{base}]
>>
>> which will place the layer at 3.5 units from the left edge of the text
>> area.
>>
>> > Here is what I got right now:
>>
>> Currently your textwidth is not a multiple of base units. I have tweaked
>> the code below so that it is.
>>
>> \definemeasure[xheight][0.1in]
>> \definemeasure[base][3\measured{xheight}]
>>
>> % Since all distances are in terms of base units, specify the paper size
>> in those
>> % terms as well.
>> \definepapersize[slide][width=26\measured{base},height=20\measured{base}]
>> \setuppapersize[slide]
>>
>> \setupinterlinespace[line=\measure{base}]
>>
>> \setuplayout
>> [
>>   topspace=2\measured{base},
>>   header=\zeropoint,
>>   headerdistance=\zeropoint,
>>   height=middle, % Space for 20-4=16 lines
>>   footerdistance=\zeropoint,
>>   footer=\zeropoint,
>>   bottomspace=2\measured{base},
>>   %
>>   cutspace=2\measured{base},
>>   leftmargin=\zeropoint,
>>   leftmargindistance=\zeropoint,
>>   width=middle, % space for 26-4=22 col
>>   rightmargindistance=\zeropoint,
>>   rightmargin=\zeropoint,
>>   backspace=2\measured{base},
>>   %
>>   columns=22,
>>   columndistance=1pt,
>>   %
>>   grid=yes,
>> ]
>>
>>
>> \showframe
>> \showgrid
>>
>> \starttext
>> \input tufte
>> \stoptext
>>
>>
>> Aditya
>>
>
> ___
> If your question is of interest to others as well, please ad

Re: [NTG-context] Offseting the baseline grid, and irregular columnsets

2022-05-27 Thread Rik Kabel via ntg-context
You left out the comma after the backspace setting. WIth that in, all is 
well.


On 2022-05-27 12:03, Stefan Nedeljkovic via ntg-context wrote:
Thank you very much Aditya for looking into this. But I still have the 
same baseline grid offset problem. Interestingly, when I remove the 
columns, the text shifts downwards by two lines.

My code:

\definemeasure[xheight][0.1in]

\definemeasure[base][3\measured{xheight}]

% Since all distances are in terms of base units, specify the paper 
size in those


% terms as well.

\definepapersize[slide][width=26\measured{base},height=20\measured{base}]

\setuppapersize[slide]

\setupinterlinespace[line=\measure{base}]

\setuplayout

[

topspace=2\measured{base},

header=\zeropoint,

headerdistance=\zeropoint,

height=middle, % Space for 20-4=16 lines

footerdistance=\zeropoint,

footer=\zeropoint,

bottomspace=2\measured{base},

%

cutspace=2\measured{base},

leftmargin=\zeropoint,

leftmargindistance=\zeropoint,

width=middle, % space for 26-4=22 col

rightmargindistance=\zeropoint,

rightmargin=\zeropoint,

backspace=2\measured{base}

grid=yes,

]

\showframe

\showgrid

\starttext

\input tufte

\stoptext

I'm attaching the pdf output.


On Fri, May 27, 2022 at 5:00 PM Aditya Mahajan  wrote:

On Wed, 25 May 2022, Stefan Nedeljkovic via ntg-context wrote:

> Dear list,
>
> My adventures into the world of grids continue. In the linked file
> (slide_grid_overlay.pdf) there are two things I cannot yet achieve:
>
>     1. I want the baseline grid to evenly (vertically) divide
the text
> area, but my code produces a smaller height of the first line and an
> additional space at the bottom.

You did not set footerdistance to zero. So, that takes up some space.

>     2. The number of columns is 21.5, that is the first column
is 0.5 units
> wide and the rest are 1 unit wide.

I believe that columns has to be an integer. Why do you want
fractional columns? Columns are useful because you can say:

\setlayer[name][line=2,column=3]{}

for absolute positioning of layers. So, you can always use:

\setlayer[name][line=2,column=3,x=0.5\measured{base}]{}

to move everything to the right by 0.5 units.

Another option is not to use columns at all, and simply do:

\setlayer[name][line=2,x=3.5\measured{base}]

which will place the layer at 3.5 units from the left edge of the
text area.

> Here is what I got right now:

Currently your textwidth is not a multiple of base units. I have
tweaked the code below so that it is.

\definemeasure[xheight][0.1in]
\definemeasure[base][3\measured{xheight}]

% Since all distances are in terms of base units, specify the
paper size in those
% terms as well.
\definepapersize[slide][width=26\measured{base},height=20\measured{base}]
\setuppapersize[slide]

\setupinterlinespace[line=\measure{base}]

\setuplayout
    [
      topspace=2\measured{base},
      header=\zeropoint,
      headerdistance=\zeropoint,
      height=middle, % Space for 20-4=16 lines
      footerdistance=\zeropoint,
      footer=\zeropoint,
      bottomspace=2\measured{base},
      %
      cutspace=2\measured{base},
      leftmargin=\zeropoint,
      leftmargindistance=\zeropoint,
      width=middle, % space for 26-4=22 col
      rightmargindistance=\zeropoint,
      rightmargin=\zeropoint,
      backspace=2\measured{base},
      %
      columns=22,
      columndistance=1pt,
      %
      grid=yes,
    ]


\showframe
\showgrid

\starttext
\input tufte
\stoptext


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] Offseting the baseline grid, and irregular columnsets

2022-05-27 Thread Stefan Nedeljkovic via ntg-context
Thank you very much Aditya for looking into this. But I still have the same
baseline grid offset problem. Interestingly, when I remove the columns, the
text shifts downwards by two lines.
My code:

\definemeasure[xheight][0.1in]

\definemeasure[base][3\measured{xheight}]


% Since all distances are in terms of base units, specify the paper size in
those

% terms as well.

\definepapersize[slide][width=26\measured{base},height=20\measured{base}]

\setuppapersize[slide]


\setupinterlinespace[line=\measure{base}]


\setuplayout

[

topspace=2\measured{base},

header=\zeropoint,

headerdistance=\zeropoint,

height=middle, % Space for 20-4=16 lines

footerdistance=\zeropoint,

footer=\zeropoint,

bottomspace=2\measured{base},

%

cutspace=2\measured{base},

leftmargin=\zeropoint,

leftmargindistance=\zeropoint,

width=middle, % space for 26-4=22 col

rightmargindistance=\zeropoint,

rightmargin=\zeropoint,

backspace=2\measured{base}

grid=yes,

]



\showframe

\showgrid


\starttext

\input tufte

\stoptext


I'm attaching the pdf output.

On Fri, May 27, 2022 at 5:00 PM Aditya Mahajan  wrote:

> On Wed, 25 May 2022, Stefan Nedeljkovic via ntg-context wrote:
>
> > Dear list,
> >
> > My adventures into the world of grids continue. In the linked file
> > (slide_grid_overlay.pdf) there are two things I cannot yet achieve:
> >
> > 1. I want the baseline grid to evenly (vertically) divide the text
> > area, but my code produces a smaller height of the first line and an
> > additional space at the bottom.
>
> You did not set footerdistance to zero. So, that takes up some space.
>
> > 2. The number of columns is 21.5, that is the first column is 0.5
> units
> > wide and the rest are 1 unit wide.
>
> I believe that columns has to be an integer. Why do you want fractional
> columns? Columns are useful because you can say:
>
> \setlayer[name][line=2,column=3]{}
>
> for absolute positioning of layers. So, you can always use:
>
> \setlayer[name][line=2,column=3,x=0.5\measured{base}]{}
>
> to move everything to the right by 0.5 units.
>
> Another option is not to use columns at all, and simply do:
>
> \setlayer[name][line=2,x=3.5\measured{base}]
>
> which will place the layer at 3.5 units from the left edge of the text
> area.
>
> > Here is what I got right now:
>
> Currently your textwidth is not a multiple of base units. I have tweaked
> the code below so that it is.
>
> \definemeasure[xheight][0.1in]
> \definemeasure[base][3\measured{xheight}]
>
> % Since all distances are in terms of base units, specify the paper size
> in those
> % terms as well.
> \definepapersize[slide][width=26\measured{base},height=20\measured{base}]
> \setuppapersize[slide]
>
> \setupinterlinespace[line=\measure{base}]
>
> \setuplayout
> [
>   topspace=2\measured{base},
>   header=\zeropoint,
>   headerdistance=\zeropoint,
>   height=middle, % Space for 20-4=16 lines
>   footerdistance=\zeropoint,
>   footer=\zeropoint,
>   bottomspace=2\measured{base},
>   %
>   cutspace=2\measured{base},
>   leftmargin=\zeropoint,
>   leftmargindistance=\zeropoint,
>   width=middle, % space for 26-4=22 col
>   rightmargindistance=\zeropoint,
>   rightmargin=\zeropoint,
>   backspace=2\measured{base},
>   %
>   columns=22,
>   columndistance=1pt,
>   %
>   grid=yes,
> ]
>
>
> \showframe
> \showgrid
>
> \starttext
> \input tufte
> \stoptext
>
>
> Aditya
>


slide.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Offseting the baseline grid, and irregular columnsets

2022-05-27 Thread Aditya Mahajan via ntg-context
On Wed, 25 May 2022, Stefan Nedeljkovic via ntg-context wrote:

> Dear list,
> 
> My adventures into the world of grids continue. In the linked file
> (slide_grid_overlay.pdf) there are two things I cannot yet achieve:
> 
> 1. I want the baseline grid to evenly (vertically) divide the text
> area, but my code produces a smaller height of the first line and an
> additional space at the bottom.

You did not set footerdistance to zero. So, that takes up some space.

> 2. The number of columns is 21.5, that is the first column is 0.5 units
> wide and the rest are 1 unit wide.

I believe that columns has to be an integer. Why do you want fractional 
columns? Columns are useful because you can say:

\setlayer[name][line=2,column=3]{}

for absolute positioning of layers. So, you can always use:

\setlayer[name][line=2,column=3,x=0.5\measured{base}]{}

to move everything to the right by 0.5 units.  

Another option is not to use columns at all, and simply do:

\setlayer[name][line=2,x=3.5\measured{base}]

which will place the layer at 3.5 units from the left edge of the text area. 

> Here is what I got right now:

Currently your textwidth is not a multiple of base units. I have tweaked the 
code below so that it is.

\definemeasure[xheight][0.1in]
\definemeasure[base][3\measured{xheight}]

% Since all distances are in terms of base units, specify the paper size in 
those
% terms as well.
\definepapersize[slide][width=26\measured{base},height=20\measured{base}]
\setuppapersize[slide]

\setupinterlinespace[line=\measure{base}]

\setuplayout
[
  topspace=2\measured{base},
  header=\zeropoint,
  headerdistance=\zeropoint,
  height=middle, % Space for 20-4=16 lines
  footerdistance=\zeropoint,
  footer=\zeropoint,
  bottomspace=2\measured{base},
  %
  cutspace=2\measured{base},
  leftmargin=\zeropoint,
  leftmargindistance=\zeropoint,
  width=middle, % space for 26-4=22 col
  rightmargindistance=\zeropoint,
  rightmargin=\zeropoint,
  backspace=2\measured{base},
  %
  columns=22,
  columndistance=1pt,
  %
  grid=yes,
]


\showframe
\showgrid

\starttext
\input tufte
\stoptext


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
___


[NTG-context] Offseting the baseline grid, and irregular columnsets

2022-05-25 Thread Stefan Nedeljkovic via ntg-context
Dear list,

My adventures into the world of grids continue. In the linked file
(slide_grid_overlay.pdf) there are two things I cannot yet achieve:

1. I want the baseline grid to evenly (vertically) divide the text
area, but my code produces a smaller height of the first line and an
additional space at the bottom.
2. The number of columns is 21.5, that is the first column is 0.5 units
wide and the rest are 1 unit wide.

How would I achieve this?
Here is what I got right now:

\definemeasure[xheight][0.1in]
\definemeasure[base][3\measured{xheight}]

\definepapersize[slide][width=80\measured{xheight},height=60\measured{xheight}]
\setuppapersize[slide]

\setupinterlinespace[line=\measure{base},top=1]

\setuplayout[
leftedge=\zeropoint,
rightedge=\measure{zero},
leftedgedistance=\zeropoint,
rightedgedistance=\zeropoint,
leftmargin=\zeropoint,
rightmargin=\zeropoint,
leftmargindistance=\zeropoint,
rightmargindistance=\zeropoint,
width=middle,
cutspace=2\measured{base},
backspace=2\measured{base},
topspace=2\measured{base},
header=\zeropoint,
height=middle,
bottomspace=2\measured{base},
footer=\zeropoint,
grid=yes,
columndistance=1pt,
columns=21.5]


\showframe
\showgrid

\starttext
\input tufte
\stoptext

Link to file:
https://drive.google.com/drive/folders/1KpYbDlukvSCirKkFvJICOX3wABl_83bW?usp=sharing

Sincerely,
Stefan
___
If your question is of interest to others as well, please add an 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] Help needed with slide grid layout

2022-05-25 Thread Stefan Nedeljkovic via ntg-context
I have problems setting up the grid in question. I cannot seem to configure
the grid spacing properly, despite combing through the "details" manual.
Could you help me configure the grid?

On Wed, May 25, 2022 at 6:24 PM Stefan Nedeljkovic 
wrote:

> Thank you very much Wolfgang, that solved the problem.
>
> On Wed, May 25, 2022 at 4:01 PM Wolfgang Schuster <
> wolfgang.schuster.li...@gmail.com> wrote:
>
>> Stefan Nedeljkovic via ntg-context schrieb am 25.05.2022 um 13:35:
>> > Dear list,
>> >
>> > This is a follow-up question on my previous question about Jean-Luc
>> > Doumont and his grid layouts. This time I have concrete questions. I
>> > reverse engineered his slide (slide_grid_overlay.pdf). All his units
>> are
>> > based on inches, because the inch is an integer multiple (72) of the
>> TeX
>> > point. His base unit is 0.1in. I tried implementing the layout first,
>> > but the pdf dimensions do not match the ones I set up. For example the
>> > width should be 8 inches, but the pdf is over 11 inches wide. I wish to
>> > shut off all margins and similar things and only have a text area with
>> > an offset of 0.2in all around the page (see slide_grid_overlay.pdf).
>> > Here is my current attempt:
>>
>> You have to use the \measured (with a trailing s) command when you need
>> multiples of a measure value. When you use something like 2\measure{...}
>> ConTeXt uses the "2" followed by the value of the measure, the following
>> example demonstrates this in the second output.
>>
>>  begin example
>> \definemeasure [point] [1pt]
>>
>> \starttext
>>
>> \startbuffer
>> \tex{measure}: \measure{point}
>>
>> \tex{measured}: \the\measured{point}
>> \stopbuffer
>>
>> \typebuffer \getbuffer
>>
>> \startbuffer
>> 2\tex{measure}: 2\measure{point}
>>
>> 2\tex{measured}: \the\dimexpr2\measured{point}\relax
>> \stopbuffer
>>
>> \typebuffer \getbuffer
>>
>> \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] Help needed with slide grid layout

2022-05-25 Thread Stefan Nedeljkovic via ntg-context
Thank you very much Wolfgang, that solved the problem.

On Wed, May 25, 2022 at 4:01 PM Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Stefan Nedeljkovic via ntg-context schrieb am 25.05.2022 um 13:35:
> > Dear list,
> >
> > This is a follow-up question on my previous question about Jean-Luc
> > Doumont and his grid layouts. This time I have concrete questions. I
> > reverse engineered his slide (slide_grid_overlay.pdf). All his units are
> > based on inches, because the inch is an integer multiple (72) of the TeX
> > point. His base unit is 0.1in. I tried implementing the layout first,
> > but the pdf dimensions do not match the ones I set up. For example the
> > width should be 8 inches, but the pdf is over 11 inches wide. I wish to
> > shut off all margins and similar things and only have a text area with
> > an offset of 0.2in all around the page (see slide_grid_overlay.pdf).
> > Here is my current attempt:
>
> You have to use the \measured (with a trailing s) command when you need
> multiples of a measure value. When you use something like 2\measure{...}
> ConTeXt uses the "2" followed by the value of the measure, the following
> example demonstrates this in the second output.
>
>  begin example
> \definemeasure [point] [1pt]
>
> \starttext
>
> \startbuffer
> \tex{measure}: \measure{point}
>
> \tex{measured}: \the\measured{point}
> \stopbuffer
>
> \typebuffer \getbuffer
>
> \startbuffer
> 2\tex{measure}: 2\measure{point}
>
> 2\tex{measured}: \the\dimexpr2\measured{point}\relax
> \stopbuffer
>
> \typebuffer \getbuffer
>
> \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] Help needed with slide grid layout

2022-05-25 Thread Wolfgang Schuster via ntg-context

Stefan Nedeljkovic via ntg-context schrieb am 25.05.2022 um 13:35:

Dear list,

This is a follow-up question on my previous question about Jean-Luc 
Doumont and his grid layouts. This time I have concrete questions. I 
reverse engineered his slide (slide_grid_overlay.pdf). All his units are 
based on inches, because the inch is an integer multiple (72) of the TeX 
point. His base unit is 0.1in. I tried implementing the layout first, 
but the pdf dimensions do not match the ones I set up. For example the 
width should be 8 inches, but the pdf is over 11 inches wide. I wish to 
shut off all margins and similar things and only have a text area with 
an offset of 0.2in all around the page (see slide_grid_overlay.pdf). 
Here is my current attempt:


You have to use the \measured (with a trailing s) command when you need
multiples of a measure value. When you use something like 2\measure{...}
ConTeXt uses the "2" followed by the value of the measure, the following
example demonstrates this in the second output.

 begin example
\definemeasure [point] [1pt]

\starttext

\startbuffer
\tex{measure}: \measure{point}

\tex{measured}: \the\measured{point}
\stopbuffer

\typebuffer \getbuffer

\startbuffer
2\tex{measure}: 2\measure{point}

2\tex{measured}: \the\dimexpr2\measured{point}\relax
\stopbuffer

\typebuffer \getbuffer

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


[NTG-context] Help needed with slide grid layout

2022-05-25 Thread Stefan Nedeljkovic via ntg-context
Dear list,

This is a follow-up question on my previous question about Jean-Luc Doumont
and his grid layouts. This time I have concrete questions. I reverse
engineered his slide (slide_grid_overlay.pdf). All his units are based on
inches, because the inch is an integer multiple (72) of the TeX point. His
base unit is 0.1in. I tried implementing the layout first, but the pdf
dimensions do not match the ones I set up. For example the width should be
8 inches, but the pdf is over 11 inches wide. I wish to shut off all
margins and similar things and only have a text area with an offset of
0.2in all around the page (see slide_grid_overlay.pdf). Here is my current
attempt:


%\input fonts


\definemeasure[base][0.1in]

\definemeasure[zero][0in]


\definepapersize[slide][width=80\measure{base},height=60\measure{base}]

\setuppapersize[slide]


\setuplayout[

leftedge=\measure{zero},

rightedge=\measure{zero},

leftedgedistance=\measure{zero},

rightedgedistance=\measure{zero},

leftmargin=\measure{zero},

rightmargin=\measure{zero},

leftmargindistance=\measure{zero},

rightmargindistance=\measure{zero},

width=middle,

cutspace=2\measure{base},

backspace=2\measure{base},

topspace=2\measure{base},

header=\measure{zero},

height=middle,

bottomspace=2\measure{base},

footer=\measure{zero}]


%\usetypescript[ibmplex][uc]

%\setupbodyfont[ibmplex,rm,9pt]





\starttext


\showlayout


\stoptext


Link to files:
https://drive.google.com/drive/folders/1KpYbDlukvSCirKkFvJICOX3wABl_83bW?usp=sharing



Kind regards,

Stefan
___
If your question is of interest to others as well, please add an 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] space before section titles sometimes disappears in grid mode

2021-08-12 Thread Henning Hraban Ramm via ntg-context
E.g. in CG journal, there are usually 3 blank lines before a section title.
Most of it is single column and without grid, no problem there. But some 
articles use columnsets and are therefore in grid mode.

Sometimes the space before the section title disappears completely, so that it 
is glued to the previous paragraph.

If I include \startlinecorrection in "before" of \setuphead[section], in front 
of the \blank, the space is only reduced by 1 line, but I get the space also at 
the top of a column (or at the start of the article).

If I put \startlinecorrection after \blank, the space disappears the same as 
without linecorrection.

\setuphead[section]
  [before={\startlinecorrection\blank[BigCGblank]},
   after={\stoplinecorrection\blank[CGblank]},
   grid=both,
  ]

It happens reproducably if there is a float before \startsection, but sometimes 
I can’t find a reason.

In the other magazine I’m typesetting ATM, I get the same problem. No 
columnsets involved in that case, but still in grid mode.
There I can "fix" it with some \blank[3*line], but it doesn’t help in the 
floats case.

Hraban
___
If your question is of interest to others as well, please add an 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] First line of larger font paragraph on grid

2021-06-28 Thread denis.maier
Ok, I've now tried to adapt my real document to this (see below). But I'm 
running into some problems:

1. I'm not sure whether to use \setuplocalinterlinespace or 
\setupinterlinespace. With \setuphead, \setuplocalinterlinespace works, but it 
doesn't work with \framed... But even with \setuphead it leads to results I 
didn't expect: \blank[force,3*line,depth] -> four empty lines instead of three.

2. foregroundstyle={\bfe\setupinterlinespace[line=17.5pt]} works sort of with 
the default fonts, i.e. the visuals are ok, but with \showstruts enabled, you 
see that the struts are incorrect. Now, with the font I have to use (Noto Serif 
Semicondensed ExtraBold at 15pt, with linespacing 17.5pt, available at 
http://www.google.com/get/noto/#serif-lgc) this shows up even visually: The 
letters are placed a tiny bit below the baseline.

Any ideas? Hints?

TIA,
Denis

%-
\setuplayout[grid=yes]
\showgrid
\showstruts

\definefont  [BigFont]  [Bold at 20pt] [28pt]

\definefontsize[e]  %   < added
\definebodyfontenvironment [12pt] [e=20pt]  %   < added

\definebodyfontenvironment [10pt] [e=15pt]  %   < added dm
\definebodyfontenvironment [10pt] [interlinespace=14pt]  %   < added dm
%\definefontfamily[mainface][rm][Noto Serif]
%   [tf=file:NotoSerif-SemiCondensed.ttf] % < added dm

\setupbodyfont[mainface,10pt] % < added dm

\unprotect
\unexpanded\def\section_command#1#2{%
   \framed [
width=\textwidth,
frame=off,
rulethickness=0pt,
offset=0pt,
loffset=-0pt,
before=,
location=top,
align=flushleft,]{#2}%
}


\setuphead [section] [
 style=\bfe,
 %style={\bfe\setupinterlinespace[line=17.5pt]},
 style={\bfe\setuplocalinterlinespace[line=17.5pt]},
 after=,
before=,
   command=\section_command,
]
\protect


\defineframed[myframed][
width=\textwidth,
frame=off,
rulethickness=0pt,
offset=0pt,
loffset=-0pt,
foregroundstyle=\bfe,%   < added
foregroundstyle={\bfe\setupinterlinespace[line=17.5pt]},
%   < dm, added; does work partially; struts are incorrect
foregroundstyle={\bfe\setuplocalinterlinespace[line=17.5pt]},   
%   < dm, added; does not work
strut=yes,   %   < added
before=,
location=top,
align=flushleft,]  

\starttext

\blank[force,3*line,depth]

\myframed{Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem ipsum 
dolor sit amet consectetur adipisicing elit}

asdfasdf

\page
\blank[force,3*line,depth]

\startsection [title=Lorem ipsum dolor sit amet consectetur adipisicing elit 
Lorem ipsum dolor sit amet consectetur adipisicing elit]
   asdf
\stopsection

\stoptext%-




> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von
> denis.ma...@unibe.ch
> Gesendet: Sonntag, 27. Juni 2021 16:57
> An: ntg-context@ntg.nl
> Betreff: Re: [NTG-context] First line of larger font paragraph on grid
> 
> Thanks, Garulfo. I don't use \definedfont in my real document so I should be
> able to port it to my use case. And now I've learned about foregroundstyle. (I
> was already a bit perplexed that \framed has no style key.)
> 
> Just out of curiousity, perhaps someone (Hans? Wolfgang?) knows more about
> the underlying issue?
> 
> Denis
> 
> > -Ursprüngliche Nachricht-
> > Von: ntg-context  Im Auftrag von Garulfo
> > Gesendet: Samstag, 26. Juni 2021 12:37
> > An: ntg-context@ntg.nl
> > Betreff: Re: [NTG-context] First line of larger font paragraph on grid
> >
> > To have the two pages similar
> >
> > There is something linked with the use of \definefont.
> > Don't know if it properly impacts the interlinespace for example.
> >
> > %--
> >
> > \setuplayout[grid=yes]
> > \showgrid
> >
> > \definefont  [BigFont]  [Bold at 20pt] [28pt]
> >
> > \definefontsize[e]  %   < added
> > \definebodyfontenvironment [12pt] [e=20pt]  %   < added
> >
> > \unprotect
> > \unexpanded\def\section_command#1#2{%
> >\framed [
> > width=\textwidth,
> > frame=off,
> > rulethickness=0pt,
> > offset=0pt,
> > loffset=-0pt,
> > before=,
> > location=top,
>

Re: [NTG-context] First line of larger font paragraph on grid

2021-06-27 Thread denis.maier
Thanks, Garulfo. I don't use \definedfont in my real document so I should be 
able to port it to my use case. And now I've learned about foregroundstyle. (I 
was already a bit perplexed that \framed has no style key.)

Just out of curiousity, perhaps someone (Hans? Wolfgang?) knows more about the 
underlying issue?

Denis

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Garulfo
> Gesendet: Samstag, 26. Juni 2021 12:37
> An: ntg-context@ntg.nl
> Betreff: Re: [NTG-context] First line of larger font paragraph on grid
> 
> To have the two pages similar
> 
> There is something linked with the use of \definefont.
> Don't know if it properly impacts the interlinespace for example.
> 
> %--
> 
> \setuplayout[grid=yes]
> \showgrid
> 
> \definefont  [BigFont]  [Bold at 20pt] [28pt]
> 
> \definefontsize[e]  %   < added
> \definebodyfontenvironment [12pt] [e=20pt]  %   < added
> 
> \unprotect
> \unexpanded\def\section_command#1#2{%
>\framed [
> width=\textwidth,
> frame=off,
> rulethickness=0pt,
> offset=0pt,
> loffset=-0pt,
> before=,
> location=top,
> align=flushleft,]{#2}%
> }
> 
> 
> \setuphead [section] [
>  style=\bfe,
>  after=,
> before={\blank[1*line]},
>command=\section_command,
> ]
> \protect
> 
> 
> \defineframed[myframed][
> width=\textwidth,
> frame=off,
> rulethickness=0pt,
> offset=0pt,
> loffset=-0pt,
> foregroundstyle=\bfe,%   < added
> strut=yes,   %   < added
> before=,
> location=top,
> align=flushleft,]%   < removed dup "]"
> 
> \starttext
> 
> \blank[force,3*line,depth]
> 
> %\begingroup%   < removed
> %\BigFont   %   < removed
> \myframed{Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem
> ipsum dolor sit amet consectetur adipisicing elit}
> %\endgroup  %   < removed
> 
> asdfasdf
> 
> \page
> \blank[force,3*line,depth]
> 
> \startsection [title=Lorem ipsum dolor sit amet consectetur adipisicing elit
> Lorem ipsum dolor sit amet consectetur adipisicing elit]
>asdf
> \stopsection
> 
> \stoptext
> 
> %--
> 
> 
> Le 25/06/2021 à 12:30, denis.ma...@unibe.ch a écrit :
> > Hi,
> >
> > I have some text in a larger font where the first line should be on
> > the grid. Therefore, I’ve tried to adapt the solution from the wiki:
> > https://wiki.contextgarden.net/Grid_typesetting#Placing_titles_on_the_
> > grid
> > <https://wiki.contextgarden.net/Grid_typesetting#Placing_titles_on_the
> > _grid>
> >
> > The interesting thing is that the section command indeed places the
> > first line on the grid, but using \framed directly does not give the
> > desired results.
> >
> > I must be missing something obvious. Does anyone know a solution ?
> >
> > Thanks for your help,
> >
> > Denis
> >
> > ===
> >
> > \setuplayout[grid=yes]
> >
> > \showgrid
> >
> > \definefont  [BigFont]  [Bold at 20pt] [24pt]
> >
> > \unprotect
> >
> > \unexpanded\def\section_command#1#2{%
> >
> > \framed [
> >
> >     width=\textwidth,
> >
> >         frame=off,
> >
> >         rulethickness=0pt,
> >
> >         offset=0pt,
> >
> >         loffset=-0pt,
> >
> >     before=,
> >
> >     location=top,
> >
> >     align=flushleft,]{#2}%
> >
> > }
> >
> > \setuphead [section] [
> >
> >      style={\BigFont},
> >
> > after=,
> >
> >     before={\blank[1*line]},
> >
> >    command=\section_command,
> >
> > ]
> >
> > \protect
> >
> > \defineframed[myframed][
> >
> >         width=\textwidth,
> >
> >         frame=off,
> >
> >         rulethickness=0pt,
> >
> >         offset=0pt,
> >
> > loffset=-0pt,
> >
> >     before=,
> >
> >     location

Re: [NTG-context] First line of larger font paragraph on grid

2021-06-26 Thread Garulfo

To have the two pages similar

There is something linked with the use of \definefont.
Don't know if it properly impacts the interlinespace for example.

%--

\setuplayout[grid=yes]
\showgrid

\definefont  [BigFont]  [Bold at 20pt] [28pt]

\definefontsize[e]  %   < added
\definebodyfontenvironment [12pt] [e=20pt]  %   < added

\unprotect
\unexpanded\def\section_command#1#2{%
  \framed [
   width=\textwidth,
   frame=off,
   rulethickness=0pt,
   offset=0pt,
   loffset=-0pt,
   before=,
   location=top,
   align=flushleft,]{#2}%
}


\setuphead [section] [
style=\bfe,
after=,
   before={\blank[1*line]},
  command=\section_command,
]
\protect


\defineframed[myframed][
   width=\textwidth,
   frame=off,
   rulethickness=0pt,
   offset=0pt,
   loffset=-0pt,
   foregroundstyle=\bfe,%   < added
   strut=yes,   %   < added
   before=,
   location=top,
   align=flushleft,]%   < removed dup "]"

\starttext

\blank[force,3*line,depth]

%\begingroup%   < removed
%\BigFont   %   < removed
\myframed{Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem 
ipsum dolor sit amet consectetur adipisicing elit}

%\endgroup  %   < removed

asdfasdf

\page
\blank[force,3*line,depth]

\startsection [title=Lorem ipsum dolor sit amet consectetur adipisicing 
elit Lorem ipsum dolor sit amet consectetur adipisicing elit]

  asdf
\stopsection

\stoptext

%--


Le 25/06/2021 à 12:30, denis.ma...@unibe.ch a écrit :

Hi,

I have some text in a larger font where the first line should be on the 
grid. Therefore, I’ve tried to adapt the solution from the wiki: 
https://wiki.contextgarden.net/Grid_typesetting#Placing_titles_on_the_grid 
<https://wiki.contextgarden.net/Grid_typesetting#Placing_titles_on_the_grid>


The interesting thing is that the section command indeed places the 
first line on the grid, but using \framed directly does not give the 
desired results.


I must be missing something obvious. Does anyone know a solution ?

Thanks for your help,

Denis

===

\setuplayout[grid=yes]

\showgrid

\definefont  [BigFont]  [Bold at 20pt] [24pt]

\unprotect

\unexpanded\def\section_command#1#2{%

\framed [

    width=\textwidth,

        frame=off,

        rulethickness=0pt,

        offset=0pt,

        loffset=-0pt,

    before=,

    location=top,

    align=flushleft,]{#2}%

}

\setuphead [section] [

     style={\BigFont},

after=,

    before={\blank[1*line]},

   command=\section_command,

]

\protect

\defineframed[myframed][

        width=\textwidth,

        frame=off,

        rulethickness=0pt,

        offset=0pt,

loffset=-0pt,

    before=,

    location=top,

align=flushleft,]]

\starttext

\blank[force,3*line,depth]

\begingroup

\BigFont

\myframed{Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem 
ipsum dolor sit amet consectetur adipisicing elit}


\endgroup

asdfasdf

\page

\blank[force,3*line,depth]

\startsection [title=Lorem ipsum dolor sit amet consectetur adipisicing 
elit Lorem ipsum dolor sit amet consectetur adipisicing elit]


asdf

\stopsection

\stoptext

=


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://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] First line of larger font paragraph on grid

2021-06-26 Thread Garulfo

A proposal

===

\setuplayout[grid=yes]
\showgrid

\definefont  [BigFont]  [Bold at 20pt] [28pt]

\unprotect
\unexpanded\def\section_command#1#2{%
  \framed [
   width=\textwidth,
   frame=off,
   rulethickness=0pt,
   offset=0pt,
   loffset=-0pt,
   before=,
   location=top,
   align=flushleft,]{#2}%
}


\setuphead [section] [
style={\BigFont},
after=,
   before={\blank[1*line]},
  command=\section_command,
]
\protect

\definefontsize[e]  %   < added
\definebodyfontenvironment [12pt] [e=20pt]  %   < added

\defineframed[myframed][
   width=\textwidth,
   frame=off,
   rulethickness=0pt,
   offset=0pt,
   loffset=-0pt,
   foregroundstyle=\bfe,%   < added
   strut=yes,   %   < added
   before=,
   location=top,
   align=flushleft,]%   < removed dupl "]"

\starttext

\blank[force,3*line,depth]

%\begingroup%   < removed
%\BigFont   %   < removed
\myframed{Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem 
ipsum dolor sit amet consectetur adipisicing elit}

%\endgroup  %   < removed

asdfasdf

\page
\blank[force,3*line,depth]

\startsection [title=Lorem ipsum dolor sit amet consectetur adipisicing 
elit Lorem ipsum dolor sit amet consectetur adipisicing elit]

  asdf
\stopsection

\stoptext

Le 25/06/2021 à 12:30, denis.ma...@unibe.ch a écrit :

Hi,

I have some text in a larger font where the first line should be on the 
grid. Therefore, I’ve tried to adapt the solution from the wiki: 
https://wiki.contextgarden.net/Grid_typesetting#Placing_titles_on_the_grid 
<https://wiki.contextgarden.net/Grid_typesetting#Placing_titles_on_the_grid>


The interesting thing is that the section command indeed places the 
first line on the grid, but using \framed directly does not give the 
desired results.


I must be missing something obvious. Does anyone know a solution ?

Thanks for your help,

Denis

===

\setuplayout[grid=yes]

\showgrid

\definefont  [BigFont]  [Bold at 20pt] [24pt]

\unprotect

\unexpanded\def\section_command#1#2{%

\framed [

    width=\textwidth,

        frame=off,

        rulethickness=0pt,

        offset=0pt,

        loffset=-0pt,

    before=,

    location=top,

    align=flushleft,]{#2}%

}

\setuphead [section] [

     style={\BigFont},

after=,

    before={\blank[1*line]},

   command=\section_command,

]

\protect

\defineframed[myframed][

        width=\textwidth,

        frame=off,

        rulethickness=0pt,

        offset=0pt,

loffset=-0pt,

    before=,

    location=top,

align=flushleft,]]

\starttext

\blank[force,3*line,depth]

\begingroup

\BigFont

\myframed{Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem 
ipsum dolor sit amet consectetur adipisicing elit}


\endgroup

asdfasdf

\page

\blank[force,3*line,depth]

\startsection [title=Lorem ipsum dolor sit amet consectetur adipisicing 
elit Lorem ipsum dolor sit amet consectetur adipisicing elit]


asdf

\stopsection

\stoptext

=


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://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
___


[NTG-context] First line of larger font paragraph on grid

2021-06-25 Thread denis.maier
Hi,

I have some text in a larger font where the first line should be on the grid. 
Therefore, I've tried to adapt the solution from the wiki: 
https://wiki.contextgarden.net/Grid_typesetting#Placing_titles_on_the_grid

The interesting thing is that the section command indeed places the first line 
on the grid, but using \framed directly does not give the desired results.

I must be missing something obvious. Does anyone know a solution ?

Thanks for your help,
Denis

===
\setuplayout[grid=yes]
\showgrid

\definefont  [BigFont]  [Bold at 20pt] [24pt]

\unprotect
\unexpanded\def\section_command#1#2{%
  \framed [
   width=\textwidth,
   frame=off,
   rulethickness=0pt,
   offset=0pt,
   loffset=-0pt,
   before=,
   location=top,
   align=flushleft,]{#2}%
}


\setuphead [section] [
style={\BigFont},
after=,
   before={\blank[1*line]},
  command=\section_command,
]
\protect

\defineframed[myframed][
   width=\textwidth,
   frame=off,
   rulethickness=0pt,
   offset=0pt,
   loffset=-0pt,
   before=,
   location=top,
   align=flushleft,]]

\starttext

\blank[force,3*line,depth]

\begingroup
\BigFont
\myframed{Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem ipsum 
dolor sit amet consectetur adipisicing elit}
\endgroup

asdfasdf

\page
\blank[force,3*line,depth]

\startsection [title=Lorem ipsum dolor sit amet consectetur adipisicing elit 
Lorem ipsum dolor sit amet consectetur adipisicing elit]
  asdf
\stopsection

\stoptext
=



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

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


Re: [NTG-context] Adjust Grid to last line textheight

2021-06-23 Thread denis.maier
I've tried adjusting interlinespacing, but it seems to make no difference :

==
\setupinterlinespace[
height=.72,
depth=.28,
top=2,
%top=0,
%top=5,
%top=1,
bottom=0,
%bottom=0.4,
%bottom=0,
%bottom=1,
%bottom=5,
line=2.8ex,
]

\setuplayout[grid=yes]
\showgrid
\starttext

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

\stoptext
==

Even extreme values for top and bottom (e.g. 0 or 10) seem to make no 
difference at all.
What am I missing? Is that even the right place to make that adjustment ?

Denis

Von: ntg-context  Im Auftrag von 
denis.ma...@unibe.ch
Gesendet: Mittwoch, 23. Juni 2021 11:47
An: ntg-context@ntg.nl
Betreff: [NTG-context] WG: Adjust Grid to last line textheight

Hi,

I have to use grid typesetting and the grid has to be aligned to the last line 
of textheight. I have to replicate a layout made with Indesign where there 
seems to be a bit of additional spacing before the first line, whereas in 
ConTeXt that happens to be after the last line of the page (see attachment).

Is that possible?

I have already found the various grid snapping methods, but they seem to change 
how content is placed on the grid, not the placement of the grid itself.

===
\setuplayout[grid=yes]
\showgrid
\starttext

\input knuth

\stoptext
===

Best,
Denis
___
If your question is of interest to others as well, please add an 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] WG: Adjust Grid to last line textheight

2021-06-23 Thread denis.maier
Hi,

I have to use grid typesetting and the grid has to be aligned to the last line 
of textheight. I have to replicate a layout made with Indesign where there 
seems to be a bit of additional spacing before the first line, whereas in 
ConTeXt that happens to be after the last line of the page (see attachment).

Is that possible?

I have already found the various grid snapping methods, but they seem to change 
how content is placed on the grid, not the placement of the grid itself.

===
\setuplayout[grid=yes]
\showgrid
\starttext

\input knuth

\stoptext
===

Best,
Denis
___
If your question is of interest to others as well, please add an 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] Grid typesetting, blockquotes in smaller font across pagebreaks

2021-03-25 Thread denis.maier
Hi,

I'm playing around with grid typesetting. Consider the following example:

--

\setuppapersize[A5][A5]
\setupbodyfont[10pt]

\setuplayout[grid=yes]
\showgrid

\setupdelimitedtext[blockquote]
   [
   style=\tfx,
   
%style=\tfx\setupinterlinespace, % this breaks grid snapping
   
spacebefore=halfline,
   indentnext=no,
   leftmargin=no,
   rightmargin=no,
   ]


\starttext

\dorecurse{5}{
\dorecurse{5}{Some text on a grid. }

\startblockquote

\dorecurse{10}{A quotation in a smaller font. }

\stopblockquote

\dorecurse{5}{This should be on the grid again. }}

\stoptext
--

With style=\tfx it kind of works as long as the quotations don't run over page 
boundaries. With style=\tfx\setupinterlinespace paragraphs after quotations 
don't snap back to the grid.
Spacebefore=line is somewhat better, but also only if I use \tfx without 
\setupinterlinespace.

Any hints?

(But maybe I'm approaching the problem from the wrong direction anyway... I 
need the have pages end consistently at the same baseline, and I thought grid 
typesetting might be an option here. But maybe that was a wrong assumption in 
the first place... Or there are better solutions.)

Best,
Denis



___
If your question is of interest to others as well, please add an 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] RE : RE : RE : RE : Issue with grid

2020-11-25 Thread Hans Hagen

On 11/25/2020 6:10 PM, Joseph wrote:

\setupindenting[yes, next, 1em]

\starttext

\input knuth

\stoptext
hm, maybe i did somethign wrong. i'll check it, but indeed for now you 
can just use the patch


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] RE : RE : RE : RE : Issue with grid

2020-11-25 Thread Joseph
Thanks for the fix in today upload. Unfortunately the issue with paragraph indentation seems to be back (first paragraph is indented but given ‘next’ is given, it should not, or at least was not before) \setupindenting[yes, next, 1em]\starttext\input knuth\stoptext Do we still need to add the correction code Hans given earlier to workaround this ?Best De : JosephEnvoyé le :lundi 23 novembre 2020 16:29À : Hans Hagen; mailing list for ConTeXt usersObjet :[NTG-context] RE : RE : RE : Issue with grid Could reproduce this problem with ‘default’ font and even seeing it cumulating in same page. BTW, Perhaps you already fixed it locally. \showgrid\setuplayout[grid=both] \starttext\dorecurse{8}{\blank[line]Fin des psalmes.\blank[line]\input knuth }\stoptext De : Hans HagenEnvoyé le :lundi 23 novembre 2020 13:19À : Joseph; mailing list for ConTeXt usersObjet :Re: RE : RE : [NTG-context] Issue with grid On 11/23/2020 11:13 AM, Joseph wrote:> Yes, I refer to text not being aligned on the grid. This only happens if > \blank is used it seems, and text sits above where it’s supposed to (ie > amount of space being skipped vertically is smaller, ie \blank[line] > skips less than 1 line). I attach pdf I get. Could reduce MWE a bit.> > \showgrid> > \setuplayout[grid=both]> > \definefontfamily[mainfont][serif][EBGaramond][features=default]> > \setupbodyfont[mainfont, 9pt]> > \starttext> > \blank[line]Fin des psalmes.> > \blank[line]Fin des psalmes.> > \dorecurse{8}{\input knuth> > }> > \stoptextIt looks ok here< I also checked the latest eb (less fonts now it seems). Hans  -   Hans Hagen | PRAGMA ADE   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands    tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl-  
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] RE : RE : RE : Issue with grid

2020-11-23 Thread Pablo Rodriguez
On 11/23/20 4:29 PM, Joseph wrote:
> Could reproduce this problem with ‘default’ font and even seeing it
> cumulating in same page. BTW, Perhaps you already fixed it locally.

Hi Joseph,

probably the approach has to be different.

Setting the whitespace to line fixes everything:

  \startsetups[*lessstrict]
  \widowpenalty=1000
  \clubpenalty=1000
  \brokenpenalty=1000
  \stopsetups

  \setuplayout[setups={*lessstrict}, grid=both]

  \showgrid

  \setupwhitespace[line]

  \starttext

  \dorecurse{8}
{\blank[line]Fin des psalmes.\par
 \blank[line]\input knuth\par}

  \stoptext

Just in case it helps,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] RE : RE : RE : Issue with grid

2020-11-23 Thread Joseph
Could reproduce this problem with ‘default’ font and even seeing it cumulating in same page. BTW, Perhaps you already fixed it locally. \showgrid\setuplayout[grid=both] \starttext\dorecurse{8}{\blank[line]Fin des psalmes.\blank[line]\input knuth }\stoptext De : Hans HagenEnvoyé le :lundi 23 novembre 2020 13:19À : Joseph; mailing list for ConTeXt usersObjet :Re: RE : RE : [NTG-context] Issue with grid On 11/23/2020 11:13 AM, Joseph wrote:> Yes, I refer to text not being aligned on the grid. This only happens if > \blank is used it seems, and text sits above where it’s supposed to (ie > amount of space being skipped vertically is smaller, ie \blank[line] > skips less than 1 line). I attach pdf I get. Could reduce MWE a bit.> > \showgrid> > \setuplayout[grid=both]> > \definefontfamily[mainfont][serif][EBGaramond][features=default]> > \setupbodyfont[mainfont, 9pt]> > \starttext> > \blank[line]Fin des psalmes.> > \blank[line]Fin des psalmes.> > \dorecurse{8}{\input knuth> > }> > \stoptextIt looks ok here< I also checked the latest eb (less fonts now it seems). Hans  -   Hans Hagen | PRAGMA ADE   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands    tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl- 
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] RE : RE : Issue with grid

2020-11-23 Thread Hans Hagen

On 11/23/2020 11:13 AM, Joseph wrote:
Yes, I refer to text not being aligned on the grid. This only happens if 
\blank is used it seems, and text sits above where it’s supposed to (ie 
amount of space being skipped vertically is smaller, ie \blank[line] 
skips less than 1 line). I attach pdf I get. Could reduce MWE a bit.


\showgrid

\setuplayout[grid=both]

\definefontfamily[mainfont][serif][EBGaramond][features=default]

\setupbodyfont[mainfont, 9pt]

\starttext

\blank[line]Fin des psalmes.

\blank[line]Fin des psalmes.

\dorecurse{8}{\input knuth

}

\stoptext

It looks ok here< I also checked the latest eb (less fonts now it seems).

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] RE : RE : Issue with grid

2020-11-23 Thread Joseph
Yes, I refer to text not being aligned on the grid. This only happens if \blank is used it seems, and text sits above where it’s supposed to (ie amount of space being skipped vertically is smaller, ie \blank[line] skips less than 1 line). I attach pdf I get. Could reduce MWE a bit. \showgrid\setuplayout[grid=both] \definefontfamily[mainfont][serif][EBGaramond][features=default]\setupbodyfont[mainfont, 9pt] \starttext \blank[line]Fin des psalmes. \blank[line]Fin des psalmes. \dorecurse{8}{\input knuth } \stoptext De : Hans HagenEnvoyé le :lundi 23 novembre 2020 10:54À : Joseph; mailing list for ConTeXt usersObjet :Re: RE : [NTG-context] Issue with grid On 11/23/2020 9:31 AM, Joseph wrote:> I don’t understand the answer I am afraid, I’ve never seen any issue > with grid alignment before (I don’t use columns either, and I changed > nothing at all).you talk about grid alignment i.e. text not sitting on the grid .. this is something that relates to font and line distance properties if on th eother hand you talk about when a pag ebreak occurs pablos answer points to the solution Hans  -   Hans Hagen | PRAGMA ADE   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands    tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl- 

TestGrid.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] RE : Issue with grid

2020-11-23 Thread Hans Hagen

On 11/23/2020 9:31 AM, Joseph wrote:
I don’t understand the answer I am afraid, I’ve never seen any issue 
with grid alignment before (I don’t use columns either, and I changed 
nothing at all).
you talk about grid alignment i.e. text not sitting on the grid ... this 
is something that relates to font and line distance properties


if on th eother hand you talk about when a pag ebreak occurs pablos 
answer points to the solution


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] RE : Issue with grid

2020-11-23 Thread Joseph
I don’t understand the answer I am afraid, I’ve never seen any issue with grid alignment before (I don’t use columns either, and I changed nothing at all). De : Hans HagenEnvoyé le :lundi 23 novembre 2020 00:05À : mailing list for ConTeXt users; JosephObjet :Re: [NTG-context] Issue with grid On 11/22/2020 5:03 PM, Joseph wrote:> Dear list,> > In some cases with latest LMTX I see text not aligned to grid. MWE > reproduces the problem (could not reproduce with default font).> > Typesetting MWE using online ConTeXt page shows correctly aligned text > on grid.> > \showgrid> > \setuplayout[grid=both]> > \definefontfeature[base][mode=node]> > \definefontfamily[mainfont][serif][EBGaramond][features=base]> > \setupbodyfont[mainfont, 9pt]> > \starttext> > \blank[line, samepage]Fin des psalmes.> > \blank[line, samepage]Fin des psalmes.> > \dorecurse{8}{\input knuth> > }> > \stoptext> > If number of itérations is changed from 8 to 7) problem does not appear, > seems to be linked to the fact page is fully filled with lines.> > If one of the \blank lines is commented out problem does not occur either. It might have to do with the fact that the height/depth ratio that is used doesn't match well with the ascenders/descenders of the font that you use. The defaults are: \setupinterlinespace   [height=.72,    depth=.28,    line=2.8\exheight] so you can play with these. The 72:28 ratio works ok for most fonts but sometimes need to be adapted. Sometimes the 2.8 is not enough. (makes me wonder: i can issue a warning when a font can overrun) (normally grid snapping should catch is but columns are kind of different) Hans  -   Hans Hagen | PRAGMA ADE   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands    tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl- 
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Issue with grid

2020-11-22 Thread Hans Hagen

On 11/22/2020 5:03 PM, Joseph wrote:


\definefontfeature[base][mode=node]

\definefontfamily[mainfont][serif][EBGaramond][features=base]
Really? No features enabled at all? EBGaramond is quite loaded with 
features. Just use 'default'.


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Issue with grid

2020-11-22 Thread Hans Hagen

On 11/22/2020 5:03 PM, Joseph wrote:

Dear list,

In some cases with latest LMTX I see text not aligned to grid. MWE 
reproduces the problem (could not reproduce with default font).


Typesetting MWE using online ConTeXt page shows correctly aligned text 
on grid.


\showgrid

\setuplayout[grid=both]

\definefontfeature[base][mode=node]

\definefontfamily[mainfont][serif][EBGaramond][features=base]

\setupbodyfont[mainfont, 9pt]

\starttext

\blank[line, samepage]Fin des psalmes.

\blank[line, samepage]Fin des psalmes.

\dorecurse{8}{\input knuth

}

\stoptext

If number of itérations is changed from 8 to 7) problem does not appear, 
seems to be linked to the fact page is fully filled with lines.


If one of the \blank lines is commented out problem does not occur either.


It might have to do with the fact that the height/depth ratio that is 
used doesn't match well with the ascenders/descenders of the font that 
you use. The defaults are:


\setupinterlinespace
  [height=.72,
   depth=.28,
   line=2.8\exheight]

so you can play with these. The 72:28 ratio works ok for most fonts but 
sometimes need to be adapted. Sometimes the 2.8 is not enough.


(makes me wonder: i can issue a warning when a font can overrun)

(normally grid snapping should catch is but columns are kind of different)

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] RE : Issue with grid

2020-11-22 Thread Joseph
Hi Pablo,Thanks for the heads up. Good to know issue is known already, of course I’ll wait for eventual fix.Best regardsJoseph De : Pablo RodriguezEnvoyé le :dimanche 22 novembre 2020 18:54À : ntg-context@ntg.nlObjet :Re: [NTG-context] Issue with grid On 11/22/20 5:03 PM, Joseph wrote:> Dear list,> > In some cases with latest LMTX I see text not aligned to grid. MWE> reproduces the problem (could not reproduce with default font). Hi Joseph, I think this is related to the fact that your paragraphs are hard tobreak between pages, since they only contain two lines. I think this paragraph break among pages is what triggers the issue youmention. > Typesetting MWE using online ConTeXt page shows correctly aligned text> on grid. https://live.contextgarden.net/ includes both LuaTeX 2.06 20200630 +ConTeXt MkIV 2020.06.30 17:30. > If number of itérations is changed from 8 to 7) problem does not appear,> seems to be linked to the fact page is fully filled with lines. Because the text fits in a single page. > If one of the \blank lines is commented out problem does not occur either. Because you avoid the problem of breaking the paragraph between pages. You can also avoid that using the following (but it will work only withyour MWE, I know):   \setuplayout[setups=*lessstrict]  \startsetups[*lessstrict]  \widowpenalty=1000  \clubpenalty=1000  \brokenpenalty=1000  \stopsetups   \setuplayout[setups={*lessstrict}]   \showgrid I think that the problem might be related to the (unsuccesful) avoidanceof orphans and widows in current latest. But of course, Hans or Wolfgang know better. Just in case it might help, Pablo--http://www.ousia.tk___If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-contextwebpage  : http://www.pragma-ade.nl / http://context.aanhet.netarchive  : 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] Issue with grid

2020-11-22 Thread Pablo Rodriguez
On 11/22/20 5:03 PM, Joseph wrote:
> Dear list,
>
> In some cases with latest LMTX I see text not aligned to grid. MWE
> reproduces the problem (could not reproduce with default font).

Hi Joseph,

I think this is related to the fact that your paragraphs are hard to
break between pages, since they only contain two lines.

I think this paragraph break among pages is what triggers the issue you
mention.

> Typesetting MWE using online ConTeXt page shows correctly aligned text
> on grid.

https://live.contextgarden.net/ includes both LuaTeX 2.06 20200630 +
ConTeXt MkIV 2020.06.30 17:30.

> If number of itérations is changed from 8 to 7) problem does not appear,
> seems to be linked to the fact page is fully filled with lines.

Because the text fits in a single page.

> If one of the \blank lines is commented out problem does not occur either.

Because you avoid the problem of breaking the paragraph between pages.

You can also avoid that using the following (but it will work only with
your MWE, I know):

  \setuplayout[setups=*lessstrict]
  \startsetups[*lessstrict]
  \widowpenalty=1000
  \clubpenalty=1000
  \brokenpenalty=1000
  \stopsetups

  \setuplayout[setups={*lessstrict}]

  \showgrid

I think that the problem might be related to the (unsuccesful) avoidance
of orphans and widows in current latest.

But of course, Hans or Wolfgang know better.

Just in case it might help,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Issue with grid

2020-11-22 Thread Joseph
Dear list, In some cases with latest LMTX I see text not aligned to grid. MWE reproduces the problem (could not reproduce with default font).Typesetting MWE using online ConTeXt page shows correctly aligned text on grid. \showgrid\setuplayout[grid=both] \definefontfeature[base][mode=node] \definefontfamily[mainfont][serif][EBGaramond][features=base]\setupbodyfont[mainfont, 9pt] \starttext \blank[line, samepage]Fin des psalmes. \blank[line, samepage]Fin des psalmes. \dorecurse{8}{\input knuth } \stoptext If number of itérations is changed from 8 to 7) problem does not appear, seems to be linked to the fact page is fully filled with lines.If one of the \blank lines is commented out problem does not occur either.  
___
If your question is of interest to others as well, please add an 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] grid+formulas: bug or expected behavior?

2019-07-26 Thread Luca Donetti
Thank you Wolfgang.
LD

On Fri, Jul 26, 2019 at 1:08 PM Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Luca Donetti schrieb am 31.05.2019 um 20:46:
> > Dear all,
> > I'm typesetting a document with grid layout and some formulas, like in
> > the minimal example below:
> >
> > %%%%
> > \setuplayout[grid=yes]
> \setupformulas[option=depth]
> > \showgrid
> >
> > \starttext
> > \input knuth
> > %\blank
> > \startformula
> > a = b + c
> > \stopformula
> > \input 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] grid+formulas: bug or expected behavior?

2019-07-26 Thread Wolfgang Schuster

Luca Donetti schrieb am 31.05.2019 um 20:46:

Dear all,
I'm typesetting a document with grid layout and some formulas, like in 
the minimal example below:



\setuplayout[grid=yes]

\setupformulas[option=depth]

\showgrid

\starttext
\input knuth
%\blank
\startformula
a = b + c
\stopformula
\input 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] grid+formulas: bug or expected behavior?

2019-07-26 Thread luigi scarso
Hi Luca,
the size of your  message was a bit over the 100KByte limit of the mailing
list, but I have made an exception and approved it .
But (everybody) please stay under 100KByte, space is a precious resource.

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

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


Re: [NTG-context] grid+formulas: bug or expected behavior?

2019-07-26 Thread Luca Donetti
> > I don't have any specific need for the alignment of the formula with
> > respect to the grid, but I expect the text below the formula to be on the
> > grid. However, I've not been able to achieve that with any of the layout
> > options described in the latest "details.pdf" manual: in all cases I've
> > tried the text below the formula doesn't "sit" on the grid.
>
> Looking through my unread ML mails, I saw nobody answered to you.
>
> Did you try enclosing your formulae in \startlinecorrection ...
> \stoplinecorrection ?
> AFAIK that should do the job.
>
> Greetlings, Hraban
>
>
Thank you Hraban,

Indeed what you suggest works. If I write:
  \startlinecorrection
  \startformula
a = b + c
  \stopformula
  \stoplinecorrection
the text below the formula is correctly aligned to the grid.

However, what puzzles me is that the version _without_ \startlinecorrection
... \stoplinecorrection works with an old version of context (from texlive
2017). Moreover, i guess this is not something due to my setup, because I
observe the same (or at least very similar) behavior in the chapter of the
details.pdf manual about grid and math. In the attached screenshot I show
the first page of such chapter in the version shipped with a recent beta
(on the left) and with texlive 2017 (on the right). While in the old
version the text after the formulas is aligned to the grid, in the new
version of the manual this is not the case: the text is not aligned.

Is this a known (documented?) change or an unnoticed regression?

Thank you in advance,
LD
___
If your question is of interest to others as well, please add an 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] grid+formulas: bug or expected behavior?

2019-07-24 Thread Henning Hraban Ramm

Zitat von Luca Donetti :


I don't have any specific need for the alignment of the formula with
respect to the grid, but I expect the text below the formula to be on the
grid. However, I've not been able to achieve that with any of the layout
options described in the latest "details.pdf" manual: in all cases I've
tried the text below the formula doesn't "sit" on the grid.


Looking through my unread ML mails, I saw nobody answered to you.

Did you try enclosing your formulae in \startlinecorrection ...  
\stoplinecorrection ?

AFAIK that should do the job.



Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___
If your question is of interest to others as well, please add an 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] grid+formulas: bug or expected behavior?

2019-05-31 Thread Luca Donetti
Dear all,
I'm typesetting a document with grid layout and some formulas, like in the
minimal example below:


\setuplayout[grid=yes]
\showgrid

\starttext
\input knuth
%\blank
\startformula
  a = b + c
\stopformula
\input knuth
\stoptext


I don't have any specific need for the alignment of the formula with
respect to the grid, but I expect the text below the formula to be on the
grid. However, I've not been able to achieve that with any of the layout
options described in the latest "details.pdf" manual: in all cases I've
tried the text below the formula doesn't "sit" on the grid.

While I do not understand this behavior, I've thought that it could be the
intended one, because this is what happens in chapter 4 of the "details"
manual. Then, I noticed that in older versions of the same manual (for
example the one included in texlive 2017) the behavior shown in chapter 4
is the one I expect: the text after formulas is aligned to the grid. So I'm
a bit puzzled: should the text after formulas be aligned to the grid or
not? Is this a (known?) bug or intended behavior?

If this is the expected behavior, I can live with that because by trial and
error I found a workaround. If I employ a \blank command before the formula
(as in the commented line in the above example), the text after the formula
is "correctly" aligned.

Thank you in advance.

LD
___
If your question is of interest to others as well, please add an 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] Question to floating figure and grid

2019-03-22 Thread Tomas Hala
Hi all,

the following code worked in TL2017 but in TL2018 the unwanted vertical
space appears before the 2nd knuth.tex. I do not know how to supress it.

I also do not know how to deal with the distance between the text and the
figure, I guessed that is controled by leftmargindistance but it makes
nothing. What am I doing wrong?

Best wishes,

Tomáš

%%%
\setuplayout[grid=yes] 
\starttext

\def\myfig#1#2#3#4{
\startplacefigure[location={right,none}]
  \setupfloat[roffset=0cc]  % leftmargindistance=2cm
  \startfloatcombination[1*1]
\setupfloatcaption[align=middle]
\placefigure[][#1]{#2}{\externalfigure[#3][#4]}
  \stopfloatcombination
\stopplacefigure}

\input knuth

\myfig{fig1}{This is FIG1}{any.jpg}{scale=250}
\input knuth

\input knuth

\stoptext

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

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


Re: [NTG-context] Problem with grid alignment and paragraph

2019-01-19 Thread Luca Donetti
On Mon, Jan 7, 2019 at 9:35 PM Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Luca Donetti schrieb am 07.01.19 um 21:21:
> > On Sun, Jan 6, 2019 at 2:53 PM Wolfgang Schuster
> >  > <mailto:wolfgang.schuster.li...@gmail.com>> wrote:
> >
> > Luca Donetti schrieb am 14.12.18 um 22:14:
> > > Dear list,
> > >
> > > I am facing a problem with grid alignment when using paragraphs. I
> > > think it could be a bug because the MWE below produces lines
> > which are
> > > correctly aligned to the grid with the context version included in
> > > texlive 2017, but it does not seem to work with the context in
> > texlive
> > > 2018 and the current beta (ConTeXt  ver: 2018.12.07 19:37 MKIV beta
> > > fmt: 2018.12.14).
> > > This is the MWE:
> > >
> > > \setuplayout[grid=yes]
> > > \defineparagraphs[twocols][n=2]
> > > \showgrid
> > >
> > > \starttext
> > > \starttwocols
> > > \input knuth
> > > \nexttwocols
> > >   \input knuth
> > > \stoptwocols
> > > \stoptext
> > >
> > > Am I doing anything wrong? If not, I'll appreciate any
> > suggestion or
> > > workaround.
> >
> >
> https://tex.stackexchange.com/questions/468711/context-defineparagraphs-aligned-to-grid/
> >
> > Wolfgang
> >
> > Dear Wolfgang,
> >
> > thank you for your help. Unfortunately, if I follow the suggestion in
> > your link (using [location=depth]), the alignment improves but it is
> > still not good: some lines are on grid while some others are not. If I
> > understand correctly your answer, inside the \framed there is a table
> > and, in this case, it seems to me that the spacing between lines is
> > not always equal to the grid spacing.
> >
> > Is there a way to force the interline spacing inside the \framed
> > block? I'm sorry if this is a simple question, but I'm quite new to
> > context.
>
> The interlinespace is correct but the paragraphs environment is too high,
> location=bottom puts the text on the baseline but it adds an extra blank
> line at the begin of the environment.
>
> A simple fix to get rid of the extra line is to set the width of the frame
> border to 0pt which doesn’t matter when the rules are disabled.
>
> \setuplayout[grid=yes]
>
> \defineparagraphs [twocols] [n=2]
>
> \setupparagraphs
>[twocols]
>[location=bottom,
> rulethickness=0pt]
>
> \showgrid
>
> \starttext
>
> \starttwocols
>\input knuth
>\nexttwocols
>\input knuth
> \stoptwocols
>
> \stoptext
>
> Wolfgang
>

 Dear Wolfgang,

thank you very much for your reply (and sorry for my late reply). Your
suggestion do solve my minimal example but, unfortunately, not my real
world example. I will try to find another minimal example which still shows
the problem. In the meantime I'll try to play with different options of
location=.

LD
___
If your question is of interest to others as well, please add an 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] Problem with grid alignment and paragraph

2019-01-07 Thread Wolfgang Schuster

Luca Donetti schrieb am 07.01.19 um 21:21:
On Sun, Jan 6, 2019 at 2:53 PM Wolfgang Schuster 
<mailto:wolfgang.schuster.li...@gmail.com>> wrote:


Luca Donetti schrieb am 14.12.18 um 22:14:
> Dear list,
>
> I am facing a problem with grid alignment when using paragraphs. I
> think it could be a bug because the MWE below produces lines
which are
> correctly aligned to the grid with the context version included in
> texlive 2017, but it does not seem to work with the context in
texlive
> 2018 and the current beta (ConTeXt  ver: 2018.12.07 19:37 MKIV beta
> fmt: 2018.12.14).
> This is the MWE:
>
> \setuplayout[grid=yes]
> \defineparagraphs[twocols][n=2]
> \showgrid
>
> \starttext
> \starttwocols
> \input knuth
> \nexttwocols
>   \input knuth
> \stoptwocols
> \stoptext
>
> Am I doing anything wrong? If not, I'll appreciate any
suggestion or
> workaround.


https://tex.stackexchange.com/questions/468711/context-defineparagraphs-aligned-to-grid/

Wolfgang

Dear Wolfgang,

thank you for your help. Unfortunately, if I follow the suggestion in 
your link (using [location=depth]), the alignment improves but it is 
still not good: some lines are on grid while some others are not. If I 
understand correctly your answer, inside the \framed there is a table 
and, in this case, it seems to me that the spacing between lines is 
not always equal to the grid spacing.


Is there a way to force the interline spacing inside the \framed 
block? I'm sorry if this is a simple question, but I'm quite new to 
context.


The interlinespace is correct but the paragraphs environment is too high,
location=bottom puts the text on the baseline but it adds an extra blank
line at the begin of the environment.

A simple fix to get rid of the extra line is to set the width of the frame
border to 0pt which doesn’t matter when the rules are disabled.

\setuplayout[grid=yes]

\defineparagraphs [twocols] [n=2]

\setupparagraphs
  [twocols]
  [location=bottom,
   rulethickness=0pt]

\showgrid

\starttext

\starttwocols
  \input knuth
  \nexttwocols
  \input knuth
\stoptwocols

\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] Problem with grid alignment and paragraph

2019-01-07 Thread Luca Donetti
On Sun, Jan 6, 2019 at 2:53 PM Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Luca Donetti schrieb am 14.12.18 um 22:14:
> > Dear list,
> >
> > I am facing a problem with grid alignment when using paragraphs. I
> > think it could be a bug because the MWE below produces lines which are
> > correctly aligned to the grid with the context version included in
> > texlive 2017, but it does not seem to work with the context in texlive
> > 2018 and the current beta (ConTeXt  ver: 2018.12.07 19:37 MKIV beta
> > fmt: 2018.12.14).
> > This is the MWE:
> >
> > \setuplayout[grid=yes]
> > \defineparagraphs[twocols][n=2]
> > \showgrid
> >
> > \starttext
> > \starttwocols
> > \input knuth
> > \nexttwocols
> >   \input knuth
> > \stoptwocols
> > \stoptext
> >
> > Am I doing anything wrong? If not, I'll appreciate any suggestion or
> > workaround.
>
>
> https://tex.stackexchange.com/questions/468711/context-defineparagraphs-aligned-to-grid/
>
> Wolfgang
>

Dear Wolfgang,

thank you for your help. Unfortunately, if I follow the suggestion in your
link (using [location=depth]), the alignment improves but it is still not
good: some lines are on grid while some others are not. If I understand
correctly your answer, inside the \framed there is a table and, in this
case, it seems to me that the spacing between lines is not always equal to
the grid spacing.

Is there a way to force the interline spacing inside the \framed block? I'm
sorry if this is a simple question, but I'm quite new to context.

This is the new example:

\setuplayout[grid=yes]
\defineparagraphs[twocols][n=2]
\setupparagraphs[twocols][location=depth]
\showgrid

\starttext
\starttwocols
  \input knuth
\nexttwocols
  \input knuth
\stoptwocols
\stoptext

Thank you,
Luca
___
If your question is of interest to others as well, please add an 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] Problem with grid alignment and paragraph

2019-01-06 Thread Wolfgang Schuster

Luca Donetti schrieb am 14.12.18 um 22:14:

Dear list,

I am facing a problem with grid alignment when using paragraphs. I 
think it could be a bug because the MWE below produces lines which are 
correctly aligned to the grid with the context version included in 
texlive 2017, but it does not seem to work with the context in texlive 
2018 and the current beta (ConTeXt  ver: 2018.12.07 19:37 MKIV beta  
fmt: 2018.12.14).

This is the MWE:

\setuplayout[grid=yes]
\defineparagraphs[twocols][n=2]
\showgrid

\starttext
\starttwocols
\input knuth
\nexttwocols
  \input knuth
\stoptwocols
\stoptext

Am I doing anything wrong? If not, I'll appreciate any suggestion or 
workaround.


https://tex.stackexchange.com/questions/468711/context-defineparagraphs-aligned-to-grid/

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] Problem with grid alignment and paragraph

2018-12-14 Thread Rik

On 12/14/2018 16:14, Luca Donetti wrote:

Dear list,

I am facing a problem with grid alignment when using paragraphs. I 
think it could be a bug because the MWE below produces lines which are 
correctly aligned to the grid with the context version included in 
texlive 2017, but it does not seem to work with the context in texlive 
2018 and the current beta (ConTeXt ver: 2018.12.07 19:37 MKIV beta  
fmt: 2018.12.14).

This is the MWE:

\setuplayout[grid=yes]
\defineparagraphs[twocols][n=2]
\showgrid

\starttext
\starttwocols
  \input knuth
\nexttwocols
  \input knuth
\stoptwocols
\stoptext

Am I doing anything wrong? If not, I'll appreciate any suggestion or 
workaround.


Thank you in advance for your help.

LD

___
If your question is of interest to others as well, please add an 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
___


The result is properly aligned here on W10x64 both with the (same) 
current beta and with TL18.


--
Rik

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

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

[NTG-context] Problem with grid alignment and paragraph

2018-12-14 Thread Luca Donetti
Dear list,

I am facing a problem with grid alignment when using paragraphs. I think it
could be a bug because the MWE below produces lines which are correctly
aligned to the grid with the context version included in texlive 2017, but
it does not seem to work with the context in texlive 2018 and the current
beta (ConTeXt  ver: 2018.12.07 19:37 MKIV beta  fmt: 2018.12.14).
This is the MWE:

\setuplayout[grid=yes]
\defineparagraphs[twocols][n=2]
\showgrid

\starttext
\starttwocols
  \input knuth
\nexttwocols
  \input knuth
\stoptwocols
\stoptext

Am I doing anything wrong? If not, I'll appreciate any suggestion or
workaround.

Thank you in advance for your help.

LD
___
If your question is of interest to others as well, please add an 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] mathalignment and grid

2017-07-03 Thread Hans Hagen

On 7/3/2017 8:37 AM, Henri Menke wrote:

Dear Hans,

In a previous email I complained that with mathalignment large formulas crash 
into the paragraph
below when using grid typesetting.  This has been fixed in the latest beta but 
now the space above
and below is asymmetric.  For this particular case I could fix it by setting 
the gird snapping mode
to "top" rather than "math", but this does not apply universally.  Any chance 
there is an easy fix?


you can experiment with other grid options to see what is the best 
average .. the problem is that in a symmetrical vcentered formula ht/dp 
is kind of unknown (we could add a grid key to formulas so that users 
can choose)



Cheers, Henri

---

\setuplayout[grid=both]
\showgrid

\startmode[fix]
\unprotect
\def\math_alignment_snap_start
   {\ifgridsnapping
  \snaptogrid[top]\vbox\bgroup
\fi}
\protect
\stopmode

\starttext
\input knuth
\startformula
   \startmathalignment
 \NC i\hbar\frac{\diff}{\diff t}\psi \NC= \left( - \frac{\hbar^2}{2 m} 
\nabla^2 + V(r) \right)
\psi \NR
 \NC F(x) \NC= \int f(x) \diff x \NR
   \stopmathalignment
\stopformula
\input ward
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] mathalignment and grid

2017-07-03 Thread Henri Menke
Dear Hans,

In a previous email I complained that with mathalignment large formulas crash 
into the paragraph
below when using grid typesetting.  This has been fixed in the latest beta but 
now the space above
and below is asymmetric.  For this particular case I could fix it by setting 
the gird snapping mode
to "top" rather than "math", but this does not apply universally.  Any chance 
there is an easy fix?

Cheers, Henri

---

\setuplayout[grid=both]
\showgrid

\startmode[fix]
\unprotect
\def\math_alignment_snap_start
  {\ifgridsnapping
 \snaptogrid[top]\vbox\bgroup
   \fi}
\protect
\stopmode

\starttext
\input knuth
\startformula
  \startmathalignment
\NC i\hbar\frac{\diff}{\diff t}\psi \NC= \left( - \frac{\hbar^2}{2 m} 
\nabla^2 + V(r) \right)
\psi \NR
\NC F(x) \NC= \int f(x) \diff x \NR
  \stopmathalignment
\stopformula
\input ward
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] mathmatrix and grid: followup

2017-06-01 Thread Henri Menke
I just realised that this is fixed in beta.  Thanks!

On Thu, 2017-06-01 at 19:33 +1200, Henri Menke wrote:
> This seems to be quite unimportant to anyone but me.  Bump!
> 
> On Sun, 2017-04-02 at 09:12 +1200, Henri Menke wrote:
> > 
> > I haven’t bumped this in a long time...
> > 
> > On 01/24/2017 11:57 PM, Henri Menke wrote:
> > > 
> > > 
> > > Bump
> > > 
> > > On 01/06/2017 10:33 AM, Henri Menke wrote:
> > > > 
> > > > 
> > > > Bump and (belated) Happy New Year!
> > > > 
> > > > On 12/10/2016 10:37 AM, Henri Menke wrote:
> > > > > 
> > > > > 
> > > > > Bump
> > > > > 
> > > > > On 11/27/2016 07:45 PM, Henri Menke wrote:
> > > > > > 
> > > > > > 
> > > > > > Bump
> > > > > > 
> > > > > > On 11/22/2016 02:18 PM, Henri Menke wrote:
> > > > > > > 
> > > > > > > 
> > > > > > > Dear list,
> > > > > > > 
> > > > > > > some time ago I asked about the interplay of mathmatix with grid 
> > > > > > > typesetting: https://
> > > > > > > ma
> > > > > > > ilman.ntg.nl/pipermail/ntg-context/2016/087018.html
> > > > > > > 
> > > > > > > I noticed that when the grid is enabled, the height of a 
> > > > > > > mathmatrix is rounded down
> > > > > > > which leaves less space above than below.  In my opinion either 
> > > > > > > the height should be
> > > > > > > rounded up or the depth rounded down here.  In the original 
> > > > > > > thread Wolfgang proposed
> > > > > > > using \setupformula[grid=tolerant] and adding a blank line before 
> > > > > > > the formula
> > > > > > > (otherwise
> > > > > > > grid=tolerant is applied to the paragraph before).  This 
> > > > > > > workaround leads to the depth
> > > > > > > being rounded down in the example below which produces a more 
> > > > > > > balanced output.  Could
> > > > > > > this somehow be made the default behaviour or something?  
> > > > > > > Currently it requires the
> > > > > > > user
> > > > > > > to notice that vertical spacing is off and correct it manually, 
> > > > > > > including adding a
> > > > > > > blank
> > > > > > > line before the formula to prevent grid=tolerant being applied to 
> > > > > > > the paragraph.
> > > > > > > 
> > > > > > > Cheers, Henri
> > > > > > > 
> > > > > > > ---
> > > > > > > 
> > > > > > > \setuplayout[grid=yes]
> > > > > > > \showgrid
> > > > > > > 
> > > > > > > \starttext
> > > > > > > 
> > > > > > > \input knuth
> > > > > > > \startformula
> > > > > > >   \vrule % make lineheight and depth visible
> > > > > > >   \startmathmatrix
> > > > > > > \NC A \NR
> > > > > > > \NC B \NR
> > > > > > > \NC C \NR
> > > > > > >   \stopmathmatrix
> > > > > > > \stopformula
> > > > > > > \input tufte
> > > > > > > 
> > > > > > > \stoptext
> > > > > > > 
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] mathmatrix and grid: followup

2017-06-01 Thread Henri Menke
This seems to be quite unimportant to anyone but me.  Bump!

On Sun, 2017-04-02 at 09:12 +1200, Henri Menke wrote:
> I haven’t bumped this in a long time...
> 
> On 01/24/2017 11:57 PM, Henri Menke wrote:
> > 
> > Bump
> > 
> > On 01/06/2017 10:33 AM, Henri Menke wrote:
> > > 
> > > Bump and (belated) Happy New Year!
> > > 
> > > On 12/10/2016 10:37 AM, Henri Menke wrote:
> > > > 
> > > > Bump
> > > > 
> > > > On 11/27/2016 07:45 PM, Henri Menke wrote:
> > > > > 
> > > > > Bump
> > > > > 
> > > > > On 11/22/2016 02:18 PM, Henri Menke wrote:
> > > > > > 
> > > > > > Dear list,
> > > > > > 
> > > > > > some time ago I asked about the interplay of mathmatix with grid 
> > > > > > typesetting: https://ma
> > > > > > ilman.ntg.nl/pipermail/ntg-context/2016/087018.html
> > > > > > 
> > > > > > I noticed that when the grid is enabled, the height of a mathmatrix 
> > > > > > is rounded down
> > > > > > which leaves less space above than below.  In my opinion either the 
> > > > > > height should be
> > > > > > rounded up or the depth rounded down here.  In the original thread 
> > > > > > Wolfgang proposed
> > > > > > using \setupformula[grid=tolerant] and adding a blank line before 
> > > > > > the formula (otherwise
> > > > > > grid=tolerant is applied to the paragraph before).  This workaround 
> > > > > > leads to the depth
> > > > > > being rounded down in the example below which produces a more 
> > > > > > balanced output.  Could
> > > > > > this somehow be made the default behaviour or something?  Currently 
> > > > > > it requires the user
> > > > > > to notice that vertical spacing is off and correct it manually, 
> > > > > > including adding a blank
> > > > > > line before the formula to prevent grid=tolerant being applied to 
> > > > > > the paragraph.
> > > > > > 
> > > > > > Cheers, Henri
> > > > > > 
> > > > > > ---
> > > > > > 
> > > > > > \setuplayout[grid=yes]
> > > > > > \showgrid
> > > > > > 
> > > > > > \starttext
> > > > > > 
> > > > > > \input knuth
> > > > > > \startformula
> > > > > >   \vrule % make lineheight and depth visible
> > > > > >   \startmathmatrix
> > > > > > \NC A \NR
> > > > > > \NC B \NR
> > > > > > \NC C \NR
> > > > > >   \stopmathmatrix
> > > > > > \stopformula
> > > > > > \input tufte
> > > > > > 
> > > > > > \stoptext
> > > > > > 
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] side caption top aligned on grid -- not implemented?

2017-04-08 Thread Florian Grammel

> There’s still one catch: When I change the caption key „location“ to „bottom“ 
> together with „inbetween={\blank[-\strutdepth]}“ the picture is aligned with 
> the black line (top of the first text line). 
> This would actually be the preferred solution also for „{left,high}“. Yet I 
> couldn’t find a possibility to shift the picture vertically by some 
> millimeters.
> Is there?

To whoever might be trying to get this to work, too:
\offset[y=2mm] *inside* \placeongrid will do this.

Best,
Florian.

___
If your question is of interest to others as well, please add an 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 caption top aligned on grid -- not implemented?

2017-04-08 Thread Florian Grammel
By trial-and-error I’ve come up with the following. It seems like a hack but 
both variants are close enough to my requirements that I would be able to work 
with one of them.

There’s still one catch: When I change the caption key „location“ to „bottom“ 
together with „inbetween={\blank[-\strutdepth]}“ the picture is aligned with 
the black line (top of the first text line). 
This would actually be the preferred solution also for „{left,high}“. Yet I 
couldn’t find a possibility to shift the picture vertically by some millimeters.
Is there?


Best regards,
Florian.




\useMPlibrary[dum]
\setuplayout [grid=yes]
\setupinterlinespace [line=20pt]


\setupcaption [figure] [
location={left,high}, 
%%  location={bottom}, %different 
alignment
number=no,
%   inbetween={\blank[-.01mm]}, 
%Variant 1: picture top-aligned, caption on grid

inbetween={\blank[-\strutdepth]}, %Variant 2: picture and caption top-aligned, 
caption not on grid
]


\starttext
\showgrid

\startplacefigure
[location=top,none,title={There is not so much basic instruction, as of 
now, as there was
in the old days, showing the differences between good and bad typographic 
design.},
]
  \placeongrid[max]{
  \externalfigure [dummy] [width=.6\textwidth]
  }
\stopplacefigure

\input zapf


\stoptext







> Den 6. apr. 2017 kl. 10.12 skrev Florian Grammel <florian.gram...@gmail.com>:
> 
> At http://tex.stackexchange.com/q/362215/6819 I asked: How can I place the 
> top line of the caption (location={left, high}) on the grid and have it align 
> with the figure at same height.
> 
> I hoped this to be solvable by some simple instructions that I just haven’t 
> been able to figure out. But Henri Menke suggested in a comment that the 
> mechanism might not be implemented.
> Is this really the case?
> And if so: is there any way to achieve the alignment anyway?
> 
> I’d greatly appreciate any help as this is an important requirement for my 
> present project!
> 
> Best regards,
> Florian.
> 



Florian Grammel

Copenhagen, Denmark

___
If your question is of interest to others as well, please add an 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] side caption top aligned on grid -- not implemented?

2017-04-06 Thread Florian Grammel
At http://tex.stackexchange.com/q/362215/6819 I asked: How can I place the top 
line of the caption (location={left, high}) on the grid and have it align with 
the figure at same height.

I hoped this to be solvable by some simple instructions that I just haven’t 
been able to figure out. But Henri Menke suggested in a comment that the 
mechanism might not be implemented.
Is this really the case?
And if so: is there any way to achieve the alignment anyway?

I’d greatly appreciate any help as this is an important requirement for my 
present project!

Best regards,
Florian.





Florian Grammel

Copenhagen, Denmark

___
If your question is of interest to others as well, please add an 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] mathmatrix and grid: followup

2017-04-01 Thread Henri Menke
I haven’t bumped this in a long time...

On 01/24/2017 11:57 PM, Henri Menke wrote:
> Bump
> 
> On 01/06/2017 10:33 AM, Henri Menke wrote:
>> Bump and (belated) Happy New Year!
>>
>> On 12/10/2016 10:37 AM, Henri Menke wrote:
>>> Bump
>>>
>>> On 11/27/2016 07:45 PM, Henri Menke wrote:
>>>> Bump
>>>>
>>>> On 11/22/2016 02:18 PM, Henri Menke wrote:
>>>>> Dear list,
>>>>>
>>>>> some time ago I asked about the interplay of mathmatix with grid 
>>>>> typesetting: https://mailman.ntg.nl/pipermail/ntg-context/2016/087018.html
>>>>>
>>>>> I noticed that when the grid is enabled, the height of a mathmatrix is 
>>>>> rounded down which leaves less space above than below.  In my opinion 
>>>>> either the height should be rounded up or the depth rounded down here.  
>>>>> In the original thread Wolfgang proposed using 
>>>>> \setupformula[grid=tolerant] and adding a blank line before the formula 
>>>>> (otherwise grid=tolerant is applied to the paragraph before).  This 
>>>>> workaround leads to the depth being rounded down in the example below 
>>>>> which produces a more balanced output.  Could this somehow be made the 
>>>>> default behaviour or something?  Currently it requires the user to notice 
>>>>> that vertical spacing is off and correct it manually, including adding a 
>>>>> blank line before the formula to prevent grid=tolerant being applied to 
>>>>> the paragraph.
>>>>>
>>>>> Cheers, Henri
>>>>>
>>>>> ---
>>>>>
>>>>> \setuplayout[grid=yes]
>>>>> \showgrid
>>>>>
>>>>> \starttext
>>>>>
>>>>> \input knuth
>>>>> \startformula
>>>>>   \vrule % make lineheight and depth visible
>>>>>   \startmathmatrix
>>>>> \NC A \NR
>>>>> \NC B \NR
>>>>> \NC C \NR
>>>>>   \stopmathmatrix
>>>>> \stopformula
>>>>> \input tufte
>>>>>
>>>>> \stoptext
>>>>>
>>>>
>>>
>>
> 

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

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

[NTG-context] controlling title head distances when grid is enabled

2017-02-23 Thread Csikos Bela
Dear context users:

I would like to typeset my documents to gridlines. If grid is enabled,
the distances between titles (section, subsection,subsubsection heads)
and text are too big. Here's an example:

\setuplayout[grid=yes]
\showgrid
\starttext
\section{Section One}
\input tufte
\subsection{Subsection One}
\input ward
\subsubsection{Subsubsection One}
\input tufte
\section{Section Two}
\subsection{Subsection Two}
\input davis
\subsection{Subsection Three}
\input dawkins
\stoptext

In the output there are 3 empty lines before and 2 after Subsection One.
It would be enough 2 and 1 lines, respectively. On page 2, between
Section Two and Subsection Two heads 4 empty lines are inserted,
which is to much (ugly). How can I control the empty space before
and after heads when grid is enabled? 

I tried this:
\setuphead[section][before=\vskip-2.8ex,after=\vskip-2.8ex]
but it removes all spaces not only 1 line.

I also tried 
\setuphead[section][before={\blank[2*line]},after={\blank[line]}]
but it doesn't have any effect.

Thank you in advance,

bcsikos

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

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

Re: [NTG-context] mathmatrix and grid: followup

2017-01-24 Thread Henri Menke
Bump

On 01/06/2017 10:33 AM, Henri Menke wrote:
> Bump and (belated) Happy New Year!
> 
> On 12/10/2016 10:37 AM, Henri Menke wrote:
>> Bump
>>
>> On 11/27/2016 07:45 PM, Henri Menke wrote:
>>> Bump
>>>
>>> On 11/22/2016 02:18 PM, Henri Menke wrote:
>>>> Dear list,
>>>>
>>>> some time ago I asked about the interplay of mathmatix with grid 
>>>> typesetting: https://mailman.ntg.nl/pipermail/ntg-context/2016/087018.html
>>>>
>>>> I noticed that when the grid is enabled, the height of a mathmatrix is 
>>>> rounded down which leaves less space above than below.  In my opinion 
>>>> either the height should be rounded up or the depth rounded down here.  In 
>>>> the original thread Wolfgang proposed using \setupformula[grid=tolerant] 
>>>> and adding a blank line before the formula (otherwise grid=tolerant is 
>>>> applied to the paragraph before).  This workaround leads to the depth 
>>>> being rounded down in the example below which produces a more balanced 
>>>> output.  Could this somehow be made the default behaviour or something?  
>>>> Currently it requires the user to notice that vertical spacing is off and 
>>>> correct it manually, including adding a blank line before the formula to 
>>>> prevent grid=tolerant being applied to the paragraph.
>>>>
>>>> Cheers, Henri
>>>>
>>>> ---
>>>>
>>>> \setuplayout[grid=yes]
>>>> \showgrid
>>>>
>>>> \starttext
>>>>
>>>> \input knuth
>>>> \startformula
>>>>   \vrule % make lineheight and depth visible
>>>>   \startmathmatrix
>>>> \NC A \NR
>>>> \NC B \NR
>>>> \NC C \NR
>>>>   \stopmathmatrix
>>>> \stopformula
>>>> \input tufte
>>>>
>>>> \stoptext
>>>>
>>>
>>
> 

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

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

Re: [NTG-context] mathmatrix and grid: followup

2017-01-06 Thread Henri Menke
Bump and (belated) Happy New Year!

On 12/10/2016 10:37 AM, Henri Menke wrote:
> Bump
> 
> On 11/27/2016 07:45 PM, Henri Menke wrote:
>> Bump
>>
>> On 11/22/2016 02:18 PM, Henri Menke wrote:
>>> Dear list,
>>>
>>> some time ago I asked about the interplay of mathmatix with grid 
>>> typesetting: https://mailman.ntg.nl/pipermail/ntg-context/2016/087018.html
>>>
>>> I noticed that when the grid is enabled, the height of a mathmatrix is 
>>> rounded down which leaves less space above than below.  In my opinion 
>>> either the height should be rounded up or the depth rounded down here.  In 
>>> the original thread Wolfgang proposed using \setupformula[grid=tolerant] 
>>> and adding a blank line before the formula (otherwise grid=tolerant is 
>>> applied to the paragraph before).  This workaround leads to the depth being 
>>> rounded down in the example below which produces a more balanced output.  
>>> Could this somehow be made the default behaviour or something?  Currently 
>>> it requires the user to notice that vertical spacing is off and correct it 
>>> manually, including adding a blank line before the formula to prevent 
>>> grid=tolerant being applied to the paragraph.
>>>
>>> Cheers, Henri
>>>
>>> ---
>>>
>>> \setuplayout[grid=yes]
>>> \showgrid
>>>
>>> \starttext
>>>
>>> \input knuth
>>> \startformula
>>>   \vrule % make lineheight and depth visible
>>>   \startmathmatrix
>>> \NC A \NR
>>> \NC B \NR
>>> \NC C \NR
>>>   \stopmathmatrix
>>> \stopformula
>>> \input tufte
>>>
>>> \stoptext
>>>
>>
> 

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

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

Re: [NTG-context] Back on grid after displayed math

2016-12-26 Thread Mikael P. Sundqvist
On Sun, Aug 21, 2016 at 10:15 PM, Mikael P. Sundqvist <mic...@gmail.com> wrote:
> Hi!
>
> Im curious how to get back to the grid after a displayed formula? I try
>
> \setuplayout[grid=yes]
> \showgrid
>
> \setupformulas[align=middle]
>
> \starttext
> \input knuth
>
> \startformula
> a^2+b^2=c^2
> \stopformula
>
> \input knuth
> \stoptext
>
> (where the \setupformulas[align=middle] was suggested in a comment at
> http://tex.stackexchange.com/questions/254815/grid-on-aligned-equations-in-context
> , but that makes no difference)
>
> but that does not work (result attached).
>
> Would it be easier if there were also an option saying how many lines
> the equation should take? Say,
>
> \startformula[lines=3]
> a^2+b^2=c^2
> \stopformula
>
> and then centering the formula (or having options for that) vertically
> over the three lines? Maybe that is a not a good idea for some
> reason...
>
> /Mikael

Dear list,

I hope it is OK that I answer an old thread. I have tried out grids
and columns, and settled for the mixed columns. I finally found out
that

\setupformulas[
grid=min,
]

seems to be the trick to get displayed formulas in good place when
there is a grid, and to get back on the grid correctly afterwards. I
just thought someone else might have use of this. I attach an example.
I am aware of that some formulas won't show up perfectly fine, but
then one could just define a specific formula environment for those.

Cheers, Mikael


ctx-listmath.pdf
Description: Adobe PDF document


ctx-listmath.tex
Description: TeX document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] mathmatrix and grid: followup

2016-12-10 Thread Henri Menke
Bump

On 11/27/2016 07:45 PM, Henri Menke wrote:
> Bump
> 
> On 11/22/2016 02:18 PM, Henri Menke wrote:
>> Dear list,
>>
>> some time ago I asked about the interplay of mathmatix with grid 
>> typesetting: https://mailman.ntg.nl/pipermail/ntg-context/2016/087018.html
>>
>> I noticed that when the grid is enabled, the height of a mathmatrix is 
>> rounded down which leaves less space above than below.  In my opinion either 
>> the height should be rounded up or the depth rounded down here.  In the 
>> original thread Wolfgang proposed using \setupformula[grid=tolerant] and 
>> adding a blank line before the formula (otherwise grid=tolerant is applied 
>> to the paragraph before).  This workaround leads to the depth being rounded 
>> down in the example below which produces a more balanced output.  Could this 
>> somehow be made the default behaviour or something?  Currently it requires 
>> the user to notice that vertical spacing is off and correct it manually, 
>> including adding a blank line before the formula to prevent grid=tolerant 
>> being applied to the paragraph.
>>
>> Cheers, Henri
>>
>> ---
>>
>> \setuplayout[grid=yes]
>> \showgrid
>>
>> \starttext
>>
>> \input knuth
>> \startformula
>>   \vrule % make lineheight and depth visible
>>   \startmathmatrix
>> \NC A \NR
>> \NC B \NR
>> \NC C \NR
>>   \stopmathmatrix
>> \stopformula
>> \input tufte
>>
>> \stoptext
>>
> 

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

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

Re: [NTG-context] grid snapping problem

2016-12-07 Thread Csikos Bela
Henri Menke írta:
>The following should do the trick.

Thank you very much. Your code indeed fixes the snap to grid problem but it also
pushes the second subsection after the float and leaves a big empty space in the
lower part of the first page, which is not desirable. The text should fill the 
whole first
page. Is it possible?

>However, you have to keep \setnostrut and \setstrut around the figure because 
>the
>before and after keys for captions are not (yet) implemented.

It's fine, not a problem.

I guess I can use simply \subsection command instead of \startsubsection and
\stopsubsection comands, because I find the command pairs counterproductive
in case of long text parts (part, section, subsection etc.).

Thank you again,

bcsikos



>\setuplayout[grid=yes]
>\showgrid
>
>\starttexdefinition caption:text #1
>  \setuplocalinterlinespace[line=2.2ex] #1
>\stoptexdefinition
>
>\setupcaptions
>  [
>width=fit,
>align=last,
>headstyle={\ss\bfx},
>style={\ss\tfx},
>before={\setnostrut},
>textcommand=\getvalue{caption:text},
>  ]
>
>\starttext
>
>\startsubsection[title={Subsection title}]
>  \input dawkins
>  \input dawkins
>
>  \setnostrut
>  \startplacefigure
>[title={\input zapf }]
>\framed[width=0.6\textwidth,height=10ex]{figure}
>  \stopplacefigure
>  \setstrut
>
>\stopsubsection
>
>\startsubsection[title={Subsection title}]
>  \input dawkins
>\stopsubsection
>
>\startsubsection[title={Subsection title}]
>  \input dawkins
>  \input dawkins
>\stopsubsection
>
>\stoptext
>
>On 12/06/2016 07:06 PM, Csikos Bela wrote:
>>> I would like to use grid snapping in my document: main text lines
>>> should be aligned to grid lines but figure caption text should not.
>>>
>>> I have this code:
>>>
>>> \setuplayout[grid=yes]
>>> \showgrid
>>>
>>> \setupcaptions[width=fit,align=last,headstyle={\ss\bfx},style={\ss\tfx}]
>>>
>>> \starttext
>>> \subsection{Subsection title}
>>> \input dawkins
>>> \input dawkins
>>>
>>> %startlinecorrection
>>> \startbaselinecorrection  \setuplocalinterlinespace[line=2.2ex]
>>> \placefigure[][]{\input zapf 
>>> }{\framed[width=0.6\textwidth,height=10ex]{figure}}
>>> \stopbaselinecorrection
>>> %stoplinecorrection
>>>
>>> \subsection{Subsection title}
>>> \input dawkins
>>> \subsection{Subsection title}
>>> \input dawkins
>>> \input dawkins
>>> \stoptext
>>>
>>> You can see that the caption is typeset as I wanted: smaller line height
>>> and it is not aligned to grid lines. But the main text after the figure is 
>>> not
>>> aligned to the grid on the same page. How can I correct this?
>>> On the next page the main text is snapped to the grid again.
>> 
>> Since I haven't got any answer to my question I think the code above contains
>> some obvious error, but I don't know what. What do I do wrong? Or is it just
>> not possible to achieve what I want? 
>> 
>> Thank you,
>> 
>> bcsikos

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

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

Re: [NTG-context] grid snapping problem

2016-12-06 Thread Henri Menke
The following should do the trick.  However, you have to keep \setnostrut and 
\setstrut around the figure because the before and after keys for captions are 
not (yet) implemented.

\setuplayout[grid=yes]
\showgrid

\starttexdefinition caption:text #1
  \setuplocalinterlinespace[line=2.2ex] #1
\stoptexdefinition

\setupcaptions
  [
width=fit,
align=last,
headstyle={\ss\bfx},
style={\ss\tfx},
before={\setnostrut},
textcommand=\getvalue{caption:text},
  ]

\starttext

\startsubsection[title={Subsection title}]
  \input dawkins
  \input dawkins

  \setnostrut
  \startplacefigure
[title={\input zapf }]
\framed[width=0.6\textwidth,height=10ex]{figure}
  \stopplacefigure
  \setstrut

\stopsubsection

\startsubsection[title={Subsection title}]
  \input dawkins
\stopsubsection

\startsubsection[title={Subsection title}]
  \input dawkins
  \input dawkins
\stopsubsection

\stoptext

On 12/06/2016 07:06 PM, Csikos Bela wrote:
>> I would like to use grid snapping in my document: main text lines
>> should be aligned to grid lines but figure caption text should not.
>>
>> I have this code:
>>
>> \setuplayout[grid=yes]
>> \showgrid
>>
>> \setupcaptions[width=fit,align=last,headstyle={\ss\bfx},style={\ss\tfx}]
>>
>> \starttext
>> \subsection{Subsection title}
>> \input dawkins
>> \input dawkins
>>
>> %startlinecorrection
>> \startbaselinecorrection  \setuplocalinterlinespace[line=2.2ex]
>> \placefigure[][]{\input zapf 
>> }{\framed[width=0.6\textwidth,height=10ex]{figure}}
>> \stopbaselinecorrection
>> %stoplinecorrection
>>
>> \subsection{Subsection title}
>> \input dawkins
>> \subsection{Subsection title}
>> \input dawkins
>> \input dawkins
>> \stoptext
>>
>> You can see that the caption is typeset as I wanted: smaller line height
>> and it is not aligned to grid lines. But the main text after the figure is 
>> not
>> aligned to the grid on the same page. How can I correct this?
>> On the next page the main text is snapped to the grid again.
> 
> Since I haven't got any answer to my question I think the code above contains
> some obvious error, but I don't know what. What do I do wrong? Or is it just
> not possible to achieve what I want? 
> 
> Thank you,
> 
> bcsikos
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://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] grid snapping problem

2016-12-06 Thread Csikos Bela
>I would like to use grid snapping in my document: main text lines
>should be aligned to grid lines but figure caption text should not.
>
>I have this code:
>
>\setuplayout[grid=yes]
>\showgrid
>
>\setupcaptions[width=fit,align=last,headstyle={\ss\bfx},style={\ss\tfx}]
>
>\starttext
>\subsection{Subsection title}
>\input dawkins
>\input dawkins
>
>%startlinecorrection
>\startbaselinecorrection  \setuplocalinterlinespace[line=2.2ex]
>\placefigure[][]{\input zapf 
>}{\framed[width=0.6\textwidth,height=10ex]{figure}}
>\stopbaselinecorrection
>%stoplinecorrection
>
>\subsection{Subsection title}
>\input dawkins
>\subsection{Subsection title}
>\input dawkins
>\input dawkins
>\stoptext
>
>You can see that the caption is typeset as I wanted: smaller line height
>and it is not aligned to grid lines. But the main text after the figure is not
>aligned to the grid on the same page. How can I correct this?
>On the next page the main text is snapped to the grid again.

Since I haven't got any answer to my question I think the code above contains
some obvious error, but I don't know what. What do I do wrong? Or is it just
not possible to achieve what I want? 

Thank you,

bcsikos

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

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

[NTG-context] grid snapping problem

2016-12-02 Thread Csikos Bela
Dear context users:

I would like to use grid snapping in my document: main text lines
should be aligned to grid lines but figure caption text should not.

I have this code:

\setuplayout[grid=yes]
\showgrid

\setupcaptions[width=fit,align=last,headstyle={\ss\bfx},style={\ss\tfx}]

\starttext
\subsection{Subsection title}
\input dawkins
\input dawkins

%startlinecorrection
\startbaselinecorrection  \setuplocalinterlinespace[line=2.2ex]
\placefigure[][]{\input zapf }{\framed[width=0.6\textwidth,height=10ex]{figure}}
\stopbaselinecorrection
%stoplinecorrection

\subsection{Subsection title}
\input dawkins
\subsection{Subsection title}
\input dawkins
\input dawkins
\stoptext

You can see that the caption is typeset as I wanted: smaller line height
and it is not aligned to grid lines. But the main text after the figure is not
aligned to the grid on the same page. How can I correct this?
On the next page the main text is snapped to the grid again.

Thank you in advance,

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

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

Re: [NTG-context] mathmatrix and grid: followup

2016-11-27 Thread Henri Menke
Bump

On 11/22/2016 02:18 PM, Henri Menke wrote:
> Dear list,
> 
> some time ago I asked about the interplay of mathmatix with grid typesetting: 
> https://mailman.ntg.nl/pipermail/ntg-context/2016/087018.html
> 
> I noticed that when the grid is enabled, the height of a mathmatrix is 
> rounded down which leaves less space above than below.  In my opinion either 
> the height should be rounded up or the depth rounded down here.  In the 
> original thread Wolfgang proposed using \setupformula[grid=tolerant] and 
> adding a blank line before the formula (otherwise grid=tolerant is applied to 
> the paragraph before).  This workaround leads to the depth being rounded down 
> in the example below which produces a more balanced output.  Could this 
> somehow be made the default behaviour or something?  Currently it requires 
> the user to notice that vertical spacing is off and correct it manually, 
> including adding a blank line before the formula to prevent grid=tolerant 
> being applied to the paragraph.
> 
> Cheers, Henri
> 
> ---
> 
> \setuplayout[grid=yes]
> \showgrid
> 
> \starttext
> 
> \input knuth
> \startformula
>   \vrule % make lineheight and depth visible
>   \startmathmatrix
> \NC A \NR
> \NC B \NR
> \NC C \NR
>   \stopmathmatrix
> \stopformula
> \input tufte
> 
> \stoptext
> 

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

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

[NTG-context] mathmatrix and grid: followup

2016-11-22 Thread Henri Menke
Dear list,

some time ago I asked about the interplay of mathmatix with grid typesetting: 
https://mailman.ntg.nl/pipermail/ntg-context/2016/087018.html

I noticed that when the grid is enabled, the height of a mathmatrix is rounded 
down which leaves less space above than below.  In my opinion either the height 
should be rounded up or the depth rounded down here.  In the original thread 
Wolfgang proposed using \setupformula[grid=tolerant] and adding a blank line 
before the formula (otherwise grid=tolerant is applied to the paragraph 
before).  This workaround leads to the depth being rounded down in the example 
below which produces a more balanced output.  Could this somehow be made the 
default behaviour or something?  Currently it requires the user to notice that 
vertical spacing is off and correct it manually, including adding a blank line 
before the formula to prevent grid=tolerant being applied to the paragraph.

Cheers, Henri

---

\setuplayout[grid=yes]
\showgrid

\starttext

\input knuth
\startformula
  \vrule % make lineheight and depth visible
  \startmathmatrix
\NC A \NR
\NC B \NR
\NC C \NR
  \stopmathmatrix
\stopformula
\input tufte

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

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

[NTG-context] grid, interlinespace

2016-11-02 Thread Michael Eidenbenz
Hello

I want my text on a grid and there should be no gap between the top and the 
capital letters of the first line.
I managed to get this by changing the height parameter of \setupinterlinespace
with a factor I calculated for the font with this formula:

CapHeight/exheight / line = height

CapHeight and exheight are font specific numbers that I got from 
https://tug.org/TUGboat/tb34-2/tb107sharpe.pdf
for  lmroman this gives me: 683 / 431 / 2.8 = .566 for height in interlinespace

Although there is no gap to the top lines are jumping.
making the factor bigger helps. 
but smaller fonts wont snap to the grid.

What is happening here? 
And is this method of changing the height the right one?

Thanks Michael


--

\showgrid
\setuplayout [grid=yes]
\starttext
\setupinterlinespace
  [
height=.566,
line=2.8ex, 
 ]

\setupbodyfont [10pt]
MM on grid but jumping\par
\dorecurse{3}{\input tufte \par}
\page

\setupinterlinespace
  [
height=.575, 
line=2.8ex, 
 ]

\setupbodyfont [10pt]
MM on grid\par
\dorecurse{6}{\input tufte \par}
\page

\setupbodyfont [18pt]
MM on grid\par
\dorecurse{2}{\input tufte \par}
\page

\setupbodyfont [7pt]
MM on grid\par
\dorecurse{10}{\input tufte\par}
\page

\setupbodyfont [6pt]
MM NOT on grid\par
\dorecurse{10}{\input tufte \par}
\page

\setupinterlinespace
  [
height=.615, 
line=2.8ex, 
 ]
\setupbodyfont [6pt]
MM on grid but gap to top\par
\dorecurse{10}{\input tufte \par}
\page

\setupbodyfont [18pt]
MM on grid but gap to top\par
\dorecurse{2}{\input tufte \par}
\page

\stoptext

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

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

Re: [NTG-context] mathmatrix and grid

2016-10-10 Thread Henri Menke
On 10/10/2016 12:30 PM, Wolfgang Schuster wrote:
>> Henri Menke <mailto:henrime...@gmail.com>
>> 10. Oktober 2016 um 11:44
>> On 10/10/2016 11:24 AM, Wolfgang Schuster wrote:
>>>> Henri Menke <mailto:henrime...@gmail.com>
>>>> 30. September 2016 um 23:01
>>>> Dear list,
>>>>
>>>> I noticed that when using grid=both then the height of a mathmatrix is 
>>>> rounded down for no apparent reason whereas the depth is rounded up 
>>>> correctly. Visually it appears to me that the height should be rounded up 
>>>> here. In the MWE I added a \vrule to show that the determined height of 
>>>> the line definitely does not coincide with what one would expect.
>>>>
>>>> How can I fix that? MWE is below.
>>>>
>>>> Cheers, Henri
>>>>
>>>> ---
>>>>
>>>> \setuplayout[grid=both]
>>>> \showgrid
>>>>
>>>> \starttext
>>>>
>>>> \input knuth
>>>> \startformula
>>>> \vrule % make lineheight and depth visible
>>>> \startmathmatrix
>>>> \NC A \NR
>>>> \NC B \NR
>>>> \NC C \NR
>>>> \stopmathmatrix
>>>> \stopformula
>>>> \input tufte
>>>>
>>>> \stoptext
>>> The default spacing modell (3) before and after formulas breaks grid 
>>> alignment
>>> because when you use another alternative (1 or 2) the alignment is correct.
>>
>> Dear Wolfgang,
>>
>> I appreciate your efforts but this does not change anything in my original 
>> example.  For reference, I include my updated example
>>
> You can add a grid setting for the formula itself, e.g.
> 
> \setupformula[grid=tolerant]
> 
> but you should add a blank line before \startformula, otherwise the setting 
> for formula is applied to the last paragraph before it.

Dear Wolfgang,

thanks again, this solution works nicely for me.  However, it only represents a 
workaround.  Do you think it is possible to patch it somehow in the core?  
Perhaps the definition of the mathmatrix has to be adjusted somehow (in 
context/base/mkiv/math-ali.mkiv).

Cheers, Henri

> 
> Wolfgang
> 
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___
> 

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

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

Re: [NTG-context] mathmatrix and grid

2016-10-10 Thread Wolfgang Schuster

Henri Menke <mailto:henrime...@gmail.com>
10. Oktober 2016 um 11:44
On 10/10/2016 11:24 AM, Wolfgang Schuster wrote:

Henri Menke<mailto:henrime...@gmail.com>
30. September 2016 um 23:01
Dear list,

I noticed that when using grid=both then the height of a mathmatrix is rounded 
down for no apparent reason whereas the depth is rounded up correctly. Visually 
it appears to me that the height should be rounded up here. In the MWE I added 
a \vrule to show that the determined height of the line definitely does not 
coincide with what one would expect.

How can I fix that? MWE is below.

Cheers, Henri

---

\setuplayout[grid=both]
\showgrid

\starttext

\input knuth
\startformula
\vrule % make lineheight and depth visible
\startmathmatrix
\NC A \NR
\NC B \NR
\NC C \NR
\stopmathmatrix
\stopformula
\input tufte

\stoptext

The default spacing modell (3) before and after formulas breaks grid alignment
because when you use another alternative (1 or 2) the alignment is correct.


Dear Wolfgang,

I appreciate your efforts but this does not change anything in my original 
example.  For reference, I include my updated example


You can add a grid setting for the formula itself, e.g.

\setupformula[grid=tolerant]

but you should add a blank line before \startformula, otherwise the 
setting for formula is applied to the last paragraph before it.


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

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

Re: [NTG-context] mathmatrix and grid

2016-10-10 Thread Henri Menke
On 10/10/2016 11:24 AM, Wolfgang Schuster wrote:
>> Henri Menke <mailto:henrime...@gmail.com>
>> 30. September 2016 um 23:01
>> Dear list,
>>
>> I noticed that when using grid=both then the height of a mathmatrix is 
>> rounded down for no apparent reason whereas the depth is rounded up 
>> correctly. Visually it appears to me that the height should be rounded up 
>> here. In the MWE I added a \vrule to show that the determined height of the 
>> line definitely does not coincide with what one would expect.
>>
>> How can I fix that? MWE is below.
>>
>> Cheers, Henri
>>
>> ---
>>
>> \setuplayout[grid=both]
>> \showgrid
>>
>> \starttext
>>
>> \input knuth
>> \startformula
>> \vrule % make lineheight and depth visible
>> \startmathmatrix
>> \NC A \NR
>> \NC B \NR
>> \NC C \NR
>> \stopmathmatrix
>> \stopformula
>> \input tufte
>>
>> \stoptext
> The default spacing modell (3) before and after formulas breaks grid alignment
> because when you use another alternative (1 or 2) the alignment is correct.

Dear Wolfgang,

I appreciate your efforts but this does not change anything in my original 
example.  For reference, I include my updated example

%\setconstantvalue{c_strc_formulas_space_model}{1}
\setconstantvalue{c_strc_formulas_space_model}{2}
%\setconstantvalue{c_strc_formulas_space_model}{3}% default value

\setuplayout[grid=both]

\showgrid

\starttext

\input knuth
\startformula
\vrule % make lineheight and depth visible
\startmathmatrix
\NC A \NR
\NC B \NR
\NC C \NR
\stopmathmatrix
\stopformula
\input tufte

\stoptext

Cheers, Henri

> 
> 
> %\setconstantvalue{c_strc_formulas_space_model}{1}
> \setconstantvalue{c_strc_formulas_space_model}{2}
> %\setconstantvalue{c_strc_formulas_space_model}{3}% default value
> 
> \setuplayout[grid=yes]
> 
> \showgrid
> 
> \starttext
> 
> \input knuth
> \startformula
> x
> \stopformula
> \input 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://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___
> 

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

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

Re: [NTG-context] mathmatrix and grid

2016-10-10 Thread Wolfgang Schuster

Henri Menke <mailto:henrime...@gmail.com>
30. September 2016 um 23:01
Dear list,

I noticed that when using grid=both then the height of a mathmatrix is 
rounded down for no apparent reason whereas the depth is rounded up 
correctly. Visually it appears to me that the height should be rounded 
up here. In the MWE I added a \vrule to show that the determined 
height of the line definitely does not coincide with what one would 
expect.


How can I fix that? MWE is below.

Cheers, Henri

---

\setuplayout[grid=both]
\showgrid

\starttext

\input knuth
\startformula
\vrule % make lineheight and depth visible
\startmathmatrix
\NC A \NR
\NC B \NR
\NC C \NR
\stopmathmatrix
\stopformula
\input tufte

\stoptext
The default spacing modell (3) before and after formulas breaks grid 
alignment

because when you use another alternative (1 or 2) the alignment is correct.


%\setconstantvalue{c_strc_formulas_space_model}{1}
\setconstantvalue{c_strc_formulas_space_model}{2}
%\setconstantvalue{c_strc_formulas_space_model}{3}% default value

\setuplayout[grid=yes]

\showgrid

\starttext

\input knuth
\startformula
x
\stopformula
\input 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] mathmatrix and grid

2016-10-08 Thread Henri Menke
Bump

On 09/30/2016 11:01 PM, Henri Menke wrote:
> Dear list,
> 
> I noticed that when using grid=both then the height of a mathmatrix is 
> rounded down for no apparent reason whereas the depth is rounded up 
> correctly.  Visually it appears to me that the height should be rounded up 
> here.  In the MWE I added a \vrule to show that the determined height of the 
> line definitely does not coincide with what one would expect.
> 
> How can I fix that?  MWE is below.
> 
> Cheers, Henri
> 
> ---
> 
> \setuplayout[grid=both]
> \showgrid
> 
> \starttext
> 
> \input knuth
> \startformula
>   \vrule % make lineheight and depth visible
>   \startmathmatrix
> \NC A \NR
> \NC B \NR
> \NC C \NR
>   \stopmathmatrix
> \stopformula
> \input tufte
> 
> \stoptext
> 

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

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

[NTG-context] mathmatrix and grid

2016-09-30 Thread Henri Menke
Dear list,

I noticed that when using grid=both then the height of a mathmatrix is rounded 
down for no apparent reason whereas the depth is rounded up correctly.  
Visually it appears to me that the height should be rounded up here.  In the 
MWE I added a \vrule to show that the determined height of the line definitely 
does not coincide with what one would expect.

How can I fix that?  MWE is below.

Cheers, Henri

---

\setuplayout[grid=both]
\showgrid

\starttext

\input knuth
\startformula
  \vrule % make lineheight and depth visible
  \startmathmatrix
\NC A \NR
\NC B \NR
\NC C \NR
  \stopmathmatrix
\stopformula
\input tufte

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

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

Re: [NTG-context] Help with grid typesetting

2016-09-26 Thread Marcus Vinicius Mesquita
Thank you very much.

Regards​

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

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

Re: [NTG-context] Help with grid typesetting

2016-09-26 Thread Wolfgang Schuster

Marcus Vinicius Mesquita <mailto:marcusvinicius.mesqu...@gmail.com>
26. September 2016 um 00:07
Dear list,

In the MWE below, the line with 
\setuphead[chapter][before={\blank[3*line,force]}] disrupts the grid 
typesetting in the first page. What am I missing?



\setuplayout[grid=yes]
\showgrid
\setuphead[chapter][before={\blank[3*line,force]}]

\setuphead[chapter][before={\blank[force,3*line,depth]}]

Wolfgang

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

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

Re: [NTG-context] Help with grid typesetting

2016-09-26 Thread Henri Menke
On 09/26/2016 12:07 AM, Marcus Vinicius Mesquita wrote:
> Dear list,
> 
> In the MWE below, the line with 
> \setuphead[chapter][before={\blank[3*line,force]}] disrupts the grid 
> typesetting in the first page. What am I missing?
> 
> 
> \setuplayout[grid=yes]
> \showgrid
> \setuphead[chapter][before={\blank[3*line,force]}]

\setuphead[chapter][before={\strut\blank[3*line,force]}]

> 
> \starttext
> 
> \startchapter[title={Chapter}]
> \dorecurse{7}{\input tufte}
> \stopchapter
> 
> \stoptext
> 
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___
> 

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

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

[NTG-context] Help with grid typesetting

2016-09-25 Thread Marcus Vinicius Mesquita
Dear list,

In the MWE below, the line with
\setuphead[chapter][before={\blank[3*line,force]}] disrupts the grid
typesetting in the first page. What am I missing?


\setuplayout[grid=yes]
\showgrid
\setuphead[chapter][before={\blank[3*line,force]}]

\starttext

\startchapter[title={Chapter}]
\dorecurse{7}{\input tufte}
\stopchapter

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

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

Re: [NTG-context] \vfill shifts content off grid

2016-09-04 Thread Wolfgang Schuster

Henri Menke <mailto:henrime...@gmail.com>
31. August 2016 um 19:45
Dear list,

when I use a body font size other than the standard, issuing \vfill 
will move the content off the grid. MWE is below. How do I fix this?


Cheers, Henri

---

\setupbodyfont[9pt]
\setuplayout[grid=yes]
\showgrid
\starttext
Hello

\vfill

World
\stoptext


You can calculate the number of lines which have to be inserted to move 
the text
to the bottom of the text. The first step for this is to put the text 
which should be
moved into a \vbox which allows paragraphs and not only short texts. 
Afterwards
you can determine how much space is left on the page and with the 
\getnoflines

command you get the number of lines for the free space.

 begin example
\define\MoveToBottom
  {\par
   \dowithnextbox
 
{\scratchdimen\dimexpr\pagegoal-\pagetotal-\nextboxht-\lineheight\relax

  \getnoflines\scratchdimen
  \emptylines[\number\noflines]%
  \flushnextbox}
 \vbox}

\setuplayout[grid=yes]

\showgrid

\starttext

Hello

\MoveToBottom{World}

\page

\input knuth

\MoveToBottom{\input ward }

\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] \vfill shifts content off grid

2016-09-01 Thread Hans Hagen

On 9/1/2016 2:18 PM, Henri Menke wrote:

On 09/01/2016 01:53 PM, Hans Hagen wrote:

On 9/1/2016 1:22 PM, Henri Menke wrote:

On 09/01/2016 09:33 AM, Hans Hagen wrote:

On 8/31/2016 7:45 PM, Henri Menke wrote:

Dear list,

when I use a body font size other than the standard, issuing \vfill will move 
the content off the grid.  MWE is below.  How do I fix this?


that's how vfill works, you can try \vskip30\lineheight with a value you like


Hm.  Then I'd like to reformulate my question:  How do I flush content to the 
bottom of the page when grid is enabled without having to specific how many 
lines to clear.


trial and error:

\vfilll \strut World \par \removedepth \page


This is not very satisfactory because it does not work unconditionally.  For 
instance with lucidaot it is still shifted off the grid.

\setupbodyfont[lucidaot,9pt]
\setuplayout[grid=yes]
\showgrid
\starttext
Hello

\vfill

World\strut\par\removedepth
\stoptext

I have come up with this other really hackish solution.  I just put the text on 
a layer and align this to the last line of the grid which I previously computed 
in Lua (Brrr).  Also, this has the disadvantage that text might flow into the 
layer (it's in the background).

\setupbodyfont[9pt]
\setuplayout[grid=yes]
\showgrid

\definelayer [flushbottom]
\setupbackgrounds [text] [background=flushbottom]
\edef\numberoflines{%
  \ctxlua{context(math.round(tex.dimen.textheight / tex.dimen.lineheight))}}

\starttext
Hello

\setlayer
  [flushbottom]
  [line=\numberoflines,location=grid]
  {World}
\stoptext

Is there really no way to have grid-consistent \vfill?  If there isn't please 
consider this a feature request.


not without some explicit support for it which currently is not there

\startstandardmakeup[top=,bottom=]
\strut Hello
\vss
\dontleavehmode\raise3\lineheight\hbox{\strut World}
\stopstandardmakeup









Cheers, Henri

---

\setupbodyfont[9pt]
\setuplayout[grid=yes]
\showgrid
\starttext
Hello

\vfill

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

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






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

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






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

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




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] \vfill shifts content off grid

2016-09-01 Thread Henri Menke
On 09/01/2016 01:53 PM, Hans Hagen wrote:
> On 9/1/2016 1:22 PM, Henri Menke wrote:
>> On 09/01/2016 09:33 AM, Hans Hagen wrote:
>>> On 8/31/2016 7:45 PM, Henri Menke wrote:
>>>> Dear list,
>>>>
>>>> when I use a body font size other than the standard, issuing \vfill will 
>>>> move the content off the grid.  MWE is below.  How do I fix this?
>>>
>>> that's how vfill works, you can try \vskip30\lineheight with a value you 
>>> like
>>
>> Hm.  Then I'd like to reformulate my question:  How do I flush content to 
>> the bottom of the page when grid is enabled without having to specific how 
>> many lines to clear.
> 
> trial and error:
> 
> \vfilll \strut World \par \removedepth \page

This is not very satisfactory because it does not work unconditionally.  For 
instance with lucidaot it is still shifted off the grid.

\setupbodyfont[lucidaot,9pt]
\setuplayout[grid=yes]
\showgrid
\starttext
Hello

\vfill

World\strut\par\removedepth
\stoptext

I have come up with this other really hackish solution.  I just put the text on 
a layer and align this to the last line of the grid which I previously computed 
in Lua (Brrr).  Also, this has the disadvantage that text might flow into the 
layer (it's in the background).

\setupbodyfont[9pt]
\setuplayout[grid=yes]
\showgrid

\definelayer [flushbottom]
\setupbackgrounds [text] [background=flushbottom]
\edef\numberoflines{%
  \ctxlua{context(math.round(tex.dimen.textheight / tex.dimen.lineheight))}}

\starttext
Hello

\setlayer
  [flushbottom]
  [line=\numberoflines,location=grid]
  {World}
\stoptext

Is there really no way to have grid-consistent \vfill?  If there isn't please 
consider this a feature request.

> 
> 
>>>
>>>> Cheers, Henri
>>>>
>>>> ---
>>>>
>>>> \setupbodyfont[9pt]
>>>> \setuplayout[grid=yes]
>>>> \showgrid
>>>> \starttext
>>>> Hello
>>>>
>>>> \vfill
>>>>
>>>> World
>>>> \stoptext
>>>> ___
>>>> If your question is of interest to others as well, please add an entry to 
>>>> the Wiki!
>>>>
>>>> maillist : ntg-context@ntg.nl / 
>>>> http://www.ntg.nl/mailman/listinfo/ntg-context
>>>> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
>>>> archive  : http://foundry.supelec.fr/projects/contextrev/
>>>> wiki : http://contextgarden.net
>>>> ___
>>>>
>>>
>>>
>>
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>>
>> maillist : ntg-context@ntg.nl / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
>> archive  : http://foundry.supelec.fr/projects/contextrev/
>> wiki : http://contextgarden.net
>> ___
>>
> 
> 

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

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

Re: [NTG-context] \vfill shifts content off grid

2016-09-01 Thread Hans Hagen

On 9/1/2016 1:22 PM, Henri Menke wrote:

On 09/01/2016 09:33 AM, Hans Hagen wrote:

On 8/31/2016 7:45 PM, Henri Menke wrote:

Dear list,

when I use a body font size other than the standard, issuing \vfill will move 
the content off the grid.  MWE is below.  How do I fix this?


that's how vfill works, you can try \vskip30\lineheight with a value you like


Hm.  Then I'd like to reformulate my question:  How do I flush content to the 
bottom of the page when grid is enabled without having to specific how many 
lines to clear.


trial and error:

\vfilll \strut World \par \removedepth \page





Cheers, Henri

---

\setupbodyfont[9pt]
\setuplayout[grid=yes]
\showgrid
\starttext
Hello

\vfill

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

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






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

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




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] \vfill shifts content off grid

2016-09-01 Thread Henri Menke
On 09/01/2016 09:33 AM, Hans Hagen wrote:
> On 8/31/2016 7:45 PM, Henri Menke wrote:
>> Dear list,
>>
>> when I use a body font size other than the standard, issuing \vfill will 
>> move the content off the grid.  MWE is below.  How do I fix this?
> 
> that's how vfill works, you can try \vskip30\lineheight with a value you like

Hm.  Then I'd like to reformulate my question:  How do I flush content to the 
bottom of the page when grid is enabled without having to specific how many 
lines to clear.

> 
>> Cheers, Henri
>>
>> ---
>>
>> \setupbodyfont[9pt]
>> \setuplayout[grid=yes]
>> \showgrid
>> \starttext
>> Hello
>>
>> \vfill
>>
>> World
>> \stoptext
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>>
>> maillist : ntg-context@ntg.nl / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
>> archive  : http://foundry.supelec.fr/projects/contextrev/
>> wiki : http://contextgarden.net
>> ___
>>
> 
> 

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

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

Re: [NTG-context] \vfill shifts content off grid

2016-09-01 Thread Hans Hagen

On 8/31/2016 7:45 PM, Henri Menke wrote:

Dear list,

when I use a body font size other than the standard, issuing \vfill will move 
the content off the grid.  MWE is below.  How do I fix this?


that's how vfill works, you can try \vskip30\lineheight with a value you 
like



Cheers, Henri

---

\setupbodyfont[9pt]
\setuplayout[grid=yes]
\showgrid
\starttext
Hello

\vfill

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

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




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] \vfill shifts content off grid

2016-08-31 Thread Henri Menke
Dear list,

when I use a body font size other than the standard, issuing \vfill will move 
the content off the grid.  MWE is below.  How do I fix this?

Cheers, Henri

---

\setupbodyfont[9pt]
\setuplayout[grid=yes]
\showgrid
\starttext
Hello

\vfill

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

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

Re: [NTG-context] mathalignment and grid

2016-08-28 Thread Henri Menke
Dear list,

I did some research in math-ali.mkiv and found that when grid is enabled, the 
whole alignment is simply put in a vbox and snapped to the grid using

\def\math_alignment_snap_start
  {\ifgridsnapping
 \snaptogrid[\v!both]\vbox\bgroup
   \fi}

Unfortunately, the `both` option rounds down both depth and height which is 
inconvenient when the content has large descenders (as in the example).  It  
should be therefore changed to some other grid setting which rounds up.  I 
chose `top` for now but I'm not done experimenting yet.

Cheers, Henri


On 08/28/2016 03:27 PM, Henri Menke wrote:
> Dear list,
> 
> when I typeset multi line equations using mathalignment and grid the 
> descenders of the last line of equation run into the first line of text after 
> that equation.  The problem is particularly bad with the Lucida fonts (I 
> think the large operators are relatively larger than for Latin Modern).
> 
> I could just increase the spacing after equation (commented out in the MWE 
> below), but that would introduce an imbalance between space before and space 
> after for all equations without descenders.  Furthermore the problem does not 
> arise for single line equations with descenders.  Without grid there is also 
> no problem.
> 
> How do I fix mathalignment to prevent this?
> 
> Cheers, Henri
> 
> ---
> 
> \setuplayout[grid=yes]
> \setupbodyfont[lucidaot,9pt]
> %\setupformulas[spaceafter={back,nowhite,2*line}]
> 
> \showgrid
> \starttext
> 
> \input ward
> \startformula
>   \startmathalignment
>   \NC \sum_{i,\alpha,\beta} c_{i,\alpha}^\dagger c_{i,\beta} \NR
>   \NC \sum_{i,\alpha,\beta} c_{i,\alpha}^\dagger c_{i,\beta} \NR
>   \stopmathalignment
> \stopformula
> %\blank[2*line]
> \input ward
> \startformula
>   \sum_{i,\alpha,\beta} c_{i,\alpha}^\dagger c_{i,\beta}
> \stopformula
> \input ward
> \startformula
>   \text{no descenders}
> \stopformula
> \input ward
> 
> \stoptext
> 

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

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

  1   2   3   4   >