Sorry Hans. I send it to you instead of to the list. And I forgot the files.
Now corrected.
---------- Forwarded message ----------
From: Cecil Westerhof
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
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
2011/7/4 Wolfgang Schuster
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
2011/7/4 Cecil Westerhof
2011/7/4 Wolfgang Schuster
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
Am 04.07.2011 um 14:58 schrieb Cecil Westerhof:
2011/7/4 Cecil Westerhof
2011/7/4 Wolfgang Schuster 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
2011/7/4 Wolfgang Schuster
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
Am 04.07.2011 um 15:53 schrieb Cecil Westerhof:
2011/7/4 Wolfgang Schuster
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
participants (2)
-
Cecil Westerhof
-
Wolfgang Schuster