bugGNU TeXmacs - Bugs: bug #30133, verbatim and code modes need...

 
 

You are not allowed to post comments on this tracker with your current authentification level.

bug #30133: verbatim and code modes need tradition TAB behaviour

Submitted by:  Sam Liddicott <samjam>
Submitted on:  Tue 15 Jun 2010 12:59:52 PM UTC  
 
Category: TypesetterPriority: 4 - Bit lower
Item Group: WishlistStatus: Need Info
Privacy: PublicAssigned to: Miguel de Benito <mdbenito>
Originator Name: Open/Closed: Open
Release: 1.0.7.3Release: None
Fixed Release: NoneFixed Release: 
Keywords: 

(Jump to the original submission Jump to the original submission)

Thu 17 Jan 2013 11:47:05 AM UTC, comment #8:

When I say tweaking the converters I mean "doing whatever it's necessary to convert the ascii tab, the corresponding unicode point, etc. to the internal encoding "<tab>" and back.

When I say "glyph" I'm using the wrong word to signify "whatever those <blah> things are called". Characters in internal encoding? As you can see I'm not quite the expert...

When I said I'd take care of the typesetting I thought I could use the path of the tree being typeset to calculate the column, as I did in scheme with (cAr (cursor-path)). Or maybe the path to the current paragraph (the parameter "ip" in
concater_rep::typeset (tree t, path ip))

Miguel de Benito <mdbenito>
Project MemberIn charge of this item.
Thu 17 Jan 2013 10:47:35 AM UTC, comment #7:

When you say tweaking the converters do you mean in ./TeXmacs/progs/convert/* or do you mean in
./src/Data/Convert/Verbatim/* or in ./src/Data/String/converter.cpp

When you say define a glyph do you mean an entry in ./src/Data/Drd/drd_std.cpp to define something like TAB like HTAB and VSPACE etc?

How will you you typeset it? My problem with the typesetter was that everything was typeset with box left=0 so nothing ever new what hoffset in the page or in the paragraph it was and so could not compute how much space to leave.

Sam Liddicott <samjam>
Project Member
Wed 16 Jan 2013 11:57:55 PM UTC, comment #6:

See my svn commit 6129 for a partial solution: pressing "space tab" inserts a tab (expanded with spaces) of default width 8, which you can configure with

(set-preference "editor:verbatim:tabstop" 4)

in a scheme session. This works in verbatim, code, etc. Also in prog modes. I chose "space tab" because "M-tab" is used for auto indentation in scheme. It is trivial to change this for verbatim inside text-kbd.scm.

I haven't done anything about the literal tab character. This needs tweaking the converters, defining a new texmacs "glyph" or whatever it's called and then expanding it in the typesetter. I can do the latter if someone takes care of setting up the converters to send some character like "<tab>" to TeXmacs whenever a tab is read from a file. The input from keyboard is then a simple matter of defining a keymap ("space var" (insert "<tab>")) in the desired modes.

Miguel de Benito <mdbenito>
Project MemberIn charge of this item.
Mon 31 Dec 2012 12:41:57 AM UTC, comment #5:

Hi Sam. I recently made some changes that might break what you expect of tab behaviour in verbatim/source. Please review if you have time.

Miguel de Benito <mdbenito>
Project MemberIn charge of this item.
Mon 16 Jul 2012 04:48:36 PM UTC, comment #4:

I've made the summary more accurate.

I've had many attempts to introduce the standard TAB behaviour, adding a variable width space to the next multiple of 8 characters in fixed width mode, but what I find hard is that the left-box position is always zero.

Sam Liddicott <samjam>
Project Member
Fri 18 Jun 2010 07:40:47 AM UTC, comment #3:

I take that back, texmacs surly can; I'll work on it.

However it really ought to support a literal TAB character in the verbatim and code environments, and in the standard fashion.

Sam Liddicott <samjam>
Project Member
Thu 17 Jun 2010 02:13:27 PM UTC, comment #2:

The bug is probably not n htab which is doing what it is designed to do.

Possible M-TAB should not be inserting htab into verbatim.

However hspace isn't the right thing either, we want to do traditional tabbing to an offset equal to the next multiple of tab-interval.

I suspect texmacs can't do this.

Sam Liddicott <samjam>
Project Member
Wed 16 Jun 2010 03:50:29 PM UTC, comment #1:

For instance:

<\code>
<htab|5mm>a
</code>

shows the letter a right-aligned in the code block

Sam Liddicott <samjam>
Project Member
Tue 15 Jun 2010 12:59:52 PM UTC, original submission:

In a verbatim block (and therefore also a session), M-TAB to insert a tab inserts much more than 8 spaces and in fact right aligns the line.

Sam Liddicott <samjam>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mdbenito (Posted a comment)
  • -unavailable- added by samjam (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 16 Jan 2013 11:57:55 PM UTCmdbenitoPriority5 - Normal=>4 - Bit lower
      StatusNone=>Need Info
    Mon 31 Dec 2012 12:41:57 AM UTCmdbenitoCategoryNone=>Typesetter
      Item GroupNone=>Wishlist
      Assigned toNone=>mdbenito
    Mon 16 Jul 2012 04:48:36 PM UTCsamjamSummaryTAB character in verbatim right aligns=>verbatim and code modes need tradition TAB behaviour

    Back to the top


    Powered by Savane 3.1-cleanup