paragraph

package
v0.0.0-...-dfdad10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Paragraph

type Paragraph struct {
	XMLName xml.Name `xml:"w:p,omitempty"`

	Properties *Properties // 样式 w:pPr
	Items      []interface{}
}

Paragraph <w:p>

func (*Paragraph) AddRun

func (p *Paragraph) AddRun(text string) *run.Run

AddRun 添加文本块

func (*Paragraph) Align

func (p *Paragraph) Align(align string) *Paragraph

Align 对齐方式 left:左对齐。center:居中对齐。 right:右对齐。both:两端对齐。distribute:分散对齐。

func (*Paragraph) Head

func (p *Paragraph) Head(lv int64) *Paragraph

Head 设置标题

func (*Paragraph) IndCustom

func (p *Paragraph) IndCustom(ind style.Ind) *Paragraph

IndCustom 自定义缩进

func (*Paragraph) IndFirst

func (p *Paragraph) IndFirst() *Paragraph

IndFirst 首行缩进

func (*Paragraph) LineSpce

func (p *Paragraph) LineSpce(before, after int) *Paragraph

LineSpce 设置行间距

func (*Paragraph) XSpce

func (p *Paragraph) XSpce(x float64) *Paragraph

XSpce 设置x倍行距

type Properties

type Properties struct {
	style.ParagraphProperties

	RunProperties *run.Properties
}

Properties <w:pPr> 段落样式

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL