4

I'm making a file of exercises, and I occasionally leave hints next to some of the problems. The issue is that if the hint follows directly after the problem, I find myself immediately and unconsciously jumping to the hint without thinking about the problem first.

In order to prevent myself from doing this, I was hoping there'd be a good way to make the text just hard enough to read that I wouldn't be able to do this unconscious jumping. Ideally I would be able to click a "Hint" button which would show the hint, but more realistically I think doing something like flipping the text of the hint upside down would do the job. Of course, there's probably other reasonable solutions to my problem which I'd be more than happy to hear as well!

Sam Spiro
  • 177
  • 5
    You can make a list of hints a special section at the end of your file with hyperlinks. – Bernard Sep 04 '17 at 13:43
  • 4
    I'd put the hints at the end of the file, and use the hyperref package to set up links. – Ian Thompson Sep 04 '17 at 13:43
  • 2
  • @dexteritas provides a nice link. Note that the accepted answer there uses italics, which (to me) are much harder to read upside down than upright type. A smaller font may also be a good idea. – Chris H Sep 04 '17 at 14:42
  • You've attracted a couple of close votes and while neither of them is mine I can see where they're coming from. It might be as well to emphasise the TeX aspect -- presumably a solution should be easy to implement and not require pages of code or esoteric packages, for example – Chris H Sep 04 '17 at 15:06

4 Answers4

11

An alternative for on-screen use only is to typeset the hint in white on white, so it only shows up when highlighted.

White text

\documentclass{article}
\usepackage{xcolor}
\begin{document}
\textbf{Question:} How do we hide text?

\textbf{Hint:} \textcolor{white}{By making it white, like this}
\end{document}

Some readers require copying and pasting instead of just highlighting (including Adobe, which used to just need a highlight). My example was taken from Evince.

Instead of white text, \textcolor{white!60!yellow} can just about be read on screen without highlighting.

Chris H
  • 8,705
11

Make it like Leonardo da Vinci and use mirror writing:

\documentclass{article}
\usepackage{xcolor}
\usepackage{graphicx}
\begin{document}
\textbf{Question:} How do we hide text?

\textbf{Hint:} \reflectbox{By making it white, like this}
\end{document}

enter image description here

2

Ideally I would be able to click a "Hint" button which would show the hint

You can make PDF interactive with the packages ocgx, ocgx2.

By clicking on a link, the text or image appears.

See an example here: Creating PDF layers using ocg.sty

AndréC
  • 24,137
1

Of course, there's probably other reasonable solutions to my problem which I'd be more than happy to hear as well!

Another possibility is to make tooltips with the fancytooltip package.

AndréC
  • 24,137