in All availableThis forumThis topic
Author Message
meyerm
Veteran

Joined: 27 Jun 2002
Posts: 1311
Location: Munich / Germany

 Posted: Fri Mar 30, 2012 8:16 am    Post subject: including files in LaTeX depending on environment Hi, how can I include files in LaTeX depending on the used environment to build the document? I'd like to include a different file when the document is being built with pdflatex than when it is built with latex. The background: I am writing on a document with other people and while most of use use pdflatex, some prefer the tex->dvi->ps->pdf way of compiling. pdflatex can create nicer PDFs including some PDF-features that PS simply does not offer (links f.ex.). So, how can I now include nice looking PDF- and PNG-graphics when the document is compiled with pdflatex and fall back to exported EPS when the traditional approach is used? Most of my graphics are created with inkscape and the pdf_tex or in the future then the eps_tex export feature. Thank you M
juniper
l33t

Joined: 22 Oct 2004
Posts: 756
Location: EU

Posted: Fri Mar 30, 2012 11:05 am    Post subject: Re: including files in LaTeX depending on environment

 meyerm wrote: Hi, how can I include files in LaTeX depending on the used environment to build the document? I'd like to include a different file when the document is being built with pdflatex than when it is built with latex. The background: I am writing on a document with other people and while most of use use pdflatex, some prefer the tex->dvi->ps->pdf way of compiling. pdflatex can create nicer PDFs including some PDF-features that PS simply does not offer (links f.ex.). So, how can I now include nice looking PDF- and PNG-graphics when the document is compiled with pdflatex and fall back to exported EPS when the traditional approach is used? Most of my graphics are created with inkscape and the pdf_tex or in the future then the eps_tex export feature. Thank you M

if you use includegraphics and don't put a file extension on the included picture, doesn't latex automatically look for a eps file while pdflatex automatically looks for a pdf file? only works if the only two options are eps and pdf.
disi
Veteran

Joined: 28 Nov 2003
Posts: 1351
Location: Out There ...

meyerm
Veteran

Joined: 27 Jun 2002
Posts: 1311
Location: Munich / Germany

Posted: Sat Mar 31, 2012 5:58 pm    Post subject: Re: including files in LaTeX depending on environment

 juniper wrote: if you use includegraphics and don't put a file extension on the included picture, doesn't latex automatically look for a eps file while pdflatex automatically looks for a pdf file? only works if the only two options are eps and pdf.

You already mentioned the problem with that . Other files won't work. Otherwise it would be a good idea to do it like you said.
meyerm
Veteran

Joined: 27 Jun 2002
Posts: 1311
Location: Munich / Germany

Posted: Sat Mar 31, 2012 6:01 pm    Post subject:

Thank you, too.

 disi wrote: Put that in a style file and all you need to do is to change the .sty file at the top of the document to load different graphics?

While this could work, I cannot ask the people to always change the included style (or any other command in the file) whenever they want to build the file they checked out of the repository. I even thought about misusing a Makefile for that by setting a symlink, but that will surely lead to a lot of problems. At least when people build the document without the Makefile.
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT Page 1 of 1

 Jump to: Select a forum Assistance----------------News & AnnouncementsFrequently Asked QuestionsInstalling GentooMultimediaDesktop EnvironmentsNetworking & SecurityKernel & HardwarePortage & ProgrammingGamers & PlayersOther Things GentooUnsupported Software Discussion & Documentation----------------Documentation, Tips & TricksGentoo ChatGentoo Forums FeedbackOff the WallDuplicate Threads International Gentoo Users----------------中文 (Chinese)DutchFinnishFrenchDeutsches Forum (German)  Diskussionsforum  Deutsche DokumentationGreekForum italiano (Italian)  Forum di discussione italiano  Risorse italiane (documentazione e tools)Polskie forum (Polish)  Instalacja i sprzęt  Polish OTWPortuguese  Documentação, Ferramentas e DicasRussianScandinavianSpanishOther Languages Architectures & Platforms----------------Gentoo on AMD64Gentoo on PPCGentoo on SparcGentoo on Alternative ArchitecturesGentoo for Mac OS X (Portage for Mac OS X)
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum