Opened 7 years ago

Closed 6 years ago

#7148 closed enhancement (worksforme)

[PATCH] Auto-detect page directionality for floating TOC

Reported by: itamarost Owned by: coderanger
Priority: normal Component: TocMacro
Severity: normal Keywords: rtl
Cc: Trac Release: 0.12


The problem: when including a floating TOC in right-to-left pages, the TOC floats on the right, which is "not right".

The fix: Make the floating aware of page directionality (complex, depends on ticket:4431) and set floating position accordingly.

Workaround until then (attached patch): Simple heuristic - if the page begins with:

#!div dir=rtl

then assume it is right-to-left.

Also add "float=<dir>" argument that allows overriding auto-detection and setting the floating direction manually.

Attachments (1)

float_dir_detection.patch (3.6 KB) - added by itamarost 7 years ago.
Auto-detection of page directionality for floating TOC

Download all attachments as: .zip

Change History (2)

Changed 7 years ago by itamarost

Auto-detection of page directionality for floating TOC

comment:1 Changed 6 years ago by itamarost

  • Resolution set to worksforme
  • Status changed from new to closed

Update: No need for this!

See DirClassMacro.

TOC used within [[RTL]] block will float on the left.

Add Comment

Modify Ticket

as closed The owner will remain coderanger.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.