On Thu, Nov 15, 2012 at 9:07 AM, 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}}
mkii or mkiv ?
-- luigi
On Thu, 15 Nov 2012 09:07:55 +0100, 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}}
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:LPr@pontex.cz] Pontex s. r. o. [mailto:pontex@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 244 062 238 Fax: +420 244 461 038
Am 15.11.2012 um 09:20 schrieb Procházka Lukáš Ing. - Pontex s. r. o.
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
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
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 -----------------------------------------------------------------
Thanks very much, Hans.
The second solution is very good.
Manuel
2012/11/17 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
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 ______________________________**______________________________** _______________________
Am 15.11.2012 um 09:07 schrieb 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}}
\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
participants (6)
-
Hans Hagen
-
luigi scarso
-
MANUEL GONZALEZ SUAREZ
-
Manuel González Suárez
-
Procházka Lukáš Ing. - Pontex s. r. o.
-
Wolfgang Schuster