ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Manuel González Suárez" <manuelteral@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Latex to ConTeXt
Date: Mon, 19 Nov 2012 09:16:54 +0100	[thread overview]
Message-ID: <CAPgWwFWz88zneAg2RYdSyFf=eFiCNODNUe1uazHHybW4dHhPLQ@mail.gmail.com> (raw)
In-Reply-To: <50A6C82F.9020002@wxs.nl>


[-- Attachment #1.1: Type: text/plain, Size: 2703 bytes --]

Thanks very much, Hans.
The second solution is very good.
Manuel

2012/11/17 Hans Hagen <pragma@wxs.nl>

> On 11/15/2012 9:20 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
>
>> On Thu, 15 Nov 2012 09:07:55 +0100, MANUEL GONZALEZ SUAREZ
>> <gonzalezsmanuel@uniovi.es> 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=middle]
>>      \setupTABLE[r][1][style=\**small]
>>      \setupTABLE[r][2][style={\**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
> the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/**
> listinfo/ntg-context <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/<http://foundry.supelec.fr/projects/contextrev/>
> wiki     : http://contextgarden.net
> ______________________________**______________________________**
> _______________________
>

[-- Attachment #1.2: Type: text/html, Size: 4074 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2012-11-19  8:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-15  8:07 MANUEL GONZALEZ SUAREZ
2012-11-15  8:13 ` luigi scarso
2012-11-15  8:20 ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-11-15 20:38   ` Wolfgang Schuster
2012-11-16 23:11   ` Hans Hagen
2012-11-19  8:16     ` Manuel González Suárez [this message]
2012-12-02 12:40 ` Wolfgang Schuster
2012-11-15  8:42 LaTeX " MANUEL GONZALEZ SUAREZ

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPgWwFWz88zneAg2RYdSyFf=eFiCNODNUe1uazHHybW4dHhPLQ@mail.gmail.com' \
    --to=manuelteral@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).