4

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?

  • Never had a similar problem, even though I never used TeXMaker. – Bakuriu Nov 6 '12 at 21:59
1

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.

| improve this answer | |
0

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/

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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