Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This question is in relation to one of my previous questions: How to replace a large block of text by an empty block of the same size?

Is it possible to generate a "blank" font using the metrics of another font in LaTeX? Can this be done "on the fly", during the typesetting of the document?

share|improve this question
    
Not "on the fly", without substantial work. Moreover this would defeat your purpose, as the metric information and the character names would be present in the output. –  egreg Jun 5 '12 at 12:45
3  
Are you after something substantially different than \textcolor{white}{Some text}? –  Scott H. Jun 5 '12 at 16:08
1  
You could also produce transparent text as per the answers here –  Scott H. Jun 5 '12 at 16:19
    
@ScottH. Please see the linked post. Changing color is the easiest alternative and has a similar effect, but it is not the same. –  digital-Ink Jun 5 '12 at 16:47
2  
@digital-Ink: It's still worth trying to produce a minimal example - you might find a bug in one of the packages! For each package, you could try to see what happens if you remove it. –  Hendrik Vogt Jun 6 '12 at 9:41
show 5 more comments

2 Answers

Edit: different method.

Depending on what you want to do with it, the implementation could likely be improved, but how about the following:

\documentclass{article}
\usepackage{xcolor}
\usepackage{transparent}
\usepackage{etoolbox}

\newbool{trans}

\newcommand{\transon}{
    \booltrue{trans}
}
\newcommand{\transoff}{
    \boolfalse{trans}
}
\newcommand{\ttext}[1]{
    \ifbool{trans}
        {\texttransparent{0}{#1}}
        {#1}
}

\begin{document}

\transoff{}
\ttext{Here is some text.}

\transon{}
\ttext{Here is some text.}

\end{document}
share|improve this answer
add comment

@digital-Ink: am not sure this answers your question but the command \special{color rgb X Y Z} changes the color of the `pen' until the document ends or you change the color again. Here X Y Z is the rgb color specification, so you could just change it to white, i.e.

\special{color rgb 1 1 1}

would change the font color to white but of course latex keeps going as though nothing happened.

\special{color rgb 0 0 0}

changes it back to normal.

share|improve this answer
    
Welcome to TeX.sx! No need to sign your posts since your user badge will show as part of any posts you make. –  Peter Jansson Feb 22 '13 at 12:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.