Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm working on my copypaste package to address a confusing feature that Seamus has kindly drawn my attention to.

\yank copies text and commands from a LaTeX document onto a "clipboard", and \paste pastes it into the same (or another) LaTeX document.

I called it "yank" because (i) \copy is already defined in TeX, and (ii) "yank" is how vim users refer to copy. However, "yank" seems to mean the opposite of copy in emacs. (I don't use emacs.) That's confusing.

My question is: is \Copy already in use by any other package? That is, would any package that you know of conflict with mine if I renamed \yank to \Copy (uppercase)? Any suggestion for a better name?

share|improve this question
1  
\copy is an important TeX primitive. I've never seen \Copy. –  egreg Jan 18 '13 at 18:23
    
emacs -nw C-h k C-y returns: C-y runs the command yank which is an interactive compiled Lisp function in `simple.el'. It is bound to C-y, <S-insertchar>, <S-insert>, <menu-bar> <edit> <paste>. (yank &optional ARG) Reinsert ("paste") the last stretch of killed text. More precisely, reinsert the stretch of killed text most recently –  Andrew Swann Jan 18 '13 at 19:10
add comment

1 Answer

up vote 8 down vote accepted

\Copy probably isn't used as a document level command but then that is because it's not a good name for a document level command (according to the somewhat under-enforced LaTeX command naming guidelines).

See Macro naming best practice?

Other possibilities would be:

  1. emacs naming (clearly good:-)

    \kill and \yank (but some people may find that a bit aggressive terminology:-)

  2. using a prefix (say cp)

    \cpcopy \cppaste

  3. using an argument form

    \cp{paste} \cp{yank}

Not sure if any of those are suitable, hard to say without seeing the package, but possible ideas..

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.