Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 150959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:22:25+00:00 2026-05-11T09:22:25+00:00

In LaTeX figures, one can use \textwidth and \columnwidth to specify sizes of the

  • 0

In LaTeX figures, one can use \textwidth and \columnwidth to specify sizes of the graphic relative to the size of surrounding text, e.g. \includegraphics[width=.5\textwidth]{myimage}.

I would like to easily switch from onecolumn to twocolumn template (and back) without the figure growing too large for onecolumn template. For twocolumn template (where \columnwidth is roughly half the \textwidth), I would like to have something like: \includegraphics[width=.9\columnwidth]{myimage}. and for onecolumn template (where \columnwidth and \textwidth are equal):
\includegraphics[width=.5\textwidth]{myimage}.

Now, I figured I could limit this using some kind of a min operator: \includegraphics[width=min(.5\textwidth,.9\columnwidth)]{myimage} but this is invalid syntax. Is there something like this to solve this problem, possibly through the use of LaTeX macro system?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T09:22:25+00:00Added an answer on May 11, 2026 at 9:22 am

    Although it’s possible to write this sort of macro, I wouldn’t want to hardcode it into each figure; how about something like this

    \makeatletter \newlength \figwidth \if@twocolumn   \setlength \figwidth {0.9\columnwidth} \else   \setlength \figwidth {0.5\textwidth} \fi \makeatother 

    and then use

    \includegraphics[width=\figwidth]{myimage} 

    to insert the graphic.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What Latex styles do you use and where do you find them? The reason
TeX/LaTeX is great, I use it in many ways. Some of its advantages are:
I have a lot of BIG xypic-matrices in my LaTeX file for one of
I am trying to include jpeg files in latex \includegraphics[width=57.6mm, height=43.2mm]{../../results2/html/zerooneloss_stumps.jpg} With specified the
I have generated eps figures in MATLAB and am using them in Latex. (Miktex
I am using LaTeX and the figure environment. I am well familiar with the
the following latex input: \rule{1cm}{1cm}\\ \rule{1cm}{1cm} leaves a gap of about .35mm between the
I'm new to LaTeX and I must say that I am really struggling with
I'm using LaTeX 's listings package to format source code. Unfortunately I get curly
Working with a latex document with eps images as in the example below... \documentclass[11pt]{paper}

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.