Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been extremely annoyed with this issue for a while. I'm using TeXMaker on KDE to write my class notes in LaTeX and I sometimes need to copy paste text from it to some other applications while editing, the flashcard program Anki being one of them.

TeXMaker uses syntax highlighting and for some reason hitting copy paste will copy the color tags with it together with tags for formatting. The end result is that Anki will treat the color tags as part of the LaTeX code and feed the code together with color tags into LaTeX, which of course makes any LaTeX compile fail.

It seems like KDE apps include formatting and color data in the data that is sent to the clipboard. In other words it won't just be a sequence consisting of the characters you've typed, but it will contain various tags that essentially look like HTML.

Anyone else stumbled on the same problem? Any way to fix it?

share|improve this question
Never had a similar problem, even though I never used TeXMaker. – Bakuriu Nov 6 '12 at 21:59

What you need is a middleman in the form of a very simple text editor that is not using the Qt Toolkit. The Qt widgets will include the formatting information on a cut/copy operation, and if the Qt widget that it is pasted to accepts the formatting, the formatting follows. I have experienced this in my own PyQt applications. However, if the text is pasted to an X11 client that only accepts plain text, the formatting will not be pasted. You can then select/copy from the middleman and paste into Anki.

Note: It may be possible to use another Qt application, since that depends on how the QtextEdit is configured in the application, although this depends on trial and error when determining the application you will need to serve as middleman.

share|improve this answer

You should report (K)Ubuntu bugs on LaunchPad. For instructions check: https://help.ubuntu.com/community/ReportingBugs

Or directly upstream in KDE: https://bugs.kde.org/

share|improve this answer
Did the OP say at any point he is using Kubuntu? – schaiba Feb 15 '13 at 14:03

Your Answer


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.