Latex段落与页面大小设置(居中对齐/单侧对齐/页面大小布局)

您所在的位置:网站首页 如何将分栏的文件居中对齐 Latex段落与页面大小设置(居中对齐/单侧对齐/页面大小布局)

Latex段落与页面大小设置(居中对齐/单侧对齐/页面大小布局)

2024-07-05 17:00| 来源: 网络整理| 查看: 265

本博文源于Latex对段落样式和页面大小布局进行学习,包含居中对齐、单侧对齐、页面大小布局。

实验效果

在这里插入图片描述

实验内容 居中对齐

居中对齐只需要设置\begin{center}即可。然后加上开门与关门。

%开始对段落居中对齐学习 This is the first normal paragraph. \begin{center} Hi,the center,Hi,the center,Hi,the center!\\ Hi,the center,Hi,the center,Hi,the center!\\ \end{center} This is the first normal paragraph. %结束对段落居中对齐学习 单侧对齐

单侧对齐就是把center改为left。

\begin{flushleft} Hi,the left,Hi,the Left.\\ Hi,the left,Hi,the Left. \end{flushleft} \begin{flushright} Hi,the right,Hi,the right.\\ Hi,the right,Hi,the right. \end{flushright} 页面大小布局

页面大小布局就是设置页面多大的,这个要放在\begin{document}之前

\usepackage[b5paper,text={125mm,195mm},centering]{geometry}

从中括号开始参数:

第一个参数,页面类型可以改动比如b5,a4第二个参数:页面正文区域的宽度和高度大小第三个参数:将正文区域自动居中 实验完整latex源码 \documentclass[UTF8]{article} %开始对页面大小布局 \usepackage[b5paper,text={125mm,195mm},centering]{geometry} %结束对页面大小布局 \usepackage{titletoc} \usepackage{ctexcap} \begin{document} %开始对段落居中对齐学习 This is the first normal paragraph. \begin{center} Hi,the center,Hi,the center,Hi,the center!\\ Hi,the center,Hi,the center,Hi,the center!\\ \end{center} This is the first normal paragraph. %结束对段落居中对齐学习 % 开始单侧对齐学习 \begin{flushleft} Hi,the left,Hi,the Left.\\ Hi,the left,Hi,the Left. \end{flushleft} \begin{flushright} Hi,the right,Hi,the right.\\ Hi,the right,Hi,the right. \end{flushright} %结束单侧对齐学习 \end{document} 实验总结

在对页面大小进行设置的时候,开始排版感觉没啥效果,但是我对将b5改成a4等常见样式时发现还是有变化的,说明latex进行编译时通过对代码的编辑。



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3