New answers tagged

7

First, I fully agree with Jesse Knight: Whoever made this requirement at your faculty is a sadist But if you use LuaTeX you can destroy the glyph to unicode mapping in the PDF file by creating a special font feature: % lualatex -shell-escape minted.tex \begin{filecontents*}{test.rb} # this should not be copyable def hello "world" end \end{...


2

If I were in your situation, I would follow these 3 steps: Export typeset minted listing to a pdf (standalone if it fits on same page or use another documentclass if listing spans multiple pages), Run ghostscript to convert text to vector paths, Import the vector path pdf produced by ghostscript in position of minted environment. Here's an example (with ...


2

Solution Perhaps my biggest hack yet ... main.tex: compile with --shell-escape to allow \write18 commend \documentclass[12pt,twoside,openright,a4paper]{report} \usepackage{graphicx} \newcommand{\nocopycode}[2]{% \immediate\write18{./code.sh #1 #2} \\[\textfloatsep] \includegraphics[width=\linewidth]{{#2}.png}% \\[\textfloatsep] } \usepackage{...


Top 50 recent answers are included