[twg-tds] Question: how to include an image file in a document class?
lei at uow.edu.au
Wed Sep 16 07:29:11 CEST 2015
It's well explained. That's something I will keep in mind when I write with LateX from now on.
> On 16 Sep 2015, at 6:52 am, Reinhard Kotucha <reinhard.kotucha at web.de> wrote:
>> On 2015-09-14 at 04:07:14 +0000, Lei Ye wrote:
>> It's my first time to know \graphicspath is deprecated.
>> In the following scenario, what is the best way to do it.
> In the scenario you describe below it doesn't matter because you have
> only one directory.
> TeX maintains a so-called string pool which contains error messages,
> control sequence names, file names, and maybe other things. The size
> if the string pool is limited. Unfortunately whatever goes to it will
> never be removed, hence it is steadily growing.
> Consider the following code:
> Though \mymacro isn't accessible anymore, its name remains in the
> string pool forever.
> Let's assume that you defined
> and there is a file "dir3/IMG1234.JPEG".
> If you write
> (without specifying an extension) and if we assume that pdftex looks for
> in this order, it will check whether one if these files exist:
> dir3/IMG1234.JPEG % <==
> TeX stops searching when dir3/IMG1234.JPEG is found but all file
> names it checked before also remain in the string pool forever.
> This has two consequences:
> 1. Though the pool size is quite large nowadays, it's still
> limited. No problem with the example above but some packages
> add a lot of stuff to the string pool too wich might lead to the
> famous error message "Capacity exceeded".
> 2. If the string pool is large, TeX needs a lot of time in order to
> find control sequences. Fortunately the string pool is actually
> a hash table and thus time consumption grows logarithmically.
> But a huge string pool slows down TeX significantly though.
> Whether this is problematic depends on the number of strings which
> actually are in the pool. A few directory names usually don't cause
> trouble but some macros generate control sequence names on the fly.
> I already had to increase the string pool in order to create many
> plots using the pgfplots package. But the impact on processing time
> remained, of course.
>> I first have a subfolder call images/ to hold my figures and have
>> Then later I decide to change the hosting folder to
>> figures/. Instead of replacing "images/" in all 100
>> \includegraphics commands, what is a better way to do it?
> Well, what would you do if you write a program and decide later to
> change names of variables and/or functions? I think that every
> reasonable text editor is sufficient.
> Furthermore, if you state the directory explicitly in the
> \includegraphics argument you don't have to search the file yourself
> whenever you want to replace it.
> Reinhard Kotucha Phone: +49-511-3373112
> Marschnerstr. 25
> D-30167 Hannover mailto:reinhard.kotucha at web.de
More information about the twg-tds