mailing-list for TeXmacs Users

Text archives Help


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


Chronological Thread 
  • From: hpl <address@hidden>
  • To: "address@hidden" <address@hidden>
  • Cc: Miguel de Benito Delgado <address@hidden>
  • Subject: Re: [TeXmacs] How to automatically wrap lines in table cells
  • Date: Sat, 24 Aug 2013 23:54:23 +0800

Many thanks for the tentative solutions!

I think the current best practice is to manually insert a blank where we need a line break. Adding a blank for every cite tag does not look good. I want to save spaces because there are a lot of citations in one single cell (a survey paper).

I should have tried blanks earlier! My workaround two months ago was to manually break the citations into two rows and make the row boundary invisible.

An additional note here. I also tried multiple cite (  <cite|r1|r2|r3> ). In this way, current line wrapping works. One drawback is that the "[r1, r2, r3]" pattern does not look very good. Another drawback is that it's inconvenient to add new papers.


Thanks,
Pili

On 21/8/13 3:51 PM, Miguel de Benito Delgado wrote:

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