Forced pdflatex create one square for each word

I convert e-book files to pdf files with ereader optimization (sony erereer cannot justify the text correctly). So I convert html to latex and then create latex output using pdflatex.

The sony reader has a dictionary search function. However, he calculates words by analyzing boxes; and pdflatex generates one box per line. Subsequently, I lost the ability to use the search in the dictionary.

How to tell pdflatex about each word in a separate field?

EDIT:
I am trying to adjust the output of the pdflatex command so that it creates one square for each word. Consider this example:

\documentclass{minimal}

\begin{document}
    This is an example sentence.
\end{document}

When you open it in the PDF editor after compilation, this sample will be displayed as a single text field containing the sentence "This is an example sentence". This is good for most full-featured PDF readers. However, on my sony e-reader, word selection is box based; therefore, my PDF reader will select the full sentence, so I won’t be able to find the definition of the word I clicked.

I noticed that pdflatex stops at punctuation marks. How can I start creating one window for each word? On the output, I would have one box for "This", one for "is", one for "an", etc.

+3
source share
2 answers

, , . \documentclass{minimal}:

\usepackage{cmap} % Puts extra info in the PDF font dictionary that helps searching
\usepackage{lmodern} % cmr, the default Tex font, has a whacky font layout
\usepackage[T1]{fontenc} % This and next line are recommended with lmodern
\usepackage{textcomp}
+1

10000 ( )

\hyphenpenalty=10000

, ,

\tolerance=1000

. http://dcwww.camd.dtu.dk/~schiotz/comp/LatexTips/LatexTips.html#nohyphen.


, TeX , ( ( ), , - , .. ad nauseam), .

, , . , 10000, , , , , .

0

Source: https://habr.com/ru/post/1752887/


All Articles