From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/97584 Path: news.gmane.org!.POSTED!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Calculating with \measure Date: Sun, 19 Mar 2017 18:18:48 +0100 Message-ID: <58CEBD78.8020207@gmail.com> References: <20170319180632.43f6e75e@homerow> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6780770206232590164==" X-Trace: blaine.gmane.org 1489944091 6312 195.159.176.226 (19 Mar 2017 17:21:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 19 Mar 2017 17:21:31 +0000 (UTC) User-Agent: Postbox 5.0.11 (Macintosh/20170302) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Mar 19 18:21:27 2017 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cpeW7-0000W7-EC for gctc-ntg-context-518@m.gmane.org; Sun, 19 Mar 2017 18:21:19 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 81C6B8414E; Sun, 19 Mar 2017 18:19:04 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gag0MAP5o0r3; Sun, 19 Mar 2017 18:19:02 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id CA9FC84156; Sun, 19 Mar 2017 18:19:02 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id BB1E484142 for ; Sun, 19 Mar 2017 18:19:01 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4AN3d-dw_dvD for ; Sun, 19 Mar 2017 18:19:01 +0100 (CET) Original-Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 260A984125 for ; Sun, 19 Mar 2017 18:18:51 +0100 (CET) Original-Received: by mail-wm0-f49.google.com with SMTP id n11so48614378wma.0 for ; Sun, 19 Mar 2017 10:18:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to; bh=38so7X5teDDxbcBC37nqSvxO256ZhCBoTC2eZJz5yxM=; b=mhFK0Q+OmZIWZNCJU7mdXlMugt+O5MuUsYucygms8VQAnz0GBBigBcShe0gHPU5Ksv /LVtoc/plETT1RzX8pUz3Qn/MXUlB5GHVzZmnQv9guhVIlmxKxQI2SqKUokNpbQ9rEVT qmOIJAKrJpPoJBP5FMhNvO5xqRtcZTTnjEHk9XvsrZEdGLVpK/pA81wHsYBMXLi8rHLx sPIleUd5yZk4OMXFOltqTCC2IkCKu1ljOv8YKv76sIqtVJUrl4d4HcBOA40+bwqayczv DZnVrkVCjsgqIgWkyz5qqYeeLLDZDL6HvqXC7jA3Vx9cOLsvLzL1wRlA93omsuwQSGyi XETg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to; bh=38so7X5teDDxbcBC37nqSvxO256ZhCBoTC2eZJz5yxM=; b=oLHCSegFB76fBrMf+64c/ucOicQYWPDVH1tGbS1SY3mFRUEOwodsXVKhxQCvoA3wv+ z0rc8eCWIVPvmBuShOAp2WwApudV27NmHEE4+KskgGwwyFNVd2zFHv229c4VrEYHxm73 2kQpxMB6BZZWn4s6VKdiRCeA0e8Gkvvgd485M3zSjfVgqYH+VwzmEu5plLWubiePKTNC bFnJwTYlgvUZo8Gc53W5uX+mjiTb39zx+MDmx6zAXmk/lZdNssA/uGQvAsbl9WlUZKH4 JX8ehUI1U29OLN6kks9BKcQop+5XHN4+D8rsLFzNAU2dM9a5HjxZdrtAvO3M28lpnZUs NsQQ== X-Gm-Message-State: AFeK/H2t47uWOOdOdKcDUGYAqTJzYLlFRNWYgXB6clKhrsTpqU1vYSDjSdyUny+bSZoWtA== X-Received: by 10.28.129.212 with SMTP id c203mr6589261wmd.19.1489943930652; Sun, 19 Mar 2017 10:18:50 -0700 (PDT) Original-Received: from keima.localdomain (x2f26b8b.dyn.telefonica.de. [2.242.107.139]) by smtp.gmail.com with ESMTPSA id z70sm17746203wrc.2.2017.03.19.10.18.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Mar 2017 10:18:49 -0700 (PDT) In-Reply-To: <20170319180632.43f6e75e@homerow> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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" Xref: news.gmane.org gmane.comp.tex.context:97584 Archived-At: This is a multi-part message in MIME format. --===============6780770206232590164== Content-Type: multipart/alternative; boundary="------------030403080400000601070105" This is a multi-part message in MIME format. --------------030403080400000601070105 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit > Marco Patzer > 19. März 2017 um 18:06via Postbox > > Hi! > > Is it possible to calculate with \measure or do I have to resort to > dimens? Example: > > \definemeasure [mymeasure] [4cm] > \newdimen\mydim \mydim4cm > > \starttext > \framed[width=4cm]{Foobar} > \framed[width=\measure{mymeasure}]{Foobar} > \framed[width=2\mydim]{Foobar} > \framed[width=2\measure{mymeasure}]{Foobar} > \stoptext You can use \measured or just create more named lengths. \definemeasure [onemeasure] [4cm] \definemeasure [twomeasure] [\measure{onemeasure}*2] %\definemeasure [twomeasure] [2\measured{onemeasure}] \starttext \framed[width=\measure{onemeasure}]{Foobar} \framed[width=2\measured{onemeasure}]{Foobar} \framed[width=\measure{twomeasure}]{Foobar} \stoptext Wolfgang --------------030403080400000601070105 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
19. März 2017 um 18:06 via Postbox
Hi!

Is it possible to calculate with \measure or do I have to resort to
dimens? Example:

\definemeasure [mymeasure] [4cm]
\newdimen\mydim \mydim4cm

\starttext
\framed[width=4cm]{Foobar}
\framed[width=\measure{mymeasure}]{Foobar}
\framed[width=2\mydim]{Foobar}
\framed[width=2\measure{mymeasure}]{Foobar}
\stoptext
You can use \measured or just create more named lengths.

\definemeasure [onemeasure] [4cm]
\definemeasure [twomeasure] [\measure{onemeasure}*2]
%\definemeasure [twomeasure] [2\measured{onemeasure}]

\starttext
  \framed[width=\measure{onemeasure}]{Foobar}
  \framed[width=2\measured{onemeasure}]{Foobar}
  \framed[width=\measure{twomeasure}]{Foobar}
\stoptext

Wolfgang
--------------030403080400000601070105-- --===============6780770206232590164== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============6780770206232590164==--