From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/79263 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Latex to ConTeXt Date: Sat, 17 Nov 2012 00:11:43 +0100 Message-ID: <50A6C82F.9020002@wxs.nl> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; Format="flowed" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1353107531 1667 80.91.229.3 (16 Nov 2012 23:12:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 16 Nov 2012 23:12:11 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Nov 17 00:12:22 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TZV5C-000319-91 for gctc-ntg-context-518@m.gmane.org; Sat, 17 Nov 2012 00:12:22 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E56D0102DC; Sat, 17 Nov 2012 00:12:11 +0100 (CET) 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 2ZGIzaNpn8Sw; Sat, 17 Nov 2012 00:12:09 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 76D9A10257; Sat, 17 Nov 2012 00:12:09 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2FD8810257 for ; Sat, 17 Nov 2012 00:12:08 +0100 (CET) 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 c-jpFPX7M7dU for ; Sat, 17 Nov 2012 00:12:06 +0100 (CET) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id 037F91023A for ; Sat, 17 Nov 2012 00:12:06 +0100 (CET) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id qAGNC4bl014879 for ; Sat, 17 Nov 2012 00:12:05 +0100 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.101; Original-Received: from [10.100.1.101] (unverified [10.100.1.101]) by pragma-net.nl (SurgeMail 6.1c) with ESMTP (TLS) id 3005-1713362 for multiple; Sat, 17 Nov 2012 00:11:38 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.2; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 In-Reply-To: X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; region=16; city=Zeewolde; latitude=52.3302; longitude=5.5364; http://maps.google.com/maps?q=52.3302,5.5364&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0VIonc5Vg - 393e8eff83f4 - 20121117 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.220 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:79263 Archived-At: On 11/15/2012 9:20 AM, Proch=E1zka Luk=E1=9A Ing. - Pontex s. r. o. wrote: > On Thu, 15 Nov 2012 09:07:55 +0100, MANUEL GONZALEZ SUAREZ > wrote: > >> >> Hello. >> >> I wish someone would help me "translate" this code LaTeX to ConTeXt. >> It is a >> command to do word by word translations, so that a word appears under >> another. >> >> Here's the code: >> >> \newcommand\dos[2]{\begin{tabular}{@{}c}{\textDidot{\footnotesize#1}}\\{= \scriptsize\em#2}\end{tabular}} >> > > A picture of the result would be nice - we probably won't know what to > reach. > >> >> >> Thanks > > Something like this? > > ---- > % > \newcommand\dos[2]{\begin{tabular}{@{}c}{\textDidot{\footnotesize#1}}\\{\= scriptsize\em#2}\end{tabular}} > > > \define[2]\dos{% > \bTABLE > \setupTABLE[align=3Dmiddle] > \setupTABLE[r][1][style=3D\small] > \setupTABLE[r][2][style=3D{\small\small\em}] > \bTR\bTD#1\eTD\eTR > \bTR\bTD#2\eTD\eTR > \eTABLE > } > > \starttext > Some text \dos{Abc}{Def} > \stoptext more efficient: \unexpanded\def\dos#1#2% {\dontleavehmode \begingroup \setbox0\struttedbox{#1}% \setbox2\struttedbox{#2}% \ifdim\wd0>\wd2 \setbox2\hbox to \wd0{\hss\box2\hss}% \else \setbox0\hbox to \wd2{\hss\box0\hss}% \fi \box0 \kern-\wd2 \raise\lineheight\box2 \endgroup} -- = ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________