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:
\begin{figure}\caption{text}\input{file.pdf_tex}\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:
\begin{figure}\caption{text}\large\input{file.pdf_tex}\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.
\begin{figure}\caption{text}\begin{small}\input{file.pdf_tex}\end{small}\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:
\begin{figure}[h]\caption{Price of Scottish and Norwegian salmon in the UK}\def\svgwidth{350pt}\input{salmons-prices.pdf_tex} \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:

\documentclass{article}\usepackage{graphicx}\usepackage{color,transparent}\begin{document}\begin{figure}[h]\caption{Price of Scottish and Norwegian salmon in the UK}\def\svgwidth{350pt}\small\input{salmons-prices}\end{figure}\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):

\documentclass{article}\usepackage[T1]{fontenc}\usepackage{graphicx}\usepackage{color,transparent}\usepackage{anyfontsize}\begin{document}\begin{figure}[h]\caption{Price of Scottish and Norwegian salmon in the UK}\def\svgwidth{350pt}\fontsize{4}{6}\selectfont\input{salmons-prices}\end{figure}\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!