W
W
WTFAYD2017-10-07 19:11:28
TeX
WTFAYD, 2017-10-07 19:11:28

How to copy text from a PDF created by LaTeX in its normal form without extra line breaks?

For example, I created a PDF file, I copy a paragraph from it, and it looks like this:

Unit testing is the practice of creating one or more tests for each method in a class,
in order to regularly tet the thes of a class for correct portion behavior. The most popular
tool used for Java is called Junit.

And it should look like this, without unnecessary line breaks:
Unit testing is the practice of creating one or more tests for each method in a class, in order to regularly tet the thes of a class for correct portion behavior. The most popular tool used for Java is called Junit.

It is also clearly visible in the case of copying listings:
class A {
public void test() { ... }
}
class B {
A a = new A();
void test() { b.test(); }
}

instead of
class A {
  public void test() { ... }
}
class B {
  A a = new A();
  void test() { b.test(</blockquote>); }
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question