Modify

Opened 4 years ago

Closed 4 years ago

#7148 closed enhancement (worksforme)

[PATCH] Auto-detect page directionality for floating TOC

Reported by: itamaro Owned by: coderanger
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 itamaro 4 years ago.
Auto-detection of page directionality for floating TOC

Download all attachments as: .zip

Change History (2)

Changed 4 years ago by itamaro

Auto-detection of page directionality for floating TOC

comment:1 Changed 4 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

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from coderanger. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.