Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Title of PDF is incorrect #15983

Open
dveeden opened this issue Jan 5, 2024 · 2 comments
Open

Title of PDF is incorrect #15983

dveeden opened this issue Jan 5, 2024 · 2 comments

Comments

@dveeden
Copy link
Contributor

dveeden commented Jan 5, 2024

Error Report

  1. What is the URL/path of the document related to this issue?

https://download.pingcap.org/tidb-stable-en-manual.pdf

image

$ pdfinfo tidb-stable-en-manual.pdf 
Title:           TiDB Introduction                                          <--------------------------------------
Creator:         LaTeX with hyperref package
Producer:        XeTeX 0.99992
CreationDate:    Fri Dec 29 13:06:16 2023 CET
Custom Metadata: no
Metadata Stream: no
Tagged:          no
UserProperties:  no
Suspects:        no
Form:            none
JavaScript:      no
Pages:           5926
Encrypted:       no
Page size:       612 x 792 pts (letter)
Page rot:        0
File size:       111419027 bytes
Optimized:       no
PDF version:     1.5

The title is "TiDB Introduction", which it should be something like "TiDB User Manual".

  1. How would you like to improve it?
@dveeden
Copy link
Contributor Author

dveeden commented Jan 5, 2024

Looks like ./scripts/merge_by_toc.py should be updated to only have a single metadata section with a proper title.

$ grep -E '^title:' doc.md | head -1
title: TiDB Introduction
$ grep -E '^title:' doc.md | tail -1
title: Glossary

@dveeden
Copy link
Contributor Author

dveeden commented Jan 5, 2024

Looks like there is an easier method:

diff --git a/templates/template.tex b/templates/template.tex
index cf372e561..7dd44ee0f 100644
--- a/templates/template.tex
+++ b/templates/template.tex
@@ -115,7 +115,7 @@ $endif$
 \hypersetup{breaklinks=true,
             bookmarks=true,
             pdfauthor={$author-meta$},
-            pdftitle={$title-meta$},
+            pdftitle="TiDB User Manual"
             colorlinks=true,
             citecolor=$if(citecolor)$$citecolor$$else$blue$endif$,
             urlcolor=$if(urlcolor)$$urlcolor$$else$blue$endif$,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant