I am flabbergasted with this macro I am setting up. I must miss something from reading the documentation.

It is a part of a macro that is much longer, only a conditional partially printing of a header, indexing on a parameter and color-formatting - just the nice things to do in a macro - , but this misbehaves on the typesetting of the main event of the macro.


The output is one page long, there are a number of underfull verticals, which are resolved in the final version with all bells and whistles.


I hope someone can help me with this strange behaviour.


Thanks,

Herman Grootaers


P.S. Please reply to the channel, I do not like it when someone finds only the question but not the answer.

\documentclass[a4paper, 12pt]{memoir}
\usepackage{fontspec}%			%% Use of the system-wide installed fonts is enabled
\fontspec{libertinusserif-regular.otf}%	%% Default-font
\usepackage{amsmath}%			%% For using mathematical symbols
\usepackage{amssymb,amsfonts,textcomp}%	%% Special mathematical characters
\usepackage{lettrine}%			%% Fancy first letters of paremias
\usepackage{xifthen}%			%% Logic, logic, and logic, what else is there without logic!
\newif\ifEmptyPar%			%% false = Filled parameter, true = empty parameter; set by calling \MTPPR {eMPTyPaRameter} ==> is the inverse of \ifFilledPar
\newif\ifFilledPar%			%% true = Filled parameter, false = empty parameter; set by calling \MPTPR {eMPTyPaRameter} ==> is the inverse of \ifEmptyPar
\makeatletter				%% Starts the makeat-environment
\newcommand\MPTPR[1]{\@ifmtarg{#1}{\EmptyPartrue \FilledParfalse}{\EmptyParfalse \FilledPartrue}}%
\makeatother				%% Stops the makeat-environment
\newcommand{\MAINTEXTBODY}[3]{\MPTPR{#1}%
			      \ifEmptyPar{Normal call of the package lettrine so 4 lines are used\\
					  \lettrine{#2}{}#3}%		%% Normal text-body so full height for the Initial {#5}
			      \else{Adjusted call of the package lettrine so #1 lines are used\\ 
			            \lettrine[lines=#1]{#2}{}#3}%	%% Due to page-constraints we change the height of the Initial {#5}
			      \fi%
			     }%
\newcommand{\BLATEXT}{ext without the starting initial bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla.}%
\begin{document}
\setlength{\parindent}{0pt}
\renewcommand{\LettrineFontHook}{\fontspec{libertinusserifinitials-regular.otf}}
\fontspec{libertinusserif-regular.otf}%
\setmainfont{libertinusserif-regular.otf}[ BoldFont = libertinusserif-bold.otf,
					   ItalicFont = libertinusserif-italic.otf,
					   BoldItalicFont = libertinusserif-bolditalic.otf
					 ]
\setcounter{DefaultLines}{4}%
\renewcommand*{\DefaultLraise}{0.075}%
TESTING the macro\\%
\MAINTEXTBODY{}{T}{\BLATEXT}\\[12pt]%
\MAINTEXTBODY{2}{T}{\BLATEXT}\\[48pt]%
VERYFING the macro\\%
\lettrine{T}{}\BLATEXT\\[12pt]%
\lettrine[lines=2]{T}{}\BLATEXT%
\end{document}

Reply via email to