diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2015-11-14 00:48:08 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2015-11-14 00:48:08 +0000 |
commit | 64322869cd45fa0029198b6ef544363a0cf49eb6 (patch) | |
tree | faa34b755a1bd7b9b5ca4a66d204deebf841d119 /Build/source/texk/web2c/luatexdir/pdf/pdfoutline.w | |
parent | 6d37525a79984eea934633c34944113831e3fecb (diff) |
web2c/luatexdir: Sync with the upstream trunk.
git-svn-id: svn://tug.org/texlive/trunk@38844 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/pdf/pdfoutline.w')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/pdf/pdfoutline.w | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfoutline.w b/Build/source/texk/web2c/luatexdir/pdf/pdfoutline.w index 1dafb0499b3..306a4b630aa 100644 --- a/Build/source/texk/web2c/luatexdir/pdf/pdfoutline.w +++ b/Build/source/texk/web2c/luatexdir/pdf/pdfoutline.w @@ -96,15 +96,22 @@ static int outline_list_count(PDF pdf, pointer p) @ @c void scan_pdfoutline(PDF pdf) { - halfword p, q, r; - int i, j, k, l; + halfword q, r; + int i, k, l; + int j = 0; + halfword p = NULL; if (scan_keyword("attr")) { scan_pdf_ext_toks(); r = def_ref; } else { r = 0; } - p = scan_action(pdf); + if (scan_keyword("useobjnum")) { + scan_int(); + j = cur_val; + } else { + p = scan_action(pdf); + } if (scan_keyword("count")) { scan_int(); i = cur_val; @@ -113,11 +120,13 @@ void scan_pdfoutline(PDF pdf) } scan_pdf_ext_toks(); q = def_ref; - j = pdf_create_obj(pdf, obj_type_others, 0); - pdf_begin_obj(pdf, j, OBJSTM_ALWAYS); - write_action(pdf, p); - pdf_end_obj(pdf); - delete_action_ref(p); + if (j == 0) { + j = pdf_create_obj(pdf, obj_type_others, 0); + pdf_begin_obj(pdf, j, OBJSTM_ALWAYS); + write_action(pdf, p); + pdf_end_obj(pdf); + delete_action_ref(p); + } k = pdf_create_obj(pdf, obj_type_outline, 0); set_obj_outline_ptr(pdf, k, pdf_get_mem(pdf, pdfmem_outline_size)); set_obj_outline_action_objnum(pdf, k, j); |