Hot answers tagged

14

For example, pdfinfo (part of poppler) can show you Creator and Producer. I get the following, for a PDF file created by XeTeX (with the xelatex command): Creator: XeTeX output 2019.06.27:0505 Producer: xdvipdfmx (20180217) Created by LuaTeX (with lualatex): Creator: TeX Producer: LuaTeX-1.07.0 Created by pdfTeX, with latex ...


10

\documentclass{article} \usepackage{accsupp} \newcommand\pdfminus{\BeginAccSupp{method=escape,ActualText=-}-\EndAccSupp{}} \begin{document} $\pdfminus A \pdfminus B = C$ $-A - B = C$ \end{document} Copy/paste yields: -A - B = C 􀀀A 􀀀 B = C SUPPLEMENT The OP comments on how it would be nice to have it done automatically. Unfortunately, redefining - as ...


10

Use pdfcrop: \documentclass{article} \usepackage{lipsum} % for mock text \pagestyle{empty} % no page ornaments \begin{document} \lipsum[1] \end{document} Save this as shortdoc.tex and run pdflatex shortdoc pdfcrop shortdoc This will produce shortdoc-crop.pdf, that you can include with \includegraphics.


10

Not a solution but an explanation. The problem is hyperref. hyperref uses with lualatex \pdf@escapestring to convert the name to something that can be safely used as a destination in the pdf. But the current implementation of \pdf@escapestring handles only ascii, everything else is simply dropped. And this means that glossaries creates for the two entries ...


9

I faced some difficulties in configuring and I decided to do this tutorial. In fact, it would be easier to download MacTex, which is the full version; however, I was not in the mood to occupy 4GB of my SSD with this. The tutorial is pretty basic anyway, so have patience. Important: I assume that: (1) BasicTex is already installed on your Mac and LaTex ...


9

Long story short, there are two differences: The color is changed from the default color to explicit black; The paper size is changed from the default of your TeX distribution setup to letter paper. One thing that changes is the PDF metadata which contains the date in which it was generated and an unique ID generated with that info. You can suppress those ...


9

You can try glyphtounicode: \documentclass{article} \input glyphtounicode \pdfgentounicode=1 \begin{document} $a \star b$. \end{document}


8

