400 reputation
211
bio website
location Cambridge, United Kingdom
age 94
visits member for 2 years, 3 months
seen Mar 19 at 14:32

Interested in web standards, semantics, communication, history of science, and the - uh - universe...

Increasingly disillusioned by Stack Overflow and the rest of the Stack Exchange system, for reasons overlapping those articulated here by Michael Richter and here* by Benjamin Mako Hill.

*Stack Exchange sites are worse than GitHub in this respect.


Jul
5
comment Ensure verbatim code block is copy/paste-able
@StephanLehmke The whole point of a PDF is to be, as its correct name suggests, a portable document format. There is no need for the output of the verbatim environment to be a "microtypographic result of a complex rendering process": it needs to do little more than pick a monospaced font and a starting co-ordinate, and then lay the characters down in sequence. For a document containing dozens or hundreds of code snippets closely referenced in the text, it would be maddening if they were provided as attachments instead of as code blocks.
Jul
5
comment Ensure verbatim code block is copy/paste-able
@JosephWright I appreciate that TeX is a typesetting system aimed primarily at print output. However, (a) it is neither novel nor esoteric to read PDFs onscreen instead of as printouts (especially in contexts like computer system tutorials where dozens or even hundreds of code snippets are to be copy/pasted), (b) LaTeX should facilitate the creation of suitable PDFs, and (c) I think perhaps you are forgetting that I'm talking about the verbatim environment rather than about flowing or body text; I totally appreciate that in the latter context, normal typesetting rules apply.
Jul
5
awarded  Nice Question
Jul
5
comment Ensure verbatim code block is copy/paste-able
Copying and pasting from your PDF (as viewed in Safari 5) to TextEdit yields a completely unusable result, I'm afraid.
Jul
5
comment Ensure verbatim code block is copy/paste-able
Thanks. This doesn't really answer my question, but it might help people who are using the "listings" package.
Jul
5
comment Ensure verbatim code block is copy/paste-able
Danie Els, thanks, but unless I'm mistaken, I only mentioned "listings" in the comments below my question. As for the positioning, surely verbatim ought only to position the first character of the block by co-ordinates. To do anything else would be buggy and not "verbatim" at all.
Jul
5
comment Ensure verbatim code block is copy/paste-able
@PauloCereda, yes, I'm doing that. I still think it's odd that the need for upquote isn't regarded as a bug.
Jul
5
comment Globally altering styles
@Caramdir, this does not make sense to me. Given that many publishers must want to accept LaTeX submissions and want their output to be typeset according to a distinctive house style rather than only according to the rules of a generic LaTeX preset, how do those publishers override/modify/etc LaTeX defaults in order to create their house styles?
Jul
5
comment Ensure verbatim code block is copy/paste-able
Sorry if I'm being dense, David, but which case are you referring to?
Jul
5
comment Ensure verbatim code block is copy/paste-able
Shortening the lines as you suggested doesn't solve the problem. As copied from Preview, the code ends up all on one line; and as copied from Acrobat Pro, newlines are preserved but every other bit of whitespace is replaced with a single space. I'm afraid I don't understand the relevance of your second point, since I'm not using the "listings" package.
Jul
5
revised Ensure verbatim code block is copy/paste-able
Emphasised last edit
Jul
5
comment Ensure verbatim code block is copy/paste-able
@DavidCarlisle, interesting point, and adds to my increasingly strong conviction that the "verbatim" environment is utterly misnamed!
Jul
4
revised Ensure verbatim code block is copy/paste-able
Clarity
Jul
4
comment Ensure verbatim code block is copy/paste-able
Apparently even with diligent attention to settings, the "listings" package still does not preserve all whitespace via copy/paste! Obviously I'm concerned with the "verbatim" environment rather than "listings", but if the latter can't do it then I wonder what hope there is for the less sophisticated former.
Jul
4
comment Ensure verbatim code block is copy/paste-able
It seems the "listings" package is similarly flawed.
Jul
4
revised Ensure verbatim code block is copy/paste-able
Clarity
Jul
4
asked Ensure verbatim code block is copy/paste-able
Jul
4
comment Globally altering styles
@ScottH. no, I was picking up on Caramdir's comment that "LaTeX wasn't designed to be easily stylable by authors", which begs the question.
Jul
4
accepted Change background colour of {verbatim} environment
Jul
4
comment Change background colour of {verbatim} environment
@azetina no, it wouldn't.