Note: The original phrasing of my question was this: How to use accsupp to produce all-upercase in the visual output from input that should paste in its original, ordinary-case form? However I think a more general phrasing of this question will be of greater use.
How can I produce character-by-character-pastable output that has a functional relation to the source code input?
One example would be the following problem I bumped into:
I desire output in all-caps but which should paste in an alternate form given in the source code. (Here the abstract function mapping the pasting input to the visual output would be the uppercasing function.)
Specifically, I am required to produce all-caps text in the (visual) output but would like the pasting behavior of that text to be that ordinary-case text is being handled. That is, I would like something like "THIS IS A TECHNICAL REPORT" to paste as "This is a Technical Report". Now starting with This is a Technical Report in the source file and producing all-uppercase text from that seems easier than writing a macro that undoes uppercasing in the source (because I would need to selectively apply it to the words-minus-any-intended-initial-capitals).
I assume a correct answer will use the accsupp package. However it will also make it possible to paste parts of words; the obvious solution to enclose the entire textchunk in \BeginAccSupp{...}...\EndAccSupp{...} wouldn't make that possible.
I think that the right answer is a derivative of the answer thread to Ulrike Fischer's answer to this question about alternative text with accsupp using the \textsc macro.
Other examples:
- Writing a custom function that both "capitalizes" (converts to all-caps) French letters and selectively strips them of their accent marks for display but not for pasting. (I can't find a reference right now (here is a good place to start, though), but due to technical limitations and simplicity, there used to be a tradition of omitting accent marks on capital letters for certain combinations, on posters and other all-caps contexts. Not in dictionaries, though.)
- Writing a custom function converting Arabic text to its rasm-representation for display but not for pasting.
\modifytexttransforming plaintext letter-by-letter that could be useful. Anyone feel free to give opinions. – Lover of Structure Oct 03 '12 at 05:29:-). – Martin Schröder Oct 09 '12 at 14:31Hello Worldfrom\textls{\textsc{HELLO WORLD}}. – Jörg May 02 '14 at 12:46