From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/96607 Path: news.gmane.org!.POSTED!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: How to clone \underbar? Date: Wed, 19 Oct 2016 15:13:27 +0200 Message-ID: <58077177.9010901@gmail.com> References: <77DD9DE0-ABE0-4598-92A9-7FD6D44CB8F2@posteo.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0130344451182209545==" X-Trace: blaine.gmane.org 1476882854 19875 195.159.176.226 (19 Oct 2016 13:14:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 19 Oct 2016 13:14:14 +0000 (UTC) User-Agent: Postbox 5.0.4 (Macintosh/20161007) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Oct 19 15:14:10 2016 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 1bwqgy-0003IY-UT for gctc-ntg-context-518@m.gmane.org; Wed, 19 Oct 2016 15:14:01 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id CCF261B304; Wed, 19 Oct 2016 15:13:44 +0200 (CEST) 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 KyI6GcfyYIX5; Wed, 19 Oct 2016 15:13:44 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 2032D1B30A; Wed, 19 Oct 2016 15:13:44 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 6F9F71B308 for ; Wed, 19 Oct 2016 15:13:43 +0200 (CEST) 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 HXHr3VdZID-T for ; Wed, 19 Oct 2016 15:13:42 +0200 (CEST) Original-Received: from mail-qt0-f181.google.com (mail-qt0-f181.google.com [209.85.216.181]) (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 42D7A1B304 for ; Wed, 19 Oct 2016 15:13:31 +0200 (CEST) Original-Received: by mail-qt0-f181.google.com with SMTP id q7so18642246qtq.1 for ; Wed, 19 Oct 2016 06:13:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to; bh=CLys5QoPckjRpC7GrOwF/4q9SH35bPw4KfGTIvg+D+s=; b=cTQMli+xY6iAlziA2mgSG8To3XNAdMxKDS4tMdkvlDXOvCbE6m0Rgw3nTQ6BRwybI6 PkGIu43MO79HteSyUTZWj3ooML42U1Tk7VfVPcUGxn6sPR5rLymzeNu6HN7b+iZCPSuz WIhE+qpu90moLkBCzsRkVwmQnfobaVQ6C/3KZQhU9BlF2Lwww94kEAaoyHEAcF68KCuI 0lSmYejawQm3cEMZaEhQ/QXHv2LcO0T1VnU1WYRCDduLtLwi7fkMsPNaCUJCADNiCRmo GeWsiEkNwouewDygUylwjl6NFwOoenwfbvraAi87WW+OEmnDlDLtl8InZ3LAWMy0Cl5r h2aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to; bh=CLys5QoPckjRpC7GrOwF/4q9SH35bPw4KfGTIvg+D+s=; b=exUndCpcA2IDW1oAZPwy+kl++szr04dZWYlPPo3sgsrNe4BfHQbuTiV3rv6k4UT7eI +Ia0HB6ZITW538MzO2NL+rLHjSaKaGXJbH5glfLKgCYUW4x8YZb3SBwwkPvVBS0vISj3 MSNi7H34yXJbwq9UJZxt+623eW8QAgpox/y69Zodrx14xMmbYPV2/fxKFAyRzPXXRCI6 e+dhQcg8RTRZcwCKdsqIBgyY86Vrw5sTTvTpvQjHV3BigbBt5VM7xzUoBlY+IS9oWbSR 9ah9KVoa5fI9P2x1m5xAC/MIvlHUTjSCSNiem2GMI4sRWC+EQC6lOq4lLAh7kBKcG6Ym GMXQ== X-Gm-Message-State: AA6/9RnGCQIGIf+pTCdqMcWoZV0HaMjbLT87DFyVNUbanzNYeTTZjEWf1y62wT30QkKaBg== X-Received: by 10.28.92.211 with SMTP id q202mr2820724wmb.132.1476882808591; Wed, 19 Oct 2016 06:13:28 -0700 (PDT) Original-Received: from keima.localdomain (x2f25177.dyn.telefonica.de. [2.242.81.119]) by smtp.gmail.com with ESMTPSA id h10sm68956736wje.48.2016.10.19.06.13.26 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 19 Oct 2016 06:13:27 -0700 (PDT) In-Reply-To: <77DD9DE0-ABE0-4598-92A9-7FD6D44CB8F2@posteo.net> 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:96607 Archived-At: This is a multi-part message in MIME format. --===============0130344451182209545== Content-Type: multipart/alternative; boundary="------------020600080809090606040907" This is a multi-part message in MIME format. --------------020600080809090606040907 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit > Florian Leupold > 19. Oktober 2016 um 14:51 > Dear list, > > how can I clone \underbar (for the purpose of changing settings for > the clone afterwards)? > > Just using \definebar to inherit \underbar’s properties does not > entirely work, see MWE: > > \definebar[myBar][underbar] > \starttext > underbar text mode: \underbar{$a^b$} \crlf > underbar math mode: $\underbar{a^b}$ \crlf > myBar text mode: \myBar{$a^b$} \crlf > myBar math mode: $\myBar{a^b}$ > \stoptext ConTeXt uses different code for the \underbar commands inside and outside of math mode, in text mode \underbar uses the version which is created with \definebar but when you’re in math mode a simpler version (which is taken from plain TeX) is used. Your \myBar command on the other side is always the same in text and math mode. Wolfgang --------------020600080809090606040907 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
19. Oktober 2016 um 14:51
Dear list,

how can I clone \underbar (for the purpose of changing settings for the clone afterwards)?

Just using \definebar to inherit \underbar’s properties does not entirely work, see MWE:

\definebar[myBar][underbar]
\starttext
underbar text mode: \underbar{$a^b$} \crlf
underbar math mode: $\underbar{a^b}$ \crlf
myBar text mode: \myBar{$a^b$} \crlf
myBar math mode: $\myBar{a^b}$
\stoptext
ConTeXt uses different code for the \underbar commands inside and outside of math mode,
in text mode \underbar uses the version which is created with \definebar but when you’re
in math mode a simpler version (which is taken from plain TeX) is used.

Your \myBar command on the other side is always the same in text and math mode.

Wolfgang
--------------020600080809090606040907-- --===============0130344451182209545== 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 --===============0130344451182209545==--