summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/parades
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/parades
Initial commit
Diffstat (limited to 'macros/latex/contrib/parades')
-rw-r--r--macros/latex/contrib/parades/README7
-rw-r--r--macros/latex/contrib/parades/example/README.example24
-rw-r--r--macros/latex/contrib/parades/example/SConstruct28
-rw-r--r--macros/latex/contrib/parades/example/paras.py33
-rw-r--r--macros/latex/contrib/parades/example/paras.sty42
-rw-r--r--macros/latex/contrib/parades/example/udhr.pdfbin0 -> 48045 bytes
-rw-r--r--macros/latex/contrib/parades/example/udhr.tex157
-rw-r--r--macros/latex/contrib/parades/example/udhr.xsl77
-rw-r--r--macros/latex/contrib/parades/example/udhr_eng.xml250
-rw-r--r--macros/latex/contrib/parades/parades.pdfbin0 -> 159069 bytes
-rw-r--r--macros/latex/contrib/parades/parades.py137
-rw-r--r--macros/latex/contrib/parades/paravesp.sty58
12 files changed, 813 insertions, 0 deletions
diff --git a/macros/latex/contrib/parades/README b/macros/latex/contrib/parades/README
new file mode 100644
index 0000000000..1ed1734565
--- /dev/null
+++ b/macros/latex/contrib/parades/README
@@ -0,0 +1,7 @@
+The LaTeX package paravesp controls the spaces above and below paragraphs.
+
+The python script parades.py generates paragraph styles with support of space above, space below and tabulators.
+
+Author: Oleg Parashchenko olpa @ http://uucode.com/
+License: The LaTeX Project Public License
+http://www.ctan.org/license/lppl1.3
diff --git a/macros/latex/contrib/parades/example/README.example b/macros/latex/contrib/parades/example/README.example
new file mode 100644
index 0000000000..25467e7303
--- /dev/null
+++ b/macros/latex/contrib/parades/example/README.example
@@ -0,0 +1,24 @@
+UDHR in Unicode
+http://www.unicode.org/udhr/
+http://www.unicode.org/udhr/d/udhr_eng.xml
+UDHR = Universal Declaration of Human Rights
+
+paras.py: The Python paragraph styles
+paras.sty: The generated LaTeX paragraph styles
+udhr.tex: UDHR in LaTeX
+
+The commands to build PDF:
+
+# From XML to TeX
+xsltproc -o udhr.texml udhr.xsl udhr_eng.xml
+texml udhr.texml udhr.tex
+# Paragraph styles
+export PYTHONPATH=..:$PYTHONPATH
+python paras.py paras.sty
+# PDF
+export TEXINPUTS=..:$TEXINPUTS
+pdflatex udhr.tex
+
+The commands can be executed running "scons". Clean-up:
+"scons -c". For details, see the build script SConstruct
+and www.scons.org.
diff --git a/macros/latex/contrib/parades/example/SConstruct b/macros/latex/contrib/parades/example/SConstruct
new file mode 100644
index 0000000000..2aac0a5565
--- /dev/null
+++ b/macros/latex/contrib/parades/example/SConstruct
@@ -0,0 +1,28 @@
+# Build chain for SCons (www.scons.org)
+import os
+
+env = DefaultEnvironment(
+ TOOL_XSLTPROC = 'xsltproc',
+ TOOL_TEXML = 'texml',
+ TOOL_LATEX = 'pdflatex',
+ TOOL_PYTHON = 'python',
+ )
+# scons uses system-default PATH, but our TeX is in user-specific PATH
+env['ENV']['PATH'] = os.environ['PATH']
+env['ENV']['PYTHONPATH'] = '..:' + os.environ.get('PATH', '')
+env['ENV']['TEXINPUTS'] = '..:' + os.environ.get('TEXINPUTS', '')
+
+# Python to sty (paragraph designer)
+node_sty = Command('paras.sty', 'paras.py', '$TOOL_PYTHON paras.py paras.sty')
+
+# XML to TeX
+node_texml = Command('udhr.texml', 'udhr_eng.xml', '$TOOL_XSLTPROC -o $TARGET udhr.xsl $SOURCE')
+Depends(node_texml, 'udhr.xsl')
+
+node_tex = Command('udhr.tex', node_texml, '$TOOL_TEXML $SOURCE $TARGET')
+
+# PDF
+node_pdf = Command('udhr.pdf', node_tex, '$TOOL_LATEX $SOURCE')
+Depends(node_pdf, node_sty)
+Clean(node_pdf, ['udhr.aux', 'udhr.log', 'udhr.out'])
+Default(node_pdf)
diff --git a/macros/latex/contrib/parades/example/paras.py b/macros/latex/contrib/parades/example/paras.py
new file mode 100644
index 0000000000..1bac0f1864
--- /dev/null
+++ b/macros/latex/contrib/parades/example/paras.py
@@ -0,0 +1,33 @@
+from parades import *
+
+add_style(ParagraphOptions(stylecmd='UseParaDefault',
+ fontsize='10pt', baseline='12pt plus.5pt minus.5pt',
+ ))
+
+add_style(ParagraphOptions(cmd='paracmd', env='para',
+ space_above='10pt plus1pt minus1pt',
+ ))
+
+head_i = add_style(ParagraphOptions(cmd='HeadI',
+ space_above='20pt', space_below='20pt',
+ fontsize='12pt', baseline='14pt', fontcmd=r'\fontseries{b}\selectfont',
+ afterpar='\\nobreak',
+ ))
+
+add_style(ParagraphOptions(cmd='HeadII',
+ parent=head_i,
+ space_above='15pt', space_below='15pt',
+ fontsize='11pt', baseline='13pt',
+ ))
+
+add_style(ParagraphOptions(env='udhrlist', cmd='UseParaUdhrList',
+ space_above='10pt plus1pt minus1pt',
+ space_below='10pt plus1pt minus1pt',
+ ))
+
+add_style(ParagraphOptions(cmd='listitem',
+ moresetup='\\interlinepenalty=150\\relax',
+ space_above='8pt',
+ boxes=(('0cm', '0.5cm'),), leftskip='0.5cm'))
+
+main('paras')
diff --git a/macros/latex/contrib/parades/example/paras.sty b/macros/latex/contrib/parades/example/paras.sty
new file mode 100644
index 0000000000..faf8b556b4
--- /dev/null
+++ b/macros/latex/contrib/parades/example/paras.sty
@@ -0,0 +1,42 @@
+\ProvidesPackage{paras}[2016/02/05 Automatically generated paragraph styles for: paras]
+% RTL hook
+\let\pd@leftskip=\leftskip
+
+\newcommand{\UseParaDefault}{\fontsize{10pt}{12pt plus.5pt minus.5pt}\selectfont}%
+
+\newcommand{\paracmd}[1]{{%
+%
+\ParaSpaceAbove{10pt plus1pt minus1pt}%
+\noindent #1\par}\ParaSpaceBelow{0pt}}
+\newenvironment{para}{%
+\ParaSpaceAbove{10pt plus1pt minus1pt}%
+\noindent \ignorespaces}
+{\par\global\def\pd@after@para{\ParaSpaceBelow{0pt}}\aftergroup\pd@after@para}
+
+\newcommand{\HeadI}[1]{{%
+\fontsize{12pt}{14pt}\fontseries{b}\selectfont%
+\ParaSpaceAbove{20pt}%
+\noindent #1\par}\nobreak\ParaSpaceBelow{20pt}}
+
+\newcommand{\HeadII}[1]{{%
+\fontsize{11pt}{13pt}\fontseries{b}\selectfont%
+\ParaSpaceAbove{15pt}%
+\noindent #1\par}\nobreak\ParaSpaceBelow{15pt}}
+
+\newcommand{\UseParaUdhrList}[1]{{%
+%
+\ParaSpaceAbove{10pt plus1pt minus1pt}%
+\noindent #1\par}\ParaSpaceBelow{10pt plus1pt minus1pt}}
+\newenvironment{udhrlist}{%
+\ParaSpaceAbove{10pt plus1pt minus1pt}%
+\noindent \ignorespaces}
+{\par\global\def\pd@after@para{\ParaSpaceBelow{10pt plus1pt minus1pt}}\aftergroup\pd@after@para}
+
+\newcommand{\listitem}[2]{{%
+%
+\ParaSpaceAbove{8pt}%
+\interlinepenalty=150\relax%
+\noindent \advance\pd@leftskip by 0.5cm %
+\hbox to 0pt{\hss\hbox to 0.5cm{#1\hss}\dimen0=0.5cm %
+\advance\dimen0 by -0cm \advance\dimen0 by -0.5cm \hskip\dimen0}%
+\the\everypar #2\par}\ParaSpaceBelow{0pt}}
diff --git a/macros/latex/contrib/parades/example/udhr.pdf b/macros/latex/contrib/parades/example/udhr.pdf
new file mode 100644
index 0000000000..d243543d3a
--- /dev/null
+++ b/macros/latex/contrib/parades/example/udhr.pdf
Binary files differ
diff --git a/macros/latex/contrib/parades/example/udhr.tex b/macros/latex/contrib/parades/example/udhr.tex
new file mode 100644
index 0000000000..eb7f1c8583
--- /dev/null
+++ b/macros/latex/contrib/parades/example/udhr.tex
@@ -0,0 +1,157 @@
+\documentclass[a5paper]{article}
+\usepackage{paravesp}
+\usepackage{paras}
+\usepackage[english]{babel}
+\usepackage{hyperref}
+\begin{document}
+\UseParaDefault
+\HeadI{Universal Declaration of Human Rights}
+%
+\HeadII{Preamble}
+\begin{para}Whereas recognition of the inherent dignity and of the equal and inalienable rights of all members of the human family is the foundation of freedom, justice and peace in the world,\end{para}
+\begin{para}Whereas disregard and contempt for human rights have resulted in barbarous acts which have outraged the conscience of mankind, and the advent of a world in which human beings shall enjoy freedom of speech and belief and freedom from fear and want has been proclaimed as the highest aspiration of the common people,\end{para}
+\begin{para}Whereas it is essential, if man is not to be compelled to have recourse, as a last resort, to rebellion against tyranny and oppression, that human rights should be protected by the rule of law,\end{para}
+\begin{para}Whereas it is essential to promote the development of friendly relations between nations,\end{para}
+\begin{para}Whereas the peoples of the United Nations have in the Charter reaffirmed their faith in fundamental human rights, in the dignity and worth of the human person and in the equal rights of men and women and have determined to promote social progress and better standards of life in larger freedom,\end{para}
+\begin{para}Whereas Member States have pledged themselves to achieve, in co-operation with the United Nations, the promotion of universal respect for and observance of human rights and fundamental freedoms,\end{para}
+\begin{para}Whereas a common understanding of these rights and freedoms is of the greatest importance for the full realization of this pledge,\end{para}
+\begin{para}Now, therefore,\end{para}
+\begin{para}The General Assembly\end{para}
+\begin{para}Proclaims this Universal Declaration of Human Rights as a common standard of achievement for all peoples and all nations, to the end that every individual and every organ of society, keeping this Declaration constantly in mind, shall strive by teaching and education to promote respect for these rights and freedoms and by progressive measures, national and international, to secure their universal and effective recognition and observance, both among the peoples of Member States themselves and among the peoples of territories under their jurisdiction.\end{para}
+%
+\HeadII{Article 1}
+\begin{para}All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood.\end{para}
+%
+\HeadII{Article 2}
+\begin{para}Everyone is entitled to all the rights and freedoms set forth in this Declaration, without distinction of any kind, such as race, colour, sex, language, religion, political or other opinion, national or social origin, property, birth or other status.\end{para}
+\begin{para}Furthermore, no distinction shall be made on the basis of the political, jurisdictional or international status of the country or territory to which a person belongs, whether it be independent, trust, non-self-governing or under any other limitation of sovereignty.\end{para}
+%
+\HeadII{Article 3}
+\begin{para}Everyone has the right to life, liberty and the security of person.\end{para}
+%
+\HeadII{Article 4}
+\begin{para}No one shall be held in slavery or servitude; slavery and the slave trade shall be prohibited in all their forms.\end{para}
+%
+\HeadII{Article 5}
+\begin{para}No one shall be subjected to torture or to cruel, inhuman or degrading treatment or punishment.\end{para}
+%
+\HeadII{Article 6}
+\begin{para}Everyone has the right to recognition everywhere as a person before the law.\end{para}
+%
+\HeadII{Article 7}
+\begin{para}All are equal before the law and are entitled without any discrimination to equal protection of the law. All are entitled to equal protection against any discrimination in violation of this Declaration and against any incitement to such discrimination.\end{para}
+%
+\HeadII{Article 8}
+\begin{para}Everyone has the right to an effective remedy by the competent national tribunals for acts violating the fundamental rights granted him by the constitution or by law.\end{para}
+%
+\HeadII{Article 9}
+\begin{para}No one shall be subjected to arbitrary arrest, detention or exile.\end{para}
+%
+\HeadII{Article 10}
+\begin{para}Everyone is entitled in full equality to a fair and public hearing by an independent and impartial tribunal, in the determination of his rights and obligations and of any criminal charge against him.\end{para}
+%
+\HeadII{Article 11}
+\begin{udhrlist}
+\listitem{1}{Everyone charged with a penal offence has the right to be presumed innocent until proved guilty according to law in a public trial at which he has had all the guarantees necessary for his defence.}
+\listitem{2}{No one shall be held guilty of any penal offence on account of any act or omission which did not constitute a penal offence, under national or international law, at the time when it was committed. Nor shall a heavier penalty be imposed than the one that was applicable at the time the penal offence was committed.}
+\end{udhrlist}
+%
+\HeadII{Article 12}
+\begin{para}No one shall be subjected to arbitrary interference with his privacy, family, home or correspondence, nor to attacks upon his honour and reputation. Everyone has the right to the protection of the law against such interference or attacks.\end{para}
+%
+\HeadII{Article 13}
+\begin{udhrlist}
+\listitem{1}{Everyone has the right to freedom of movement and residence within the borders of each State.}
+\listitem{2}{Everyone has the right to leave any country, including his own, and to return to his country.}
+\end{udhrlist}
+%
+\HeadII{Article 14}
+\begin{udhrlist}
+\listitem{1}{Everyone has the right to seek and to enjoy in other countries asylum from persecution.}
+\listitem{2}{This right may not be invoked in the case of prosecutions genuinely arising from non-political crimes or from acts contrary to the purposes and principles of the United Nations.}
+\end{udhrlist}
+%
+\HeadII{Article 15}
+\begin{udhrlist}
+\listitem{1}{Everyone has the right to a nationality.}
+\listitem{2}{No one shall be arbitrarily deprived of his nationality nor denied the right to change his nationality.}
+\end{udhrlist}
+%
+\HeadII{Article 16}
+\begin{udhrlist}
+\listitem{1}{Men and women of full age, without any limitation due to race, nationality or religion, have the right to marry and to found a family. They are entitled to equal rights as to marriage, during marriage and at its dissolution.}
+\listitem{2}{Marriage shall be entered into only with the free and full consent of the intending spouses.}
+\listitem{3}{The family is the natural and fundamental group unit of society and is entitled to protection by society and the State.}
+\end{udhrlist}
+%
+\HeadII{Article 17}
+\begin{udhrlist}
+\listitem{1}{Everyone has the right to own property alone as well as in association with others.}
+\listitem{2}{No one shall be arbitrarily deprived of his property.}
+\end{udhrlist}
+%
+\HeadII{Article 18}
+\begin{para}Everyone has the right to freedom of thought, conscience and religion; this right includes freedom to change his religion or belief, and freedom, either alone or in community with others and in public or private, to manifest his religion or belief in teaching, practice, worship and observance.\end{para}
+%
+\HeadII{Article 19}
+\begin{para}Everyone has the right to freedom of opinion and expression; this right includes freedom to hold opinions without interference and to seek, receive and impart information and ideas through any media and regardless of frontiers.\end{para}
+%
+\HeadII{Article 20}
+\begin{udhrlist}
+\listitem{1}{Everyone has the right to freedom of peaceful assembly and association.}
+\listitem{2}{No one may be compelled to belong to an association.}
+\end{udhrlist}
+%
+\HeadII{Article 21}
+\begin{udhrlist}
+\listitem{1}{Everyone has the right to take part in the government of his country, directly or through freely chosen representatives.}
+\listitem{2}{Everyone has the right of equal access to public service in his country.}
+\listitem{3}{The will of the people shall be the basis of the authority of government; this will shall be expressed in periodic and genuine elections which shall be by universal and equal suffrage and shall be held by secret vote or by equivalent free voting procedures.}
+\end{udhrlist}
+%
+\HeadII{Article 22}
+\begin{para}Everyone, as a member of society, has the right to social security and is entitled to realization, through national effort and international co-operation and in accordance with the organization and resources of each State, of the economic, social and cultural rights indispensable for his dignity and the free development of his personality.\end{para}
+%
+\HeadII{Article 23}
+\begin{udhrlist}
+\listitem{1}{Everyone has the right to work, to free choice of employment, to just and favourable conditions of work and to protection against unemployment.}
+\listitem{2}{Everyone, without any discrimination, has the right to equal pay for equal work.}
+\listitem{3}{Everyone who works has the right to just and favourable remuneration ensuring for himself and his family an existence worthy of human dignity, and supplemented, if necessary, by other means of social protection.}
+\listitem{4}{Everyone has the right to form and to join trade unions for the protection of his interests.}
+\end{udhrlist}
+%
+\HeadII{Article 24}
+\begin{para}Everyone has the right to rest and leisure, including reasonable limitation of working hours and periodic holidays with pay.\end{para}
+%
+\HeadII{Article 25}
+\begin{udhrlist}
+\listitem{1}{Everyone has the right to a standard of living adequate for the health and well-being of himself and of his family, including food, clothing, housing and medical care and necessary social services, and the right to security in the event of unemployment, sickness, disability, widowhood, old age or other lack of livelihood in circumstances beyond his control.}
+\listitem{2}{Motherhood and childhood are entitled to special care and assistance. All children, whether born in or out of wedlock, shall enjoy the same social protection.}
+\end{udhrlist}
+%
+\HeadII{Article 26}
+\begin{udhrlist}
+\listitem{1}{Everyone has the right to education. Education shall be free, at least in the elementary and fundamental stages. Elementary education shall be compulsory. Technical and professional education shall be made generally available and higher education shall be equally accessible to all on the basis of merit.}
+\listitem{2}{Education shall be directed to the full development of the human personality and to the strengthening of respect for human rights and fundamental freedoms. It shall promote understanding, tolerance and friendship among all nations, racial or religious groups, and shall further the activities of the United Nations for the maintenance of peace.}
+\listitem{3}{Parents have a prior right to choose the kind of education that shall be given to their children.}
+\end{udhrlist}
+%
+\HeadII{Article 27}
+\begin{udhrlist}
+\listitem{1}{Everyone has the right freely to participate in the cultural life of the community, to enjoy the arts and to share in scientific advancement and its benefits.}
+\listitem{2}{Everyone has the right to the protection of the moral and material interests resulting from any scientific, literary or artistic production of which he is the author.}
+\end{udhrlist}
+%
+\HeadII{Article 28}
+\begin{para}Everyone is entitled to a social and international order in which the rights and freedoms set forth in this Declaration can be fully realized.\end{para}
+%
+\HeadII{Article 29}
+\begin{udhrlist}
+\listitem{1}{Everyone has duties to the community in which alone the free and full development of his personality is possible.}
+\listitem{2}{In the exercise of his rights and freedoms, everyone shall be subject only to such limitations as are determined by law solely for the purpose of securing due recognition and respect for the rights and freedoms of others and of meeting the just requirements of morality, public order and the general welfare in a democratic society.}
+\listitem{3}{These rights and freedoms may in no case be exercised contrary to the purposes and principles of the United Nations.}
+\end{udhrlist}
+%
+\HeadII{Article 30}
+\begin{para}Nothing in this Declaration may be interpreted as implying for any State, group or person any right to engage in any activity or to perform any act aimed at the destruction of any of the rights and freedoms set forth herein.\end{para}
+\end{document}
diff --git a/macros/latex/contrib/parades/example/udhr.xsl b/macros/latex/contrib/parades/example/udhr.xsl
new file mode 100644
index 0000000000..aa7a01f75f
--- /dev/null
+++ b/macros/latex/contrib/parades/example/udhr.xsl
@@ -0,0 +1,77 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:udhr="http://www.unhchr.ch/udhr">
+<!-- -->
+
+<xsl:template match="/">
+ <TeXML>
+ <xsl:call-template name="latex-header"/>
+ <xsl:apply-templates/>
+ </TeXML>
+</xsl:template>
+
+<xsl:template match="*">
+ <xsl:message>*** Unprocessed XML element <xsl:value-of select="local-name()"/></xsl:message>
+</xsl:template>
+
+<xsl:template match="udhr:udhr">
+ <env name="document">
+ <cmd name="UseParaDefault" gr="0" nl2="1" />
+ <xsl:apply-templates/>
+ </env>
+</xsl:template>
+
+<xsl:template match="udhr:article | udhr:preamble">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="udhr:udhr/udhr:title">
+ <cmd name="HeadI" nl2="1">
+ <parm><xsl:apply-templates/></parm>
+ </cmd>
+</xsl:template>
+
+<xsl:template match="udhr:preamble/udhr:title | udhr:article/udhr:title">
+ <spec cat="nl?"/>
+ <spec cat="comment"/>
+ <spec cat="nl"/>
+ <cmd name="HeadII" nl2="1">
+ <parm><xsl:apply-templates/></parm>
+ </cmd>
+</xsl:template>
+
+<xsl:template match="udhr:para">
+ <env name="para" nl2="0" nl3="0">
+ <xsl:if test="parent::udhr:listitem">
+ <xsl:attribute name="nl1">0</xsl:attribute>
+ <xsl:attribute name="nl4">0</xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </env>
+</xsl:template>
+
+<xsl:template match="udhr:listitem/udhr:para">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="udhr:orderedlist">
+ <env name="udhrlist">
+ <xsl:apply-templates/>
+ </env>
+</xsl:template>
+
+<xsl:template match="udhr:listitem">
+ <cmd name="listitem" nl2="1">
+ <parm><xsl:value-of select="1+count(preceding-sibling::udhr:listitem)"/></parm>
+ <parm><xsl:apply-templates select="*"/></parm>
+ </cmd>
+</xsl:template>
+
+<xsl:template name="latex-header">
+<TeXML escape="0" ws="1">\documentclass[a5paper]{article}
+\usepackage{paravesp}
+\usepackage{paras}
+\usepackage[english]{babel}
+\usepackage{hyperref}
+</TeXML>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/macros/latex/contrib/parades/example/udhr_eng.xml b/macros/latex/contrib/parades/example/udhr_eng.xml
new file mode 100644
index 0000000000..c7de108c11
--- /dev/null
+++ b/macros/latex/contrib/parades/example/udhr_eng.xml
@@ -0,0 +1,250 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--© The Office of the High Commisioner for Human Rights-->
+
+<udhr iso639-3='eng' xml:lang='en' key='eng' n='English' xmlns="http://www.unhchr.ch/udhr">
+ <title>Universal Declaration of Human Rights</title>
+ <preamble>
+ <title>Preamble</title>
+ <para>Whereas recognition of the inherent dignity and of the equal and inalienable rights of all members of the human family is the foundation of freedom, justice and peace in the world,</para>
+ <para>Whereas disregard and contempt for human rights have resulted in barbarous acts which have outraged the conscience of mankind, and the advent of a world in which human beings shall enjoy freedom of speech and belief and freedom from fear and want has been proclaimed as the highest aspiration of the common people,</para>
+ <para>Whereas it is essential, if man is not to be compelled to have recourse, as a last resort, to rebellion against tyranny and oppression, that human rights should be protected by the rule of law,</para>
+ <para>Whereas it is essential to promote the development of friendly relations between nations,</para>
+ <para>Whereas the peoples of the United Nations have in the Charter reaffirmed their faith in fundamental human rights, in the dignity and worth of the human person and in the equal rights of men and women and have determined to promote social progress and better standards of life in larger freedom,</para>
+ <para>Whereas Member States have pledged themselves to achieve, in co‐operation with the United Nations, the promotion of universal respect for and observance of human rights and fundamental freedoms,</para>
+ <para>Whereas a common understanding of these rights and freedoms is of the greatest importance for the full realization of this pledge,</para>
+ <para>Now, therefore,</para>
+ <para>The General Assembly</para>
+ <para>Proclaims this Universal Declaration of Human Rights as a common standard of achievement for all peoples and all nations, to the end that every individual and every organ of society, keeping this Declaration constantly in mind, shall strive by teaching and education to promote respect for these rights and freedoms and by progressive measures, national and international, to secure their universal and effective recognition and observance, both among the peoples of Member States themselves and among the peoples of territories under their jurisdiction.</para>
+ </preamble>
+ <article number="1">
+ <title>Article 1</title>
+ <para>All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood.</para>
+ </article>
+ <article number="2">
+ <title>Article 2</title>
+ <para>Everyone is entitled to all the rights and freedoms set forth in this Declaration, without distinction of any kind, such as race, colour, sex, language, religion, political or other opinion, national or social origin, property, birth or other status.</para>
+ <para>Furthermore, no distinction shall be made on the basis of the political, jurisdictional or international status of the country or territory to which a person belongs, whether it be independent, trust, non‐self‐governing or under any other limitation of sovereignty.</para>
+ </article>
+ <article number="3">
+ <title>Article 3</title>
+ <para>Everyone has the right to life, liberty and the security of person.</para>
+ </article>
+ <article number="4">
+ <title>Article 4</title>
+ <para>No one shall be held in slavery or servitude; slavery and the slave trade shall be prohibited in all their forms.</para>
+ </article>
+ <article number="5">
+ <title>Article 5</title>
+ <para>No one shall be subjected to torture or to cruel, inhuman or degrading treatment or punishment.</para>
+ </article>
+ <article number="6">
+ <title>Article 6</title>
+ <para>Everyone has the right to recognition everywhere as a person before the law.</para>
+ </article>
+ <article number="7">
+ <title>Article 7</title>
+ <para>All are equal before the law and are entitled without any discrimination to equal protection of the law. All are entitled to equal protection against any discrimination in violation of this Declaration and against any incitement to such discrimination.</para>
+ </article>
+ <article number="8">
+ <title>Article 8</title>
+ <para>Everyone has the right to an effective remedy by the competent national tribunals for acts violating the fundamental rights granted him by the constitution or by law.</para>
+ </article>
+ <article number="9">
+ <title>Article 9</title>
+ <para>No one shall be subjected to arbitrary arrest, detention or exile.</para>
+ </article>
+ <article number="10">
+ <title>Article 10</title>
+ <para>Everyone is entitled in full equality to a fair and public hearing by an independent and impartial tribunal, in the determination of his rights and obligations and of any criminal charge against him.</para>
+ </article>
+ <article number="11">
+ <title>Article 11</title>
+ <orderedlist>
+ <listitem>
+ <para>Everyone charged with a penal offence has the right to be presumed innocent until proved guilty according to law in a public trial at which he has had all the guarantees necessary for his defence.</para>
+ </listitem>
+ <listitem>
+ <para>No one shall be held guilty of any penal offence on account of any act or omission which did not constitute a penal offence, under national or international law, at the time when it was committed. Nor shall a heavier penalty be imposed than the one that was applicable at the time the penal offence was committed.</para>
+ </listitem>
+ </orderedlist>
+ </article>
+ <article number="12">
+ <title>Article 12</title>
+ <para>No one shall be subjected to arbitrary interference with his privacy, family, home or correspondence, nor to attacks upon his honour and reputation. Everyone has the right to the protection of the law against such interference or attacks.</para>
+ </article>
+ <article number="13">
+ <title>Article 13</title>
+ <orderedlist>
+ <listitem>
+ <para>Everyone has the right to freedom of movement and residence within the borders of each State.</para>
+ </listitem>
+ <listitem>
+ <para>Everyone has the right to leave any country, including his own, and to return to his country.</para>
+ </listitem>
+ </orderedlist>
+ </article>
+ <article number="14">
+ <title>Article 14</title>
+ <orderedlist>
+ <listitem>
+ <para>Everyone has the right to seek and to enjoy in other countries asylum from persecution.</para>
+ </listitem>
+ <listitem>
+ <para>This right may not be invoked in the case of prosecutions genuinely arising from non‐political crimes or from acts contrary to the purposes and principles of the United Nations.</para>
+ </listitem>
+ </orderedlist>
+ </article>
+ <article number="15">
+ <title>Article 15</title>
+ <orderedlist>
+ <listitem>
+ <para>Everyone has the right to a nationality.</para>
+ </listitem>
+ <listitem>
+ <para>No one shall be arbitrarily deprived of his nationality nor denied the right to change his nationality.</para>
+ </listitem>
+ </orderedlist>
+ </article>
+ <article number="16">
+ <title>Article 16</title>
+ <orderedlist>
+ <listitem>
+ <para>Men and women of full age, without any limitation due to race, nationality or religion, have the right to marry and to found a family. They are entitled to equal rights as to marriage, during marriage and at its dissolution.</para>
+ </listitem>
+ <listitem>
+ <para>Marriage shall be entered into only with the free and full consent of the intending spouses.</para>
+ </listitem>
+ <listitem>
+ <para>The family is the natural and fundamental group unit of society and is entitled to protection by society and the State.</para>
+ </listitem>
+ </orderedlist>
+ </article>
+ <article number="17">
+ <title>Article 17</title>
+ <orderedlist>
+ <listitem>
+ <para>Everyone has the right to own property alone as well as in association with others.</para>
+ </listitem>
+ <listitem>
+ <para>No one shall be arbitrarily deprived of his property.</para>
+ </listitem>
+ </orderedlist>
+ </article>
+ <article number="18">
+ <title>Article 18</title>
+ <para>Everyone has the right to freedom of thought, conscience and religion; this right includes freedom to change his religion or belief, and freedom, either alone or in community with others and in public or private, to manifest his religion or belief in teaching, practice, worship and observance.</para>
+ </article>
+ <article number="19">
+ <title>Article 19</title>
+ <para>Everyone has the right to freedom of opinion and expression; this right includes freedom to hold opinions without interference and to seek, receive and impart information and ideas through any media and regardless of frontiers.</para>
+ </article>
+ <article number="20">
+ <title>Article 20</title>
+ <orderedlist>
+ <listitem>
+ <para>Everyone has the right to freedom of peaceful assembly and association.</para>
+ </listitem>
+ <listitem>
+ <para>No one may be compelled to belong to an association.</para>
+ </listitem>
+ </orderedlist>
+ </article>
+ <article number="21">
+ <title>Article 21</title>
+ <orderedlist>
+ <listitem>
+ <para>Everyone has the right to take part in the government of his country, directly or through freely chosen representatives.</para>
+ </listitem>
+ <listitem>
+ <para>Everyone has the right of equal access to public service in his country.</para>
+ </listitem>
+ <listitem>
+ <para>The will of the people shall be the basis of the authority of government; this will shall be expressed in periodic and genuine elections which shall be by universal and equal suffrage and shall be held by secret vote or by equivalent free voting procedures.</para>
+ </listitem>
+ </orderedlist>
+ </article>
+ <article number="22">
+ <title>Article 22</title>
+ <para>Everyone, as a member of society, has the right to social security and is entitled to realization, through national effort and international co‐operation and in accordance with the organization and resources of each State, of the economic, social and cultural rights indispensable for his dignity and the free development of his personality.</para>
+ </article>
+ <article number="23">
+ <title>Article 23</title>
+ <orderedlist>
+ <listitem>
+ <para>Everyone has the right to work, to free choice of employment, to just and favourable conditions of work and to protection against unemployment.</para>
+ </listitem>
+ <listitem>
+ <para>Everyone, without any discrimination, has the right to equal pay for equal work.</para>
+ </listitem>
+ <listitem>
+ <para>Everyone who works has the right to just and favourable remuneration ensuring for himself and his family an existence worthy of human dignity, and supplemented, if necessary, by other means of social protection.</para>
+ </listitem>
+ <listitem>
+ <para>Everyone has the right to form and to join trade unions for the protection of his interests.</para>
+ </listitem>
+ </orderedlist>
+ </article>
+ <article number="24">
+ <title>Article 24</title>
+ <para>Everyone has the right to rest and leisure, including reasonable limitation of working hours and periodic holidays with pay.</para>
+ </article>
+ <article number="25">
+ <title>Article 25</title>
+ <orderedlist>
+ <listitem>
+ <para>Everyone has the right to a standard of living adequate for the health and well‐being of himself and of his family, including food, clothing, housing and medical care and necessary social services, and the right to security in the event of unemployment, sickness, disability, widowhood, old age or other lack of livelihood in circumstances beyond his control.</para>
+ </listitem>
+ <listitem>
+ <para>Motherhood and childhood are entitled to special care and assistance. All children, whether born in or out of wedlock, shall enjoy the same social protection.</para>
+ </listitem>
+ </orderedlist>
+ </article>
+ <article number="26">
+ <title>Article 26</title>
+ <orderedlist>
+ <listitem>
+ <para>Everyone has the right to education. Education shall be free, at least in the elementary and fundamental stages. Elementary education shall be compulsory. Technical and professional education shall be made generally available and higher education shall be equally accessible to all on the basis of merit.</para>
+ </listitem>
+ <listitem>
+ <para>Education shall be directed to the full development of the human personality and to the strengthening of respect for human rights and fundamental freedoms. It shall promote understanding, tolerance and friendship among all nations, racial or religious groups, and shall further the activities of the United Nations for the maintenance of peace.</para>
+ </listitem>
+ <listitem>
+ <para>Parents have a prior right to choose the kind of education that shall be given to their children.</para>
+ </listitem>
+ </orderedlist>
+ </article>
+ <article number="27">
+ <title>Article 27</title>
+ <orderedlist>
+ <listitem>
+ <para>Everyone has the right freely to participate in the cultural life of the community, to enjoy the arts and to share in scientific advancement and its benefits.</para>
+ </listitem>
+ <listitem>
+ <para>Everyone has the right to the protection of the moral and material interests resulting from any scientific, literary or artistic production of which he is the author.</para>
+ </listitem>
+ </orderedlist>
+ </article>
+ <article number="28">
+ <title>Article 28</title>
+ <para>Everyone is entitled to a social and international order in which the rights and freedoms set forth in this Declaration can be fully realized.</para>
+ </article>
+ <article number="29">
+ <title>Article 29</title>
+ <orderedlist>
+ <listitem>
+ <para>Everyone has duties to the community in which alone the free and full development of his personality is possible.</para>
+ </listitem>
+ <listitem>
+ <para>In the exercise of his rights and freedoms, everyone shall be subject only to such limitations as are determined by law solely for the purpose of securing due recognition and respect for the rights and freedoms of others and of meeting the just requirements of morality, public order and the general welfare in a democratic society.</para>
+ </listitem>
+ <listitem>
+ <para>These rights and freedoms may in no case be exercised contrary to the purposes and principles of the United Nations.</para>
+ </listitem>
+ </orderedlist>
+ </article>
+ <article number="30">
+ <title>Article 30</title>
+ <para>Nothing in this Declaration may be interpreted as implying for any State, group or person any right to engage in any activity or to perform any act aimed at the destruction of any of the rights and freedoms set forth herein.</para>
+ </article>
+</udhr> \ No newline at end of file
diff --git a/macros/latex/contrib/parades/parades.pdf b/macros/latex/contrib/parades/parades.pdf
new file mode 100644
index 0000000000..76686d6b8f
--- /dev/null
+++ b/macros/latex/contrib/parades/parades.pdf
Binary files differ
diff --git a/macros/latex/contrib/parades/parades.py b/macros/latex/contrib/parades/parades.py
new file mode 100644
index 0000000000..5a8741b1fd
--- /dev/null
+++ b/macros/latex/contrib/parades/parades.py
@@ -0,0 +1,137 @@
+# Paragraph designer generation
+import sys, time, os.path
+styles_438dsg48 = []
+
+def add_style(style):
+ styles_438dsg48.append(style)
+ return style
+
+class ParagraphOptions:
+
+ def __init__(self, **kw):
+ arg_names = ('cmd', 'parent', 'space_above', 'space_below', 'fontsize', 'baseline', 'fontcmd', 'stylecmd', 'boxes', 'leftskip', 'moresetup', 'afterpar', 'env', 'hsize', 'preamble_arg1', 'preamble_arg2', 'preamble_arg3', 'preamble_arg4')
+ cmd = kw.get('stylecmd') # 'cmd' or 'stylecmd' are required
+ if not cmd:
+ cmd = kw['cmd']
+ parent = kw.get('parent', None)
+ if parent:
+ for arg in arg_names:
+ if ('cmd' == arg) or ('stylecmd' == arg):
+ setattr(self, arg, None)
+ continue
+ setattr(self, arg, getattr(parent, arg))
+ else:
+ for arg in arg_names:
+ setattr(self, arg, None)
+ for (arg, val) in kw.iteritems():
+ if not (arg in arg_names):
+ raise AttributeError(arg)
+ setattr(self, arg, val)
+
+ #
+ # Print style as an internal command
+ #
+ def get_style_string(self):
+ s = ''
+ #if self.space_above:
+ # s = "\\ParaSpaceAbove{%s}" % self.space_above
+ fontcmd = self.fontcmd
+ if self.fontsize and self.baseline:
+ s = s + "\\fontsize{%s}{%s}" % (self.fontsize, self.baseline)
+ if not fontcmd:
+ fontcmd = '\\selectfont'
+ if fontcmd:
+ s = s + fontcmd
+ return s
+
+ #
+ # Print the style as command
+ #
+ def print_command(self, h):
+ if self.stylecmd:
+ s_style = self.get_style_string()
+ h.write("\\newcommand{\\%s}{%s}%%\n" % (self.stylecmd, s_style))
+ if not self.cmd:
+ return
+ if self.boxes:
+ n_boxes = len(self.boxes)
+ else:
+ n_boxes = 0
+ n_lastarg = n_boxes + 1
+ h.write("\\newcommand{\\%s}[%i]{{%%\n" % (self.cmd, n_lastarg))
+ self.write_para_setup(h)
+ if self.boxes:
+ if self.leftskip:
+ h.write("\\advance\\pd@leftskip by %s " % self.leftskip)
+ self.print_boxes(h)
+ h.write("%\n\\the\\everypar ")
+ s_after_par = self.get_after_para()
+ if self.hsize:
+ h.write("\\hsize=%s\\relax\n" % self.hsize)
+ preamble_attr = 'preamble_arg' + str(n_lastarg)
+ s_preamble = getattr(self, preamble_attr, None)
+ if s_preamble is None:
+ s_preamble = ''
+ h.write("%s#%i\\par}%s}\n" % (s_preamble, n_lastarg, s_after_par))
+
+ def print_env(self, h):
+ if not self.env:
+ return
+ h.write("\\newenvironment{%s}{" % self.env)
+ self.write_para_setup(h)
+ h.write("\ignorespaces}\n{")
+ ap = self.get_after_para()
+ if ap:
+ h.write("\\par\\global\\def\\pd@after@para{%s}\\aftergroup\\pd@after@para" % ap)
+ h.write("}\n")
+
+ def write_para_setup(self, h):
+ # "space_above" before "moresetup" because the latter
+ # may contain a call to "headbreaker"
+ s_style = self.get_style_string()
+ h.write(s_style)
+ spa = self.space_above or '0pt'
+ if '#natural' != spa:
+ h.write("%%\n\\ParaSpaceAbove{%s}" % spa)
+ if self.moresetup:
+ h.write("%%\n%s" % self.moresetup)
+ h.write("%\n\\noindent ")
+
+ def get_after_para(self):
+ s_after_par = ''
+ if self.afterpar:
+ s_after_par = self.afterpar
+ if '#natural' != self.space_below:
+ spb = self.space_below or '0pt'
+ s_after_par = s_after_par + ('\\ParaSpaceBelow{%s}' % spb)
+ return s_after_par
+
+ def print_boxes(self, h):
+ box_i = 0
+ for box in self.boxes:
+ box_i = box_i + 1
+ (offset, width) = box
+ h.write("%%\n\\hbox to 0pt{\\hss\\hbox to %s{#%i\\hss}\\dimen0=%s " % (width, box_i, self.leftskip))
+ h.write("%%\n\\advance\\dimen0 by -%s \\advance\\dimen0 by -%s \\hskip\\dimen0}" % (offset, width))
+
+def print_styles(h):
+ for style in styles_438dsg48:
+ h.write("\n")
+ style.print_command(h)
+ style.print_env(h)
+
+#
+# Command-line
+#
+def main(codeword):
+ h = sys.stdout
+ if len(sys.argv) > 1:
+ file_name = sys.argv[1]
+ h = open(file_name, 'w')
+ s_name = os.path.splitext(os.path.basename(file_name))[0]
+ s_date = time.strftime('%Y/%m/%d')
+ h.write("\\ProvidesPackage{%s}[%s Automatically generated paragraph styles for: %s]\n" % (s_name, s_date, s_name))
+ h.write("% RTL hook\n\\let\\pd@leftskip=\\leftskip\n")
+ print_styles(h)
+ if h != sys.stdout:
+ h.close()
diff --git a/macros/latex/contrib/parades/paravesp.sty b/macros/latex/contrib/parades/paravesp.sty
new file mode 100644
index 0000000000..5f983dd316
--- /dev/null
+++ b/macros/latex/contrib/parades/paravesp.sty
@@ -0,0 +1,58 @@
+\ProvidesPackage{paravesp}[2016/02/05 space above and below paragraphs]
+
+\newcount\pd@lastpenalty
+
+\newcommand\pd@remember@penalty{\pd@lastpenalty=\lastpenalty\relax}
+
+\newcommand\pd@restore@penalty{\ifnum 0=\pd@lastpenalty \else
+ \penalty\pd@lastpenalty\relax \fi}
+
+\newcommand\ParaSpaceAbove[1]{\relax % Mask \ifdim from possible expansion
+\ifvmode
+ \skip0=#1\relax
+ \ifdim\parskip<0pt\relax
+ \skip0=0pt\relax
+ \fi
+ \ifdim\skip0=0pt\relax
+ \IssueParaSpace
+ \else
+ \ifdim\prevdepth>-1000pt\relax
+ \advance\parskip by \prevdepth\relax % assumed: was set by SpaceBelow
+ \pd@remember@penalty
+ \vskip-\prevdepth\relax
+ \pd@restore@penalty
+ \prevdepth=-1000pt\relax
+ \fi
+ \ifdim\skip0>\parskip\relax
+ \parskip=#1\relax
+ \fi
+ \fi
+\fi
+}
+
+\newcommand\ParaSpaceBelow[1]{\relax
+\parskip=#1\relax
+\advance\parskip by -\prevdepth\relax
+\ifdim\parskip<0pt\relax
+ \ifdim#1<0pt\relax \parskip=#1\relax \else \parskip=0pt\relax \fi
+ \nointerlineskip
+\else% >=10000pt
+ \ifdim\parskip>999pt\relax \parskip=#1\relax\fi
+\fi}
+
+\newcommand\IssueParaSpace{\relax
+\ifhmode \typeout{! LaTeX warning: IssueParaSpace in horizontal mode.}\par \fi
+\ifdim\parskip>0pt\relax
+ \pd@remember@penalty
+ \vskip\parskip\relax
+ \pd@restore@penalty
+ \prevdepth=-1000pt\relax
+ \parskip=0pt\relax
+\fi
+}
+
+\newcommand\IgnoreSpaceAboveNextPara{%
+\ParaSpaceBelow{-0.01pt}}
+
+\newcommand\CancelIgnoreSpaceAboveNextPara{%
+\relax\ifdim\parskip<0pt\relax \parskip=0pt\relax \fi}