* Newlines in a table cel @ 2011-07-04 9:59 Cecil Westerhof 2011-07-04 10:03 ` Hans Hagen 0 siblings, 1 reply; 9+ messages in thread From: Cecil Westerhof @ 2011-07-04 9:59 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 574 bytes --] I have a macro to display MVC (model-view-controller) info: \define[3]\MVC{ \starttabulate[|l|l|] \NC \Important[Model]: \NC #1 \NC\NR \NC \Important[View]: \NC #2 \NC\NR \NC \Important[Controller]: \NC #3 \NC\NR \stoptabulate \myblank } Sometimes the info is very long. Now it is displayed in one long line that scrolls off the screen. How can I change this. Ideally would be if I could give in the macro call where a new line should start, but just automatically formatted would be good enough. -- Cecil Westerhof [-- Attachment #1.2: Type: text/html, Size: 634 bytes --] [-- Attachment #2: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Newlines in a table cel 2011-07-04 9:59 Newlines in a table cel Cecil Westerhof @ 2011-07-04 10:03 ` Hans Hagen [not found] ` <CAG-LmmDLbuj4jKhF7pvqw1cc5v-FwkxzYwAeoAj4YyRx-z181w@mail.gmail.com> 0 siblings, 1 reply; 9+ messages in thread From: Hans Hagen @ 2011-07-04 10:03 UTC (permalink / raw) To: mailing list for ConTeXt users On 4-7-2011 11:59, Cecil Westerhof wrote: > I have a macro to display MVC (model-view-controller) info: > \define[3]\MVC{ > \starttabulate[|l|l|] > \NC \Important[Model]: \NC #1 \NC\NR > \NC \Important[View]: \NC #2 \NC\NR > \NC \Important[Controller]: \NC #3 \NC\NR > \stoptabulate > \myblank > } > > Sometimes the info is very long. Now it is displayed in one long line that > scrolls off the screen. How can I change this. Ideally would be if I could > give in the macro call where a new line should start, but just automatically > formatted would be good enough. [|l|lp|] ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <CAG-LmmDLbuj4jKhF7pvqw1cc5v-FwkxzYwAeoAj4YyRx-z181w@mail.gmail.com>]
* Fwd: Newlines in a table cel [not found] ` <CAG-LmmDLbuj4jKhF7pvqw1cc5v-FwkxzYwAeoAj4YyRx-z181w@mail.gmail.com> @ 2011-07-04 10:50 ` Cecil Westerhof 2011-07-04 12:16 ` Wolfgang Schuster 0 siblings, 1 reply; 9+ messages in thread From: Cecil Westerhof @ 2011-07-04 10:50 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 1297 bytes --] Sorry Hans. I send it to you instead of to the list. And I forgot the files. Now corrected. ---------- Forwarded message ---------- From: Cecil Westerhof <cldwesterhof@gmail.com> Date: 2011/7/4 Subject: Re: [NTG-context] Newlines in a table cel To: Hans Hagen <pragma@wxs.nl> 2011/7/4 Hans Hagen <pragma@wxs.nl> > On 4-7-2011 11:59, Cecil Westerhof wrote: > >> I have a macro to display MVC (model-view-controller) info: >> \define[3]\MVC{ >> \starttabulate[|l|l|] >> \NC \Important[Model]: \NC #1 \NC\NR >> \NC \Important[View]: \NC #2 \NC\NR >> \NC \Important[Controller]: \NC #3 \NC\NR >> \stoptabulate >> \myblank >> } >> >> Sometimes the info is very long. Now it is displayed in one long line that >> scrolls off the screen. How can I change this. Ideally would be if I could >> give in the macro call where a new line should start, but just >> automatically >> formatted would be good enough. >> > > [|l|lp|] > Thanks. Much better. I did not find this. Did I not look good enough? Attached a tex and a pdf file. It shows the original and your solution, but also the preferred solution. (But hard coded, not with a macro.) Would it be possible to get the preferred solution in a macro? -- Cecil Westerhof -- Cecil Westerhof [-- Attachment #1.2: Type: text/html, Size: 2040 bytes --] [-- Attachment #2: dummy.tex --] [-- Type: application/x-tex, Size: 1022 bytes --] [-- Attachment #3: dummy.pdf --] [-- Type: application/pdf, Size: 8405 bytes --] [-- Attachment #4: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Fwd: Newlines in a table cel 2011-07-04 10:50 ` Fwd: " Cecil Westerhof @ 2011-07-04 12:16 ` Wolfgang Schuster 2011-07-04 12:47 ` Cecil Westerhof 0 siblings, 1 reply; 9+ messages in thread From: Wolfgang Schuster @ 2011-07-04 12:16 UTC (permalink / raw) To: mailing list for ConTeXt users Am 04.07.2011 um 12:50 schrieb Cecil Westerhof: > Attached a tex and a pdf file. It shows the original and your solution, but also the preferred solution. (But hard coded, not with a macro.) Would it be possible to get the preferred solution in a macro? Tell ConTeXt where is should break the line with “\\”. \MVCa{usedmodel}{firstViewFromSeveral\\ secondViewFromSeveral\\ thirthViewFromSeveral\\ fourthViewFromSeveral}{usedController} Wolfgang ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Fwd: Newlines in a table cel 2011-07-04 12:16 ` Wolfgang Schuster @ 2011-07-04 12:47 ` Cecil Westerhof 2011-07-04 12:58 ` Cecil Westerhof 0 siblings, 1 reply; 9+ messages in thread From: Cecil Westerhof @ 2011-07-04 12:47 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 648 bytes --] 2011/7/4 Wolfgang Schuster <schuster.wolfgang@googlemail.com> > > Attached a tex and a pdf file. It shows the original and your solution, > but also the preferred solution. (But hard coded, not with a macro.) Would > it be possible to get the preferred solution in a macro? > > Tell ConTeXt where is should break the line with “\\”. > > \MVCa{usedmodel}{firstViewFromSeveral\\ secondViewFromSeveral\\ > thirthViewFromSeveral\\ fourthViewFromSeveral}{usedController} > Thanks. In the dummy.tex it works. In my own document it does not. Looks like I changed something in my environment. Have to find out what. -- Cecil Westerhof [-- Attachment #1.2: Type: text/html, Size: 930 bytes --] [-- Attachment #2: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Fwd: Newlines in a table cel 2011-07-04 12:47 ` Cecil Westerhof @ 2011-07-04 12:58 ` Cecil Westerhof 2011-07-04 13:32 ` Wolfgang Schuster 0 siblings, 1 reply; 9+ messages in thread From: Cecil Westerhof @ 2011-07-04 12:58 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 824 bytes --] 2011/7/4 Cecil Westerhof <cldwesterhof@gmail.com> > 2011/7/4 Wolfgang Schuster <schuster.wolfgang@googlemail.com> > >> > Attached a tex and a pdf file. It shows the original and your solution, >> but also the preferred solution. (But hard coded, not with a macro.) Would >> it be possible to get the preferred solution in a macro? >> >> Tell ConTeXt where is should break the line with “\\”. >> >> \MVCa{usedmodel}{firstViewFromSeveral\\ secondViewFromSeveral\\ >> thirthViewFromSeveral\\ fourthViewFromSeveral}{usedController} >> > > Thanks. In the dummy.tex it works. In my own document it does not. Looks > like I changed something in my environment. Have to find out what. > It is not in my environment. The use of \completecontent wreck havoc on this. See the attachments. -- Cecil Westerhof [-- Attachment #1.2: Type: text/html, Size: 1351 bytes --] [-- Attachment #2: dummy.tex --] [-- Type: application/x-tex, Size: 2375 bytes --] [-- Attachment #3: dummy.pdf --] [-- Type: application/pdf, Size: 10525 bytes --] [-- Attachment #4: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Fwd: Newlines in a table cel 2011-07-04 12:58 ` Cecil Westerhof @ 2011-07-04 13:32 ` Wolfgang Schuster 2011-07-04 13:53 ` Cecil Westerhof 0 siblings, 1 reply; 9+ messages in thread From: Wolfgang Schuster @ 2011-07-04 13:32 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 1498 bytes --] Am 04.07.2011 um 14:58 schrieb Cecil Westerhof: > 2011/7/4 Cecil Westerhof <cldwesterhof@gmail.com> > 2011/7/4 Wolfgang Schuster <schuster.wolfgang@googlemail.com> > > Attached a tex and a pdf file. It shows the original and your solution, but also the preferred solution. (But hard coded, not with a macro.) Would it be possible to get the preferred solution in a macro? > > Tell ConTeXt where is should break the line with “\\”. > > \MVCa{usedmodel}{firstViewFromSeveral\\ secondViewFromSeveral\\ thirthViewFromSeveral\\ fourthViewFromSeveral}{usedController} > > Thanks. In the dummy.tex it works. In my own document it does not. Looks like I changed something in my environment. Have to find out what. > > It is not in my environment. The use of \completecontent wreck havoc on this. See the attachments. This is *not* a minimal working example, neither it’s minimal nor it’s working. You can fix this by replacing the \\ with \crlf to add a linebreak in the entries: \define[3]\MVC {\starttabulate[|l|lp|] \NC Model: \NC #1 \NC\NR \NC View: \NC #2 \NC\NR \NC Controller: \NC #3 \NC\NR \stoptabulate} \starttext \MVC{usedmodel}{firstViewFromSeveral\crlf secondViewFromSeveral\crlf thirthViewFromSeveral\crlf fourthViewFromSeveral}{usedController} \completecontent \MVC{usedmodel}{firstViewFromSeveral\crlf secondViewFromSeveral\crlf thirthViewFromSeveral\crlf fourthViewFromSeveral}{usedController} \stoptext Wolfgang [-- Attachment #1.2: Type: text/html, Size: 2906 bytes --] [-- Attachment #2: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Fwd: Newlines in a table cel 2011-07-04 13:32 ` Wolfgang Schuster @ 2011-07-04 13:53 ` Cecil Westerhof 2011-07-04 14:04 ` Wolfgang Schuster 0 siblings, 1 reply; 9+ messages in thread From: Cecil Westerhof @ 2011-07-04 13:53 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 460 bytes --] 2011/7/4 Wolfgang Schuster <schuster.wolfgang@googlemail.com> > This is *not* a minimal working example, neither it’s minimal nor it’s > working. > What do you mean by this? I had a problem, thus sure it is not working. You can fix this by replacing the \\ with \crlf to add a linebreak in the > entries: > Works like a charm: thanks. Is it not strange that the behavior is different before and after a \content? -- Cecil Westerhof [-- Attachment #1.2: Type: text/html, Size: 959 bytes --] [-- Attachment #2: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Fwd: Newlines in a table cel 2011-07-04 13:53 ` Cecil Westerhof @ 2011-07-04 14:04 ` Wolfgang Schuster 0 siblings, 0 replies; 9+ messages in thread From: Wolfgang Schuster @ 2011-07-04 14:04 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 1062 bytes --] Am 04.07.2011 um 15:53 schrieb Cecil Westerhof: > 2011/7/4 Wolfgang Schuster <schuster.wolfgang@googlemail.com> > This is *not* a minimal working example, neither it’s minimal nor it’s working. > > What do you mean by this? I had a problem, thus sure it is not working. 1. You example is not minimal because you have a lot of unnecessary commands in it. 2. Your example does not work because you use commands which aren’t defined in the file. > You can fix this by replacing the \\ with \crlf to add a linebreak in the entries: > > Works like a charm: thanks. > > Is it not strange that the behavior is different before and after a \content? No because i had been wrong and \\ isn’t a valid command to end the line in tabulate, it’s used to write tabulate in a different form, e.g. look at \startlegend in the manual or at the following example: \starttext \definetabulate[test][|l|p|] \setuptabulate [test][inner=\setquicktabulate\test] \starttest \test 1 \\ 2 \\ \test 3 \\ 4 \\ \stoptest \stoptext Wolfgang [-- Attachment #1.2: Type: text/html, Size: 2092 bytes --] [-- Attachment #2: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-07-04 14:04 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-07-04 9:59 Newlines in a table cel Cecil Westerhof 2011-07-04 10:03 ` Hans Hagen [not found] ` <CAG-LmmDLbuj4jKhF7pvqw1cc5v-FwkxzYwAeoAj4YyRx-z181w@mail.gmail.com> 2011-07-04 10:50 ` Fwd: " Cecil Westerhof 2011-07-04 12:16 ` Wolfgang Schuster 2011-07-04 12:47 ` Cecil Westerhof 2011-07-04 12:58 ` Cecil Westerhof 2011-07-04 13:32 ` Wolfgang Schuster 2011-07-04 13:53 ` Cecil Westerhof 2011-07-04 14:04 ` Wolfgang Schuster
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).