Re: [XeTeX] XeTeX (/not/ XeLaTeX) : Marginal kerning, font protrusion, hyperlinks

2014-04-15 Thread Ross Moore
Hi Phil,

Have you ever tried

\input miniltx.tex

This then allows a subset of LaTeX structural commands and internals to be used 
without the documentclass stuff — which is what I think you detest most.
Now many LaTeX packages can be loaded and used, without problems, in what are 
otherwise plain TeX documents. Just use, e.g.

  \usepackage{color}

as in a LaTeX document.

I'm pretty sure that  graphics.sty  and  graphicx.sty  are usable this way, and 
also  hyperref.sty ,
and its driver files, including  hdvipdfmx.def  — I think this is the correct 
name.

Now all the documentation you want about hyperlinks is in the book The LaTeX 
Web Companion,  or in the PDFs built from the .dtx  documentation files for the 
LaTeX packages. 
Use the  texdoc  command to access these.

Beware that not all LaTeX packages work this way. That will depend upon what 
the authors of the packages have used internally. There can be inter-package 
dependencies, ultimately leading back to the parts of LaTeX that you have not 
loaded. You have to just try things out, and use what works, perhaps keeping 
records of what does or does not.


Hope this helps,

 Ross

On 15/04/2014, at 19:07, Philip Taylor  wrote:

> 
> 
> Khaled Hosny wrote:
> 
>> On Thu, Apr 10, 2014 at 12:58:23PM +0100, Philip Taylor wrote:
>>> 
>>> Why are these key XeTeX primitives (\XeTeXprotrudechars, \rpcode, etc)
>>> not documented in /The XƎTEX reference guide/ ?   Will, Khaled,
>>> Jonathan :  can you comment on this, and will these (and any other
>>> currently undocumented primitives) be documented in the version of
>>> /The XƎTEX reference guide/ which accompanies TeX Live 2014 ?
>> 
>> From me: simply because I know near nothing about them.
> 
> Fully understood.  In that case, may I ask Jonathan where these primitives 
> are, in fact, documented, so that Khaled and Will can
> potentially make use of this information if they choose to
> prepare a TeX Live 2014 edition of /The XƎTEX reference guide/ ?
> 
> Also, are there any other currently undocumented XeTeX primitives,
> and where can be found any information on embedding hyperlinks
> using XeTeX ?
> 
> Philip Taylor
> 
> 
> 
> 
> --
> Subscriptions, Archive, and List information, etc.:
> http://tug.org/mailman/listinfo/xetex




--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] XeTeX, \XeTeXprotrudechars, \rpcode, etc.

2014-04-15 Thread Jonathan Kew

On 15/4/14 11:05, Philip Taylor wrote:

... and are
you also aware of any documentation discussing how hyperlinks
can be embedded using XeTeX, another apparently undocumented feature
that is successfully exploited by "hyperref", "eplain", etc., yet
for which no primitive-level documentation seems to exist.


IIRC, hyperlinks are handled entirely at the pdf output driver level; 
there are no xetex primitives involved. It's just a question of 
inserting appropriate \special{pdf: ...} commands.


So try looking for dvipdfmx documentation about the \special commands it 
supports, and the PDF spec if you need help with the exact PDF fragments 
to insert. In particular, 
http://project.ktug.org/dvipdfmx/doc/tb94cho.pdf might be helpful.


JK




--
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] XeTeX, \XeTeXprotrudechars, \rpcode, etc.

2014-04-15 Thread Akira Kakuto

Dear Philip,

I found Corresponding ones in pdfTeX in the pdfTeX manual:

\pdfprotrudechars (integer)
Yet another way of optimizing paragraph breaking is to let certain characters
move into the margin (‘character protrusion’). When \pdfprotrudechars=1,
the glyphs qualified as such will make this move when applicable, without
changing the line-breaking. When \pdfprotrudechars=2 (or greater),
character protrusion will be taken into account while considering breakpoints,
so line-breaking might be changed. This qualification and the amount of shift
are set by the primitives \rpcode and \lpcode. Character protrusion is
disabled when \pdfprotrudechars=0 (or negative).
If you want to protrude some item other than a character (e.g. a \hbox),
you can do so by padding the item with an invisible zero--width character,
for which protrusion is activated.

\rpcode  <8-bit number> (integer)
The amount that a character from a given font may shift into the right
margin (‘character protrusion’) is set by the primitive \rpcode. The
protrusion distance is the integer value given to \rpcode, multiplied with
0.001em from the current font. The given integer value is clipped to the
range -1000..1000, corresponding to a usable protrusion range of -1 em..1 em.
Example:

\rpcode\somefont`,=200
\rpcode\somefont`-=150

Here the comma may shift by 0.2 em into the margin and the hyphen by 0.15 em.
All these small bits and pieces will help pdfTEX to give you better
paragraphs (use \rpcode judiciously; don’t overdo it).
Remark: old versions of pdfTEX use the character width as measure.
This was changed to a proportion of the em-width after Han The´ Thanh
finished his master’s thesis.

