%% %% Ein Beispiel der DANTE-Edition %% %% 1. Auflage %% %% %% Copyright (C) 2013 Herbert Voss %% %% It may be distributed and/or modified under the conditions %% of the LaTeX Project Public License, either version 1.3 %% of this license or (at your option) any later version. %% %% See http://www.latex-project.org/lppl.txt for details. %% %% %% ==== % Show page(s) 1 %% %% \documentclass[]{exaarticle} \pagestyle{empty} \setlength\textwidth{352.81416pt} \textwidth=320pt %StartShownPreambleCommands \usepackage{luacode,libertine} \begin{luacode*} function active_hyphen (head) local orig_head = head while head do if head.id == 37 then head.subtype = 1 if head.char == 45 then local p = node.new("penalty") p.penalty = 10000 local g = node.new("glue") g.spec = node.new("glue_spec") g.spec.width = 0 head.prev.next = p p.next = head p.prev = head.prev g.prev = head g.next = head.next head.prev = p head.next = g g.next.prev = g end end head = head.next end lang.hyphenate(orig_head) -- Trennungen neu testen return true end \end{luacode*} %StopShownPreambleCommands \begin{document} \noindent\rule{\linewidth}{0.5pt}\makebox(0,0){\put(0,-200){\line(0,1){100}}} \par Finally, all of the three antibiotics examined had a negative effect on $\beta$-galactosidase activity from the time they were introduced to the assay. \par \directlua{luatexbase.add_to_callback("pre_linebreak_filter",active_hyphen,"hyphen")} Finally, all of the three antibiotics examined had a negative effect on $\beta$-galactosidase activity from the time they were introduced to the assay.\par \directlua{luatexbase.remove_from_callback("pre_linebreak_filter","hyphen")} Finally, all of the three antibiotics examined had a negative effect on $\beta$-galactosidase activity from the time they were introduced to the assay. \end{document}