[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

url style for pdf

From: Karl Berry
Subject: url style for pdf
Date: Sun, 27 Oct 2013 02:10:05 GMT

Patrice - right now, if pdftex is used for processing,
  @url{http://whatever, foo}
displays simply
and the http://whatever is a link, like in HTML output.  Whereas
if DVI output is being made, then what is displayed is
  foo (http://whatever)
like in Info/plain text.

However, Arnold (Robbins) pointed out to me that it is reasonable to
want a visible url in PDF output; it's not just a stylistic choice.  The
PDF might be being used to print a book, for instance.

Clearly it is a trivial option to implement, but my question is, what
should we call it?  What comes to mind is something like
@urllinkstyle link | textual
.. but the thing is, I don't think it should apply to HTML.  I can't
imagine any circumstances where one would want "foo (http://whatever)"
in the HTML output, even if one wants it in the PDF.  On the other hand,
I suppose one could always use it like
@urllinkstyle textual
@end iftext
and if it was used outside of @ifpdf, it could simply be a warning with
no effect, to save you the trouble of implementing it.

The alternative I can think of is to specifically restrict it to PDF,
as in
@pdfurllinkstyle textual
which is what is actually intended, but somehow seems wrong.

On the other other hand, there is Docbook.  Docbook is also used to
print books.  So it would not be unreasonable for @urllinkstyle to
actually have an effect there.  Blah.  I wish I hadn't thought of that.
And of course the option could be transliterated into our XML.

Complication: a similar scenario arises with colors.  Right now, in PDF,
I put the links in a dark red.  That prints well enough informally and
is distinct on the screen (which is why I use it), but for book
printing, one simply wants black.  Thus:
@urllinkcolor true|false
Same considerations apply, I think.  (Irrelevant in ascii+info, should
be ignored in html, could be relevant in docbook+xml.)  I don't want to
get into the hassle of specifying colors, which in the TeX case would
mean an RGB triple, etc.  Nobody has ever asked for a different
color, so I don't see a reason to generalize.

Although in principle it would be possible to implement these url
options in DVI output (given a capable driver, like dvips), not just
PDF, in practice it would be a lot of trouble and it seems unnecessary,
so I'm not going to.  I think the options should just be no-ops, maybe
with TeX messages (not errors), when used with DVI output.

Wdyt?  Sorry this got so long.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]