LaTeX forum ⇒ Graphics, Figures & TablesHow to change the frame line thickness ? Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
User avatar
Cham
Posts: 813
Joined: Sat Apr 02, 2011 4:06 pm

How to change the frame line thickness ?

Postby Cham » Sun Nov 19, 2017 1:39 am

I don't need anything fancy. Just to change the frame thickness in this MWE example :

  1. \documentclass[12pt,letterpaper,twoside]{book}
  2. \usepackage{lmodern}
  3. \usepackage{amsmath}
  4. \usepackage{graphicx}
  5.  
  6. \begin{document}
  7.  
  8. \begin{figure}
  9. \centering
  10. \frame{\includegraphics[height=6.5cm]{example-image}}
  11. \end{figure}
  12.  
  13. \end{document}


If possible, I don't want to use another package just to change the line thickness. Any suggestion ? Are there some options for the \frame command ?

User avatar
Johannes_B
Site Moderator
Posts: 3584
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sun Nov 19, 2017 2:06 am

Better use fbox.
  1. \documentclass[12pt,letterpaper,twoside]{book}
  2. \usepackage{lmodern}
  3. \usepackage{amsmath}
  4. \usepackage{graphicx}
  5.  
  6. \begin{document}
  7.  
  8. \begin{figure}
  9. \centering
  10. \setlength{\fboxrule}{5pt}
  11. \setlength{\fboxsep}{0pt}
  12. \fbox{\includegraphics[height=6.5cm]{example-image}}
  13. \end{figure}
  14. \begin{figure}
  15. \centering
  16. \makeatletter
  17. \@wholewidth5pt
  18. \makeatother
  19. \frame{\includegraphics[height=6.5cm]{example-image}}
  20. \end{figure}
  21.  
  22. \end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

User avatar
Cham
Posts: 813
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Sun Nov 19, 2017 2:13 am

Indeed, fbox appears to solve my issue. Thanks a lot !


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 9 guests