Page Layout ⇒ Center, Centering Inconsistency
Center, Centering Inconsistency
I'm having a problem in which the images and text I enter, though of the same alignment, do not align properly. I've tried \begin{center} - \end{center} tags and \centering but both exhibit the same problem.
*also, site requires me to log in repeatedly which is utterly annoying
- Attachments
-
- centering.png (110.61 KiB) Viewed 2891 times
Reason: Preferably no external links (see Board Rules). Attachments go onto the forum server where possible.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Re: Center, Centering Inconsistency
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Center, Centering Inconsistency
What do you mean? Where do I find the log file? Is there a specific error I should look for to fix this?
Cheers,
Josh
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Re: Center, Centering Inconsistency
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Center, Centering Inconsistency
I guess your images are too wide. If they are wider than the text width, they cannot be centered.
Either resize the bigger images, such as by
Code: Select all
\includegraphics[width=\textwidth]{filename}
Code: Select all
\noindent\makebox[\textwidth]{\includegraphics{filename}}
Stefan
Re: Center, Centering Inconsistency
Thank you for your responses. I used Stefan's second solution and it worked perfectly. Again, thank you very much.

Cheers,
Josh