![在 LaTeX 中设置确切的段落样式?](https://linux22.com/image/239527/%E5%9C%A8%20LaTeX%20%E4%B8%AD%E8%AE%BE%E7%BD%AE%E7%A1%AE%E5%88%87%E7%9A%84%E6%AE%B5%E8%90%BD%E6%A0%B7%E5%BC%8F%EF%BC%9F.png)
如何为每一侧设置不同的填充值?我想要与此 HTML/CSS 配置相对应的结果:
<html>
<head>
<style>
div {
background: #444;
color: white;
}
div.padded {
padding-top: 60px;
padding-right: 10px;
padding-bottom: 15px;
padding-left: 152px;
}
</style>
</head>
<body>
<div class="padded">
Padded<br>
Top: 10px; bottom: 0px<br>
Left: 5em; right: 0px
</div>
</body>
</html>
在 LaTeX 中要设置的具体段落样式是什么?
\documentclass{article}
\usepackage{fontspec}
\usepackage{fancyhdr}
\usepackage{multicol}
\pagestyle{plain}\pagestyle{fancy}
\renewcommand{\headrulewidth}{0.4pt} \renewcommand{\footrulewidth}{0.4pt}
\begin{document}
\thispagestyle{empty}
\font\brbrdivpadded="Times New Roman":color=ffffff at 12pt
\font\brdivpadded="Times New Roman":color=ffffff at 12pt
\font\divpadded="Times New Roman":color=ffffff at 12pt
\divpadded{Padded }\divpadded{Top: 10px; bottom: 0px }\divpadded{Left: 5em; right: 0px }
\end{document}
答案1
我给了你一个模拟 HTML 的模板,但它不是那么相似。:-) 在你学习 TeX 并熟悉它的同时逐渐调整它。
\documentclass[dvipsnames,rgb]{article}
\usepackage{xcolor}
\usepackage
[
paperwidth=1024pt,
paperheight=768pt,
left=60pt,
right=60pt,
top=60pt,
bottom=60pt
]{geometry}
\pagecolor{Yellow!50}% page color
\color{Maroon}% text color
\usepackage{lipsum}%dummy text
\usepackage[demo]{graphicx}% import graphics
\begin{document}
\section{Introduction to \LaTeX}
\lipsum[1]
\[E\not=mc^2\]
\lipsum[2]
\begin{figure}[hbtp]
\centering
\includegraphics[width=0.5\linewidth]{foo}
\caption{Dummy Figure}
\end{figure}
\lipsum[3]
\section{Introduction to PSTricks}
\lipsum[4]
\end{document}