[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [emacs-wiki-discuss] Re: <nop> problem
From: |
chris wallace |
Subject: |
Re: [emacs-wiki-discuss] Re: <nop> problem |
Date: |
Thu, 18 Mar 2004 10:19:01 +0000 |
User-agent: |
Internet Messaging Program (IMP) 3.2.2 |
Quoting Sacha Chua <address@hidden>:
> chris wallace <address@hidden> writes:
>
> > I was editting the following
> > <pre>
> > --- *fatness* ----
> > BMI bmi (sum, diff) for sib pair
> > WaistHip waist_hip_ratio for sib pair
> > Tri triceps (sum, diff) for sib pair
> > Bi biceps (sum, diff) for sib pair
> > Sub subscapular (sum, diff) for sib pair
> > Sup suprailiac (sum, diff) for sib pair
> > Fat bmi>25 (both or one member of sib pair)
> > VFat bmi>30 (both or one member of sib pair)
> > </pre>
>
> Better to use <example>.
except <example> means *fatness* won't be rendered emphasized (this is an
excerpt from a long list, with "dividers" like
--- *fatness* ----
--- *individual BP* ----
> although it looks like you're trying to make a table, so
>
> BMI | bmi (sum, diff) for sib pair
> <nop>WaistHip | ...
again, this presents problems for the "dividers", which I would like to span
both columns (I don't think there's a way to represent such in emacs-wiki?).
Also, although I insert the dividers manually, the list is just pasted from
another program and comes lined up nicely for <pre> format. Quite often I just
paste such output into a file and surround with <pre> or <example> rather than
troubling to convert to table format.
While on the subject of tables (sort of), I often want to put maths like P(A|B)
into a file. I can prevent it being rendered as a table by writing =P(A|B)=,
but then it comes out in fixed font. Is there an alternative method to say
"emacs-wiki please don't attempt to render this part"?
> > and everything up to "25 (both or..." was swallowed into invisibleness.
> (The
> > <nop was matching to the next > and swallowing the bits in between).
>
> Here's a better nop method:
>
> (defun emacs-wiki-nop-tag (beg end highlight-p)
> (when (= (- end beg) 5)
> (if highlight-p
> (add-text-properties beg end '(invisible t intangible t)))
> (when (looking-at emacs-wiki-name-regexp)
> (unless highlight-p
> (add-text-properties beg (match-end 0)
> '(rear-nonsticky (read-only) read-only t))))))
Yes, much better, thanks.
Chris.