GeneralUnable to get transparent text

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Unable to get transparent text

Post by Cham »

The following code should use a transparent diagonal line of text after a few pages, but it's all blocky red when I compile the PDF, even after 3 runs. The preview is okay though. What is wrong ?

Code: Select all

\RequirePackage[l2tabu,orthodox]{nag}
\documentclass[10pt,letterpaper,nofootinbib,notitlepage,tightenlines]{revtex4-1}
\usepackage[total={6.5in,10in},left=1in,top=0.5in,bottom=0.5in,includefoot]{geometry}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage[dvipsnames,table]{xcolor}
\usepackage{graphicx}
\usepackage{blindtext}
\usepackage{transparent}
\usepackage[printwatermark]{xwatermark}

\begin{document}

\Blindtext

\newpage

\Blindtext\Blindtext

\newwatermark*[allpages,angle=45,color=red,scale=2.5,textalign=center,height=\paperheight,width=\paperwidth,xpos=0,ypos=0]{\transparent{0.15} \bfseries\sffamily TOP SECRET!}

\subsection{Titre}

\Blindtext

\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10361
Joined: Mon Mar 10, 2008 9:44 pm

Unable to get transparent text

Post by Stefan Kottwitz »

I see transparent red in the TeXworks preview and with the Adobe Reader on the Mac. Can you post the .pdf output of that example, as attachment, and the .log file?

Stefan
LaTeX.org admin
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Unable to get transparent text

Post by Cham »

Stefan Kottwitz wrote:I see transparent red in the TeXworks preview and with the Adobe Reader on the Mac. Can you post the .pdf output of that example, as attachment, and the .log file?
Here's the PDF file I got :
LatexianExport.pdf
(74.95 KiB) Downloaded 306 times
From the preview window of my LaTeX app, the transparency is there. Once compiled, the PDF opened with the Preview app on a Mac, the red diagonal TOP SECRET is all opaque. The console says I need a re-run :
Package transparent Warning: Rerun to get transparencies right.

No complaints by nag.
So no wonder I don't get a proper PDF file, but 3 runs don't get the transparency right. So I don't know what's wrong here.

I'm using pdfLaTeX 2015.
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Unable to get transparent text

Post by Cham »

Since I'm unable to get the transparency right, for some unknown reasons, I'll change my approach to add a watermark. Instead of a diagonal line on top of the text, I'll put it vertically into the margin.
Post Reply