Monday, July 27, 2020

Latex add directory for figure

In the practice of Latex writing, it is common to use the same figure or figure directory across different projects (papers). Instead of a copy-paste-ing figure directory, which is usually big in size, it is better to just drop a line of latex code to specify where the location of the figure directory. By using this technique, we can avoid increasing memory size by preventing copying the same files/figures used by different tex files.

Here is how.
% for a single directory
\graphicspath{{figures/}} %Setting the graphicspath

% for multiple directories
\graphicspath{{figures1/}{figures2/}{figures3/}} %Setting the graphicspath


Don't forget the slash '/' after the name of the directory.
That's all. It works!
Related Posts Plugin for WordPress, Blogger...