Re: [NTG-context] Float positioning

2020-04-09 Thread Alexey Kryukov
On Thu, 9 Apr 2020 20:44:16 +0200
Geert Dobbels wrote:

> Hello,
> 
> Maybe I did not understand the problem, but doesn't the code below
> give you the expected result?:

Hmm, unfortunately no. Using [top,force] just causes context to 
break the text flow at the place where the image is specified.
You can see that both the first and second pages in your example
are underfilled, although I would expect the free space to be filled
with the text.

Also it seems the [force] flag causes the [page] flag to be ignored:
here the second and third images are positioned as if [top] has been
specified, but, again, there is no text under the second image, as
in the file is followed by the third image, which goes to the next page.

-- 
Regards,
Alexey Kryukov 

Moscow State University
Faculty of History
___
If your question is of interest to others as well, please add an 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] Float positioning

2020-04-08 Thread Alexey Kryukov
On Mon, 6 Apr 2020 16:53:33 +0200
Tomas Hala wrote:

> You can try the work around below, it is based on computation of
> additional measures for special instance of figure.

Thank you, this is helpful indeed, at least as a workaround.

-- 
Regards,
Alexey Kryukov 

Moscow State University
Faculty of History
___
If your question is of interest to others as well, please add an 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] Float positioning

2020-04-06 Thread Alexey Kryukov
Hi Tomas,

thank you for your answer.

Yes, I tried leftpage/rightpage: this removes the blank page, but may
cause images to be reordered (so that e. g. 3 goes before 2), which is
completely unacceptable IMO.

Also, this doesn't help with the text flow at the page where the first
image is positioned (still no text below the image).

-- 
Regards,
Alexey Kryukov 

Moscow State University
Faculty of History

On Mon, 6 Apr 2020 13:58:57 +0200
Tomas Hala wrote:

> Hi Alexey,
> 
> I do not how free are you in decision where figures should be located
> but I tried with "leftpage" and "rightpage" instead of "page" and
> it seems to be ok.
> 
> \placefigure[rightpage]{one more cow}{\externalfigure[cow]
> [width=150mm]} \placefigure[leftpage]{cow again}{\externalfigure[cow]
> [width=150mm]}
> 
> Best wishes,
> 
> Tomáš
> 
> 
> Mon, Apr 06, 2020 ve 02:15:50PM +0300 Alexey Kryukov napsal(a):
> # Hi all,
> # 
> # Suppose I have the following document:
> # 
> # \setupexternalfigures[location={local,default}]
> # \starttext
> # 
> # \dorecurse{3}{\input{knuth}}
> # \placefigure[top]{cow}{\externalfigure[cow][width=150mm]}
> # \input{knuth}
> # \placefigure[page]{one more cow}{\externalfigure[cow][width=150mm]}
> # \placefigure[page]{cow again}{\externalfigure[cow][width=150mm]}
> # \dorecurse{10}{\input{knuth}}
> # \stoptext
> # 
> # Here I would expect the text flow to continue below the first image,
> # and then two more images to be positioned on separate pages.
> # Instead I get no text at all at the page with the Figure 1 and one
> # more blank page after it. Only after the last image the text flow
> # continues.
> # 
> # Since similar situations are very common for documents which contain
> # several large illustrations, I would like to know if there are any
> # workarounds for the problem.
> # 
> # -- 
> # Regards,
> # Alexey Kryukov 
> # 
> # Moscow State University
> # Faculty of History
> # 
> ___
> # If your question is of interest to others as well, please add an
> # 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
> # 
> ___
> 
>  Tomáš Hála
> 
> Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky
> Zemědělská 1, CZ-613 00 Brno,  tel. +420 545 13 22 28
> 
> http://akela.mendelu.cz/~thala
> ___
> If your question is of interest to others as well, please add an
> 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] Float positioning

2020-04-06 Thread Alexey Kryukov
Hi all,

Suppose I have the following document:

\setupexternalfigures[location={local,default}]
\starttext

\dorecurse{3}{\input{knuth}}
\placefigure[top]{cow}{\externalfigure[cow][width=150mm]}
\input{knuth}
\placefigure[page]{one more cow}{\externalfigure[cow][width=150mm]}
\placefigure[page]{cow again}{\externalfigure[cow][width=150mm]}
\dorecurse{10}{\input{knuth}}
\stoptext

Here I would expect the text flow to continue below the first image,
and then two more images to be positioned on separate pages. Instead I
get no text at all at the page with the Figure 1 and one more
blank page after it. Only after the last image the text flow continues.

Since similar situations are very common for documents which contain
several large illustrations, I would like to know if there are any
workarounds for the problem.

-- 
Regards,
Alexey Kryukov 

Moscow State University
Faculty of History
___
If your question is of interest to others as well, please add an 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] Vertical alignment in tabulate

