mailing-list for TeXmacs Users

Text archives Help


Re: [TeXmacs] How to automatically wrap lines in table cells


Chronological Thread 
  • From: Miguel de Benito Delgado <address@hidden>
  • To: "address@hidden" <address@hidden>
  • Subject: Re: [TeXmacs] How to automatically wrap lines in table cells
  • Date: Wed, 21 Aug 2013 09:51:34 +0200


On 21 Aug, 2013, at 09:36, Sam Liddicott <address@hidden> wrote:

the cite tag should be defined to include a zero width space at the end so that breaking can still occur.

That looks like a nice idea. On the downside you loose autocompletion of cite keys if you enclose the cite tag in a new macro. A solution is to alter the original definition of <\cite> in packages/standard/standard-automatic.ts (I think it's that one), but this will get overwritten by updates. Or, if you are not scared or bored by scheme code, you can define your new <\cite-space> macro and to get autocompletion back you can redefine

(tm-define (kbd-variant t forwards?)
  (:require (and (tree-in? t '(cite-space)) (cursor-inside? t)))
  (with u (current-bib-file)
    (with ttxt (tree-ref t (cADr (cursor-path)))
      (if (or (url-none? u) (not ttxt))
          (set-message "No completions" "You must add a bibliography file")
          (custom-complete (tm->tree (citekey-completions u ttxt)))))))


(For reference: the original function is in progs/generic/generic-edit.scm, somewhere in your system depending on what OS you have and how you installed TeXmacs.)

Just define your new macro cite-space in your style file, then paste this code into your my-init-texmacs.scm and it should work.

Anyway... I'd rather use spaces or comma + space between the cite tags...

Best,
--
Miguel de Benito.



Archive powered by MHonArc 2.6.19.

Top of page