GeneralAdjusting font sizes

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
NinV
Posts: 69
Joined: Sun Oct 05, 2008 12:57 pm

Adjusting font sizes

Post by NinV »

Hi,

I would like to adjust fonts according to the distance between pictures (circles) which they refer to.

But didn't succeed!

I tried the following code:

Code: Select all

\newcommand{\redim}[1]{%
   \ifx \xunit > 24
    {\huge{#1}}
   \else
	 \ifx \xunit > 20
     {\LARGE{#1}}
    \else
	  \ifx \xunit > 17
      {\Large{#1}}
     \else
	   \ifx \xunit > 14
       {\large{#1}}
      \else
	    \ifx \xunit > 12
        {\normalsize{#1}}
       \else
	     \ifx \xunit > 10
         {\small{#1}}
        \else
            {\tiny{#1}}
        \fi
       \fi
      \fi
     \fi
    \fi
   \fi
 }
\xunit is distance between the pictures in pt.

The result is always \tiny.

I'm trying to modify psgo.sty, which uses pstrick.

Thank you very much.
Nino
Window + MiKTeX 2.7
Ubuntu + TexLive + Kile
Xandros (eeePC) + TeTex + TexMaker

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Re: Adjusting font sizes

Post by phi »

Hello,

you cannot compare dimensions with \ifx, use \ifdim instead.
NinV
Posts: 69
Joined: Sun Oct 05, 2008 12:57 pm

Re: Adjusting font sizes

Post by NinV »

Thank you, it works!

Ciao,
Nino
Window + MiKTeX 2.7
Ubuntu + TexLive + Kile
Xandros (eeePC) + TeTex + TexMaker
Post Reply