## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ different text in figure (inkscape)

Information and discussion about graphics, figures & tables in LaTeX documents.
xbender
Posts: 9
Joined: Thu Aug 26, 2010 10:39 pm

### different text in figure (inkscape)

Hi,

Im using the new version of Inkscape, with which I have draw a graphics and labeled them. New Inkscape allows to export the graphics itself in pdf format and the text (labels) in tex file. In this file is an inputgraphics command and bunch of put commands that put together a desired graphics with lables.

So have have something like this:
1. \begin{figure}
2. \caption{text}
3. \input{file.pdf_tex}
4. \end{figure}

Now because there is a lot of text in the pdf_tex (and it can be expected that the pdf_tex file will be re-generated several times) I would like to ask if I can change the size of the text from the figure command itself. that is, can I change the size of the text which is imported with figure right in the figure environment?
I would like to avoid making any changes to the pdf_tex file as I will be overwriting it quite often and I dont want to go into it every time....

Last edited by xbender on Mon Feb 07, 2011 11:59 pm, edited 1 time in total.

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am
Without seeing an example file.pdf_tex, it is hard to know. You could try:
1. \begin{figure}
2. \caption{text}
3. \large
4. \input{file.pdf_tex}
5. \end{figure}

or similar and see if that works, but who knows? But even if you solve that problem, won't having a larger font size change what the right placement of the text would/should be?

php1ic
Posts: 192
Joined: Wed Jan 28, 2009 8:17 pm
Can you post a very simple example .pdf_tex file with lines and text, that might make it easier to help.

Without knowing the format you could try wrapping the \input{} in a "small" environment.
1. \begin{figure}
2. \caption{text}
3. \begin{small}
4. \input{file.pdf_tex}
5. \end{small}
6. \end{figure}

What system are you on unix or windows?

EDIT: Beaten to the punch

xbender
Posts: 9
Joined: Thu Aug 26, 2010 10:39 pm
thank you and sorry, I should have done this right the first time....here is the example of pdf and pdt_tex file...

The forum did not allow me to attach file extension "*.pdf_tex" so I had to rename it to simple tex. Please, rename the file salmon-prices.tex to salmon-prices.pdf_tex

my real code is then:
1. \begin{figure}[h]
2. \caption{Price of Scottish and Norwegian salmon in the UK}
3. \def\svgwidth{350pt}
4. \input{salmons-prices.pdf_tex}
5. \end{figure}

as you can see, the figures are too big to the graph and I would like to make them smaller.

thank you!

ps: neither \small nor the small environment work....
Attachments
salmons-prices.tex
salmons-prices.pdf

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am
Well, no offense, but you're still not doing it "right", because you still haven't provided a minimal working example -- see the Post on Avoidable Mistakes.

Maybe it would help to see a full example for the parent document, but otherwise, I don't see the problem. I did:

1. \documentclass{article}
2. \usepackage{graphicx}
3. \usepackage{color,transparent}
4. \begin{document}
5. \begin{figure}[h]
6. \caption{Price of Scottish and Norwegian salmon in the UK}
7. \def\svgwidth{350pt}
8. \small
9. \input{salmons-prices}
10. \end{figure}
11. \end{document}

And the "\small" definitely made a difference... though not really enough of a difference, so you might consider \tiny or even smaller, e.g. (note I added the anyfontsize package):

1. \documentclass{article}
2. \usepackage[T1]{fontenc}
3. \usepackage{graphicx}
4. \usepackage{color,transparent}
5. \usepackage{anyfontsize}
6. \begin{document}
7. \begin{figure}[h]
8. \caption{Price of Scottish and Norwegian salmon in the UK}
9. \def\svgwidth{350pt}
10. \fontsize{4}{6}\selectfont
11. \input{salmons-prices}
12. \end{figure}
13. \end{document}

xbender
Posts: 9
Joined: Thu Aug 26, 2010 10:39 pm
thank you, that have actually worked! (not that I would doubt it before..
You were right that using the font size even in the figure environment makes a difference...I just didnt change the font size so much that I would notice right away...using \tiny makes it really obvious.

thank you for the help!