2018-05-10 Thread Alexey Kryukov
On Thu, 10 May 2018 14:36:20 +0200
luigi scarso wrote:

> > a minimal example could help .

OK, it's simple:

\starttext
\starttabulate[|A{yes,verytolerant}p(4in)|A{flushleft,low}p|]

\NC \input{knuth}
\NC A small remark\NC\NR

\stoptabulate
\stoptext

Here I would like to get the text in the second column bottom-aligned.

-- 
Regards,
Alexey Kryukov 

Moscow State University
Faculty of History
___
If your question is of interest to others as well, please add an 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] Vertical alignment in tabulate

2018-05-10 Thread Alexey Kryukov
Hi,

is it possible to specify a verticall alignment for a cell contents in
the tabulate environment? I have experimented with the A key,
but any options related with the vertical alignment seem to be
silently ignored here.

-- 
Regards,
Alexey Kryukov 

Moscow State University
Faculty of History
___
If your question is of interest to others as well, please add an 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] Header after a chapter title

2017-12-16 Thread Alexey Kryukov
On Thu, 14 Dec 2017 12:29:21 +0300
Alexey Kryukov wrote:

> Now you can see that the "header=empty" setting is ignored for the
> first section (one immediately following the chapter head). So, how
> can I get rid of the header in this case?

Answering my own question: I should have added 'continue=no'
to \setuphead[section].

-- 
Regards,
Alexey Kryukov 

Moscow State University
Faculty of History
___
If your question is of interest to others as well, please add an 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] Header after a chapter title

2017-12-14 Thread Alexey Kryukov
Dear list,

sorry for probably a stupid question. The problem looks obvious, but I
could not find a solution by googling the list archive. Suppose I want
to have a chapter head on a separate page. The chapter includes some
sections, each starting from its own page too (so I don't want a
header on the pages where a section starts). The following example
is simplified (I actually have a 'command' option for chapters):

\setuphead[chapter][
  after={\page[empty,odd]},
  page=odd,
  header=empty,
]

\setuphead[section][
  page=yes,
  header=empty,
]

\starttext
\startbodymatter
\chapter{My Chapter}
\section{My First Section}
\input{knuth}
\section{My Second Section}
\input{knuth}
\stopbodymatter
\stoptext

Now you can see that the "header=empty" setting is ignored for the
first section (one immediately following the chapter head). So, how
can I get rid of the header in this case?

-- 
Regards,
Alexey Kryukov 

Moscow State University
Faculty of History
___
If your question is of interest to others as well, please add an 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] setupalign and flushbottom

2014-01-24 Thread Alexey Kryukov
Dear list,

according to the wiki and the ConTeXt manual, the ConTeXt equivalent
for the LaTeX \flushbottom command is \setupalign[line]. However in my
tests this setting doesn't have the desired effect. For example:

\setuplayout[height=720pt]
\setuphead[subject][before={\vskip4pt plus 1fil},after={\blank[small]}]
\setupalign[line]
\showgrid

\starttext
\dorecurse{3}{\input knuth}

\subject{My Subject}

\dorecurse{8}{\input knuth}
\stoptext

Here at the first page there is a small gap between the last line and
the page border, although the glue above the heading can safely be
expanded to make the page filled. However I do get the desired result if
I replace \setupalign [line] with a low-level command (\alignbottom).

So what is the correct way to get pages bottom-aligned in MKIV?

-- 
Regards,
Alexey Kryukov anagnost at yandex dot ru

Moscow State University
Faculty of History
___
If your question is of interest to others as well, please add an 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] \placeinitial after a heading

2014-01-24 Thread Alexey Kryukov
Hi,

If I attempt to insert a drop cap after a heading while the paragraph
indentation is enabled, I get the following effect: all lines the drop
cap spans except the first one (e. g. second and third in case of n=3)
get an additional indent, equal to the \parindent. For example:

\setupinitial[font=Bold sa 4,n=3]
\setupindenting[yes,1em]

\starttext

\section{Knuth}

\placeinitial
\input knuth

\stoptext

I suppose this is not the intended behavior :) The problem doesn't
occur if I enable indenting also for the first paragraph after the
heading, but in this case, of course, the drop cap itself is indented
together with its adjacent lines. So the following workaround is
possible:

\setupinitial[font=Bold sa 4,n=3,
hoffset=\parindent,distance=-\parindent]
\setuphead[section][indentnext=yes]

Nevertheless it would be nice if this issue could be fixed.

Also, is it possible to explicitly apply case conversion commands to a
drop cap? Setting the 'style' option to \WORD or \word currently seems
to have no effect.

-- 
Regards,
Alexey Kryukov anagnost at yandex dot ru

Moscow State University
Faculty of History
___
If your question is of interest to others as well, please add an 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] setupalign and flushbottom

2014-01-24 Thread Alexey Kryukov
On Fri, 24 Jan 2014 18:41:45 +0100
Wolfgang Schuster wrote:

 Use \setupalign[height].

I tested this before writing my first post, and the result was still
different from one I get with \alignbottom .

-- 
Regards,
Alexey Kryukov anagnost at yandex dot ru

Moscow State University
Faculty of History
___
If your question is of interest to others as well, please add an 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] setupalign and flushbottom

2014-01-24 Thread Alexey Kryukov
On Fri, 24 Jan 2014 21:45:32 +0400
Alexey Kryukov wrote:

 On Fri, 24 Jan 2014 18:41:45 +0100
 Wolfgang Schuster wrote:
 
  Use \setupalign[height].
 
 I tested this before writing my first post, and the result was still
 different from one I get with \alignbottom .

Oops, I am wrong. \setupalign[height] seems to help indeed, so thanks
for your answer. However it would be nice to wikify this.

-- 
Regards,
Alexey Kryukov anagnost at yandex dot ru

Moscow State University
Faculty of History
___
If your question is of interest to others as well, please add an 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] Some questions on float combinations

2014-01-07 Thread Alexey Kryukov
On Mon, 06 Jan 2014 11:43:51 +0100
Hans Hagen wrote:

 It all depends on it being floats or not (floatign indeed). One
 option is to package a set of floats in a bTABLE .. eTABLE and put
 a..z subcaptions under it that way and then have the whole as a float

Well, I actually don't need floats, because each image has a fixed
position. However the problem is to get captions properly formatted and
numbered. Again, in LaTeX it would be easy to output captions
separately from the corresponding images, but I haven't found how to do
that in ConTeXt. That's what causes me to use floats (and pack them
into floatcombinations if necessary).

 anyway ... you have more chance onan answer if you provide small
 examples

My code currently looks like the following:

\defineparagraphs[DoubleL][n=2]

\starttext

\centerline{\rotate[rotation=90]{
  \startDoubleL
\placefigure[force]
  {My first caption}
  {\externalfigure[dummy][width=1in,height=3in]}
  \nextDoubleL
\placefigure[force]
  {My second caption}
  {\externalfigure[dummy][width=1in,height=1in]}
\placefigure[force]
  {My third caption}
  {\externalfigure[dummy][width=1in,height=1in]}
  \stopDoubleL
}}

\stoptext

As I have explained, this works, but it would prefer to use a
floatcombination syntax to describe this type of layout just like I
would use it for two images placed side-by-side. I. e. it would be nice
if ConTeXt supported something like the following:

\startfloatcombination[2*1]
   \placefigure[force]
  {My first caption}
  {\externalfigure[dummy][width=1in,height=3in]}
  \startfloatcombination[1*2]
\placefigure[force]
  {My second caption}
  {\externalfigure[dummy][width=1in,height=1in]}
\placefigure[force]
  {My third caption}
  {\externalfigure[dummy][width=1in,height=1in]}
  \stopfloatcombination
\stopfloatcombination

Another small problem is that combinations and floatcombinations,
unlike single floats, have no 'rotation' parameter, so that I have to
embed them into a rotation command. This seems just a bit inconsistent.

-- 
Regards,
Alexey Kryukov anagnost at yandex dot ru

Moscow State University
Faculty of History
___
If your question is of interest to others as well, please add an 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] Some questions on float combinations

2014-01-03 Thread Alexey Kryukov
Hi all,

recently I finished typesetting a block of inset illustrations for a
journal on history, which I first implemented in LaTeX and then moved
to ConTeXt (I am using a version from TeXLive 2013 packaged with
openSUSE 13.1). Basically I am greatly satisfied with the result, as the
code looks much clearer now. However, I still see some things
which can be done in LaTeX by a more natural way.

First of all, is there a dedicated method to rotate an entire
combination or floatcombination by 90 degrees? I see floats have a
special option to control this, but float combinations don't (am I
right here?). And if I enclose a float combination into a \rotate
command, then the height of the rotated block seems to be incorrectly
calculated, so that about a half of the block goes outside of the upper
page boundary.

Second, not all image combinations can be described by a simple matrix,
and the documentation doesn't explain what to do in such more complex
cases (nor the Wiki does). For example, in my document some pages have
three images ordered in two columns: one relatively tall image
side-by-side with two smaller ones. To make the things worse such
combinations are usually placed on landscape pages. The obvious solution
here seems to be to somewhow group two smaller images and then put them
into a float combination. Unfortunately, this doesn't work, as
floatcombination seems to ignore all enclosed boxing
commands/environments and even nested float combinations.

Finally I managed to achieve the desired layout by defining a set of
parallel paragraphs, which fortunately worked even inside a \rotate
command (columns and columnsets with embedded floats didn't). Still it
would be nice to have a special interface allowing to combine floats
and float combinations into larger blocks.

-- 
Regards,
Alexey Kryukov anagnost at yandex dot ru

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