From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/87559 Path: news.gmane.org!not-for-mail From: Rik Kabel Newsgroups: gmane.comp.tex.context Subject: Re: Problem with \framed align and orientation on landscape pages Date: Sun, 25 May 2014 13:06:55 -0400 Message-ID: <5382232F.1060802@rik.users.panix.com> References: <537FFFEE.7060105@rik.users.panix.com> <538073C0.6050501@wxs.nl> <5380D315.7000208@rik.users.panix.com> <89A22ED6-0BBF-4A3B-9CCD-8602CFAE05C1@umich.edu> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1646839324==" X-Trace: ger.gmane.org 1401037645 22009 80.91.229.3 (25 May 2014 17:07:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 25 May 2014 17:07:25 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sun May 25 19:07:20 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WobtI-0000iN-12 for gctc-ntg-context-518@m.gmane.org; Sun, 25 May 2014 19:07:20 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 7A1251022F for ; Sun, 25 May 2014 19:07:19 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id PeJRqvCbQKGd for ; Sun, 25 May 2014 19:07:19 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 1352310230 for ; Sun, 25 May 2014 19:07:13 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 04387101E8 for ; Sun, 25 May 2014 19:07:10 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 7cfUPVsFIXVc for ; Sun, 25 May 2014 19:07:08 +0200 (CEST) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 6FA26101E7 for ; Sun, 25 May 2014 19:07:03 +0200 (CEST) Original-Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s4PHTs6O022558 for ; Sun, 25 May 2014 19:29:54 +0200 Original-Received: from [192.168.201.179] (cpe-67-240-55-150.nycap.res.rr.com [67.240.55.150]) by mailbackend.panix.com (Postfix) with ESMTP id EC2F035DA2 for ; Sun, 25 May 2014 13:06:59 -0400 (EDT) User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: <89A22ED6-0BBF-4A3B-9CCD-8602CFAE05C1@umich.edu> X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=166.84.1.89; country=US; region=New York; city=Richmond Hill; latitude=40.7005; longitude=-73.8345; http://maps.google.com/maps?q=40.7005,-73.8345&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01M6htStW - e55aa4b85871 - 20140525 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:87559 Archived-At: This is a multi-part message in MIME format. --===============1646839324== Content-Type: multipart/alternative; boundary="------------000801000309000609080403" This is a multi-part message in MIME format. --------------000801000309000609080403 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 2014-05-25 00:12, Aditya Mahajan wrote: > > > On May 24, 2014, at 1:12 PM, Rik Kabel > wrote: > >> On 2014-05-24 06:26, Hans Hagen wrote: >>> On 5/24/2014 4:11 AM, Rik Kabel wrote: >>>> For the /\framed/ command, any value for the key /align /other than a >>>> null value pushes the frame beyond the bottom margin on a landscape >>>> page >>>> for many values of /orientation/. The following MWE demonstrates this: >>>> >>>> \setuppapersize [A4,landscape] >>>> \starttext >>>> \framed[orientation=90,align=no]{\externalfigure[dummy]} >>>> \stoptext >>>> >>>> It also seems that the default value of /align/// is not /no/ as the >>>> wiki suggests, since there is a very different result when no align >>>> key >>>> is provided and when it is provided as above with /no/, if by a >>>> default >>>> value one means that, when a given key is not explicitly provided, >>>> processing will occur as if it had been provided with that particular >>>> value. >>> >>> \setuppapersize [A4,landscape] >>> >>> \starttext >>> >>> \framed[orientation=90,width=\textheight,align=no]{\externalfigure[dummy]} >>> >>> \stoptext >>> >> Thank you, Hans. That pointed me in the right direction, although it >> is not the solution in my case. >> >> The problem was with align=no. It does not, as I surmised, lead to >> the same result as having no align key at all. The following shows >> the differences clearly. What I am after is the fifth page. I would >> think that the wiki is incorrect in stating that the default value >> for the align key is no, but I do not know what is the proper >> description of the default. >> >> \setuppapersize [A5,landscape][A4] >> \definebodyfontenvironment [default][d=6] >> \showframe >> \starttext >> \framed[align=no]{\tfd 1} >> \page >> \framed[]{\tfd 2} >> \page >> \framed[orientation=90,align=no,width=\textheight]{\tfd 3} >> \page >> \framed[orientation=90,align=no]{\tfd 4} >> \page >> \framed[orientation=90]{\tfd 5} >> \stoptext >> > > > Without any align key, \framed is a \hbox; with align it is a \vbox. > That might explain the difference that you see. Try adding > \dontleavehmode in front of \framed > > Aditya Alas, Aditya, \dontleavehmode does not appear to make a difference. I think that we might expect frames 1 and 4 above to produce similar results, as do frames 2 and 5. They do not, and I am trying to understand why that is. The fact that it is landscape just exacerbates the problem, pushing some of the text off the page. Remove that and the differences are still there; the text is still on the page although not where I expect it. Hans's resetting of the width does make the landscape result the same as the portrait result, with the frame pushed just to the lower edge of the text area, but it does not address the different treatment with and without align. -- Rik Kabel --------------000801000309000609080403 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
On 2014-05-25 00:12, Aditya Mahajan wrote:


