Commits

Anonymous committed bbf96b5

minor style fixes

  • Participants
  • Parent commits 3568dc7

Comments (0)

Files changed (3)

File makedummy.lua

 
 
 local main = function ()
-  local times   = arg[1] or 50
+  local times   = arg[1] and tonumber(arg[1]) or 50
   local outlang = arg[2] or "en" -- or “de” if you please
   do_main(outlang, times)
   return 0

File testfile.tex

   frame=on,
   adapt=yes,
   minfontsize=6pt,
-  fontsize=24pt,
+  fontsize=24.1pt,
   fontstep=1pt,
   % adapt=no,
   verbose=yes,

File tex/context/third/bstellen/t-bibelstellen.mkiv

 \newdimen\fitbox_targetht
 
 \def\do_prepare_bodyfont_definitions{%
-  \fit_dbg{defining bodyfont size \the\current_fontsize}%
+  \edef\size_id{\the\current_fontsize}%
+  \fit_dbg{defining bodyfont size \size_id}%
   \definebodyfont[\the\current_fontsize][rm][default]%
+  \definebodyfontenvironment[\the\current_fontsize]%
   \advance\current_fontsize by-\decrease_step
   \ifdim\current_fontsize>\min_fontsize
     \do_prepare_bodyfont_definitions
 
 \def\prepare_bodyfont_definitions{%
   \fit_dbg{defining font sizes from \the\normal_fontsize\space to \the\min_fontsize}%
-    \newdimen\current_fontsize
-    \current_fontsize\dimexpr(\normal_fontsize)%
-    \do_prepare_bodyfont_definitions
-  \let\current_fontsize      \relax
+  \newdimen\current_fontsize
+  \current_fontsize\dimexpr(\normal_fontsize)\relax
+  \do_prepare_bodyfont_definitions
+  \let\current_fontsize\relax
 }
 
 \appendtoks
 \to \everysetupbstellen
 
 \def\set_fit_box_interline_space{%
-  \newdimen\scratchdimen \scratchdimen\dimexpr(\current_fontsize*6/5)\relax
+  \scratchdimen\dimexpr(\current_fontsize*6/5)\relax
   \setuplocalinterlinespace[\the\scratchdimen]%
 }
 
   \fi%
 }
 
-\def\do_fitbox[#1]#2{%
+\def\do_fit_box[#1]#2{%
   \setupframed[stellenframe][#1]%
   \newdimen\current_fontsize
-  \current_fontsize\dimexpr(\normal_fontsize)%
+  \current_fontsize\dimexpr(\normal_fontsize)\relax
   \def\current_content{#2}%
   \do_do_fit_box%
   \let\current_fontsize\relax
   \fit_dbg{===== new fitbox =====================================}%
   \newcount \recurse_level \recurse_level=0
   \dontcomplain
-  \dosingleempty\do_fitbox%
+  \dosingleempty\do_fit_box%
 }
 
 %······································································%