lyx-layout-espdx/espdsections.inc
2016-10-20 20:23:01 +03:00

325 lines
10 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Standard textclass definition file. Taken from initial LyX source code
# Author : Matthias Ettrich <ettrich@informatik.uni-tuebingen.de>
# Transposed by Pascal André <andre@via.ecp.fr>
# Heavily modifed and enhanced by several developers.
# This include files contains all numbered sectionning-related
# commands that are useful for article-like document classes, but not
# for letters.
Format 11
#Style Part
# Category Section
# Margin Dynamic
# LabelString "Part \thepart"
# LabelType Counter
# TocLevel 0
# LabelCounter part
# LatexType Command
# LatexName part
# NeedProtect 1
# NextNoIndent 1
# Labelsep xxx
# ParSkip 0.4
# TopSep 4
# BottomSep 4
# ParSep 0.8
# Align Center
# Alignpossible Center
# Font
# Series Bold
# Size Huge
# EndFont
#End
#Style Chapter
# Margin Static
# Category Section
# LabelString "Chapter \thechapter"
# LabelStringAppendix "Appendix \thechapter"
# LabelType Counter
# LabelCounter chapter
# TocLevel 0
# LatexType Command
# LatexName chapter
# NeedProtect 1
# NextNoIndent 1
# ParSkip 0.4
# TopSep 4
# BottomSep 0.8
# ParSep 0.8
# Align Block
# OptionalArgs 1
# Font
# Series Bold
# Size Huge
# EndFont
#End
Style "Раздел"
Category "Раздел"
Margin Dynamic
LabelType Counter
LabelCounter section
LabelString \thesection.
TocLevel 1
LatexType Command
LatexName ESPDsection
NeedProtect 1
NextNoIndent 0
LabelSep xxx
ParSkip 0.4
TopSep 1.3
LeftMargin "MMMMM"
BottomSep 0.7
ParSep 0.7
Align Block
AlignPossible Block, Left
OptionalArgs 1
Font
Series Bold
Size Larger
EndFont
Preamble
\newcommand{\ESPDsection}[1]{
\section{#1}
\setcounter{point}{\value{section}}
\setcounter{subpoint}{0}
}
EndPreamble
End
Style "Подраздел"
CopyStyle "Раздел"
LabelCounter subsection
LabelString \thesubsection.
TocLevel 2
LatexName ESPDsubsection
LeftMargin "MMMMM"
TopSep 0.9
BottomSep 0.5
ParSep 0.5
Font
Series Bold
Size Large
EndFont
Preamble
\newcommand{\ESPDsubsection}[1]{
\subsection{#1}
\setcounter{point}{\value{subsection}}
\setcounter{subpoint}{0}
}
EndPreamble
End
Style "Подподраздел"
CopyStyle "Подраздел"
LabelCounter subsubsection
LabelString \thesubsubsection.
TocLevel 3
LatexName ESPDsubsubsection
LeftMargin "MMMMM"
TopSep 0.5
BottomSep 0.3
ParSep 0.3
Font
Series Medium
Size Normal
EndFont
Preamble
\newcommand{\ESPDsubsubsection}[1]{
\subsubsection{#1}
\setcounter{point}{\value{subsubsection}}
\setcounter{subpoint}{0}
}
EndPreamble
End
# Поскольку в ЕСКД могут быть документы как с подразделами, так и без подразделов
# считаю логичным ввести 2 типа пунктов/подпунктов:
# 1) Для документов БЕЗ подразделов - начинаются префиксом woss(without subsections)
# (wossPoint, wossSubPoint)
# 2) Для документов ИМЕЮЩИХ подраздела - начинаются прфексом wss(with subsections)
# (wssPoint, wssSubPoint)
# так же необходимо разнести и в разные категории, чтобы в UI Lyx можно было выбрать их
# без лишней путаницы.
# Для woss - "Без подразделов"
# Для wss - "С подразделами"
# Само собой они будут использоваться разные счетчики:
# 1) 2 и 3 уровня для wss - subsection и point
# 2) 3 и 4 уровня для woss - point и subpoint
# Так же необходимо выделять заголовки для SubSection и не выбелять для point и subpoint,
# но выводить нумерацию.
Style "Пункт 2 уровень"
Category "Пункты после разделов"
Margin First_Dynamic
LabelType Counter
LabelCounter pointII
LabelString \thepointII.
KeepEmpty 1
LatexType Command
LatexName pointII
# NeedProtect 0
# NextNoIndent 1
LabelSep xxx
ParSkip 0.4
Align Block
AlignPossible Block, Left, Right, Center
End
Style "Пункт 3 уровень"
Category "Пункты после разделов"
Margin First_Dynamic
LabelType Counter
LabelCounter pointIII
LabelString \thepointIII.
KeepEmpty 1
LatexType Command
LatexName pointIII
NeedProtect 0
NextNoIndent 0
LabelSep xxx
ParSkip 0.4
TopSep 0.4
BottomSep 0
End
Style "Пункт 4 уровень"
Category "Пункты после разделов"
Margin First_Dynamic
LabelType Counter
LabelCounter pointIV
LabelString \thepointIV.
KeepEmpty 1
LatexType Command
LatexName pointIV
NeedProtect 0
NextNoIndent 0
LabelSep xxx
ParSkip 0.4
TopSep 0.4
BottomSep 0
End
Style "Подпункт 3 уровень"
Category "Подпункты после пунктов"
Margin First_Dynamic
LabelType Counter
LabelCounter subpointIII
LabelString \thesubpointIII.
KeepEmpty 1
LatexType Command
LatexName subpointIII
NeedProtect 0
NextNoIndent 0
LabelSep xxx
ParSkip 0.4
TopSep 0.4
BottomSep 0
End
Style "Подпункт 4 уровень"
Category "Подпункты после пунктов"
Margin First_Dynamic
LabelType Counter
LabelCounter subpointIV
LabelString \thesubpointIV.
KeepEmpty 1
LatexType Command
LatexName subpointIV
NeedProtect 0
NextNoIndent 0
LabelSep xxx
ParSkip 0.4
TopSep 0.4
BottomSep 0
End
# Поскольку команда ESPDappendix содержит 2 параметра, а передать в команду через Lyx
# мы можем только один документ, то необходимо применить одну старую рыбацкую хитрость,
# которую практиковал мой дедушка.
# Объявим в преамбуле новую команду ESPDappendixOP и будем передавать в неё строку следующего
# вида:
# "{обязательное|рекомендуемое|справочное} Заголовок приложения"
# Используем пакет stringstrings.
# 1) Используя макрос \getaword выхватим первое слово из входящей строки будем использовать его как
# первый параметр для функции ESPDappendix.
# 2) Потом удалить из входящей строки первое слово (которое уже извлечено ранее) и остатки строки
# использовать как второй аргумент ESPDappendix.
# Вот такой я умник.
#% Category Section
#% Margin Dynamic
#% LabelType Counter
#% LabelCounter section
Style "Обязательное"
Category "Приложение"
Margin Dynamic
LabelType Static
LabelString "Прил. Обязат. "
LabelCounter appendix
TocLevel 1
LatexType Command
LatexName ESPDappendixReq
NeedProtect 1
NextNoIndent 1
LabelSep xxx
ParSkip 0.4
TopSep 1.3
BottomSep 0.7
ParSep 0.7
Align Block
AlignPossible Block, Left
OptionalArgs 2
Font
Series Bold
Size Larger
EndFont
Preamble
\newcommand{\ESPDappendixReq}[1]{
\ESPDappendix{"Обязательное"}{#1}
}
EndPreamble
End
Style "Справочное"
CopyStyle "Обязательное"
LabelString "Прил. Справоч. "
LatexName ESPDappendixRef
Preamble
\newcommand{\ESPDappendixRef}[1]{
\ESPDappendix{"Справочное"}{#1}
}
EndPreamble
End
Style "Рекомендуемое"
CopyStyle "Обязательное"
LabelString "Прил. Рекоменд. "
LatexName ESPDappendixRec
Preamble
\newcommand{\ESPDappendixRec}[1]{
\ESPDappendix{"Рекомендуемое"}{#1}
}
EndPreamble
End
Input numarticle.inc