[NTG-pdftex] Patch OutlineAttr

Heiko Oberdiek oberdiek@uni-freiburg.de
Thu, 5 Jun 2003 22:35:13 +0200


--7AUc2qLy4jB3hD7Z
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hello,

Patch OutlineAttr

Since PDF 1.3/1.4 further entries are supported in the outline
item dictionary: /SE, /C, /F. Especially the last to keys can
be interesting. Currently there is no support in pdfTeX to set
these entries. Therefore I have added the possibility to
specify further attributes to the \pdfoutline command:
  \pdfoutline <outline spec>
  <outline spec> --> <attr spec> <action spec>
                     [count <number>] <general text>

Patch files, based on 2002/06/05 v1.11a:
  pdftex.ch.diff    for pdftexdir/pdftex.ch
  pdftex-syntax.txt for pdftexdir/pdftex-syntax.txt

Yours sincerely
  Heiko <oberdiek@uni-freiburg.de>
-- 
--7AUc2qLy4jB3hD7Z
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="pdftex.ch.diff"

*** pdftex.ch.org	Thu Jun  5 22:20:17 2003
--- pdftex.ch	Thu Jun  5 22:21:07 2003
***************
*** 1863,1869 ****
  entries can't not be deallocated and will stay in memory. For this reason we
  will store data of outline entries in |pdf_mem| instead of |mem|}
  
! @d pdfmem_outline_size     == 7 {size of memory in |pdf_mem| which
  |obj_outline_ptr| points to}
  @d obj_outline_count        == obj_info{count of all opened children}
  @d obj_outline_ptr          == obj_aux {pointer to |pdf_mem|}
--- 1863,1869 ----
  entries can't not be deallocated and will stay in memory. For this reason we
  will store data of outline entries in |pdf_mem| instead of |mem|}
  
! @d pdfmem_outline_size     == 8 {size of memory in |pdf_mem| which
  |obj_outline_ptr| points to}
  @d obj_outline_count        == obj_info{count of all opened children}
  @d obj_outline_ptr          == obj_aux {pointer to |pdf_mem|}
***************
*** 1875,1880 ****
--- 1875,1881 ----
  @d obj_outline_last(#)      == pdf_mem[obj_outline_ptr(#) + 5]
  @d obj_outline_action_objnum(#) == pdf_mem[obj_outline_ptr(#) + 6] {object number of
  action}
+ @d obj_outline_attr(#)      == pdf_mem[obj_outline_ptr(#) + 7]
  
  @# {types of destinations}
  @d pdf_dest_xyz             == 0
***************
*** 4081,4086 ****
--- 4082,4091 ----
          pdf_indirect_ln("Last", obj_outline_last(k));
      if obj_outline_count(k) <> 0 then
          pdf_int_entry_ln("Count", obj_outline_count(k));
+     if obj_outline_attr(k) <> 0 then begin
+         pdf_print_toks_ln(obj_outline_attr(k));
+         delete_toks(obj_outline_attr(k));
+     end;
      pdf_end_dict;
      k := obj_link(k);
  end
***************
*** 6978,6983 ****
--- 6983,6994 ----
  @ @<Implement \.{\\pdfoutline}@>=
  begin
      check_pdfoutput("\pdfoutline");
+     if scan_keyword("attr") then begin
+         scan_pdf_ext_toks;
+         r := def_ref;
+     end
+     else
+         r := 0;
      p := scan_action;
      if scan_keyword("count") then begin
          scan_int;
***************
*** 7008,7013 ****
--- 7019,7025 ----
      obj_outline_first(k) := 0;
      obj_outline_last(k) := 0;
      obj_outline_parent(k) := pdf_parent_outline;
+     obj_outline_attr(k) := r;
      if pdf_first_outline = 0 then
          pdf_first_outline :=  k;
      if pdf_last_outline = 0 then begin

--7AUc2qLy4jB3hD7Z
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="pdftex-syntax.txt.diff"

96c96
< <outline spec> --> <action spec> [count <number>] <general text>
---
> <outline spec> --> <attr spec> <action spec> [count <number>] <general text>

--7AUc2qLy4jB3hD7Z--