summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-09-15 23:33:07 +0000
committerKarl Berry <karl@freefriends.org>2011-09-15 23:33:07 +0000
commit5cf14d2ba51ffc6d0b16e42e6f459a603da20605 (patch)
treed74fea166b542c00039c17fb1f2769438560ebbc /Master
parent899df8057d5769250db18b1f57dc1757fc2a0fe7 (diff)
impnattypo 0.3 (14sep11)
git-svn-id: svn://tug.org/texlive/trunk@23975 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/impnattypo/impnattypo.pdfbin189597 -> 51098 bytes
-rw-r--r--Master/texmf-dist/source/latex/impnattypo/impnattypo.dtx162
-rw-r--r--Master/texmf-dist/tex/latex/impnattypo/impnattypo.sty77
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check1
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds1
5 files changed, 234 insertions, 7 deletions
diff --git a/Master/texmf-dist/doc/latex/impnattypo/impnattypo.pdf b/Master/texmf-dist/doc/latex/impnattypo/impnattypo.pdf
index 626a74a0cf7..8527120ede4 100644
--- a/Master/texmf-dist/doc/latex/impnattypo/impnattypo.pdf
+++ b/Master/texmf-dist/doc/latex/impnattypo/impnattypo.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/impnattypo/impnattypo.dtx b/Master/texmf-dist/source/latex/impnattypo/impnattypo.dtx
index 4efb58dffc6..16644e211fd 100644
--- a/Master/texmf-dist/source/latex/impnattypo/impnattypo.dtx
+++ b/Master/texmf-dist/source/latex/impnattypo/impnattypo.dtx
@@ -26,15 +26,17 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{impnattypo}
%<*package>
- [2011/09/11 0.1 Recommendations typographiques de l'Imprimerie Nationale Française]
+ [2011/09/13 0.3 Recommendations typographiques de l'Imprimerie Nationale Française]
%</package>
%
%<*driver>
\documentclass{ltxdoc}
-\usepackage{impnattypo}[2011/09/11]
+\usepackage[hyphenation,nosingleletter,parindent,lastparline]{impnattypo}[2011/09/13]
\usepackage[french]{babel}
-\usepackage[utf8]{inputenc}
-\usepackage[T1]{fontenc}
+\usepackage{fontspec}
+\setmainfont{Linux Libertine O}
+\usepackage{metalogo}
+\usepackage[all]{nowidow}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
@@ -46,7 +48,7 @@
%</driver>
% \fi
%
-% \CheckSum{26}
+% \CheckSum{66}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -65,6 +67,8 @@
% Right brace \} Tilde \~}
%
%
+% \changes{0.3}{2011/09/13}{Add parindent and lastparline options}
+% \changes{0.2}{2011/09/13}{Add nosingleletter option}
% \changes{0.1}{2011/09/11}{First version}
%
% \DoNotIndex{\newcommand,\newenvironment}
@@ -90,7 +94,7 @@
%
% C'est le but de ce paquet, qui implémente plusieurs règles
% édictées dans ce lexique afin de les rendre plus facilement applicables
-% aux textes édités avec \LaTeX
+% aux textes édités avec \LaTeX.
%
% \section{Utilisation}
%
@@ -104,6 +108,7 @@
%
% \subsection{Césures}
%
+% \DescribeMacro{hyphenation}
% En dehors des règles générales de coupure des mots, le lexique indique
% qu'il faut \og [éviter] les coupures de mots sur plus de trois lignes
% consécutives \fg{}.
@@ -118,8 +123,52 @@
% \usepackage[hyphenation]{impnattypo}
% \end{verbatim}
%
+%
+% \subsection{Formatage des paragraphes}
+%
+% \DescribeMacro{parindent}
+% Le lexique conseille une indentation des paragraphes de 1em.
+% Ce réglage de |\parindent| peut être obtenu par l'utilisation
+% de l'option \texttt{parindent}:
+%
+% \begin{verbatim}
+% \usepackage[parindent]{impnattypo}
+% \end{verbatim}
+%
+% \DescribeMacro{lastparline}
+% De plus, il est indiqué dans la section \og Coupure des mots \fg{}
+% que \og la dernière ligne d'un alinéa doit comporter un mot ou
+% une fin de mot de longueur au moins égale au double du renfoncement
+% de l'alinéa suivant. \fg{} À défaut d'implémenter exactement cette
+% solution, l'option \texttt{lastparline} s'assure que la dernière
+% ligne d'un alinéa est au moins aussi longue que le double
+% de la valeur de |\parindent|.\footnote{\url{http://tex.stackexchange.com/questions/28357/ensure-minimal-length-of-last-line}}
+%
+% Lorsque \LuaTeX est utilisé, la solution de Patrick Gundlach\footnote{\url{http://tex.stackexchange.com/questions/28357/ensure-minimal-length-of-last-line/28361\#28361}}
+% est utilisée. Avec les autres moteurs de rendu, c'est la solution native de
+% Enrico Gregorio\footnote{\url{http://tex.stackexchange.com/questions/28357/ensure-minimal-length-of-last-line/28358\#28358}}
+% qui fait office d'implémentation:
+%
+% \begin{verbatim}
+% \usepackage[lastparline]{impnattypo}
+% \end{verbatim}
+%
+% \DescribeMacro{nosingleletter}
+% Il est également recommendé d'éviter les coupures isolant une lettre.
+% La solution proposée par Patrick Gundlach\footnote{\url{http://tex.stackexchange.com/questions/27780/one-letter-word-at-the-end-of-line}}
+% permet de remédier à cela en utilisant \LuaTeX. Pour activer cette
+% fonctionalité, il faut utiliser l'option \texttt{nosingleletter}:
+%
+% \begin{verbatim}
+% \usepackage[nosingleletter]{impnattypo}
+% \end{verbatim}
+%
+% Lorsque cette option est activée, seul \LuaTeX{} (via la commande |lualatex|)
+% pourra effectuer le rendu du document.
+%
% \subsection{Numérotation des chapitres}
%
+% \DescribeMacro{frenchchapters}
% Concernant la numérotation des chapitres, le lexique indique:
% \og Dans un titre, on compose en chiffres romains grandes capitales
% les numéros de chapitres, à l'exception de l'ordinal \og premier \fg{}
@@ -142,6 +191,18 @@
% \end{verbatim}
%
%
+% \subsection{Lignes orphelines}
+%
+% Il est fortement recommendé de ne pas laisser de lignes orphelines
+% dans un document. Pour cela, nous vous conseillons d'utiliser le paquet
+% |nowidow|:
+%
+% \begin{verbatim}
+% \usepackage[all]{nowidow}
+% \end{verbatim}
+%
+% Voir la documentation de ce paquet pour plus d'options.
+%
%
% \StopEventually{}
%
@@ -153,10 +214,17 @@
%
% \begin{macrocode}
\ProvidesPackage{impnattypo}
+\usepackage{ifluatex}
\newif\if@impnattypo@frenchchapters
\DeclareOption{frenchchapters}{\@impnattypo@frenchchapterstrue}
\newif\if@impnattypo@hyphenation
\DeclareOption{hyphenation}{\@impnattypo@hyphenationtrue}
+\newif\if@impnattypo@nosingleletter
+\DeclareOption{nosingleletter}{\@impnattypo@nosinglelettertrue}
+\newif\if@impnattypo@parindent
+\DeclareOption{parindent}{\@impnattypo@parindenttrue}
+\newif\if@impnattypo@lastparline
+\DeclareOption{lastparline}{\@impnattypo@lastparlinetrue}
\ProcessOptions
\if@impnattypo@hyphenation
% \end{macrocode}
@@ -187,6 +255,88 @@
\fi
% \end{macrocode}
%
+% \marginpar{No single letter}
+%
+% \begin{macrocode}
+\if@impnattypo@nosingleletter
+ \ifluatex
+ \usepackage{luatexbase,luacode}
+ \begin{luacode}
+
+ local prevent_single_letter = function (head)
+ while head do
+ if head.id == 37 then -- glyph
+ if head.prev.id == 10 and head.next.id == 10 then -- only if we are at a one letter word
+
+ local p = node.new("penalty")
+ p.penalty = 10000
+
+ -- Uncomment the next lines to show the position of the ~'s
+ -- local p = node.new("rule")
+ -- p.width = 2* 2^16
+ -- p.height = 2^16
+ -- p.depth = 2^16
+
+ p.next = head.next
+ head.next.prev = p
+ head.next = p
+
+ end
+ end
+ head = head.next
+ end
+ return true
+ end
+
+ luatexbase.add_to_callback("pre_linebreak_filter",prevent_single_letter,"~")
+ \end{luacode}
+ \else
+ \PackageError{The nosingleletter option only works with LuaTeX}
+ \fi
+\fi
+% \end{macrocode}
+%
+% \marginpar{Paragraph indentation}
+%
+% \begin{macrocode}
+\if@impnattypo@parindent
+\setlength{\parindent}{1em}
+\fi
+% \end{macrocode}
+%
+% \marginpar{Last line of paragraph}
+%
+% \begin{macrocode}
+\if@impnattypo@lastparline
+ \ifluatex
+ \usepackage{luatexbase,luacode}
+ \begin{luacode}
+ last_line_twice_parindent = function (head)
+ while head do
+ local _w,_h,_d = node.dimensions(head)
+ if head.id == 10 and head.subtype ~= 15 and (_w < 2 * tex.parindent) then
+
+ -- we are at a glue and have less then 2*\parindent to go
+ local p = node.new("penalty")
+ p.penalty = 10000
+ p.next = head
+ head.prev.next = p
+ p.prev = head.prev
+ head.prev = p
+ end
+
+ head = head.next
+ end
+ return true
+ end
+
+ luatexbase.add_to_callback("pre_linebreak_filter",last_line_twice_parindent,"lastparline")
+ \end{luacode}
+ \else
+ \setlength{\parfillskip}{0pt plus\dimexpr\textwidth-2\parindent}
+ \fi
+\fi
+% \end{macrocode}
%
% \iffalse
%</package>
diff --git a/Master/texmf-dist/tex/latex/impnattypo/impnattypo.sty b/Master/texmf-dist/tex/latex/impnattypo/impnattypo.sty
index cedfd3d15cd..9185c353e9d 100644
--- a/Master/texmf-dist/tex/latex/impnattypo/impnattypo.sty
+++ b/Master/texmf-dist/tex/latex/impnattypo/impnattypo.sty
@@ -20,12 +20,19 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{impnattypo}
- [2011/09/11 0.1 Recommendations typographiques de l'Imprimerie Nationale Française]
+ [2011/09/13 0.3 Recommendations typographiques de l'Imprimerie Nationale Française]
\ProvidesPackage{impnattypo}
+\usepackage{ifluatex}
\newif\if@impnattypo@frenchchapters
\DeclareOption{frenchchapters}{\@impnattypo@frenchchapterstrue}
\newif\if@impnattypo@hyphenation
\DeclareOption{hyphenation}{\@impnattypo@hyphenationtrue}
+\newif\if@impnattypo@nosingleletter
+\DeclareOption{nosingleletter}{\@impnattypo@nosinglelettertrue}
+\newif\if@impnattypo@parindent
+\DeclareOption{parindent}{\@impnattypo@parindenttrue}
+\newif\if@impnattypo@lastparline
+\DeclareOption{lastparline}{\@impnattypo@lastparlinetrue}
\ProcessOptions
\if@impnattypo@hyphenation
\brokenpenalty=10000
@@ -41,6 +48,74 @@
\fi
}
\fi
+\if@impnattypo@nosingleletter
+ \ifluatex
+ \usepackage{luatexbase,luacode}
+ \begin{luacode}
+
+ local prevent_single_letter = function (head)
+ while head do
+ if head.id == 37 then -- glyph
+ if head.prev.id == 10 and head.next.id == 10 then -- only if we are at a one letter word
+
+ local p = node.new("penalty")
+ p.penalty = 10000
+
+ -- Uncomment the next lines to show the position of the ~'s
+ -- local p = node.new("rule")
+ -- p.width = 2* 2^16
+ -- p.height = 2^16
+ -- p.depth = 2^16
+
+ p.next = head.next
+ head.next.prev = p
+ head.next = p
+
+ end
+ end
+ head = head.next
+ end
+ return true
+ end
+
+ luatexbase.add_to_callback("pre_linebreak_filter",prevent_single_letter,"~")
+ \end{luacode}
+ \else
+ \PackageError{The nosingleletter option only works with LuaTeX}
+ \fi
+\fi
+\if@impnattypo@parindent
+\setlength{\parindent}{1em}
+\fi
+\if@impnattypo@lastparline
+ \ifluatex
+ \usepackage{luatexbase,luacode}
+ \begin{luacode}
+ last_line_twice_parindent = function (head)
+ while head do
+ local _w,_h,_d = node.dimensions(head)
+ if head.id == 10 and head.subtype ~= 15 and (_w < 2 * tex.parindent) then
+
+ -- we are at a glue and have less then 2*\parindent to go
+ local p = node.new("penalty")
+ p.penalty = 10000
+ p.next = head
+ head.prev.next = p
+ p.prev = head.prev
+ head.prev = p
+ end
+
+ head = head.next
+ end
+ return true
+ end
+
+ luatexbase.add_to_callback("pre_linebreak_filter",last_line_twice_parindent,"lastparline")
+ \end{luacode}
+ \else
+ \setlength{\parfillskip}{0pt plus\dimexpr\textwidth-2\parindent}
+ \fi
+\fi
\endinput
%%
%% End of file `impnattypo.sty'.
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 7144a1a916e..086b6432c24 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -370,6 +370,7 @@ my @TLP_working = qw(
thinsp thmbox thmtools threeddice threeparttable threeparttablex
thumb thumbpdf thumbs thumby thuthesis
ticket tikz-cd tikz-3dplot tikz-inet tikz-qtree tikz-timing
+ tikzpagenodes
timetable tipa tipa-de
titlefoot titlepages titlepic titleref titlesec titling
tkz-base tkz-berge tkz-doc tkz-euclide tkz-fct tkz-graph
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index fe8dfc85f58..8a80e00f37b 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -437,6 +437,7 @@ chomp ($Build = `cd $Master/../Build/source && pwd`);
'labtable', "die 'skipping, nonfree w32 application'",
'latex-help-texinfo', "die 'skipping, use latex2e-help-texinfo'",
'latex-make', "die 'skipping, subprograms seem problematic'",
+ 'latex-pro-pragmatiky', "die 'skipping, no source'",
'latex_maker', "die 'skipping, we must not usurp two-character cmd name'",
'latex2pdf', "die 'skipping, too bare-bones'",
'latex3', "die 'skipping, use xpackages'",