Re: ignoring end of lines within figure environment



Enrico Gregorio <gregorio@xxxxxxxxxxxxx> wrote:

If you are sure that the external program writes only lines of the
form

\includegraphics[options]{name}

you can get away with the following trick:

\let\origincgr\includegraphics
\def\modincgr#1 {\origincgr#1}

\newcommand*{\OrgIncludegraphics}{}
\let\OrgIncludegraphics\includegraphics
\renewcommand*{\includegraphics}[2][]{%
\OrgIncludegraphics[{#1}]{#2}%
\ignorespaces
}

% This should work for \includegraphics.
% In general the redefinition of macros
% with optional arguments is more complicate.

Alternative approach:
\endlinechar=-1

Yours sincerely
Heiko <oberdiek@xxxxxxxxxxxxxxx>
.



Relevant Pages

  • Re: problem with ifdim on LaTeX lengths?
    ... Heiko Oberdiek wrote: ... package calc is loaded.) ... I have a very simple macro that uses this trick to help in alignment, so basiacally you are saying that I either have to create my own version of \setlength or resort to low level tex programming. ... LaTeX FAQ: http://www.tex.ac.uk/faq ...
    (comp.text.tex)
  • Farbwert nach RGB zurückwandeln (Umkehr von RGB)
    ... Farbanteile wandeln. ... Gibt es da eine Funktion oder hat jemand einen Trick? ... Viele Dank ... Gruß Heiko ...
    (microsoft.public.de.fox)
  • Re: exercise environment, redux
    ... Art Werschulz wrote: ... On Mon 11 Jul 2011 at 03:58 PM, Enrico Gregorio wrote: ... inside the "ex" environment. ... Did you try the \everypar trick to avoid spurious spaces? ...
    (comp.text.tex)
  • Re: save size exceeded due to csname-definition?
    ... Enrico Gregorio wrote: ... Then the incompatibility remains that the meaning "\relax" triggers ... Heiko ...
    (comp.text.tex)
  • Re: Need simple example to process package options
    ... Enrico Gregorio wrote: ... Copy the previous lines in a .tex document and process through LaTeX; ... If you exchange the commented lines, ... Heiko ...
    (comp.text.tex)