On May 24, 2014, at 1:12 PM, Rik Kabel <context@rik.users.panix.com> wrote:

On 2014-05-24 06:26, Hans Hagen wrote:
On 5/24/2014 4:11 AM, Rik Kabel wrote:
For the /\framed/ command, any value for the key /align /other than a
null value pushes the frame beyond the bottom margin on a landscape page
for many values of /orientation/. The following MWE demonstrates this:

    \setuppapersize [A4,landscape]
    \starttext
       \framed[orientation=90,align=no]{\externalfigure[dummy]}
    \stoptext

It also seems that the default value of /align/// is not /no/ as the
wiki suggests, since there is a very different result when no align key
is provided and when it is provided as above with /no/, if by a default
value one means that, when a given key is not explicitly provided,
processing will occur as if it had been provided with that particular
value.

\setuppapersize [A4,landscape]

\starttext

\framed[orientation=90,width=\textheight,align=no]{\externalfigure[dummy]}
\stoptext

Thank you, Hans. That pointed me in the right direction, although it is not the solution in my case.

The problem was with align=no. It does not, as I surmised, lead to the same result as having no align key at all. The following shows the differences clearly. What I am after is the fifth page. I would think that the wiki is incorrect in stating that the default value for the align key is no, but I do not know what is the proper description of the default.
\setuppapersize [A5,landscape][A4]
\definebodyfontenvironment [default][d=6]
\showframe
\starttext
\framed[align=no]{\tfd 1}
\page
\framed[]{\tfd 2}
\page
\framed[orientation=90,align=no,width=\textheight]{\tfd 3}
\page
\framed[orientation=90,align=no]{\tfd 4}
\page
\framed[orientation=90]{\tfd 5}

\stoptext


Without any align key, \framed is a \hbox; with align it is a \vbox. That might explain the difference that you see. Try adding \dontleavehmode in front of \framed 

Aditya

Alas, Aditya, \dontleavehmode does not appear to make a difference.

I think that we might expect frames 1 and 4 above to produce similar results, as do frames 2 and 5. They do not, and I am trying to understand why that is.

The fact that it is landscape just exacerbates the problem, pushing some of the text off the page. Remove that and the differences are still there; the text is still on the page although not where I expect it. Hans’s resetting of the width does make the landscape result the same as the portrait result, with the frame pushed just to the lower edge of the text area, but it does not address the different treatment with and without align.

--
Rik Kabel
--------------000801000309000609080403-- --===============1646839324== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an 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 ___________________________________________________________________________________ --===============1646839324==--