annotated text: main text in narrower text, annotations on the right
Hello list, I need a feature like the one described in http://www.pragma-ade.nl/gen eral/magazines/mag-1102-mkiv.pdf for annotated verbatim, but for normal text. Think about the main text flowing in a narrower text, with the annotations (like unnumbered sidenotes) in a widened right margin. Or think about a right margin moved left locally, as long as you need annotated text. Thanks, Massi
MF mailto:massifr@fastwebnet.it 29. September 2016 um 16:23 Hello list, I need a feature like the one described in http://www.pragma-ade.nl/gen eral/magazines/mag-1102-mkiv.pdf for annotated verbatim, but for normal text. Which feature from verbatim annotations do you need because style and color changes can be applied in normal text without problems.
Wolfgang
Which feature from verbatim annotations do you need because style and color changes can be applied in normal text without problems.
Wolfgang
Thanks for the answer, Wolfgang. That's not style and color, it's a sort of two-column layout with the main text in the left column and annotations (comments) in the right one. Example (it does not work): \starttext This is the main text\sidenote{annotation} flowing in the left column... \stoptext resulting in |This is the main text flowing | annotation | |in the left column... | | You can do it with setuplayout and a wider right margin, using \inright for annotations, but it's for the whole document or a whole page. Is that possibile only for a section of text inside a page? Best regards, Massi
mf mailto:massifr@fastwebnet.it 30. September 2016 um 00:09
Thanks for the answer, Wolfgang.
That's not style and color, it's a sort of two-column layout with the main text in the left column and annotations (comments) in the right one. This is not a real multcolumn text because in verbatim text each space in the input appear also in the output and in the examples spaces where used to align the code comments on the same position. Example (it does not work):
\starttext
This is the main text\sidenote{annotation} flowing in the left column...
\stoptext
resulting in
|This is the main text flowing | annotation | |in the left column... | |
You can do it with setuplayout and a wider right margin, using \inright for annotations, but it's for the whole document or a whole page. Is that possibile only for a section of text inside a page? You can use the narrower environment to change the margins for a certain text area and use the paragraphs environment to create two columns with different widths in this area.
%% begin example \definenarrower [SidenotesMargin] [before=\blank, after=\blank, right=\rightmarginwidth, default=-right] \defineparagraphs[Sidenotes] \setupparagraphs [Sidenotes] [n=2,before={\startnarrow[SidenotesMargin]},after=\stopnarrow] \setupparagraphs [Sidenotes:1][width=.6\localhsize,distance=.1\localhsize] \setupparagraphs [Sidenotes:2][width=.3\localhsize] \starttext \input knuth \startparagraphs[Sidenotes] \startparagraphscell \input knuth \stopparagraphscell \startparagraphscell \input ward \stopparagraphscell \stopparagraphs \input knuth \stoptext %% end example Wolfgang
Thank you, Wolfgang and Jean-Pierre! I've modified your example and now it resembles what I was looking for. Now I can use \inright to get annotations on the right of the main text, but inside the width of the normal text. The annotations are aligned to the line they occur in the main text. It's somewhat tricky, because I need to leave the second paragraph empty. Is there a way to obtain that effect without setupparagraphs? Anyway it works as I wanted, so now I have a solution. Thank you very much! Best regards, Massi %% begin example \setuplayout[rightmargin=7cm] \definenarrower [SidenotesMargin] [before=\blank, after=\blank, right=-1cm, %right=\rightmarginwidth, default=-right] \defineparagraphs[Sidenotes] \setupparagraphs [Sidenotes] [n=2,before={\startnarrow[SidenotesMargin]},after=\stopnar row] \setupparagraphs [Sidenotes:1][width=.55\localhsize,distance=.1\localhsize] \setupparagraphs [Sidenotes:2][width=.35\localhsize] \starttext \input knuth \startparagraphs[Sidenotes] \startparagraphscell A paragraph spanning some lines of text with sidenotes that should stay aligned\inright{aligned} with the text they annotate; \input ward Some more words\inright{more words, spanning more than one line on the margin} to control whether the sidenotes are aligned with the text they annotate. \stopparagraphscell \startparagraphscell\stopparagraphscell \stopparagraphs \input knuth \stoptext %% end example
mf 30. September 2016 um 00:09
Thanks for the answer, Wolfgang.
That's not style and color, it's a sort of two-column layout with the main text in the left column and annotations (comments) in the right one.
This is not a real multcolumn text because in verbatim text each space
in the input appear also in the output and in the examples spaces
where used to align the code comments on the same position.
Example (it does not work):
\starttext
This is the main text\sidenote{annotation} flowing in the left column...
\stoptext
resulting in
|This is the main text flowing | annotation | |in the left column... | |
You can do it with setuplayout and a wider right margin, using \inright for annotations, but it's for the whole document or a whole page. Is that possibile only for a section of text inside a page?
You can use the narrower environment to change the margins for a certain
text area and use the paragraphs environment to create two columns
with different widths in this area.
%% begin example
\definenarrower
[SidenotesMargin]
[before=\blank,
after=\blank,
right=\rightmarginwidth,
default=-right]
\defineparagraphs[Sidenotes]
\setupparagraphs [Sidenotes] [n=2,before={\startnarrow[SidenotesMargin]},after=\stopnarrow]
\setupparagraphs [Sidenotes:1][width=.6\localhsize,distance=.1\localhsize]
\setupparagraphs [Sidenotes:2][width=.3\localhsize]
\starttext
\input knuth
\startparagraphs[Sidenotes]
\startparagraphscell
\input knuth
\stopparagraphscell
\startparagraphscell
\input ward
\stopparagraphscell
\stopparagraphs
\input knuth
\stoptext
%% end example
Wolfgang
Dear List, I am currently writing documents with some framed texts, sometimes with a few footnotes inside these framed texts. The frames are coloured ones using MPGraphic (but there is no use of MPGraphic in the sample below). The issue is that only footnotes outside of the framed text are printed in the footer, using Windows 10 or Linux Ubuntu, with CTX current version 2016-07-01 or later. What is the way to print the footnote outside of the frame (alternatively, inside of the frame) ? Thank you very much for your help. JP See below the minimal sample : \defineframedtext [MyFrame] [before={\blank[3*big]}, after={\blank[3*big]}, frame=on, background=MyFrame, %width=\textwidth, width=max, height=fit, style={\setupbodyfont[9pt]}] \starttext Here we place some text with a footnote\footnote{This is a first footnote.} before the framed text in order to see how the footnotes are printed by \ConTeXt. \input knuth \startMyFrame[Title=Attention !] This is a frame with no special paragraphs, but a footnote\footnote{This is a second footnote} inside the framed text that \ConTeXt should print in the page footer. \input ward \stopMyFrame Here we place some text with another footnote\footnote{This is the third footnote. Note that the second footnote in the frame is not printed.} after the framed text in order to test how the footnotes are printed by \ConTeXt ... \input knuth \stoptext
You should set the footnote text before the frame, with \footnotetext[id]{text}. In case you need to set more footnotes, set them in the order they will be called in your frame (or float, like tables or formulas). In case you define your own footnotes, use \setnotetext[yourfootnote][id]{text}. \footnotetext[id]{text} is the same as \setnotetext[footnote][id]{text}. %% begin modified example \defineframedtext [MyFrame] [before={\blank[3*big]}, after={\blank[3*big]}, frame=on, background=MyFrame, %width=\textwidth, width=max, height=fit, style={\setupbodyfont[9pt]}] \starttext Here we place some text with a footnote\footnote{This is a first footnote.} before the framed text in order to see how the footnotes are printed by \ConTeXt. \input knuth % we set the footnote text in advance \setnotetext[footnote][fn2]{This is a second footnote} \startMyFrame[Title=Attention !] This is a frame with no special paragraphs, but a footnote\note[fn2] % we put only the footnote marker inside the framed text that \ConTeXt should print in the page footer. \input ward \stopMyFrame Here we place some text with another footnote\footnote{This is the third footnote. Note that the second footnote in the frame is not printed.} after the framed text in order to test how the footnotes are printed by \ConTeXt ... \input knuth \stoptext %% end modified example Best regards, Massi
Dear List,
I am currently writing documents with some framed texts, sometimes with a few footnotes inside these framed texts. The frames are coloured ones using MPGraphic (but there is no use of MPGraphic in the sample below). The issue is that only footnotes outside of the framed text are printed in the footer, using Windows 10 or Linux Ubuntu, with CTX current version 2016-07-01 or later. What is the way to print the footnote outside of the frame (alternatively, inside of the frame) ?
Thank you very much for your help. JP
See below the minimal sample :
\defineframedtext [MyFrame] [before={\blank[3*big]}, after={\blank[3*big]}, frame=on, background=MyFrame, %width=\textwidth, width=max, height=fit, style={\setupbodyfont[9pt]}]
\starttext Here we place some text with a footnote\footnote{This is a first footnote.} before the framed text in order to see how the footnotes are printed by \ConTeXt. \input knuth \startMyFrame[Title=Attention !] This is a frame with no special paragraphs, but a footnote\footnote{This is a second footnote} inside the framed text that \ConTeXt should print in the page footer. \input ward \stopMyFrame Here we place some text with another footnote\footnote{This is the third footnote. Note that the second footnote in the frame is not printed.} after the framed text in order to test how the footnotes are printed by \ConTeXt ... \input knuth \stoptext _____________________________________________________________________ ______________ 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/nt g-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net _____________________________________________________________________ ______________
Thank you Massi for your help !
----- Mail original -----
De: "mf"
Dear List,
I am currently writing documents with some framed texts, sometimes with a few footnotes inside these framed texts. The frames are coloured ones using MPGraphic (but there is no use of MPGraphic in the sample below). The issue is that only footnotes outside of the framed text are printed in the footer, using Windows 10 or Linux Ubuntu, with CTX current version 2016-07-01 or later. What is the way to print the footnote outside of the frame (alternatively, inside of the frame) ?
Thank you very much for your help. JP
See below the minimal sample :
\defineframedtext [MyFrame] [before={\blank[3*big]}, after={\blank[3*big]}, frame=on, background=MyFrame, %width=\textwidth, width=max, height=fit, style={\setupbodyfont[9pt]}]
\starttext Here we place some text with a footnote\footnote{This is a first footnote.} before the framed text in order to see how the footnotes are printed by \ConTeXt. \input knuth \startMyFrame[Title=Attention !] This is a frame with no special paragraphs, but a footnote\footnote{This is a second footnote} inside the framed text that \ConTeXt should print in the page footer. \input ward \stopMyFrame Here we place some text with another footnote\footnote{This is the third footnote. Note that the second footnote in the frame is not printed.} after the framed text in order to test how the footnotes are printed by \ConTeXt ... \input knuth \stoptext _____________________________________________________________________ ______________ 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/nt g-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net _____________________________________________________________________ ______________
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 ___________________________________________________________________________________
On 10/04/2016 05:36 PM, Jean-Pierre Delange wrote:
Thank you Massi for your help !
Sorry for not having answered before, Jean-Pierre. Last year, Hans replied to a question on the very same issue (https://mailman.ntg.nl/pipermail/ntg-context/2015/083570.html), with the following code: \framed{three\postponenotes\footnote{3}}\flushnotes I hope it helps, Pablo -- http://www.ousia.tk
Hi Pablo,
I'll try very soon your trick as I'll try Massi's.
Thank you very much.
----- Mail original -----
De: "Pablo Rodriguez"
Thank you Massi for your help !
Sorry for not having answered before, Jean-Pierre. Last year, Hans replied to a question on the very same issue (https://mailman.ntg.nl/pipermail/ntg-context/2015/083570.html), with the following code: \framed{three\postponenotes\footnote{3}}\flushnotes I hope it helps, Pablo -- http://www.ousia.tk ___________________________________________________________________________________ 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 ___________________________________________________________________________________
Hi Massi,
Why don't you try this kind of parallel paragraphs ?
% \setuppapersize[A5]
\defineparagraphs[TwoThird][n=2]
% The second paragraph width is automatically calculated, if not specified.
\setupparagraphs[TwoThird][1][width=.66\textwidth]
\starttext
\startTwoThird
quotation{...{\it pourquoi y a-t-il quelque chose plutôt que rien ?}
Parce que rien n’est plus simple et facile que quelque chose.
Plus loin, sachant que les choses existent,
on doit être en mesure d’expliquer
{\it pourquoi elles existent ainsi,}
et pas autrement.}
\nextTwoThird
G. W. Leibniz, {\it\fr Principes de la nature et de la grâce fondés en raison,} 1714.
\stopTwoThird
\stoptext
Another solution is :
\defineparagraphs[TwoColumns][n=2,align=verytolerant]
\startsetups[TwoColumns]
\setupinterlinespace[line=5ex]
\stopsetups
\setupparagraphs[TwoColumns:2][inner=\directsetup{TwoColumns}]
\starttext
\input tufte
% here start the twocolumns
\startTwoColumns
\startlines
{\bf ontact information}
Adeimantos
3 Achaion Street
Attica
Gr - 11852 Athens
adeimantos@uc.cy
{\bf Edition}
Essays § Novels
{\bf Development}
Prototype
{\bf Year}
2016
{\bf Private funding}
\$0
\stoplines
% Starting second column
\TwoColumns
\input ward
\blank
\input ward
\stopTwoColumns
\stoptext
----- Mail original -----
De: "mf"
Which feature from verbatim annotations do you need because style and color changes can be applied in normal text without problems.
Wolfgang
Thanks for the answer, Wolfgang. That's not style and color, it's a sort of two-column layout with the main text in the left column and annotations (comments) in the right one. Example (it does not work): \starttext This is the main text\sidenote{annotation} flowing in the left column... \stoptext resulting in |This is the main text flowing | annotation | |in the left column... | | You can do it with setuplayout and a wider right margin, using \inright for annotations, but it's for the whole document or a whole page. Is that possibile only for a section of text inside a page? Best regards, Massi ___________________________________________________________________________________ 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 ___________________________________________________________________________________
participants (5)
-
Jean-Pierre Delange
-
mf
-
MF
-
Pablo Rodriguez
-
Wolfgang Schuster