bugGNU TeXmacs - Bugs: bug #32893, 2 apostrophe's not fixed with in...

 
 

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

bug #32893: 2 apostrophe's not fixed with in mode prog or verbatim

Submitter:  Sam Liddicott <samjam>
Submitted:  Wed 23 Mar 2011 03:18:38 PM UTC
   
 
Category:  Typesetter Priority:  5 - Normal
Item Group:  Error Status:  Fixed
Privacy:  Public Assigned to:  vdhoeven
Originator Name:  Open/Closed:  Closed
Release:  None Release: 
Fixed Release:  1.99.12 Fixed Release:  svn 6076
Keywords: 

Jump to the original submission

Sat 19 Oct 2019 06:57:56 PM UTC, comment #9: 

I think that this problem has been fixed in the meantime (as of revision 12385).  Please re-open if you still have problems.

Notice that the (un)related copy&paste bug for backquotes (#36346) still seems to be present.

Joris van der Hoeven <vdhoeven>
Group administrator
Fri 04 Jan 2013 01:08:03 PM UTC, comment #8: 

(I must repost due to some strange bug in savannah)

This is due to the following kbd-map in text-kbd.scm:

(kbd-map
  (:mode in-text?)
  ("\"" (insert-quote))
   ...

I overwrote this at the end of the file when in-verbatim? and it's only a matter of adding some in-code? check. However I'm not sure this is the right solution: Whenever a new tag is created which should render verbatim text, the default (:mode in-text?) will apply and this problem will reappear. I think we should do one of these:

  • Add <with|mode=prog|...> to the definition of any tag which should render as verbatim text. This should include <verbatim>, <code>, etc. and would fix problems with shortcuts and undue ligatures and kerning. I don't know if this should extend to changes in the font family to a monospaced font (like the tag <tt>).


  • Create a new environment mode (as used in edit_env_rep::update_mode ()) which signals text must be rendered without ligatures nor kerning (maybe the font family should be set to fixed width too, but I don't know). This would disable text mode specific shortcuts right away and fix the problem with double quotes, commas, etc.. We'd have four basic modes: text, math, prog and, say, plain (or whatever name is appropriate). This new mode could also be used to mark arguments in tags which should render as-is to the typesetter. This is a problem for arguments defined as TYPE_URL in drd_std.cpp among others (e.g. arguments to cite tags). See edit_env_rep::rewrite_inactive_arg() and hilghlight() for instance. More generally the env variable "src-tt" should be set to this new "plain" mode. But there may arise problems elsewhere, I don't know...


I personally prefer the second approach if it also helps solving the problem with the arguments. It also seems reasonable to be able to tell the typesetter to stop messing with our whitespace when we want it to. :)

Miguel de Benito <mdbenito>
Group Member
Fri 04 Jan 2013 01:06:16 PM UTC, comment #7: 

This is due to the following kbd-map in text-kbd.scm:


(kbd-map
  (:mode in-text?)
  ("\"" (insert-quote))
   ...
++verbatim++

I overwrote this at the end of the file when in-verbatim? and it's only a matter of adding some in-code? check. However I'm not sure this is the right solution: Whenever a new tag is created which should render verbatim text, the default (:mode in-text?) will apply and this problem will reappear. I think we should do one of these:

* Add <with|mode=prog|...> to the definition of any tag which should render as verbatim text. This should include <verbatim>, <code>, etc. and would fix problems with shortcuts and undue ligatures and kerning. I don't know if this should extend to changes in the font family to a monospaced font (like the tag <tt>).

* Create a new environment mode (as used in edit_env_rep::update_mode ()) which signals text must be rendered without ligatures nor kerning (maybe the font family should be set to fixed width too, but I don't know). This would disable text mode specific shortcuts right away and fix the problem with double quotes, commas, etc.. We'd have four basic modes: *text*, *math*, *prog* and, say, *plain* (or whatever name is appropriate). This new mode could also be used to mark arguments in tags which should render as-is to the typesetter. This is a problem for arguments defined as TYPE_URL in drd_std.cpp among others (e.g. arguments to cite tags). See edit_env_rep::rewrite_inactive_arg() and hilghlight() for instance. More generally the env variable "src-tt" should be set to this new "plain" mode. But there may arise problems elsewhere, I don't know...

I personally prefer the second approach if it also helps solving the problem with the arguments. It also seems reasonable to be able to tell the typesetter to stop messing with our whitespace when we want it to. :)

Miguel de Benito <mdbenito>
Group Member
Fri 04 Jan 2013 09:49:44 AM UTC, comment #6: 

Confirm fixed for apostrophe in code/verbatim/mode=prog - thankyou

but related comma problem (see comment #1) and ascii double-quote
(ascii 34) problem are not fixed for <code|...>

In <code|...> the asci 34 (shift-2 on a UK keyboard) inserts two apostrophes (now properly spaced) and a double comma is still replaced by something which cut-n-paste as \R. A work-around is to use SHIFT-F5 to precede each character to prevent the wrong interpolation.

ascii double-quote and comma work find in verbatim/mode=prog

Sam Liddicott <samjam>
Group Member
Wed 02 Jan 2013 09:57:23 PM UTC, comment #5: 

The fix disabling ligatures for verbatim seems to work. Also I think I found all the kbd-maps for text mode which were incompatible with verbatim (svn 6076). I'm closing this item. Please reopen if you find any related problems.

Miguel de Benito <mdbenito>
Group Member
Mon 31 Dec 2012 12:39:55 AM UTC, comment #4: 

Now fixed for verbatim tags too. (SVN 6058)

Miguel de Benito <mdbenito>
Group Member
Sun 30 Dec 2012 11:40:08 PM UTC, comment #3: 

A fix for program mode (i.e. sessions) is on SVN 6052.

Miguel de Benito <mdbenito>
Group Member
Sat 28 Jan 2012 11:39:27 PM UTC, comment #2: 

It seems that "ligature kerning" (i.e. packing several characters together), which is performed by the font (although it sounds weird), is not disabled in verbatim mode. I traced the code up to tex_font_metric_rep::execute in Plugins/Metafont/load_tfm.cpp, but I'm incapable of deciphering that code. Any help would be appreciated.

Miguel de Benito <mdbenito>
Group Member
Thu 28 Jul 2011 11:37:50 AM UTC, comment #1: 

Same also hold for commas - multiple commas a bunched together.

Michael Lachmann Tamarlin <ghostwheel>
Group Member
Wed 23 Mar 2011 03:18:38 PM UTC, original submission:  

In verbaitim or mode prog, two adjacent apostrophes take up the same width as a single apostrophe

This is not correct, fixed width font should be used.

Also in verbatim mode, the double-quote-key (usually shift-2) does not enter an ascii quote but a pair of apostrophes. This seems wrong for fixed-width verbatim mode.

Sam Liddicott <samjam>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by vdhoeven (Posted a comment)
  • -email is unavailable- added by mdbenito (Updated the item)
  • -email is unavailable- added by ghostwheel (Posted a comment)
  • -email is unavailable- added by samjam (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 18 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-10-19 vdhoeven StatusNeed Info Fixed
        Assigned tomdbenito vdhoeven
        Open/ClosedOpen Closed
        Fixed ReleaseNone 1.99.12
    2013-01-04 mdbenito StatusNone Need Info
        Open/ClosedClosed Open
    2013-01-04 samjam StatusFixed None
    2013-01-02 mdbenito StatusReady For Test Fixed
        Open/ClosedOpen Closed
        Fixed Release svn 6076
    2012-12-31 mdbenito StatusIn Progress Ready For Test
    2012-12-30 mdbenito CategoryNone Typesetter
        Item GroupNone Error
        StatusConfirmed In Progress
        Assigned tovdhoeven mdbenito
    2012-03-08 mdbenito Assigned tomdbenito vdhoeven
    2012-01-28 mdbenito StatusNone Confirmed
        Assigned toNone mdbenito

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code