3

So I was wondering if there is some commands or/and packages that allows us to hide text (I didn't find an answer here on the site ...) , because I really need it for hiding hints in some math article . Anyway , thanks in advance .

EDIT : I am sorry, I was not clear enough about what I'm looking for ...enter image description here

Check
  • 31
  • 1
  • 3
  • Do you mean some kind of box the reader is able unfold when needed? If so, you may want to have a look at these to questions: (http://tex.stackexchange.com/questions/45106/how-to-make-interactive-pdf-documents-with-tex) (http://tex.stackexchange.com/questions/19673/constructing-a-dynamic-pdf) – Wamseln Jul 06 '15 at 13:33
  • Is this a regular document or a quiz/test? – Alenanno Jul 06 '15 at 13:33
  • If this is a quiz/test, exsheets or answers will provide the means, for example –  Jul 06 '15 at 13:39
  • No , it's not a test . It's actually like an assignment (to some younger friend) where I put hints on the hard problems . – Check Jul 06 '15 at 13:43

2 Answers2

3

Here are two ideas:

  • Make the hint text white. Then, it won't be visible at first glance, but the reader can highlight it to read the hint. Some websites (e.g. TvTropes) hide spoilers this way. Put \usepackage{xcolor} in the preamble, and then use \textcolor{white}{(spoiler text for the hint goes here)}. More information
  • Place the hint text upside down in a footnote, which is a common way to hide spoilers in print. Put \usepackage{graphicx} in the preamble, and then use \footnote{\rotatebox{180}{(spoiler text for the hint goes here)}}. This one also works in print, unlike the previous one.
Arun Debray
  • 7,126
  • 2
  • 30
  • 54
  • Depending on font/size settings you may want to make the rotated footnote smaller than standard or italic so it's not as easy to read. I know many people can read upside down almost as easily as the right way up; while I'm not that quick I can still read upside down puzzle answers before I've considered whether I want to. Alternatively you could try to push the footnote to the following page -- that would be an interesting exercise to code. – Chris H Jul 08 '15 at 10:32
1

You can use the comment package to easily hide text without removing or commenting out every line of your .tex file by placing everything you want hidden between \begin{comment} and \end{comment}. It isn't clear if this is what you're after, though.

alkasm
  • 186