Graphics, Figures & Tablesseparate figures from text

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
tguozden
Posts: 7
Joined: Tue Mar 09, 2010 2:39 pm

separate figures from text

Post by tguozden »

Hi everyone:

I am printing my thesis which includes figures in colour. Te question is this:

Can I make 2 separate outputs
-one which contains the text only, leaving a blank space for the figures,
-and the other with the figures leaving a blank space for the text?

This way I could print the text in a laser printer, and then print the figures in an inkjet colour printer.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

tguozden
Posts: 7
Joined: Tue Mar 09, 2010 2:39 pm

Re: separate figures from text

Post by tguozden »

:roll:
It should not be too hard to do, and the advantages justify it. Every office has a fast big laser printer and important people have personal color inkjets that one can borrow. Any ideas????
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

separate figures from text

Post by localghost »

tguozden wrote:[...] It should not be too hard to do, and the advantages justify it. [...]
If so, you should be able to figure this out on your own. I personally have no idea at the moment (and no time to think about).


Best regards and welcome to the board
Thorsten
tguozden
Posts: 7
Joined: Tue Mar 09, 2010 2:39 pm

Re: separate figures from text

Post by tguozden »

I went searching almost the whole web for an answer but nothing came along. I meant that there has to be a way to do this, it seems that somebody should have done this sort of "collage" of text and figures.

Thanks and regards

Tomás.-
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

separate figures from text

Post by frabjous »

You could switch to "phantom" for the images to produce an empty box of the appropriate size.

Phantom won't work across paragraphs, but I guess you could switch to white text. (Hopefully the color printer won't waste white ink for this. If it does, you might be in trouble.)

So the code below is currently set up to print graphics but not text. To switch to text but not graphics, you'd comment out the \renewcommand line, and the \color line.

Code: Select all

\documentclass{article}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{xcolor}
\newcommand{\toggleimage}[1]{\phantom{\includegraphics{#1}}}
\renewcommand{\toggleimage}[1]{\includegraphics{#1}}
\begin{document}
\color{white}
\lipsum[1]

\toggleimage{myimage}

\lipsum[2]
\end{document}
However, this all strikes me as a colossally bad idea.

I don't have access to any kind of color printer most of the time. Does that make me not important? But even if I did, I don't trust such devices to line up perfectly straight or aligned anyway, so I doubt I'd get nice looking results. I also find that a lot of printers jammed on paper already having ink on it.
tguozden
Posts: 7
Joined: Tue Mar 09, 2010 2:39 pm

Re: separate figures from text

Post by tguozden »

Thanks very much! I was worried because I could still see the text in the .dvi file, but when I printed the postscript only the figures came out! :)

I have to print 180 pages with almost the same amount of figures. Hope that the ink printer doesn't mess it all up.
tguozden
Posts: 7
Joined: Tue Mar 09, 2010 2:39 pm

separate figures from text

Post by tguozden »

One last thing, how should I redefine the command \includegraphics, since I also put aditional setting like the width or height of the figure..

Code: Select all

\includegraphics[width=4cm]{Figuras/Figus_Intro/davinci.eps}
tguozden
Posts: 7
Joined: Tue Mar 09, 2010 2:39 pm

separate figures from text

Post by tguozden »

this is it..

Code: Select all

\newcommand{\toggleimage[2]  }{\phantom{\includegraphics[#1]{#2}}}
tguozden
Posts: 7
Joined: Tue Mar 09, 2010 2:39 pm

separate figures from text

Post by tguozden »

just one more thing.. ther seems to be a problem with the phantom command when there are two consecutive figures like, for example

Code: Select all

\toggleimage[width=4cm]{Figuras/Figus_Intro/galileo_1.eps}
\hspace{5cm}
\toggleimage[width=1cm]{Figuras/Figus_Intro/galileo_2.eps}\hspace{1cm}
Casually I found a way to fix this, by putting an invisible caracter just before the phantom this way

Code: Select all

\newcommand{\toggleimage[2] }{\textcolor{white}{.}\phantom{\includegraphics[#1]{#2}}}

This is not an elegant solution but I have just printed 8 pages of my thesis first in the laser printer and after in the ink printer. It worked perfectly. To me this is a wonderful achievement, because I won't have to buy extra black ink cartridges plus I get the text with laser quality.


Thanks very very much.
Post Reply