As Ulrike Fischer described the problem is that non-ASCII characters are dropped by \pdf@escapestring. To avoid this, you can change \pdf@escapestring to encode Unicode characters in UTF-8: \documentclass{article} \usepackage{polyglossia} \setmainfont{Liberation Serif} \usepackage{hyperref} \usepackage[nonumberlist]{glossaries-extra} \newglossaryentry{...


8

This is not really a LaTeX question but simply the difference between vector graphics (pdf) and raster ones (png, jpg, etc.). a raster graphics although it can be large is a simple object to display. It is only an X by Y image irrespective of what the image contains, and that it. A vector graphic can be extremely complex, consisting of many object that the ...


7

Welcome to TeX.SE.! As far as I know, a .pdf or .dvi file can not have such a functionality (for whole pages). But it can have it for comments... something that I suppose is not enough for you. If you open any pdf (or dvi) by using any viewer of your system, you will see that all the pages are visible. So, the I don't think you can do it with just a pdf or ...


7

One solution could be xr-hyper: curriculum.tex: \documentclass[twocolumn]{article} \usepackage{xr-hyper} \usepackage[colorlinks,allcolors=blue]{hyperref} \externaldocument{001} \externaldocument{002} \usepackage{nameref} \parindent0pt \begin{document} \section*{\em\centering Curriculum vitae} \ref{pub}. \nameref{pub} \dotfill \pageref{pub}\par \ref{books}...


7

When MiKTeX is running and LaTeX-Workshop installed, you do not need perl or latexmk. Building Just open the command palette in VS Code (Menu: View > Command Palette ...) and type: Latex workshop: build with recipe, click on it and choose pdflatex->bibtex->pdflatex2 instead of latexmk. If you want to build directly via command Ctrl + Alt + B, edit your ...


7

You need to set the variable omitcidset to 1 (thanks to Hans Hagen ...): \documentclass{article} \usepackage{fontspec} \setmainfont{Georgia} \usepackage[a-3b]{pdfx} \pdfvariable omitcidset=1 \begin{document} Test \end{document} (probably pdfx should do it, so better inform the maintainer)


6

Let’s start with the following example: \documentclass{article} \newcommand*\testsqrtsign[1]{\sqrtsign{\vphantom{#1}}} \pagestyle{empty} \begin{document} \[ \testsqrtsign{|}\testsqrtsign{\big|}\testsqrtsign{\Big|}\testsqrtsign{\bigg|}\testsqrtsign{\Bigg|} \] \end{document} Compile the above code via pdfLaTeX and then open the PDF file via Adobe Acrobat ...


6

Type 3 fonts can be given encoding vectors as of the pdftex in the 2018 release, thanks to Pali Rohar.


6

Adding \pdfpkresolution100 \pdfmapfile{} \usepackage{color} \pagecolor[gray]{.95} makes it use (very) low resolution bitmap fonts, disable using scalable fonts, and add a light grey background. % This is a sample LaTeX input file. (Version of 12 August 2004.) % % A '%' character causes TeX to ignore all remaining text on the line, % and is used for ...


6

You can use tex4ht to convert the TeX file converted from RMarkdown by Knitr and Pandoc. It supports TikZ and most of LaTeX packages. If you want to convert TikZ code to SVG, it is best to use special driver, which needs to be manually installed unfortunately. To request the driver, add one line to your .rmd file: --- title: "Hello World" author: "Me" date:...


6

\documentclass{article} \usepackage{hyperref} \usepackage{siunitx} \AtBeginDocument {\pdfstringdefDisableCommands{\def\as{foo}}} \begin{document} \def\as{foo} \section{\as} \end{document}


6

\toprule (and \midrule or \bottomrule) are defined in the booktabs package. It must be included before any use. This package largely improves the visual appearance of tables by providing rules with varying width and by fixing some line spacing problems. Standard latex uses \hline to draw a rule between lines. \documentclass{article} \usepackage{booktabs} ...


5

So you want to "...know a possibility how to export a PDF, that has just blank space where the graphics should be? (And the other way round)" Well, I don't know how to reach that point directly. But I know a detour with three backdoors which get you were you want: First, the detour: Export to PDF just as normal. The result will be no blank space where ...


5

\documentclass{article} \begin{document} {% \def\%#1:#2@{\expandafter\xdef\csname ZZ#1\endcsname{#2}}% \endlinechar`\@ % \catcode`\%=0 \sbox0{\input{test.xbb}}}% Pages: \ZZPages \end{document}


5

\documentclass{article} \usepackage{graphicx} \pdfinclusioncopyfonts=1 \begin{document} \begin{figure} \centering \includegraphics[width=\textwidth]{external.pdf} \end{figure} \end{document}


5

hyperref provides the \pdfstringdefDisableCommands, which is a hook to execute commands before hyperref tries to translate TeX code into pdf strings. The argument of \pdfstringdefDisableCommands is arbitrary TeX code which should redefine commands which don't expand to valid pdf strings. You can redefine \faicon to consume an argument and do nothing: \...


4

Here is a quick solution to your problem. I have put together a modified pdfcomment.sty file, called pdfcomment1.sty. It has a new function pdftooltiphid, which produces tooltips in the same way as the original pdftooltip, but sets them to 'hidden'. You can call this function in the regular way: \pdftooltiphid{\includegraphics{img.png}}{This is the ALT ...


4

pdfTeX supports object stream compression in order to reduce the resultant PDF file sizes. You can disable this object stream compression in the preamble so that the resultant PDF file leaves the page count uncompressed in the plain-text: \pdfobjcompresslevel=0 Alternatively, before version 1.5 PDF's did not implement object stream compression. You can ...


4

To expand all macros in the bookmarks, you have to add \enabledirectives[references.bookmarks.preroll] in your document. I don't think you can apply ligatures in the bookmarks, because ligatures are part of the font. What you can do is, instead of --- either use the Unicode character — (U+2014 EM DASH) directly or the corresponding control sequence \...


4

After some looking through lpdf-ini.lua, lpdf-xmp.lua and back-ini.lua I've found a way to change the metadata: % Change PDF metadata timestamp, \startluacode local metadata = lpdf.getmetadata(); metadata['time'] = '2018-04-22T15:42:12+01:00'; \stopluacode This doesn't touch the \currentdate set by TeX, so you can have different dates for \date and the ...


4

You can combine both answers like this: \documentclass{article} \usepackage{fontmfizz} \usepackage{tikz} \usepackage{accsupp} \newcommand{\archlinux}{% \BeginAccSupp{ method=plain, unicode=false, ActualText=Linux, }% \ooalign{\hidewidth\tikz\node[inner sep=0pt,opacity=0]{Linux};\cr \mfArchlinux \cr}% \EndAccSupp{}% } \begin{document} I ...


Only top voted, non community-wiki answers of a minimum length are eligible