Dear ConTeXt users,
I am typesetting a critical edition with margin notes. To place these, I
am using the Lua code below. It is based on the code from the LuaTeX
wiki (cf.
http://wiki.luatex.org/index.php/Post_linebreak_filter#Margin_notes) and
has the restrictions mentioned on this wiki page. For example, placing
notes on the left of the text is not possible. Now, my questions are:
(1) How can I extend the code to place notes on the left of the text? I
tried node.insert_before(line.list, line.list, glyph) but it did not
work out.
(2) How do I use the callback within the output routine to distinguish
odd and even pages?
Thank you very much for any hints or help!
Best regards
Hannes Riebl
make_notes = function(head)
for line in node.traverse_id(node.id("hlist"), head) do
...
local glyph = node.new("glyph")
glyph.font = font.current()
glyph.lang = tex.language
glyph.char = 97
node.insert_after(line.list, node.tail(line.list), glyph)
...
end
return head
end
nodes.tasks.appendaction("finalizers", "after", "make_notes")
--
Hannes Riebl
Abteilung Forschung & Entwicklung
Georg-August-Universität Göttingen
Niedersächsische Staats- und Universitätsbibliothek Göttingen
D-37070 Göttingen
Papendiek 14 (Historisches Gebäude, Raum 2.409)
hri...@sub.uni-goettingen.de
http://www.sub.uni-goettingen.de
http://www.rdd.sub.uni-goettingen.de
http://dhd-blog.org
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________