[ pdftex-Patches-375 ] Patch EscapeAndOther
Patches item #375, was opened at 2005-06-25 03:42
You can respond by visiting:
http://sarovar.org/tracker/?func=detail&atid=495&aid=375&group_id=106
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Heiko Oberdiek (oberdiek)
Assigned to: Nobody (None)
Summary: Patch EscapeAndOther
Initial Comment:
Hello,
Subject: Patch EscapeAndOther
Date: 2005/06/25
Author: Heiko Oberdiek
The patch is based on pdftex-1.30.0-rc1.
It supersedes patch EscapeDivers.tar.bz2
Inherited from patch EscapeDivers:
Expandable: \pdfstrcmp, \pdfescapestring, \pdfescapename
Added: \pdfescapehex, \pdfunescapehex
Fix: \pdfescapename: '%' is also a delimiter that
needs escaping.
New in patch EscapeAndOther:
* \pdfcreationdate
* \pdffilemoddate
* \pdffilesize
* \pdfmdfivesum
* \pdffiledump
* \pdfshellescape
* \pdfmatch and \pdflastmatch
* Start with bug fix: quotes are legal in other
operating systems than windows.
The description is in file README and
I also post it to the ntg-pdftex mailing
list.
Patched files:
The main part is implemented in:
* utils.c
* pdfstrcmp.ch is added.
The other files only contains small changes:
* pdftoepdf.cc, epdf.h, ptexlib.h
because of changed signature of
convertStringToPDFString()
* pdftex.defines adds new/deletes old entries of utils.c
* pdftex.mk, pdfetex.mk: addition of pdfstrcmp.ch
Patch is applied by
patch -p0
noreply@sarovar.org wrote:
Patches item #375, was opened at 2005-06-25 03:42 You can respond by visiting: http://sarovar.org/tracker/?func=detail&atid=495&aid=375&group_id=106
why not take this opportunity to add a few more converters:
how about
\pdflchex <number> => [0-f][0-f]... (even number of chars)
\pdfuchex <number> => [0-F][0-F]...
\pdflcchar
Hello, On Mon, Jun 27, 2005 at 11:14:42AM +0200, Hans Hagen wrote:
noreply@sarovar.org wrote:
Patches item #375, was opened at 2005-06-25 03:42 You can respond by visiting: http://sarovar.org/tracker/?func=detail&atid=495&aid=375&group_id=106
why not take this opportunity to add a few more converters:
how about
Regarding uppercase/lowercase: the primitives of the patch converts to uppercase hex (uchex). Do you prefer having pairs of commands for generating hex output: \pdfescapeuchex, \pdfescapelchex \pdffiledumpuchex, \pdffiledumplchex Another possibility are keyword options: \pdfescapehex lc {...} \pdfescapehex uc {...} Variants: * short or long keywords: "lc" vs. "lowercase" * both "lc" and "uc" or one is the default, e.g. uppercase, then just one option is needed for lowercase output.
\pdflchex <number> => [0-f][0-f]... (even number of chars) \pdfuchex <number> => [0-F][0-F]...
* What happens with negative numbers? * same behaviour as \romannumeral * error message, invalid number * What happens with zero? * nothing, same as \romannumeral * 0 * 00 * The perhaps often used case 0-15 is converted to 00-0f with two digits?
\pdflcchar
=> a-z \pdfucchar => A-Z
That means "\pdflcchar 1" expands to "a" and "\pdfucchar 26" to "Z"?
The limitation to numbers from 1 to 26 is not clear to me.
A \pdflcchar
as well as an expandable upper/lowercase (taco and i have this on the agenda anyway)
a) Do you mean an \uppercase and \lowercase that take a
token list and convert the characters in there?
b) Easier to implement should be an uppercase/lowercase command
that takes a <general text>, expands it, makes a string and
applies uppercase/lowercase conversion.
*) Conversion according to \uccode/\lccode?
Or C-locale or something else?
Yours sincerely
Heiko
Heiko Oberdiek wrote:
Another possibility are keyword options: \pdfescapehex lc {...} \pdfescapehex uc {...}
using keywords sounds ok to me
Variants: * short or long keywords: "lc" vs. "lowercase" * both "lc" and "uc" or one is the default, e.g. uppercase, then just one option is needed for lowercase output.
indeed
\pdflchex <number> => [0-f][0-f]... (even number of chars) \pdfuchex <number> => [0-F][0-F]...
* What happens with negative numbers? * same behaviour as \romannumeral * error message, invalid number
same as romannummeral
* What happens with zero? * nothing, same as \romannumeral * 0 * 00
this one is probably best
* The perhaps often used case 0-15 is converted to 00-0f with two digits?
indeed, an even number of digits
\pdflcchar
=> a-z \pdfucchar => A-Z That means "\pdflcchar 1" expands to "a" and "\pdfucchar 26" to "Z"?
indeed
The limitation to numbers from 1 to 26 is not clear to me.
i have no problem with A .. Z AA..ZZ etc \pdflcchar 27 -> AA
A \pdflcchar
, using the \lccode conversion table, would be more general. Or even a \pdflowercase, see below. as well as an expandable upper/lowercase (taco and i have this on the agenda anyway)
a) Do you mean an \uppercase and \lowercase that take a token list and convert the characters in there? b) Easier to implement should be an uppercase/lowercase command that takes a <general text>, expands it, makes a string and applies uppercase/lowercase conversion.
indeed
*) Conversion according to \uccode/\lccode? Or C-locale or something else?
no locales, just uccode/lccode (when pdftex goes unicode/opentype we can use the info in unicode tables cq. fonts) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Mon, Jun 27, 2005 at 12:45:20PM +0200, Hans Hagen wrote:
Heiko Oberdiek wrote:
\pdflcchar
=> a-z \pdfucchar => A-Z That means "\pdflcchar 1" expands to "a" and "\pdfucchar 26" to "Z"?
indeed
The limitation to numbers from 1 to 26 is not clear to me.
i have no problem with A .. Z AA..ZZ etc
You mean something that can be used to generate command names similar to \romannumeral, but using lowercase/uppercase letters? Something that the LaTeX package alphalph provides?
\pdflcchar 27 -> AA
Yours sincerely
Heiko
Heiko Oberdiek wrote:
You mean something that can be used to generate command names similar to \romannumeral, but using lowercase/uppercase letters? Something that the
indeed
LaTeX package alphalph provides?
i dunno that one, but context has such mapping macros as well and having a primitive simplifies live -) (the simple A-Z one is ok since one can construct the others easily, so maybe just stick to A-Z and empty for being outside the range)
\pdflcchar 27 -> AA
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Heiko Oberdiek
-
noreply@sarovar.org