Re: [NTG-context] Latex to ConTeXt

2012-12-02 Thread Wolfgang Schuster

Am 15.11.2012 um 09:07 schrieb MANUEL GONZALEZ SUAREZ 
gonzalezsman...@uniovi.es:

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

\usemodule[ruby]

\defineruby[dos]

\starttext

Left \dos{middle}{middle text} right

\blank

Left \dos[alternative=bottom]{middle}{middle text} right

\blank

Left \dos[textstyle={\setcharactercasing[WORD]\tfxx}]{middle}{middle text} right

\stoptext

Wolfgang

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

Re: [NTG-context] Latex to ConTeXt

2012-11-19 Thread Manuel González Suárez
Thanks very much, Hans.
The second solution is very good.
Manuel

2012/11/17 Hans Hagen pra...@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
 gonzalezsman...@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
 __**__**
 ___

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

Re: [NTG-context] Latex to ConTeXt

2012-11-16 Thread Hans Hagen

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
gonzalezsman...@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
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Latex to ConTeXt

2012-11-15 Thread MANUEL GONZALEZ SUAREZ
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}}Thanks-- Manuel González Suárez-- Manuel González Suárez
___
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
___

Re: [NTG-context] Latex to ConTeXt

2012-11-15 Thread luigi scarso
On Thu, Nov 15, 2012 at 9:07 AM, MANUEL GONZALEZ SUAREZ 
gonzalezsman...@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}}

 mkii or mkiv ?

-- 
luigi
___
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
___

Re: [NTG-context] Latex to ConTeXt

2012-11-15 Thread Procházka Lukáš Ing . - Pontex s . r . o .

On Thu, 15 Nov 2012 09:07:55 +0100, MANUEL GONZALEZ SUAREZ 
gonzalezsman...@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


Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

t-Manuel.mkiv
Description: Binary data


t-Manuel.pdf
Description: Adobe PDF document
___
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
___

[NTG-context] LaTeX to ConTeXt

2012-11-15 Thread MANUEL GONZALEZ SUAREZ
Hi, Luigi.mkii-- Manuel González Suárez
___
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
___

Re: [NTG-context] Latex to ConTeXt

2012-11-15 Thread Wolfgang Schuster

Am 15.11.2012 um 09:20 schrieb Procházka Lukáš Ing. - Pontex s. r. o. 
l...@pontex.cz:

 t-Manuel.mkiv

You can use the “p”-Prefix for private modules.

It doesn’t matter which prefix you use, you can even drop it (not really 
recommended when you have a local file with the same name) but the different 
prefixes are a good method to tell if a module comes with the tex installation 
(t-xxx) or is only on the own system (p-xxx).

Wolfgang

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