Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Figures/Tables do not fit into the page, so that some tables get cut by their right side (imagine that I cannot see the end of the table on its right side). Here is the complicated part:

My situation:

  1. I have two modes under which I compile the document: INFORMS (1column) and IEEE(2 column)

The figures/tables are fine with IEEE template (2 column). It knows how to scale them well, so that everything fits.

All figures are large when compiled with INFORMS. I want to reduce the size by say 40% on each figure.

Some big tables do not fit into the page as described above.

My questions:

How can I apply 40% size reduction to all Figures (all Vector graphics), so that I get smaller figures without affecting the IEEE compilation part?

How to define the tables so that they fit even with INFORMS template?

I did my homework!

The only solution that I am thinking of based on my little knowledge of latex is to use flag and define the objects in a duplicated manner and, depending on which mode, render the appropriate tables\figures. Obviously, this is really ugly solution.

I am interested in solutions that can enforce something globally for all tables and/or figures.

share|improve this question
1  
Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. –  Martin Schröder Feb 10 at 11:28

1 Answer 1

up vote 1 down vote accepted

When defining width of your floats, instead of using absolute size, you can use \textwidth.

For example,

\includegraphics[width = 0.5 \textwidth]{image.png}

will give you an image automatically scaled with respect to text width (as a result with respect to number of columns in your template).

The multiplication coefficient can be set in the beginning if you want to change the scaling of all floats at once.

\newcommand{\widthcoeff}{0.8}
...
\includegraphics[\widthcoeff \textwidth]{image.png}

If you don't want to manually change the coefficient for each case, you can also define a conditional.

\newif\ifieeeformat
\ieeeformattrue % if you comment this line out it will be false
\newcommand{\widthcoeff}{0.8}
...
\ifieeeformat
\renewcommand{\widthcoeff}{1}
\fi
share|improve this answer
1  
\linewidth is better than \textwidth. –  Harish Kumar Feb 10 at 14:29
    
@yaksoy I already have width=\linewidth, it works fine with IEEE format, but with INFORMS template, the figures are too large. I want to resize the images by reducing 40% only in the case of INFORMs template. –  Bob Feb 10 at 17:01
    
@Bob I updated the answer. –  yaksoy Feb 11 at 11:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.