Text Formatting ⇒ text under \hrulefill
text under \hrulefill
How do I do it?
Thanks in advance
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
-
latexforever
- Posts: 120
- Joined: Fri Nov 14, 2008 9:40 pm
text under \hrulefill
Code: Select all
\documentclass[10pt]{article}
\usepackage{ifthen}
\newboolean{Teachernotes} % false at start
% \setboolean{Teachernotes}{true} % true if the output is the teacher's document, false if the output is the pupil's document; TO UNCOMMENT IF STUDENTS VERSION
\newcounter{nb-holes}
\setcounter{nb-holes}{1}
\newcommand{\Hole}[1]{
\ifthenelse{\boolean{Teachernotes}} % if the output is the teacher's document,
{\textbf{#1}} % pupil-hidden words are in bold
{\underline{\phantom{#1}} (\arabic{nb-holes})} % (else) at the place of the word (the pupil has to write down on his sheet), is a bar, to let him write. This bar has the word's size.
% {$\underbrace{\underline{\phantom{#1}}}_{(\arabic{nb-holes})}$} % Does not work, actually.
\addtocounter{nb-holes}{1} % nb-holes is incremented
}
\begin{document} %% TEST DOC
Here is a \Hole{test}. The number of the test is \Hole{$\pi$}.
\end{document}
I just programmed this now.