J'ai eu subitement un problème en compilant un document contenant des
chapitres relatif au package soul, le message d'erreur étant :
! Package soul Error: Reconstruction failed.
En gros, j'utilise le template classicthesis modifié pour le faire
fonctionner avec lualatex, et ce template contient un
\requirepackage{soul} qui bloque avec lualatex. J'ai essayé la
recommandation de Ulrik Fischer ici :
http://web.archiveorange.com/archive/v/l9xdWrW3vYeet65AwmCX
Mais le message d'erreur subsiste pour les headers. Il apparaît alors
en pressant tout de même Entrée pour sauter les erreurs des carrés
noirs dans le pdf.
J'utilise la dernière version de lualatex (la version de TLcontrib,
http://tlcontrib.metatex.org/usage.html ), ainsi que les fichiers du
template modifiés. Si jamais qqn saurait faire fonctionner ça je lui
en serai très reconnaissant, j'utilise constamment ce template
(parfait pour moi).
Voici un ECM :
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[headinclude,
11pt,a4paper,BCOR5mm,footinclude=true]{scrreprt}
\usepackage{classicthesis-ldpkg}
\usepackage[floatperchapter]{classicthesis}
\usepackage{luatextra}
\setmainfont{TeX Gyre Pagella}
\usepackage{lipsum}
\begin{document}
\pagestyle{scrheadings}
\chapter{test}
\lipsum
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
classicthesis-ldpkg.sty modifié :
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ********************************************************************
% classicthesis-ldpkg.sty (formerly known as loadpackages.sty)
%
% Copyright (C) 2011 Andr\'e Miede http://www.miede.de
%
% If you like the style then I would appreciate a postcard. My address
% can be found in the file ClassicThesis.pdf. A collection of the
% postcards I received so far is available online at
% http://postcards.miede.de
%
% License:
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program; see the file COPYING. If not, write to
% the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
% Boston, MA 02111-1307, USA.
%
%
********************************************************************
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{classicthesis-ldpkg}[2011/01/24 v2.9 Package Loader
for Classic Thesis Style]
\@ifpackageloaded{classicthesis}%
{\PackageWarningNoLine{classicthesis-ldpkg}{Package
"classicthesis" should be loaded AFTER "classicthesis-ldpkg".}}%
{\relax}%
% ********************************************************************
% Options
% ********************************************************************
\RequirePackage{ifthen}
\newboolean{cld@backref} % enable backrefs in the bibliography
\DeclareOption{backref}{\setboolean{cld@backref}{true}}
\ProcessOptions\relax
% ********************************************************************
% Packages
% ********************************************************************
%\RequirePackage[T1]{fontenc}
\RequirePackage{textcomp}
%\RequirePackage[dvipsnames]{xcolor}
\RequirePackage{xspace} % to get the spacing after macros right
\RequirePackage{tabularx} % better tables
\RequirePackage{mparhack} % get marginpar right
\RequirePackage{fixltx2e} % fixes some LaTeX stuff
%\RequirePackage{ellipsis} % ... ;-)
\RequirePackage{relsize} % scale font up or down
\RequirePackage[printonlyused,smaller]{acronym} % nice macros for
handling all acronyms in the thesis
%\renewcommand*{\acsfont}[1]{\textssc{#1}}
\renewcommand{\bflabel}[1]{{#1}\hfill} % fix the list of acronyms
%\RequirePackage{natbib}
% ********************************************************************
% Commands
%
********************************************************************
\newcounter{dummy} % necessary for correct hyperlinks (to index, bib,
etc.)
\newcommand{\longpage}{\enlargethispage{3\baselineskip}}
\newcommand{\medpage}{\enlargethispage{2\baselineskip}}
\newcommand{\shortpage}{\enlargethispage{\baselineskip}}
\newcommand{\concskip}{\medskip}
\newcommand{\myPrimRef}[1]{\textit{#1}} % how primary index entries
will be marked
% ********************************************************************
\newcommand{\ie}{i.\,e.}
\newcommand{\Ie}{I.\,e.}
\newcommand{\eg}{e.\,g.}
\newcommand{\Eg}{E.\,g.}
\newcommand{\etAl}{et al.\xspace}
\newcommand{\twod}{2\textsc{d}\xspace}
\newcommand{\threed}{3\textsc{d}\xspace}
% ********************************************************************
\newcommand{\system}[1]{\emph{#1}}
\newcommand{\person}[1]{#1}
\newcommand{\term}[1]{\emph{#1}}
\newcommand{\cauthor}[1]{\relax}
%\@ifpackageloaded{natbib}%
% {\renewcommand{\cauthor}[1]{\person{\citeauthor{#1}}}%
% }{\PackageWarningNoLine{classicthesis-ldpk}{Package "natbib" not
loaded, %
% command "cauthor" will not work.}}
\newcommand{\tableheadline}[1]{\multicolumn{1}{c}
{\spacedlowsmallcaps{#1}}}
% ********************************************************************
\newcommand{\RA}{\ensuremath{\Rightarrow}}
\newcommand{\ra}{\ensuremath{\rightarrow}}
\newcommand{\lra}{\ensuremath{\leftrightarrow}}
\newcommand{\On}{\ensuremath{O(n)}\xspace}
\newcommand{\Ologn}{\ensuremath{O(\log n)}\xspace}
\newcommand{\Oone}{\ensuremath{O(1)}\xspace}
% ********************************************************************
% take care of the caption fonts and sizes (tables and figures)
\RequirePackage{caption}
% ********************************************************************
% fine typesetting of code listings
%\RequirePackage{listings}
% ********************************************************************
% enable subfigures in figures
\RequirePackage{subfig}
% ********************************************************************
% Using PDFLaTeX:
% ********************************************************************
%\RequirePackage[pdftex,hyperfootnotes=false,pdfpagelabels]{hyperref}
% backref linktocpage pagebackref
\pdfcompresslevel=9
\pdfadjustspacing=1
\RequirePackage{graphicx} % PDFTeX driver for graphicx
%\DeclareGraphicsRule{*}{mps}{*}{} % enables use of MetaPost graphics
with pdflatex
%*******************************************************
% for German texts to get \autoref macros right
%\renewcommand{\figureautorefname}{Figure}
%\renewcommand{\tableautorefname}{Table}
%\renewcommand{\partautorefname}{Part}
%\renewcommand{\chapterautorefname}{Chapter}
%\renewcommand{\subsectionautorefname}{Section}
%\renewcommand{\subsubsectionautorefname}{Section}
%\renewcommand{\paragraphautorefname}{Absatz}
%\renewcommand{\subparagraphautorefname}{Unterabsatz}
%\renewcommand{\footnoteautorefname}{Fu\"snote}
%\renewcommand{\FancyVerbLineautorefname}{Zeile}
%\renewcommand{\theoremautorefname}{Theorem}
%\renewcommand{\appendixautorefname}{Anhang}
%\renewcommand{\equationautorefname}{Gleichung}
%\renewcommand{\itemautorefname}{Punkt}
%\newcommand*{\subfigureautorefname}{Abbildung}
% ********************************************************************
% get the links to the figures and tables right
%\RequirePackage[all]{hypcap} % to be loaded after hyperref package
% ********************************************************************
% setup the style of the backrefs from the bibliography
\newcommand{\backrefnotcitedstring}{\relax}%(Not cited.)
\newcommand{\backrefcitedsinglestring}[1]{(Cited on page~#1.)}
\newcommand{\backrefcitedmultistring}[1]{(Cited on pages~#1.)}
\ifthenelse{\boolean{cld@backref}}%
{%
\RequirePackage[hyperpageref]{backref} % to be loaded after
hyperref package
\renewcommand{\backreftwosep}{ and~} % seperate 2 pages
\renewcommand{\backreflastsep}{, and~} % seperate last of
longer list
\renewcommand*{\backref}[1]{} % Disable standard
\renewcommand*{\backrefalt}[4]{% Detailed backref
\ifcase #1 %
\backrefnotcitedstring%
\or%
\backrefcitedsinglestring{#2}%
\else%
\backrefcitedmultistring{#2}%
\fi}%
}{\relax}
% \hspace*{\fill}{\scriptsize\itshape\mbox{%
% \ifnum#1=1 %
% (Cited on page~%
% \else
% (Cited on pages~%
% \fi
% #2)}
%}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
classicthesis.sty :
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ********************************************************************
% classicthesis.sty
%
% Copyright (C) 2011 Andr\'e Miede http://www.miede.de
%
% If you like the style then I would appreciate a postcard. My address
% can be found in the file ClassicThesis.pdf. A collection of the
% postcards I received so far is available online at
% http://postcards.miede.de
%
% License:
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program; see the file COPYING. If not, write to
% the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
% Boston, MA 02111-1307, USA.
%
%
********************************************************************
% Important:
%
% This style can also be used without the thesis template.
% It works with both LaTeX and PDFLaTeX now.
%
% * You must not use "u etc. in strings/commands that will be spaced
out
% (use \"u or real umlauts instead)
% * Chapters must be marked with the \myChapter{Foo} command
% (sorry for the inconvenience at this point)
% * For margin notes: \graffito{}
% * There is a problem with the case of math text in part-,
% chapter-, and section titles (either the case or the spacing
breaks).
% => this can be fixed by using pdftex 1.40 or later and enabling
the
% option pdfspacing of this package
%
%
********************************************************************
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{classicthesis}[2011/01/24 v2.9 Typographic Style for
a classic-looking thesis]
\RequirePackage{ifthen}
\newboolean{@tocaligned} % the left column of the toc will be
aligned (no indention)
\newboolean{@eulerchapternumbers} % use AMS Euler for chapter font
(otherwise Palatino)
\newboolean{@drafting} % print version information on pages
\newboolean{@linedheaders} % chaper headers will have line above
and beneath
\newboolean{@listsseparated} % toggles the vertical space between
lof/lot entries of different chapters
\newboolean{@nochapters} % disable all chapter-specific commands
\newboolean{@beramono} % toggle nice monospaced font (w/ bold) +
pre-installed
\newboolean{@eulermath} % use awesome Euler fonts for math
\newboolean{@parts} % use part division for the text
\newboolean{@minionpro} % setup for minion pro font
\newboolean{@minionprospacing} % use minion pro's textssc for
letter spacing
\newboolean{@pdfspacing} % use pdftex for letterspacing (via
microtype)
\newboolean{@subfig} % setup for preloaded @subfig package
\newboolean{@a5paper} % use those tiny DIN A5 pages
\newboolean{@dottedtoc} % page numbers in ToC flushed right
\newboolean{@listings} % load listings package (if not
already) and setup LoL
\newboolean{@manychapters} % additional space in ToC after
chapter number (if two digits are needed)
\newboolean{@floatperchapter} % additional space in ToC after
chapter number (if two digits are needed)
% ********************************************************************
% Options
% ********************************************************************
\DeclareOption{tocaligned}{\setboolean{@tocaligned}{true}}
\DeclareOption{eulerchapternumbers}{\setboolean{@eulerchapternumbers}
{true}}
\DeclareOption{drafting}{\setboolean{@drafting}{true}}
\DeclareOption{linedheaders}{\setboolean{@linedheaders}{true}}
\DeclareOption{listsseparated}{\setboolean{@listsseparated}{true}}
\DeclareOption{subfigure}{%
\PackageWarningNoLine{classicthesis}{Package "subfigure" and
option "subfigure" are deprecated, used "subfig" instead.}
\setboolean{@subfig}{true}%
}
\DeclareOption{subfig}{\setboolean{@subfig}{true}}
\DeclareOption{nochapters}{\setboolean{@nochapters}{true}}
\DeclareOption{beramono}{\setboolean{@beramono}{true}}
\DeclareOption{eulermath}{\setboolean{@eulermath}{true}}
\DeclareOption{parts}{\setboolean{@parts}{true}}
\DeclareOption{a5paper}{\setboolean{@a5paper}{true}}
\DeclareOption{minionpro}{\setboolean{@minionpro}{true}}
\DeclareOption{minionprospacing}{\setboolean{@minionprospacing}{true}}
\DeclareOption{pdfspacing}{\setboolean{@pdfspacing}{true}}
\DeclareOption{pdfspacing}{\setboolean{@pdfspacing}{true}}
\DeclareOption{dottedtoc}{\setboolean{@dottedtoc}{true}}
\DeclareOption{listings}{\setboolean{@listings}{true}}
\DeclareOption{manychapters}{\setboolean{@manychapters}{true}}
\DeclareOption{floatperchapter}{\setboolean{@floatperchapter}{true}}
\ProcessOptions\relax
% subfig-related stuff
\@ifpackageloaded{subfig}%
{\setboolean{@subfig}{true}%
}{\relax}
\@ifpackageloaded{subfigure}%
{\setboolean{@subfig}{true}%
\PackageWarningNoLine{classicthesis}{Package "subfigure" and
option "subfigure" are deprecated, %
use "subfig" instead.}
}{\relax}
\ifthenelse{\boolean{@subfig}}%
{\PassOptionsToPackage{subfigure}{tocloft}%
}{\relax}%
% listings-related stuff
\ifthenelse{\boolean{@listings}}%
{\@ifpackageloaded{listings}%
{\relax}{\RequirePackage{listings}}%
}{\relax}%
% fine-tuning if we use minionprospacing
\ifthenelse{\boolean{@minionprospacing}}%
{%
\PackageInfo{classicthesis}{Using option "minionprospacing". %
This activates "minionpro" in general and turns off %
the option "pdfspacing".}%
% is the user trying to use pdfspacing at the same time?
\ifthenelse{\boolean{@pdfspacing}}%
{% both minionprospacing and pdfspacing are active
\PackageWarningNoLine{classicthesis}{You cannot use
"pdfspacing" at the same time %
as "minionprospacing"!}%
}{\relax}%
\setboolean{@minionpro}{true}%
\setboolean{@pdfspacing}{false}%
}{\relax}
% fine-tuning if we do not use chapters
\ifthenelse{\boolean{@nochapters}}%
{%
% is the user trying to use parts at the same time?
\ifthenelse{\boolean{@parts}}%
{% both parts and nochapters are active
\PackageWarningNoLine{classicthesis}{You cannot use
"parts" at the same time %
as "nochapters"!}%
}{\relax}%
% is the user trying to use manychapters at the same time?
\ifthenelse{\boolean{@manychapters}}%
{% both manychapters and nochapters are active
\PackageWarningNoLine{classicthesis}{You cannot use
"manychapters" at the same time %
as "nochapters"!}%
}{\relax}%
% is the user trying to use floatperchapter at the same time?
\ifthenelse{\boolean{@floatperchapter}}%
{% both manychapters and nochapters are active
\PackageWarningNoLine{classicthesis}{You cannot use
"floatperchapter" at the same time %
as "nochapters"!}%
}{\relax}%
% turn off some things if we do not use chapters
\PackageInfo{classicthesis}{Using option
"nochapters" (probably for an article). %
This turns off the options "linedheaders",
"manychapters", "floatperchapter",%
"listsseparated", "eulerchapternumbers", and "parts".
Please be aware of that.}
\setboolean{@linedheaders}{false}%
\setboolean{@listsseparated}{false}%
\setboolean{@eulerchapternumbers}{false}%
\setboolean{@parts}{false}%
\setboolean{@manychapters}{false}%
\setboolean{@floatperchapter}{false}%
}{\relax}%
%
********************************************************************
% PDF Stuff
% ********************************************************************
\RequirePackage{ifpdf}
\ifpdf\RequirePackage{hyperref}\fi % for texorpdfstring command below
%
********************************************************************
% Colors
% ********************************************************************
\RequirePackage[dvipsnames]{xcolor} % [dvipsnames]
\definecolor{halfgray}{gray}{0.55} % chapter numbers will be semi
transparent .5 .55 .6 .0
\definecolor{webgreen}{rgb}{0,.5,0}
\definecolor{webbrown}{rgb}{.6,0,0}
%\definecolor{Maroon}{cmyk}{0, 0.87, 0.68, 0.32}
%\definecolor{RoyalBlue}{cmyk}{1, 0.50, 0, 0}
%\definecolor{Black}{cmyk}{0, 0, 0, 0}
% ********************************************************************
% Font Stuff
%
********************************************************************
% specialists: MinionPro
%\ifthenelse{\boolean{@minionpro}}%
%{%
% in order have Euler math fonts work with Minion, special
option is needed
% \ifthenelse{\boolean{@eulermath}}%
% {%
% \RequirePackage[opticals,mathlf,onlytext]{MinionPro} %
opticals, fullfamily, osf
%}{%
% \RequirePackage[opticals,mathlf]{MinionPro} % opticals,
fullfamily, osf
%}%
%}{%
% default: Palatino
%\RequirePackage[osf,sc]{mathpazo} % Palatino with real small
caps and old style figures
%\linespread{1.05} % a bit more for Palatino
%}
\ifthenelse{\boolean{@beramono}}%
{\RequirePackage[scaled=0.85]{beramono}}%
{%
\relax%
% put your own suitable typewriter font here
%\renewcommand{\ttdefault}{\rmdefault}
}
\ifthenelse{\boolean{@eulermath}}%
{\RequirePackage[euler-digits]{eulervm}} % Euler math fonts
{\relax}
\ifthenelse{\boolean{@eulerchapternumbers}}% font for the chapter
numbers
{\newfont{\chapterNumber}{eurb10 scaled 7000}}%
{\newfont{\chapterNumber}{pplr9d scaled 7000}}
% Euler eurb10 / Palatino OSF pplr9d / Palatino SC pplrc9d
% Latin Modern cork-lmr10 / Minion MinionPro-Regular-osf-t1
% (MinionPro-SemiboldCapt-osf-t1 MinionPro-SemiboldDisp-osf-t1)
\RequirePackage{microtype} % character protruding and other micro-
typography stuff
% [expansion=false]
% ********************************************************************
% Textblock size
%*******************************************************
\ifthenelse{\boolean{@a5paper}}%
{% A5
\ifthenelse{\boolean{@minionpro}}%
{% Minion gets some extra sizes
\PackageInfo{classicthesis}{A5 paper, MinionPro}
\areaset[5mm]{278pt}{556pt}%
\setlength{\marginparwidth}{5em}%
\setlength{\marginparsep}{1.25em}%
}{% Palatino or other
\PackageInfo{classicthesis}{A5 paper, Palatino or
other}
\areaset[5mm]{288pt}{555pt}%
\setlength{\marginparwidth}{4em}%
\setlength{\marginparsep}{1.25em}%
}%
}{% A4
\ifthenelse{\boolean{@minionpro}}%
{% Minion gets some extra sizes
\PackageInfo{classicthesis}{A4 paper, MinionPro}
\areaset[5mm]{312pt}{684pt}% 609 + 33 + 42 head \the
\footskip
\setlength{\marginparwidth}{7.5em}%
\setlength{\marginparsep}{2em}%
}{% Palatino or other
\PackageInfo{classicthesis}{A4 paper, Palatino or
other}
\areaset[5mm]{336pt}{750pt} % ~ 336 * factor 2 + 33 head +
42 \the\footskip
% \areaset[5mm]{336pt}{761pt} % 686 (factor 2.2) + 33 head
+ 42 head \the\footskip 10pt
\setlength{\marginparwidth}{7em}%
\setlength{\marginparsep}{2em}%
}%
}
% Here are some suggestions for the text widths and heights:
% Palatino 10pt: 288--312pt | 609--657pt
% Palatino 11pt: 312--336pt | 657--705pt
% Palatino 12pt: 360--384pt | 768pt
% Minion 10pt: 264--288pt | 561--609pt
% Minion 11pt: 288--312pt | 609--657pt
% Minion 12pt: 336pt | 672pt
% Libertine 10pt:
% Libertine 11pt:
% Libertine 12pt:
% ********************************************************************
% Own Stuff
% ********************************************************************
% Disable single lines at the start of a paragraph (Schusterjungen)
\clubpenalty = 10000
% Disable single lines at the end of a paragraph (Hurenkinder)
\widowpenalty = 10000
\displaywidowpenalty = 10000 % formulas
% Graffiti as in GKP's book "Concrete Mathematics"
% thanks to Lorenzo Pantieri and Enrico Gregorio
\def\graffito@setup{%
\slshape\footnotesize%
\parindent=0pt \lineskip=0pt \lineskiplimit=0pt %
\tolerance=2000 \hyphenpenalty=300 \exhyphenpenalty=300%
\doublehyphendemerits=100000%
\finalhyphendemerits=\doublehyphendemerits}
\DeclareRobustCommand{\graffito}[1]{\marginpar%
[\graffito@setup\raggedleft\hspace{0pt}{#1}]%
{\graffito@setup\raggedright\hspace{0pt}{#1}}}
% Enumeration environment with small caps
\newenvironment{aenumerate}
{\def\theenumi{\textsc{\alph{enumi}}}%
\enumerate}
{\endenumerate}
% ********************************************************************
% Fancy Stuff
%
********************************************************************
\RequirePackage{booktabs} % for better rules in tables
\RequirePackage{textcase} % for \MakeTextUppercase
\ifthenelse{\boolean{@minionprospacing}}%
{%
\PackageInfo{classicthesis}{Using MinionPro's textssc for
character spacing.}%
\DeclareRobustCommand{\spacedallcaps}[1]
{\textssc{\MakeTextUppercase{#1}}}%
\DeclareRobustCommand{\spacedlowsmallcaps}[1]
{\textssc{\MakeTextLowercase{#1}}}%
}{%
\ifthenelse{\boolean{@pdfspacing}}%
{%
\PackageInfo{classicthesis}{Using pdftex/microtype for
character spacing.%
Make sure your pdftex is
version 1.40 or higher.}%
\microtypesetup{expansion=false}%
\DeclareRobustCommand{\spacedallcaps}[1]{\textls[160]
{\MakeTextUppercase{#1}}}%
\DeclareRobustCommand{\spacedlowsmallcaps}[1]{\textls[80]
{\scshape\MakeTextLowercase{#1}}}%
}{%
\RequirePackage{soul} % for letterspacing
\makeatletter
\font\SOUL@tt="DejaVu Sans
Mono"\setbox\z@\hbox{\SOUL@tt-}\SOUL@ttwidth\wd\z@
\def\SOUL@doword{%
\edef\x{\the\SOUL@word}%
\ifx\x\empty
\else
\SOUL@buffer={}%
\setbox\z@\vbox{%
\SOUL@tt
\hyphenchar\font`\-
\hfuzz\maxdimen
\hbadness\@M
\pretolerance\m@ne
% \tolerance\@M %<--------------
\leftskip\z@
\rightskip\z@
\hsize1sp
\everypar{}%
\parfillskip\z@\@plus1fil
\hyphenpenalty-\@M
\noindent
\hskip\z@
\relax
\the\SOUL@word}%
%\showbox\z@ %<------showbox
\let\SOUL@errmsg\SOUL@error
\let\-\relax
\count@\m@ne
\SOUL@analyze
\SOUL@word={}%
\fi
}
\makeatother
\sodef\allcapsspacing{\upshape}{0.15em}{0.65em}{0.6em}
%
\sodef\lowsmallcapsspacing{\scshape}{0.075em}{0.5em}
{0.6em}%
\DeclareRobustCommand{\spacedallcaps}[1]
{\MakeTextUppercase{\allcapsspacing{#1}}}%
\DeclareRobustCommand{\spacedlowsmallcaps}[1]
{\MakeTextLowercase{\textsc{\lowsmallcapsspacing{#1}}}}%
}%
}
%
********************************************************************
% headlines
%
********************************************************************
\RequirePackage[automark]{scrpage2} % provides headers and footers
(KOMA Script)
\clearscrheadings
\setheadsepline{0pt}
\ifthenelse{\boolean{@nochapters}}%
{\relax}%
{\renewcommand{\chaptermark}[1]
{\markboth{\spacedlowsmallcaps{#1}}{\spacedlowsmallcaps{#1}}}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\enspace
\spacedlowsmallcaps{#1}}}
\lehead{\mbox{\llap{\small\thepage\kern2em}\headmark\hfil}}
\rohead{\mbox{\hfil{\headmark}\rlap{\small\kern2em\thepage}}}
\renewcommand{\headfont}{\small}
%\DeclareRobustCommand{\fixBothHeadlines}[1]{} % <--- ToDo
% hack to get the content headlines right (thanks, Lorenzo!)
\def\toc@heading{%
\ifthenelse{\boolean{@nochapters}}%
{\section*{\contentsname}}%nochapters
{\chapter*{\contentsname}}%chapters
\@mkboth{\spacedlowsmallcaps{\contentsname}}
{\spacedlowsmallcaps{\contentsname}}}
% ********************************************************************
% figures are placed only within section they were declared in
% provides command \FloatBarrier
% ********************************************************************
%\RequirePackage[section,below]{placeins}
% ********************************************************************
% layout of the chapter-, section-, subsection-, subsubsection-,
% paragraph and description-headings
%
********************************************************************
\RequirePackage{titlesec}
% parts
\ifthenelse{\boolean{@parts}}%
{%
\titleformat{\part}[display]
{\normalfont\centering\large}%
{\thispagestyle{empty}\partname~\MakeTextUppercase{\thepart}}
{1em}%
{\color{Maroon}\spacedallcaps}
}{\relax}
% chapters
\ifthenelse{\boolean{@linedheaders}}%
{% lines above and below, number right
\titleformat{\chapter}[display]%
{\relax}{\raggedleft{\color{halfgray}\chapterNumber
\thechapter} \\ }{0pt}%
{\titlerule\vspace*{.9\baselineskip}\raggedright\spacedallcaps}
[\normalsize\vspace*{.8\baselineskip}\titlerule]%
}{% something like Bringhurst
\titleformat{\chapter}[display]%
{\relax}{\mbox{}\marginpar{\vspace*{-3\baselineskip}
\color{halfgray}\chapterNumber\thechapter}}{0pt}%
{\raggedright\spacedallcaps}[\normalsize\vspace*{.
8\baselineskip}\titlerule]%
}
% sections \FloatBarrier
\titleformat{\section}
{\relax}{\textsc{\MakeTextLowercase{\thesection}}}{1em}
{\spacedlowsmallcaps}
% subsections
\titleformat{\subsection}
{\relax}{\textsc{\MakeTextLowercase{\thesubsection}}}{1em}
{\normalsize\itshape}
% subsubsections
\titleformat{\subsubsection}
{\relax}{\textsc{\MakeTextLowercase{\thesubsubsection}}}{1em}
{\normalsize\itshape}
% paragraphs
\titleformat{\paragraph}[runin]
{\normalfont\normalsize}{\theparagraph}{0pt}
{\spacedlowsmallcaps}
% descriptionlabels
\renewcommand{\descriptionlabel}[1]{\hspace*{\labelsep}
\spacedlowsmallcaps{#1}} % spacedlowsmallcaps textit
textsc
% spacing
\ifthenelse{\boolean{@nochapters}}%
{\relax}%
{\titlespacing*{\chapter}{0pt}{1\baselineskip}
{1.2\baselineskip}}
\titlespacing*{\section}{0pt}{1.25\baselineskip}{1\baselineskip}
\titlespacing*{\subsection}{0pt}{1.25\baselineskip}
{1\baselineskip}
\titlespacing*{\paragraph}{0pt}{1\baselineskip}{1\baselineskip}
%
********************************************************************
% layout of the TOC, LOF and LOT (LOL-workaround see next section)
% ********************************************************************
\RequirePackage[titles]{tocloft}
% avoid page numbers being right-aligned in fixed-size
box
\newlength{\newnumberwidth}
\settowidth{\newnumberwidth}{999} % yields overfull hbox warnings
for pages > 999
\cftsetpnumwidth{\newnumberwidth}
% have the bib neatly positioned after the rest
\newlength{\beforebibskip}
\setlength{\beforebibskip}{0em}
% space for more than nine chapters
\newlength{\newchnumberwidth}
\settowidth{\newchnumberwidth}{.} % <--- tweak here if more space
required
\ifthenelse{\boolean{@manychapters}}% <--- many chapters option
{%
\addtolength{\cftchapnumwidth}{\newchnumberwidth}%
\addtolength{\cftsecnumwidth}{\newchnumberwidth}
\addtolength{\cftsecindent}{\newchnumberwidth}
\addtolength{\cftsubsecnumwidth}{\newchnumberwidth}
\addtolength{\cftsubsecindent}{2\newchnumberwidth}
\addtolength{\cftsubsubsecnumwidth}{\newchnumberwidth}
}{\relax}%
% pagenumbers right after the titles
% parts
\ifthenelse{\boolean{@parts}}%
{%
\renewcommand{\thepart}{\roman{part}}%
\renewcommand{\cftpartpresnum}{\scshape}% \MakeTextLowercase
% \renewcommand{\cftpartaftersnum}{\cftchapaftersnum}%
% \renewcommand{\cftpartaftersnumb}{\quad}%
% \setlength{\cftpartnumwidth}{\cftpartnumwidth}
\renewcommand{\cftpartfont}{\color{Maroon}\normalfont}%
\renewcommand{\cftpartpagefont}{\normalfont}%
\ifthenelse{\boolean{@dottedtoc}}{\relax}%
{%
\renewcommand{\cftpartleader}{\hspace{1.5em}}%
\renewcommand{\cftpartafterpnum}{\cftparfillskip}%
}%
\setlength{\cftbeforepartskip}{1em}%
\setlength{\cftbeforechapskip}{.1em}%
\setlength{\beforebibskip}{\cftbeforepartskip}%
}{\relax}
% chapters
\ifthenelse{\boolean{@nochapters}}%
{\relax}%
{%
\renewcommand{\cftchappresnum}{\scshape\MakeTextLowercase}
%
\renewcommand{\cftchapfont}{\normalfont}%
\renewcommand{\cftchappagefont}{\normalfont}%
\ifthenelse{\boolean{@dottedtoc}}{\relax}%
{%
\renewcommand{\cftchapleader}{\hspace{1.5em}}%
\renewcommand{\cftchapafterpnum}{\cftparfillskip}%
}
%\setlength{\cftbeforechapskip}{.1em}%
}
% sections
\ifthenelse{\boolean{@nochapters}}%
{%
\setlength{\cftbeforesecskip}{.1em}%
\setlength{\beforebibskip}{1em}%
}%
{\relax}
\renewcommand{\cftsecpresnum}{\scshape\MakeTextLowercase}%
\renewcommand{\cftsecfont}{\normalfont}%
\renewcommand{\cftsecpagefont}{\normalfont}%
\ifthenelse{\boolean{@dottedtoc}}{\relax}%
{%
\renewcommand{\cftsecleader}{\hspace{1.5em}}%
\renewcommand{\cftsecafterpnum}{\cftparfillskip}%
}
\ifthenelse{\boolean{@tocaligned}}{\renewcommand{\cftsecindent}
{0em}}{\relax}
% subsections
\renewcommand{\cftsubsecpresnum}{\scshape\MakeTextLowercase}%
\renewcommand{\cftsubsecfont}{\normalfont}%
\ifthenelse{\boolean{@dottedtoc}}{\relax}%
{%
\renewcommand{\cftsubsecleader}{\hspace{1.5em}}%
\renewcommand{\cftsubsecafterpnum}{\cftparfillskip}%
}
\ifthenelse{\boolean{@tocaligned}}
{\renewcommand{\cftsubsecindent}{0em}}{\relax}
% subsubsections
\renewcommand{\cftsubsubsecpresnum}{\scshape\MakeTextLowercase}
%
\renewcommand{\cftsubsubsecfont}{\normalfont}%
\ifthenelse{\boolean{@dottedtoc}}{\relax}%
{%
\renewcommand{\cftsubsubsecleader}{\hspace{1.5em}}%
\renewcommand{\cftsubsubsecafterpnum}{\cftparfillskip}%
}
\ifthenelse{\boolean{@tocaligned}}
{\renewcommand{\cftsubsubsecindent}{0em}}{\relax}
% figures
\renewcommand{\cftfigpresnum}{\scshape\MakeTextLowercase}%
\renewcommand{\cftfigfont}{\normalfont}%
\ifthenelse{\boolean{@dottedtoc}}{\relax}%
{%
\renewcommand{\cftfigleader}{\hspace{1.5em}}%
\renewcommand{\cftfigafterpnum}{\cftparfillskip}%
}
\renewcommand{\cftfigpresnum}{\figurename~}%Fig.~}
\newlength{\figurelabelwidth}
\settowidth{\figurelabelwidth}{\cftfigpresnum~99}
\addtolength{\figurelabelwidth}{2.5em}
\cftsetindents{figure}{0em}{\figurelabelwidth}
% tables
\renewcommand{\cfttabpresnum}{\scshape\MakeTextLowercase}%
\renewcommand{\cfttabfont}{\normalfont}%
\ifthenelse{\boolean{@dottedtoc}}{\relax}%
{%
\renewcommand{\cfttableader}{\hspace{1.5em}}%
\renewcommand{\cfttabafterpnum}{\cftparfillskip}%
}
\renewcommand{\cfttabpresnum}{\tablename~}%Tab.~}
\newlength{\tablelabelwidth}
\settowidth{\tablelabelwidth}{\cfttabpresnum~99}
\addtolength{\tablelabelwidth}{2.5em}
%\cftsetindents{table}{0em}{\tablelabelwidth}
\cftsetindents{table}{0em}{\figurelabelwidth}
% listings
\ifthenelse{\boolean{@listings}}%
{%
\newlistof{listings}{lol}{\lstlistlistingname}%
\renewcommand{\cftlistingspresnum}{\scshape
\MakeTextLowercase}%
\renewcommand{\cftlistingsfont}{\normalfont}%
\renewcommand{\cftlistingspresnum}{\lstlistingname~}%
\renewcommand{\cftlistingspagefont}{\normalfont}%
\ifthenelse{\boolean{@dottedtoc}}{\relax}%
{%
\renewcommand{\cftlistingsleader}{\hspace{1.5em}}%
\renewcommand{\cftlistingsafterpnum}{\cftparfillskip}%
}
\newlength{\listingslabelwidth}%
\settowidth{\listingslabelwidth}{\cftlistingspresnum~99}%
\addtolength{\listingslabelwidth}{2.5em}%
%\cftsetindents{listings}{0em}{\listingslabelwidth}%
\cftsetindents{listings}{0em}{\figurelabelwidth}%
%\let\l@lstlisting\l@listings%
\let\lstlistoflistings\listoflistings%
}{\relax}%
% dirty work-around to get the spacing after the toc/lot/lof-
titles right
\ifthenelse{\boolean{@parts}}%
{%
\AtBeginDocument{\addtocontents{toc}{\protect\vspace{-
\cftbeforepartskip}}}
}{%
\ifthenelse{\boolean{@nochapters}}%
{\relax}%
{\AtBeginDocument{\addtocontents{toc}{\protect\vspace{-
\cftbeforechapskip}}}}
}
% another dirty work-around to get the spaced low small caps into
the toc ;-(
\ifthenelse{\boolean{@nochapters}}%
{\relax}%
{%
%% use modified \chapter (thanks to Hinrich Harms)
\let\oldchap=\chapter
\renewcommand*{\chapter}{%
\secdef{\Chap}{\ChapS}%
}
\newcommand\ChapS[1]{\oldchap*{#1}}%
\newcommand\Chap[2][]{%
\ifpdf
\oldchap[\texorpdfstring{\spacedlowsmallcaps{#1}}{#1}]{#2}%
\else\oldchap[\spacedlowsmallcaps{#1}]{#2}%
\fi%
}
}
% yet another dirty work-around to get the spaced low small caps
into the toc ;-(
\ifthenelse{\boolean{@parts}}%
{%
%% use modified \part (thanks to Hinrich Harms)
\let\oldpart=\part%
\renewcommand*{\part}{%
\secdef{\Part}{\PartS}%
}%
\newcommand\PartS[1]{\oldpart*{#1}}%
\newcommand\Part[2][]{%
\ifpdf\pdfstringdefDisableCommands{\let\thepart
\@gobbletwo}%
\oldpart[\texorpdfstring{\spacedlowsmallcaps{#1}}{#1}]{#2}%
spacedallcaps spacedlowsmallcaps
\else\oldpart[\spacedlowsmallcaps{#1}]{#2}%
\fi%
}%
}{\relax}
\newcommand{\tocEntry}[1]{% for bib, etc.
\ifpdf\texorpdfstring{\spacedlowsmallcaps{#1}}{#1}%
\else{#1}\fi%
}
% % remove the vertical space between lof/lot entries of different
chapters
\ifthenelse{\boolean{@listsseparated}}{%
\PackageWarningNoLine{classicthesis}{Option "listsseparated"
deprecated as of version 2.9.}%
}{\relax}
% \ifthenelse{\boolean{@listsseparated}}{%
% \AtBeginDocument{%
% \addtocontents{lof}{\protect\vspace{-\cftbeforechapskip}}
%
% \addtocontents{lot}{\protect\vspace{-\cftbeforechapskip}}
%
% \ifthenelse{\boolean{@listings}}%
% {%
% \addtocontents{lol}{\protect\vspace{-
\cftbeforechapskip}}%
% }{\relax}%
% }%
% }{%
\DeclareRobustCommand*{\deactivateaddvspace}{\let\addvspace
\@gobble}%
\AtBeginDocument{%
\addtocontents{lof}{\deactivateaddvspace}%
\addtocontents{lot}{\deactivateaddvspace}%
\ifthenelse{\boolean{@listings}}%
{%
\addtocontents{lol}{\deactivateaddvspace}%
}{\relax}%
}%
% }
% ********************************************************************
% footnotes setup
% ********************************************************************
%\RequirePackage{footmisc} % [bottom] norule para symbol* marginal
perpage
% KOMA-command, footnotemark not superscripted at the bottom
\deffootnote{0em}{0em}{\thefootnotemark\hspace*{.5em}}
%\setfnsymbol{bringhurst} % use symbols recommended by guru
Robert Bringhurst
%\setlength{\footnotemargin}{-1em}
% ********************************************************************
% Drafting Stuff
% ********************************************************************
\RequirePackage{scrtime} % time access
\newcommand{\finalVersionString}{}
\ifthenelse{\boolean{@drafting}}{%
% \RequirePackage{draftwatermark}%
% \SetWatermarkLightness{0.9}
% \SetWatermarkScale{.5}
% \SetWatermarkText{\today\ at \thistime}
\RequirePackage[draft]{prelim2e}
\renewcommand{\PrelimWords}{\relax}
\renewcommand{\PrelimText}{\footnotesize[\,\today\ at \thistime
\,]}
}{\renewcommand{\finalVersionString}{\emph{Final Version} as of \today
\ at \thistime.}}
% ********************************************************************
% Caption numbering now w/o chapter number
% ********************************************************************
\ifthenelse{\boolean{@floatperchapter}}{%
\ifthenelse{\boolean{@listings}}{%
\lstset{numberbychapter=true}}{\relax}%
}{%
\ifthenelse{\boolean{@listings}}{%
\lstset{numberbychapter=false}}{\relax}%
\RequirePackage{remreset}%
\makeatletter%
\ifthenelse{\boolean{@nochapters}}%
{\relax}{%
\@removefromreset{table}{chapter} % requires remreset
package
}%
\renewcommand{\thetable}{\arabic{table}}%
\makeatother%
\makeatletter%
\ifthenelse{\boolean{@nochapters}}%
{\relax}{%
\@removefromreset{figure}{chapter} % requires remreset
package
}%
\renewcommand{\thefigure}{\arabic{figure}}%
\makeatother%
}
% ********************************************************************
% Backward-compatibility
% ********************************************************************
\let\myChapter\chapter
\let\myPart\part
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Je vous serez très reconnaissant si vous pouviez m'aider :)
--
Alexandre KRISPIN
> onjour,
>
> J'ai eu subitement un problème en compilant un document contenant des
> chapitres relatif au package soul, le message d'erreur étant :
> ! Package soul Error: Reconstruction failed.
>
> En gros, j'utilise le template classicthesis modifié pour le faire
> fonctionner avec lualatex, et ce template contient un
> \requirepackage{soul} qui bloque avec lualatex. J'ai essayé la
> recommandation de Ulrik Fischer ici :
> http://web.archiveorange.com/archive/v/l9xdWrW3vYeet65AwmCX
>
> Mais le message d'erreur subsiste pour les headers. Il apparaît alors
> en pressant tout de même Entrée pour sauter les erreurs des carrés
> noirs dans le pdf.
>
> J'utilise la dernière version de lualatex (la version de TLcontrib,
> http://tlcontrib.metatex.org/usage.html ), ainsi que les fichiers du
> template modifiés. Si jamais qqn saurait faire fonctionner ça je lui
> en serai très reconnaissant, j'utilise constamment ce template
> (parfait pour moi).
>
> Voici un ECM :
[...]
> Je vous serez très reconnaissant si vous pouviez m'aider :)
Seulement si tu fais un vrai ECM. Je n'ai ni le temps ni envie
d'analyser tout ce code dans ton classicthesis-ldpkg.sty .
--
Ulrike Fischer
> J'ai eu subitement un problème en compilant un document contenant des
> chapitres relatif au package soul, le message d'erreur étant :
> ! Package soul Error: Reconstruction failed.
Addition: Avec un luatex nouveau soul n'est plus necessaire. Tu peux
utiliser \letterspacefont:
\documentclass [a4paper]{article}
\usepackage{fontspec}
\begin{document}
abc {\letterspacefont\lspfont=\font 1000\lspfont abc} abc
\end{document}
--
Ulrike Fischer
C'est clair ;-)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[headinclude,11pt,a4paper,BCOR5mm,footinclude=true]
{scrreprt}
\RequirePackage{ifthen}
\newboolean{@nochapters} % disable all chapter-specific commands
\RequirePackage{soul} % for letterspacing
\sodef\allcapsspacing{\upshape}{0.15em}{0.65em}{0.6em}%
\sodef\lowsmallcapsspacing{\scshape}{0.075em}{0.5em}
{0.6em}%
\DeclareRobustCommand{\spacedallcaps}[1]
{\MakeTextUppercase{\allcapsspacing{#1}}}%
\DeclareRobustCommand{\spacedlowsmallcaps}[1]
{\MakeTextLowercase{\textsc{\lowsmallcapsspacing{#1}}}}%
%
********************************************************************
% headlines
%
********************************************************************
\RequirePackage[automark]{scrpage2} % provides headers and footers
(KOMA Script)
\clearscrheadings
\setheadsepline{0pt}
\ifthenelse{\boolean{@nochapters}}%
{\relax}%
{\renewcommand{\chaptermark}[1]
{\markboth{\spacedlowsmallcaps{#1}}{\spacedlowsmallcaps{#1}}}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\enspace
\spacedlowsmallcaps{#1}}}
\lehead{\mbox{\llap{\small\thepage\kern2em}\headmark\hfil}}
\rohead{\mbox{\hfil{\headmark}\rlap{\small\kern2em\thepage}}}
\renewcommand{\headfont}{\small}
\usepackage{luatextra}
\setmainfont{TeX Gyre Pagella}
\usepackage{lipsum}
\begin{document}
\pagestyle{scrheadings}
\chapter{test}
\lipsum
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Un petit carré noir va apparaître sur la 2e page, en haut à droite.
Merci de m'avoir accordé votre attention :)
Alexandre Krispin
On 14 avr, 15:54, GL <gouail...@gmail.com> wrote:
> Le 14/04/2011 15:47, Ulrike Fischer a crit :
>
> > Am Thu, 14 Apr 2011 05:15:27 -0700 (PDT) schrieb alexandre krispin:
>
> >> Je vous serez tr s reconnaissant si vous pouviez m'aider :)
il manque textcase.sty
moi les \markboth \markright j'ai jamais rien compris et je n'aime pas.
Je vis avec mon temps et utilise les \marks d'e-TeX, et je n'utilise pas
luaTeX car c'est en avance sur mon temps - LuaTeX reste expérimental.
C'est quoi \headmark ? Je connais \firstmarks, \botmarks et \topmarks,
c'est déjà pas si facile à bien maîtrise alors \headmark... je m'en
passe allègrement.
En principe, on ne \mark pas le format, mais seulement le texte, le
format est mis quand on appelle \firstmarks, \botmarks ou \topmarks
dans le header.
Si vous compilez avec pdfTeX tout se passe bien.
Vous utilisez LuaTeX mais pas les possibilités d'e-TeX (marques,
DeClareRobustCommand)
Vous utilisez une fonte qui est disponible pour pdf-eTeX.
Vous utilisez un package "soul" pour le letterspacing alors que pdfTeX
fournit ces fonctionnalités en primitif.
Vous utilisez un package "ifthen" qui est rigolo et largement utilisé
par les fainéants/imbéciles (je pense plutôt que le deuxième épithète
s'applique, c'est comme \headmark au fond: les gens se prennent la tête
pour apprendre des macros compliquées qui sont susceptibles de changer
et qui n'apportent pas grand chose, pour ne pas avoir à apprendre les
quelques primitives importantes qui font le travail, qui ne changent
pas, et avec lesquelles si on n'obtient pas le résultat voulu, c'est
sûr, c'est qu'on s'est trompé, pas la primitive !)
\newif \if@chapters c'est pas un peu plus simple quand même ?
et ça n'a pas changé depuis 30 ans !
Bon je vous le donne en mille, mais avec pdfTeX, je vis avec mon temps...
\documentclass[headinclude,11pt,a4paper,BCOR5mm,footinclude=true]{scrreprt}
\RequirePackage{textcase,etoolbox}
%\newboolean{@nochapters} % disable all chapter-specific commands
\makeatletter
\newif \if@nochapters
%\RequirePackage{soul} % for letterspacing
\usepackage {microtype}
\providecommand\lsstyle{}
%\sodef\allcapsspacing{\upshape}{0.15em}{0.65em}{0.6em}%
%\sodef\lowsmallcapsspacing{\scshape}{0.075em}{0.5em}{0.6em}%
\newrobustcmd*\spacedallcaps {\lsstyle\MakeTextUppercase }%
\newrobustcmd*\spacedlowsmallcaps{\lsstyle\scshape\MakeTextLowercase }%
%
% headlines
%
\RequirePackage[automark]{scrpage2} % provides headers and footers
\clearscrheadings
\setheadsepline{0pt}
\if@nochapters \else \def\chaptermark #1{\markboth {\spacedlowsmallcaps{#1}}
{\spacedlowsmallcaps{#1}}}\fi
\def\sectionmark #1{\markright{\thesection\enspace
\spacedlowsmallcaps{#1}}}%
\lehead{\mbox{\llap{\small\thepage\kern2em}\headmark\hfil}}
\rohead{\mbox{\hfil{\headmark}\rlap{\small\kern2em\thepage}}}
\def\headfont{\small}
%\usepackage{luatextra}
%\setmainfont{TeX Gyre Pagella}
%\AtBeginDocument{\usefont{T1}{qbk}mn}
\usepackage {tgpagella}
> Ok, n'étant pas vraiment à l'aise, j'ai réduit autant que j'ai pu au
> strict minimum, voici le nouveau ECM :
Je n'ai aujourd'hui plus du temps. Si tu veux essayer la solution de
GL avec microtype: elle marchera probablement aussi avec lualatex si
tu utilises la nouvelle beta de microtype:
http://xetex.tk/mediawiki/index.php/Microtype_package_(preliminary_version).
--
Ulrike Fischer
Merci beaucoup pour vos réponses.
Pour répondre à GL, je comprends bien qu'il faut vivre avec son temps
et ne pas chercher à aller plus loin. Cependant, lualatex permet
d'écrire facilement dans une langue qui n'utilise pas d'alphabet, et
également de formater correctement les paragraphes (contrairement à à
xelatex qui posait problèmes à la longue).
Vous me posiez la question "C'est quoi \headmark ?", mais en réalité
je n'en ai aucune idée, car je me contentais d'utiliser le template de
quelqu'un d'autre. Que ce soit en latex ou en typographie, je suis en
effet trop incompétent pour utiliser mon propre template.
"Vous utilisez un package "ifthen" qui est rigolo et largement utilis
par les fain ants/imb ciles (je pense plut t que le deuxi me pith te "
S'il s'agit de devoir admettre que je suis un imbécile, alors ok, si
vous me le dites c'est que j'en suis probablement un.
Je suis sincèrement désolé d'être trop nul et incompétent pour
résoudre mon problème par moi-même, cependant, après avoir fait copier-
coller de ce que GL a écrit, je ne parviens toujours pas à faire
marcher le template que j'utilise (classicthesis donc), malgré plus
d'1h passée à compiler encore et encore en modifiant des lignes ou en
retirant pour essayer de voir ce qui n'allait pas (à causes de
quelques lignes tout le corps du texte se met en petites majuscules et
je ne sais pas comment les modifier).
Je me souviens qu'avec ce qu'avait écrit Ulrike tout marchait très
bien (jusqu'à une update récente de je-ne-sais-quoi. Je conçois que je
puisse en demander beaucoup, mais serait-il possible d'avoir une
solution qui ne me demande pas 1h d'essais (sans succès) pour faire
marcher le template ?
Ulrike avait écrit :
Ceci ne marche pas dans le cas des headers (pour le reste c'était
parfait).
Alexandre Krispin
> il manque textcase.sty
> moi les \markboth \markright j'ai jamais rien compris et je n'aime pas.
> Je vis avec mon temps et utilise les \marks d'e-TeX,
Même avec \marks d'e-TeX il te faudrait une commande qui "mark" deux
\marks en meme temps pour les chapitres (\markboth) et une qui
"mark" seulement la mark pour la page de droite (\markright).
> C'est quoi \headmark ?
C'est une high-level commande des KOMA-classes.
\headmark= \leftmark dans les pages gauches et \rightmark dans les
pages droites.
--
Ulrike Fischer
> Ok, n'étant pas vraiment à l'aise, j'ai réduit autant que j'ai pu au
> strict minimum, voici le nouveau ECM :
J'ai essaye ton exemple, apres avoir ajouter le paquet textcase il
marchait sans erreur. Mais j'utilise un luatex plus recent (Version
beta-0.66.0-2011020321 ), et mon luaotfload est aussi une version
beta.
Donc je ne peux pas analyser ton probleme, sorry.
La solution de GL est en principe meilleure que celle avec soul,
mais la combination \lsstyle/\scshape ne semble de ne pas marcher
avec luatex, la fonte pert le small caps apres un \lsstyle.
--
Ulrike Fischer
Laisse tomber. 95% de ce qu'écrit GL ne veut rien dire: « vivre avec son
temps » en parlant d'eTeX est absurde: eTeX a 15 ans. Quant à LuaTeX, il
n'est pas « expérimental », mais beta, et est utilisé régulièrement.
> Vous me posiez la question "C'est quoi \headmark ?", mais en réalité
> je n'en ai aucune idée, car je me contentais d'utiliser le template de
> quelqu'un d'autre. Que ce soit en latex ou en typographie, je suis en
> effet trop incompétent pour utiliser mon propre template.
Laisse tomber aussi. Que \topmark et associés soient insuffisants a été
reconnu dans le /TeXbook/ (p. 259sq); mais GL est persuadé qu'il sait
mieux tout que tout le monde (et que tout le monde est idiot, sauf lui).
Pour le reste, je n'ai pas suivi tout dans le détail, mais quitte à
utiliser LuaTeX, autant y aller franco: faire du letterspacing est assez
simple avec du code Lua pur. Voici par exemple un petit bout de code:
%%%
\def\letterspaced#1{%
\directlua{callback.register("kerning", letterspacing)}
\hbox{#1}%
\directlua{callback.register("kerning", nil)}
}
\directlua{%
local GLUE, SPEC, GLYF= node.id("glue"), node.id("glue_spec"),
node.id("glyph")
local interletter = node.new(GLUE)
local interletter_spec = node.new(SPEC)
interletter_spec.width = tex.sp(".1em")
interletter.spec = interletter_spec
function letterspacing (head)
for glyph in node.traverse_id(GLYF, head) do
if glyph.prev.id == GLYF then
node.insert_before(head, glyph, node.copy(interletter))
end
end
end
}
%%%
Remarques:
- Il faudrait distinguer espaces entre lettres, mots, etc., comme le
fait soul, etc., ajouter des pénalités pour interdire de couper une
ligne entre deux mots, mais là je ne voulais donner qu'un exemple.
- J'utilise callback.register() pur; mais j'imagine qu'avec LuaLaTeX tu
utilises luatexbase (ne serait-ce que pour luaotfload), donc
callback.register() est interdit; je laisse parler à ce sujet les
ceusses qui s'y connaissent, mais ça ne change pas fondamentalement le code.
Paul
Oui je pense que microtype n'est pas encore tout à fait prêt pour
LuaTeX.
Le fait est que microtype est un package complexe par nature, et
complexifié encore par son auteur M. Robert Schlicht que je connais
aussi par ses macros qu'il a écrites pour WinEdt et que j'ai totalement
réécrites... parce qu'elles sont intéressantes pour les fonctionnalités
et codées d'une manière totalement incompréhensible - tout est mélangé
avec des niveaux de groupes invraisemblables.
C'est aussi l'impression que donne microtype malheureusement.
Ca doit être une corvée salée d'upgrader ce package pour LuaTeX...
Ben si justement: TeX a au moins 30 ans et e-TeX seulement 15.
je dis que je n'utilise pas LuaTeX parce qu'il est beta et que j'utilise
e-TeX parce qu'il est stable et que TeX est vieux à côté.
Ma remarque c'est pour \DeclareRobustCommand et \markboth, deux choses
dont depuis 15 ans donc, on n'a plus besoin... et Lua n'a rien à voir
dans l'histoire.
>> La solution de GL est en principe meilleure que celle avec soul,
>> mais la combination \lsstyle/\scshape ne semble de ne pas marcher
>> avec luatex, la fonte pert le small caps apres un \lsstyle.
> Oui je pense que microtype n'est pas encore tout à fait prêt pour
> LuaTeX.
Cela n'a rien a faire avec microtype. C'est probablement un probleme
de fontspec:
\documentclass{scrreprt}
\usepackage{ifluatex}
\ifluatex
\usepackage{fontspec}
\setmainfont{Linux Libertine O}
\fi
\begin{document}
%faulty
{\scshape abc
\letterspacefont\lsfont\font1000 \lsfont abc}
%okay
{\font\test={LinuxLibertineO:+smcp}\test abc
\letterspacefont\lsfont\font1000 \lsfont abc}
%okay
{\itshape abc
\letterspacefont\lsfont\font1000 \lsfont abc}
Merci beaucoup à Ulrike et aux autres :)
Je ne savais pas que le dépôt de TLcontrib avait été mis à jour
(habituellement je fais la mise à jour de ce dépôt à peu près toutes
les semaines c'est pour ça)
Avec la nouvelle version de luatex, aucun problème pour moi aussi :)
Maintenant je saurais qu'avant de poser une question il faut mettre à
jour.
Bonne journée
Alexandre Krispin