I am using lyx and want to crate a Beamer presentation with flowcharts.

But I want to make the aspect ratio to be 19:6. The last version of the Beamer package supports this, but older ones, not.

In my system, the older one is installed. So, I have installed locally the newer one (along with all required packages, including pgf, that in turn includes tikz).

This works fine and I can produce beamer presentations with 19:6 aspect ratio.

But now, I want to add some flowcharts. For this purpose, I load the package tikz. But when I attempt to compile I get the following errors:

LaTeX Error: Command \pgfdeclareimage already defined.

LaTeX Error: Command \pgfdeclaremask already defined.

LaTeX Error: Command \pgfimage already defined.

And I think that Latex loads twice the pgf package. So, how could I prevent latex from loading the older (globally installed) packages without to delete them (I do not have root permissions).

But it seems to work well when only the beamer package is loaded, which is also installed globally and locally).

The latex code follows. I have generated it from lyx with Export->LaTeX(pdflatex), and get the same errors as within lyx when I run the file with pdflatex:

%% LyX 2.1.4 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
 % this default might be overridden by plain title style
 % (ERT) argument for the TOC

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.


This is a test

Browse other questions tagged or ask your own question.