TransWikia.com

Same font in figues as in document text, CorelDraw 2 pgf?

TeX - LaTeX Asked by Benno P. on December 20, 2020

Dear stackoverflow community,

I am in the midst of writing my thesis and I want my figures to have the same font as my text in Latex.
I have a lot of figures, so I would like the process to be automatic. for that purpose, I have found the neat *.pgf format that Latex can handle with

usepackage{pgfplots}

and

begin{figure}
    input{./example.pgf}
end{figure}

With *.pgf files the font is automatically adjusted, which is exactly what I want. It works great with the figures that I created with matplotlib.pyplot.

My issue:
I have now created figures in CorelDraw such as this one.
I also want these figures as *.pgf so Latex automatically knows what is text and converts it to the same font as the rest of the document.

My question: Do you have an idea how to create *pgf files? Or is there another way of editing the font in my figures?

My attempt to solve it: I have tried exporting the file in CorelDraw to *.eps and using eps2pgf converting it to *.pgf. Sadly eps2pgf does not show compability with the *.eps file created by CorelDraw (error report). I thought I might be able to export it to Inkscape and exporting as an *.eps file there, but the conversion doesn’t work either.

PS: CorelDraw can export to all of these file formats.

One Answer

The solution via Inkscape worked! Thank you DG' for showing me the right direction! :) I am not converting the file to *pgf, but using the export function of Inkscape like this:

  1. Export the graphic as *.svg file in CorelDraw
  2. Import the *.svg file and edit it in Inkscape
  3. Export it as pdf like DG' mentioned in a comment on my question
  4. After doing these steps I was able to import the figure in latex like this: this:

usepackage{tikz}

and

begin{figure}
    graphicspath{{figures/}}
    defsvgwidth{linewidth}
    input{./figures/example_figure.pdf_tex}
    caption{}
end{figure}

(Don't ask me why I had to specify graphicspath, but without it, latex doesn't find the pdf file.

Answered by Benno P. on December 20, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP