Modify

Opened 7 years ago

Closed 6 years ago

#7148 closed enhancement (worksforme)

[PATCH] Auto-detect page directionality for floating TOC

Reported by: Itamar Ostricher Owned by: Noah Kantrowitz
Priority: normal Component: TocMacro
Severity: normal Keywords: rtl
Cc: Trac Release: 0.12

Description

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 Itamar Ostricher 7 years ago.
Auto-detection of page directionality for floating TOC

Download all attachments as: .zip

Change History (2)

Changed 7 years ago by Itamar Ostricher

Attachment: float_dir_detection.patch added

Auto-detection of page directionality for floating TOC

comment:1 Changed 6 years ago by Itamar Ostricher

Resolution: worksforme
Status: newclosed

Update: No need for this!

See DirClassMacro.

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

Modify Ticket

Action
as closed The owner will remain Noah Kantrowitz.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.