\lpcode  <8-bit number> (integer)
This is similar to \rpcode, but affects the amount by which characters
may protrude into the left margin. Also here the given integer value is
clipped to the range -1000..1000.

Best,
Akira





--
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] XeTeX, \XeTeXprotrudechars, \rpcode, etc.

2014-04-15 Thread Philip Taylor

Fine, many thanks Jonathan; will do.
** Phil.


Jonathan Kew wrote:


IIRC, hyperlinks are handled entirely at the pdf output driver level;
there are no xetex primitives involved. It's just a question of
inserting appropriate \special{pdf: ...} commands.

So try looking for dvipdfmx documentation about the \special commands it
supports, and the PDF spec if you need help with the exact PDF fragments
to insert. In particular,
http://project.ktug.org/dvipdfmx/doc/tb94cho.pdf might be helpful.




--
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex


[XeTeX] XeTeX, \XeTeXprotrudechars, \rpcode, etc.

2014-04-15 Thread Philip Taylor

Good morning Thành  --

I have for some time been trying to get to the bottom of the mysterious
new primitives in XeTeX that include \XeTeXprotrudechars, \rpcode, etc.
The only "documentation" of these is a brief e-mail from JK dated
Mon May 3 01:12:46 CEST 2010 :

http://tug.org/pipermail/xetex/2010-May/016465.html

in which he mentions that they have been added.  Despite the fact that
they have therefore been around for about four years, they are still
not documented in /The XƎTEX reference guide/, and Khaled today wrote :


 From me: simply because I know near nothing about them.


Vafa then noted :


If I recall correctly, Hàn Thế Thành added these primitives to XeTeX;
therefore he knows them best.


and so I am pursuing it with you.

Are you able to point me at any formal documentation for this set of
primitives to which I can refer Khaled, Will et al., in the hopes
that they will finally be documented for TeX Live 2014, and are
you also aware of any documentation discussing how hyperlinks
can be embedded using XeTeX, another apparently undocumented feature
that is successfully exploited by "hyperref", "eplain", etc., yet
for which no primitive-level documentation seems to exist.

** Phil.




--
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] XeTeX (/not/ XeLaTeX) : Marginal kerning, font protrusion, hyperlinks

2014-04-15 Thread Philip Taylor

OK, thank you Vafa, I will ask Thành.
** Phil.

Vafa Khalighi wrote:


If I recall correctly, Hàn Thế Thành added these primitives to XeTeX;
therefore he knows them best.





--
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] XeTeX (/not/ XeLaTeX) : Marginal kerning, font protrusion, hyperlinks

2014-04-15 Thread Vafa Khalighi
If I recall correctly, Hàn Thế Thành added these primitives to XeTeX;
therefore he knows them best.


On Tue, Apr 15, 2014 at 7:07 PM, Philip Taylor  wrote:

>
>
> Khaled Hosny wrote:
>
>  On Thu, Apr 10, 2014 at 12:58:23PM +0100, Philip Taylor wrote:
>>
>>>
>>> Why are these key XeTeX primitives (\XeTeXprotrudechars, \rpcode, etc)
>>> not documented in /The XƎTEX reference guide/ ?   Will, Khaled,
>>> Jonathan :  can you comment on this, and will these (and any other
>>> currently undocumented primitives) be documented in the version of
>>> /The XƎTEX reference guide/ which accompanies TeX Live 2014 ?
>>>
>>
>>  From me: simply because I know near nothing about them.
>>
>
> Fully understood.  In that case, may I ask Jonathan where these primitives
> are, in fact, documented, so that Khaled and Will can
> potentially make use of this information if they choose to
> prepare a TeX Live 2014 edition of /The XƎTEX reference guide/ ?
>
> Also, are there any other currently undocumented XeTeX primitives,
> and where can be found any information on embedding hyperlinks
> using XeTeX ?
>
> Philip Taylor
>
>
>
>
> --
> Subscriptions, Archive, and List information, etc.:
>  http://tug.org/mailman/listinfo/xetex
>


--
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex


Re: [XeTeX] XeTeX (/not/ XeLaTeX) : Marginal kerning, font protrusion, hyperlinks

2014-04-15 Thread Philip Taylor



Khaled Hosny wrote:


On Thu, Apr 10, 2014 at 12:58:23PM +0100, Philip Taylor wrote:


Why are these key XeTeX primitives (\XeTeXprotrudechars, \rpcode, etc)
not documented in /The XƎTEX reference guide/ ?   Will, Khaled,
Jonathan :  can you comment on this, and will these (and any other
currently undocumented primitives) be documented in the version of
/The XƎTEX reference guide/ which accompanies TeX Live 2014 ?


 From me: simply because I know near nothing about them.


Fully understood.  In that case, may I ask Jonathan where these 
primitives are, in fact, documented, so that Khaled and Will can

potentially make use of this information if they choose to
prepare a TeX Live 2014 edition of /The XƎTEX reference guide/ ?

Also, are there any other currently undocumented XeTeX primitives,
and where can be found any information on embedding hyperlinks
using XeTeX ?

Philip Taylor




--
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex