Subject: mailing-list for TeXmacs Users
List archive
From : TeXmacs <address@hidden>- To: address@hidden
- Subject: Re: [TeXmacs-users] Show/Hide texts according to a variable
- Date: Sat, 25 Jul 2020 21:34:56 +0200
Hi Frank,
A better way is to have several macros for the "shown" and "hidden" versions
and then to use the 'compound' program for applying the appropriate version
to the body depending on the value of "draft-mode".
(document (assign "draft-mode" "true") (assign "draft-hidden" (macro "body"
"")) (assign "draft-shown" (macro "body" (arg "body"))) (assign "draft"
(macro "body" (compound (if (value "draft-mode") (value "draft-shown") (value
"draft-hidden")) (arg "body")))) "")
Best wishes, --Joris
On Sat, Jul 25, 2020 at 05:48:46PM +0200, Frank wrote:
> Dear all,
>
> I am trying to implement a macro which allows me to show texts
> according to the value of a variable. I tried the following:
>
> (document (assign "shown-draft" (macro "body" (if (draft-mode) (arg
> "body")))) (assign "draft-mode" "true"))
>
> However, I see that this macro is buggy. For example,
>
> (shown-draft (document "s" "e" "alsdkjf asdlfja asdlfj asldkfj
> asldfk jasldkfj lkasj alskdjf lkasjd alsdkjfl jasdlkf jalsfj laskdj
> flajsdf lkjasd lkjaslkfjlaksjdf lajs dflkjaslfkjlkj lajs ldksaj
> lkajs lkfjsalk jask jfkls jladsj ljadslkj laskdj fljsd ljalksdf
> jlaksdjf lkjaslkd fjalksjfd ljasl jasdlkf jlkajs lkasldk j"))
>
> Then this extremely long line does not break. I wonder how to deal
> with this properly?
>
> Best,
>
> Frank
>
- [TeXmacs-users] Show/Hide texts according to a variable, Frank, 07/25/2020
- Re: [TeXmacs-users] Show/Hide texts according to a variable, TeXmacs, 07/25/2020
- Re: [TeXmacs-users] Show/Hide texts according to a variable, Frank, 07/26/2020
- Re: [TeXmacs-users] Show/Hide texts according to a variable, Basile Audoly, 07/26/2020
- Re: [TeXmacs-users] Show/Hide texts according to a variable, Frank, 07/26/2020
- Re: [TeXmacs-users] Show/Hide texts according to a variable, Basile Audoly, 07/26/2020
- Re: [TeXmacs-users] Show/Hide texts according to a variable, Frank, 07/26/2020
- Re: [TeXmacs-users] Show/Hide texts according to a variable, TeXmacs, 07/25/2020
Archive powered by MHonArc 2.6.19.