Old technical dictionary 4 languages in PDF

Submitted by Nicola Rainiero on 2012-10-07 (last updated on 2015-01-30)

In this article I show you a concrete example on the use of my previous tutorials about PDF optimizations, in particular I have added a new pagination, toc and bookmarks. The used PDF is a very old technical dictionary (in English, Italian, French and German), but it is not in copyright and for some words is yet useful.

Generally to facilitate my translations I use the following sites:

Sometimes for specialisti terms I consult:

Particularly Wikipedia allows me to view the definition of the word and if I am lucky to know automatically the translation in the wanted language.

All the same, with few words the translation problems still remain and during my research I found this old dictionary:

Technical dictionary in four languages: Free Download & Streaming: Internet Archive

Well, I have downloaded the PDF version, described in this manner:

  • Pages 938
  • Page size: 297x441 pt
  • File size: 72,50 MB
  • No toc and bookmarks. Necessity to view the page-display in Two-Up continuous modality in order to consult in the same page the 4 columns with the relative languages. 

After my conversion:

  • Pages 464
  • Page size: 546x441 pt
  • File size: 71,50 MB
  • With toc and bookmarks and new pagination: in every pages all the 4 columns.

I have tried to reduce the file size without compromise the quality, but with poor results! So I have desisted and I have executed only a new pagination with this command and excluding the unuseful pages:

\includepdf[nup=2x1, pages={9,11,14-933}]{technicaldiction00webbrich.pdf} 

First LaTeX file

So I have created a first file only to pagination, called add_toc.tex:

\documentclass[portrait]{minimal}
\usepackage[paperwidth=546pt,paperheight=441pt]{geometry}
\usepackage{pdfpages}
\begin{document}
\includepdf[nup=2x1, pages={9,11,14-933}]{technicaldiction00webbrich.pdf}
\end{document}

Usually I run pdflatex twice to resolve references and then using JPdfBookmarks I have added bookmarks in this pdf. When finished I have exported them in the segnalibri.txt file:

Title/1,Black,notBold,notItalic,open,FitPage
A/2,Black,notBold,notItalic,closed,FitPage
Air/12,Black,notBold,notItalic,open,FitPage
Ane/22,Black,notBold,notItalic,open,FitPage
Arm/32,Black,notBold,notItalic,open,FitPage
B/38,Black,notBold,notItalic,closed,FitPage
Ben/48,Black,notBold,notItalic,open,FitPage
Bol/58,Black,notBold,notItalic,open,FitPage
Bro/68,Black,notBold,notItalic,open,FitPage
[...]
Y/461,Black,notBold,notItalic,open,FitPage
Z/461,Black,notBold,notItalic,open,FitPage

Second LaTeX file

I have used my convert_bookmarks.sh script and I have added the resulting text file in technical_dictionary_with_toc.tex:

\documentclass[8pt]{book}
\usepackage[paperwidth=546pt,paperheight=441pt,includeheadfoot,%
top=1pt,bottom=1pt,left=10pt,right=10pt]{geometry}
\usepackage{pdfpages}
\usepackage[pagebackref]{hyperref}
\usepackage{color}
\definecolor{Light}{gray}{.80}
\usepackage{multicol}
\newcommand{\starttwocolumns}{\setlength{\columnsep}{10mm}\begin{multicols}{2}}
\newcommand{\stoptwocolumns}{\end{multicols}}
\makeatletter
\def\[email protected]{%
\let\@oddhead\@empty% header empty on odd pages
\let\@evenhead\@empty% header empty on even pages
\def\@oddfoot{\hfil\huge{\colorbox{Light}{-\hyperref[contents]{\arabic{page}}-}}\hfil}%
\def\@evenfoot{\hfil\huge{\colorbox{Light}{-\hyperref[contents]{\arabic{page}}-}}\hfil}%
}
\makeatother
\hypersetup{
pdftitle={Technical dictionary in four languages: English, Italian, French and German (1917)},
pdfsubject={London, Whittaker & co., shared by openlibrary.org},
pdfauthor={Webber, Edoardo}
}
\begin{document}
\includepdf[pages={1},addtotoc={
1,chapter,1,{Title \& Abbreviations},a
}]{2in1.pdf}
\thispagestyle{empty}
\backmatter
\starttwocolumns
\tableofcontents
\addcontentsline{toc}{chapter}{Contents}
\setcounter{secnumdepth}{0} % not section numbers
\setcounter{tocdepth}{1} % sections in the toc
\label{contents}
\stoptwocolumns
\includepdf[pages={2-461},pagecommand=\thispagestyle{mystyle},addtotoc={
2,chapter,1,{A},a,
12,section,1,{Air},a,
22,section,1,{Ane},a,
32,section,1,{Arm},a,
38,chapter,1,{B},a,
48,section,1,{Ben},a,
58,section,1,{Bol},a,
68,section,1,{Bro},a,
[...]
461,chapter,1,{Y},a,
461,chapter,1,{Z},a
}]{2in1.pdf}
\end{document}

Summary

All the text files (tex e txt) are here: technical_dictionary_conversion.zip

Original pdf is available here.




Related Content:

Nicola Rainiero

A civil geotechnical engineer with the ambition to facilitate own work with free software for a knowledge and collective sharing. Also, I deal with green energy and in particular shallow geothermal energy. I have always been involved in web design and 3D modelling.

Add new comment

The content of this field is kept private and will not be shown publicly.

Plain text

  • No HTML tags allowed.
  • Web page addresses and email addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.