Document Classessearchable German-language PDF files from LaTeX

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
gtm
Posts: 2
Joined: Thu Oct 25, 2007 8:19 pm

searchable German-language PDF files from LaTeX

Post by gtm »

I have a LaTeX document in which I quote a passage by Kafka in German;
to preserve the authenticity of the original I want to include Eszetts
(\ss in LaTeX) and single guillemets (\frq and \flq in LaTeX). I am
using the documentclass "article" and including in my preamble the
following:

\usepackage[german]{babel}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{aeguill}

The problem is that I seem to be unable to produce a searchable PDF
document from this LaTeX file. I can get a DVI file that is searchable
with xdvi; using dvips I can get a Postscript file that is searchable
with ghostscript; however, when I run ps2pdf, the resulting PDF file
seems to be a scanned image: it is an unduly large PDF file that is not
searchable. (If it helps, this PDF file can be viewed at
http://euler.slu.edu/Dept/Faculty/marks ... ermsol.pdf.)

I've tried creating the PDF file using pdflatex; I've also tried the command
"gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=filename.pdf
filename.ps"; I still don't get a searchable PDF file.

Surely there is some way of producing searchable German-language PDF
documents. Does anyone have a solution to this problem?

Sincerely,
Greg Marks

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

searchable German-language PDF files from LaTeX

Post by Stefan Kottwitz »

Hi Greg,

I would use pdflatex and also fontenc with T1 option. Important for me is the installed cm-super package for T1 encoded fonts then, and of course the right input encoding. I don't use ae or similar package, that disturbes searching!
Here is one short example:

Code: Select all

\documentclass[a4paper,10pt]{article}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\begin{document}
»Was ist mit mir geschehen?« dachte er. Es war kein Traum. Sein Zimmer,
ein richtiges, nur etwas zu kleines Menschenzimmer, lag ruhig zwischen
den vier wohlbekannten Wänden. Über dem Tisch, auf dem eine
auseinandergepackte Musterkollektion von Tuchwaren ausgebreitet war --
Samsa war Reisender --, hing das Bild, das er vor kurzem aus einer
illustrierten Zeitschrift ausgeschnitten und in einem hübschen,
vergoldeten Rahmen untergebracht hatte. Es stellte eine Dame dar, die,
mit einem Pelzhut und einer Pelzboa versehen, aufrecht dasaß und einen
schweren Pelzmuff, in dem ihr ganzer Unterarm verschwunden war, dem
Beschauer entgegenhob.
\end{document}
The searchable pdf created by pdflatex is attached.

Stefan
Attachments
kafka.pdf
(22.56 KiB) Downloaded 464 times
Post Reply