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

  • SEARCH
  • Home
  • 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

I am trying to get LaTeX to include figures, but the eps files will
Hello I am having a problem with the numbering of figures using Latex, I
In the latex-mode, we can make a tex file to fill it with all
I am trying to set up a simple one-to-many relationship where a list can
I have a lot of BIG xypic-matrices in my LaTeX file for one of
I am attempting to serialize multiple maps to one file so that I can
I have a WCF service, which works if I use one login, but throws
I am trying to figure out whether I can use protobuf-net to store and
It's late and I can't figure out what is wrong with my syntax. I
LaTeX is a wonderful language for writing documents. With the hyperref package and pdflatex

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.