> > I could imagine that \ruby{document}{text} should be output as
> > `text (document)' or something.
> 
> Rather "document (text)" with "document" as ruby base and "text" as
> ruby text?

Yes, of course.

> \newcommand*{\ruby}[2]{#1 (#2)}

Sorry for being unclear: It should appear as normal ruby in the pdf:

          ruby
     base character

but if cut and pasted, it should become

     base character (ruby)

>     \BeginAccSupp{method=pdfstringdef,ActualText={ (#2)},}% 

Aah, this works!  Here's a preliminary patch to ruby.sty which
provides the `base character (ruby)' style for the dvipdfmx driver.
Replace `dvipdfm' with `pdftex' if necessary -- remember, however,
that pdftex doesn't provide proper ToUnicode support for virtual fonts
(which are used for the Japanese wadalab and Korean fonts in TeXLive,
for example).

Thanks a lot, Heiko!


    Werner


======================================================================


--- /home/wl/git/cjk/texinput/ruby.sty  2008-05-22 00:00:00.000000000 +0200
+++ ruby.sty    2008-06-13 07:31:50.000000000 +0200
@@ -29,6 +29,8 @@
 
 
 \RequirePackage{CJK}[1996/11/20]
+\RequirePackage[dvipdfm, unicode]{hyperref}
+\RequirePackage[dvipdfm]{accsupp}
 
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
@@ -147,7 +149,11 @@
      \fi
    \fi
   
-   [EMAIL PROTECTED]
+   \BeginAccSupp{method=pdfstringdef,
+                 unicode,
+                 ActualText={#1 (#2)}}
+     [EMAIL PROTECTED]
+   \EndAccSupp{}
 
    [EMAIL PROTECTED]
    [EMAIL PROTECTED] > \z@

_______________________________________________
Cjk maillist  -  [email protected]
https://lists.ffii.org/mailman/listinfo/cjk

Reply via email to