58
votes
How can I generate PDF metadata from LaTeX?
As others have already answered, I like to use hyperref. However, as my documents often have \author and \title commands I do not want to repeat myself in the package parameters. Luckily, hyperref ...
30
votes
Is there a standard way to include ORCID in TeX / PDF?
Academicons has TeX package at https://ctan.org/pkg/academicons which is supported by ORCiD. You may also download SVG or PNG icons from ORCiD website, https://orcid.org/trademark-and-id-display-...
27
votes
Accepted
Unicode in PDF Metadata
Package hyperref
hyperref encodes correctly, but the options should be set after hyperref is loaded. Otherwise LaTeX expands the options the hard way and hyperref will only see the expanded garbage.
...
23
votes
Accepted
Is possible to add an unnoticeable "signature" to a PDF in order to track its copies?
PDF information entries
Additional entries can be set by hyperref, e.g.:
\hypersetup{
pdfinfo={
User={John Doe},
% ...
},
}
Some PDF viewers are not able to show non-standard entries, ...
22
votes
Get number of pages of external PDF
pdfTeX, LuaTeX
\pdflastximageages, see the answer of Symbol 1.
Remarks:
\pdfximage cannot be used in DVI mode.
LuaTeX
Unhappily, LuaTeX is constantly changing its interfaces.
\luatexluaescapestring ...
21
votes
Accepted
Can you set the Natural Language of a PDF compiled with pdflatex?
The following document passes the test that you linked. It should be obvious from the example how to set the language.
\documentclass{article}
\usepackage{hyperref}
\hypersetup{
pdftitle={Test},
...
19
votes
Is there a standard way to include ORCID in TeX / PDF?
Although the previous answers are more than complete, I found out that a simple package orcidlink has just been pushed on CTAN to fulfill your need!
18
votes
Accepted
Get number of pages of external PDF
After \tracingmacros1 with option pages=last-1, it seems like pdfpages uses a feature of pdf(la)tex to get the number.
\documentclass{minimal}
\begin{document}
\pdfximage{test-29.pdf}
\the\...
16
votes
Accepted
Show document title instead of file name in PDF-Reader
\documentclass{article}
\usepackage[pdftitle=Title,pdfauthor=Me,pdfdisplaydoctitle]{hyperref}
\begin{document}
The title is shown.
\end{document}
15
votes
Grabbing data from website and use it in LaTeX document
LuaTeX is ideal for such tasks. LuaTeX has a socket library, that can be used to fetch data from urls. In ConTeXt, almost all file related commands (\readfile, \typefile, \externalimage, etc) can ...
13
votes
Accepted
How can I programmatically populate a PDF's pdfcreator field?
pdfTeX
The TeX compiler pdfTeX already sets some keys as default:
/Producer (pdfTeX-1.40.15)
/Creator (TeX)
/CreationDate (D:20140506215840+02'00')
/ModDate (D:20140506215840+02'00')
/Trapped /False
...
13
votes
Populate information from a csv file into a LaTeX document (specifically into the fields/arguments of commands therein)
Quick and dirty expl3 implementation:
First you load the CSV file with \LoadCSV{<label>}{<file>}. This command will open the file and load the contents of the CSV into <label>. The ...
12
votes
Accepted
Embed nicely formatted \listfiles into document
The macros I propose just show the information for the document class and the packages, so only those with extension .cls or .sty, discarding the other files.
\documentclass{article}
\usepackage{...
11
votes
Accepted
How to plot scatter points using pgfplots with color defined from table rgb values?
While it is possible to access table elements by means of \pgfplotstablegetelem{0}{RED}\of{\test}, I would recommend to move the code which defines colors into the \addplot command: pgfplots supports ...
11
votes
Is hyperref really the best way to add metadata to a TeX file?
hyperxmp – Embed XMP metadata within a LATEX document
http://www.ctan.org/pkg/hyperxmp
" ... The package integrates seamlessly with hyperref and requires virtually no modifications ...
10
votes
Accepted
How to achieve equal colors for a marker's filling and edge?
The style of the markers in a scatter plot is determined using the key scatter/use mapped color={draw=..., fill=...} (see section 4.5.11 "Scatter Plots" in the manual). By default, it is set to draw=...
10
votes
Populate information from a csv file into a LaTeX document (specifically into the fields/arguments of commands therein)
Let us say we have the following code:
\documentclass[11pt,a4paper,sans]{moderncv}
% moderncv themes
\moderncvstyle{classic} % casual, classic, banking, oldstyle and fancy
\moderncvcolor{blue}
\...
10
votes
Accepted
Populate information from a csv file into a LaTeX document (specifically into the fields/arguments of commands therein)
With readarray (and listofitems included).
First, I employ readarray macros
\readarraysepchar{\\}
\readdef{personalinfo.csv}\myrawdata
to take the contents of personalinfo.csv and place it into the ...
9
votes
How to embed abstract as an XMP metadata?
Currently, there are two three packages that I am aware of that will embed XMP: hyperxmp xmpincl and pdfx. The advantage of the first is that it is easy to use; the second is perhaps more extensible.
...
9
votes
How can I programmatically populate a PDF's pdfcreator field?
\pdftexbanner (introduced in pdfTeX 1.20a; see the pdfTeX user manual) produces the output:
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/W32TeX) kpathsea version 6.1.1
and contains ...
8
votes
Is there a standard way to include ORCID in TeX / PDF?
If there are several authors, make a new command with the argument of the ORCID.
Using @Samir's answer, create a XeLaTeX document with the following at the top:
\documentclass{article}
\usepackage{...
8
votes
Accepted
Referring to Title of Document in Hypersetup
\@title and \@author have @ in their names, therefore \makeatletter is needed:
\makeatletter
\hypersetup{
pdftitle=\@title,
pdfauthor=\@author,
}
\makeatother
An alternative is option ...
8
votes
Accepted
Can the pdfx package use the document title and author?
You could do it the other way round and reuse the data from the xmpdata:
\RequirePackage{filecontents} %if filecontents should overwrite old files
\begin{filecontents}{\jobname.xmpdata}
\Title{My ...
7
votes
Does LaTeX store any potentially personally revealing data from my source in some log file somewhere?
Out of the box LaTeX stores information about the used program version and the used packages in the .log file. In other auxiliary files it stores certain information about your document such as ...
7
votes
Accepted
Including Orcid in plain latex using authblk
The easy way to set something to a good height relative to the current font is to use dimensions with units of ex, which is nominally the height of the lower case x in the font. So naively one would ...
6
votes
How to get correct PDF metadata?
classicthesis already loads hyperref, so you have to use \hypersetup to set the metadata (Hint: do not use pdftex):
\documentclass{article}
\usepackage{lipsum}
\usepackage{url}
\usepackage[nochapters]...
6
votes
Is possible to add an unnoticeable "signature" to a PDF in order to track its copies?
If you want to do this in a discreete and hard to alter fashion, I would suggest having an image in your PDF, in which you hide the information you want using steganography (which uses low order bits ...
6
votes
Accepted
How to use \char inside \pdfinfo?
\char is not an expandable command, thus it does not work as string in \pdfinfo. Also, \char would use the current font encoding. But the font encoding is irrelevant here. Instead, the PDF ...
5
votes
How can I generate PDF metadata from LaTeX?
You can use xmpincl, "which allows you to add arbitrary metadata in the Adobe XMP (Extensible Metadata Platform) format. But you have to write a separate XML file to do this" (suggested in threads ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
metadata × 151pdf × 52
hyperref × 45
pdftex × 14
xetex × 12
hyperxmp × 12
xmp × 11
pgfplots × 9
pdfx × 8
tikz-pgf × 7
pdf-a × 6
titles × 5
unicode × 5
color × 4
context × 4
external-files × 4
author × 4
copyright × 4
beamer × 3
table-of-contents × 3
luatex × 3
packages × 3
moderncv × 3
pgfplotstable × 3
article × 3