From cfcaa08efc5a338e25d8dd5b1075030bcfe868ed Mon Sep 17 00:00:00 2001 From: Leo Zachl Date: Fri, 4 Jun 2021 18:10:06 +0200 Subject: [PATCH 1/4] pdfx for PDF/A-2b and cmap for ToUnicode Map => PDF/A-2u --- example.tex | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/example.tex b/example.tex index 86957f7..78839bf 100644 --- a/example.tex +++ b/example.tex @@ -1,4 +1,16 @@ % Copyright (C) 2014-2020 by Thomas Auzinger +\pdfminorversion=7 +% Define convenience functions to use the author name and the thesis title in the PDF document properties. +\newcommand{\authorname}{surname forname} % The author name without titles. +\newcommand{\thesistitle}{Title of the Thesis} % The title of the thesis. The English version should be used, if it exists. + +\begin{filecontents}{\jobname.xmpdata} + \Title{\thesistitle} + \Author{\authorname} + \Language{en-US} + \Keywords{a\sep list\sep of\sep keywords} + \Publisher{Technische Universität Wien} +\end{filecontents} \documentclass[draft,final]{vutinfth} % Remove option 'final' to obtain debug information. @@ -22,19 +34,29 @@ \usepackage{todonotes} % Provides tooltip-like todo notes. \usepackage{hyperref} % Enables cross linking in the electronic document version. This package has to be included second to last. \usepackage[acronym,toc]{glossaries} % Enables the generation of glossaries and lists fo acronyms. This package has to be included last. - -% Define convenience functions to use the author name and the thesis title in the PDF document properties. -\newcommand{\authorname}{Forename Surname} % The author name without titles. -\newcommand{\thesistitle}{Title of the Thesis} % The title of the thesis. The English version should be used, if it exists. - +\usepackage[a-2u,pdf17]{pdfx} +\input{glyphtounicode.tex} %Part of modern distribution +\input{glyphtounicode-cmr.tex} %Additionnal glyph: You must grab it from pdfx package +\pdfgentounicode=1 +\pdfinterwordspaceon +\pdfomitcharset 1 +\usepackage{colorprofiles} +\usepackage{cmap} +\ifdefined\pdffontattr% \ifdefined is part of the e-TeX extension, which is part of any modern LaTeX compiler. + \immediate\pdfobj stream file {umsa.cmap} + {\usefont{U}{msa}{m}{n}\pdffontattr\font{/ToUnicode \the\pdflastobj\space 0 R}} + \immediate\pdfobj stream file {umsb.cmap} + {\usefont{U}{msb}{m}{n}\pdffontattr\font{/ToUnicode \the\pdflastobj\space 0 R}} +\fi % Set PDF document properties \hypersetup{ pdfpagelayout = TwoPageRight, % How the document is shown in PDF viewers (optional). - linkbordercolor = {Melon}, % The color of the borders of boxes around crosslinks (optional). - pdfauthor = {\authorname}, % The author's name in the document properties (optional). - pdftitle = {\thesistitle}, % The document's title in the document properties (optional). - pdfsubject = {Subject}, % The document's subject in the document properties (optional). - pdfkeywords = {a, list, of, keywords} % The document's keywords in the document properties (optional). + % linkbordercolor = {Melon}, % The color of the borders of boxes around crosslinks (optional). + colorlinks, + linkcolor={black}, % auch keine grellen Rahmen im View + citecolor={black}, + urlcolor={black}, + bookmarksnumbered } \setpnumwidth{2.5em} % Avoid overfull hboxes in the table of contents (see memoir manual). -- GitLab From 7aff4fbfc2699062633df048591c20d8bd288149 Mon Sep 17 00:00:00 2001 From: Leo Zachl Date: Fri, 4 Jun 2021 19:10:17 +0200 Subject: [PATCH 2/4] multilang xmpdata --- example.tex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/example.tex b/example.tex index 78839bf..690c2bb 100644 --- a/example.tex +++ b/example.tex @@ -3,12 +3,13 @@ % Define convenience functions to use the author name and the thesis title in the PDF document properties. \newcommand{\authorname}{surname forname} % The author name without titles. \newcommand{\thesistitle}{Title of the Thesis} % The title of the thesis. The English version should be used, if it exists. +\newcommand{\tranlatedtitle}{Titel der Arbeit} % The title of the thesis. The English version should be used, if it exists. \begin{filecontents}{\jobname.xmpdata} - \Title{\thesistitle} + \Title{\thesistitle\sep[de]\tranlatedtitle} \Author{\authorname} \Language{en-US} - \Keywords{a\sep list\sep of\sep keywords} + \Keywords{a\sep list\sep of\sep keywords\sep[de]Eine\sep[de]Liste\sep[de]von\sep[de]Stichwörtern} \Publisher{Technische Universität Wien} \end{filecontents} -- GitLab From 13244a32f2a75e5ccfd68a6255e8c3f15c199c47 Mon Sep 17 00:00:00 2001 From: Leo Zachl Date: Mon, 7 Jun 2021 10:19:03 +0200 Subject: [PATCH 3/4] translated title --- example.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example.tex b/example.tex index 690c2bb..c6f5255 100644 --- a/example.tex +++ b/example.tex @@ -3,10 +3,10 @@ % Define convenience functions to use the author name and the thesis title in the PDF document properties. \newcommand{\authorname}{surname forname} % The author name without titles. \newcommand{\thesistitle}{Title of the Thesis} % The title of the thesis. The English version should be used, if it exists. -\newcommand{\tranlatedtitle}{Titel der Arbeit} % The title of the thesis. The English version should be used, if it exists. +\newcommand{\tranlatedtitle}{Titel der Arbeit} % Translated title of the thesis. \begin{filecontents}{\jobname.xmpdata} - \Title{\thesistitle\sep[de]\tranlatedtitle} + \Title{\thesistitle} \Author{\authorname} \Language{en-US} \Keywords{a\sep list\sep of\sep keywords\sep[de]Eine\sep[de]Liste\sep[de]von\sep[de]Stichwörtern} @@ -91,7 +91,7 @@ % Required data. \setregnumber{0123456} \setdate{01}{01}{2001} % Set date with 3 arguments: {day}{month}{year}. -\settitle{\thesistitle}{Titel der Arbeit} % Sets English and German version of the title (both can be English or German). If your title contains commas, enclose it with additional curvy brackets (i.e., {{your title}}) or define it as a macro as done with \thesistitle. +\settitle{\thesistitle}{\tranlatedtitle} % Sets English and German version of the title (both can be English or German). If your title contains commas, enclose it with additional curvy brackets (i.e., {{your title}}) or define it as a macro as done with \thesistitle. \setsubtitle{Optional Subtitle of the Thesis}{Optionaler Untertitel der Arbeit} % Sets English and German version of the subtitle (both can be English or German). % Select the thesis type: bachelor / master / doctor / phd-school. -- GitLab From e03479f3c329c707d0190b760d084102f0269aea Mon Sep 17 00:00:00 2001 From: Leo Date: Fri, 3 Sep 2021 21:43:53 +0000 Subject: [PATCH 4/4] fix typo --- example.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example.tex b/example.tex index c6f5255..d1f33ed 100644 --- a/example.tex +++ b/example.tex @@ -3,7 +3,7 @@ % Define convenience functions to use the author name and the thesis title in the PDF document properties. \newcommand{\authorname}{surname forname} % The author name without titles. \newcommand{\thesistitle}{Title of the Thesis} % The title of the thesis. The English version should be used, if it exists. -\newcommand{\tranlatedtitle}{Titel der Arbeit} % Translated title of the thesis. +\newcommand{\translatedtitle}{Titel der Arbeit} % Translated title of the thesis. \begin{filecontents}{\jobname.xmpdata} \Title{\thesistitle} @@ -91,7 +91,7 @@ % Required data. \setregnumber{0123456} \setdate{01}{01}{2001} % Set date with 3 arguments: {day}{month}{year}. -\settitle{\thesistitle}{\tranlatedtitle} % Sets English and German version of the title (both can be English or German). If your title contains commas, enclose it with additional curvy brackets (i.e., {{your title}}) or define it as a macro as done with \thesistitle. +\settitle{\thesistitle}{\translatedtitle} % Sets English and German version of the title (both can be English or German). If your title contains commas, enclose it with additional curvy brackets (i.e., {{your title}}) or define it as a macro as done with \thesistitle. \setsubtitle{Optional Subtitle of the Thesis}{Optionaler Untertitel der Arbeit} % Sets English and German version of the subtitle (both can be English or German). % Select the thesis type: bachelor / master / doctor / phd-school. @@ -184,4 +184,4 @@ \bibliographystyle{alpha} \bibliography{intro} -\end{document} \ No newline at end of file +\end{document} -- GitLab