Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is the content not horizontally centered in the page? It is slightly left tilted #18

Open
PeterL1n opened this issue Feb 17, 2024 · 2 comments

Comments

@PeterL1n
Copy link

Look at the margin of the page. The left margin is smaller than the right margin. The whole content is left tilted. Can we fix this thing? Bugging me like crazy...

@hust-lidelong
Copy link

hust-lidelong commented Feb 17, 2024 via email

@PeterL1n
Copy link
Author

PeterL1n commented Feb 17, 2024

Ah I figured it out.

Here is the problem:

\setlength{\oddsidemargin}{-.304in}

You gotta change

\setlength{\oddsidemargin}{-0.304in}
\setlength{\evensidemargin}{-0.304in}

to

\setlength{\oddsidemargin}{-0.1875in}
\setlength{\evensidemargin}{-0.1875in}

The old margin value was designed for a4paper, but our document is actually a letterpaper!

Letterpaper width is 8.5in, our textwidth is defined as 6.875in, so the margin on each side should be (8.5-6.875)/2=0.8125. The default margin is 1in, therefore we need to subtract 1-0.8125=0.1875in!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants