I would like to typeset text (a link) at the end of the current line, like this  1 Text.                                                  [Link]  2 More text, that is unfortunately too long to fit the link.                                                            [Link]  3 Text that goes over two lines just places the link at the end   of the last line, if it fits.                          [Link]  4 If it doesn't fit into the second line, because the text is   just too long, put it flushright on the next line, as in 2.                                                          [Link]   I don't want to break the [Link] into two lines.    Update. Thank you for all your answers. The code from the  on the "duplicate" question works best:
121462
I want to define a quote environment such that after the quote on the right occurs the author with page number. My solution is yet the redefinition of the quote environment  \usepackage{amsthm} % pushQED, popQED \newenvironment{aquote}[1]{%   \pushQED{#1}%   \begin{quote} }{%   \par\nointerlineskip\noindent\hfill(\popQED)%   \end{quote}% }   with the following result:    The drawback is the parskip in front of the author, which wastes some space in the first quote, but is right in the second one. If I change my command to:  \newenvironment{aquote}[1]{%   \pushQED{#1}%   \begin{quote} }{%   \noindent\hfill(\popQED)%   \end{quote}% }   I get the following result:    Now the placement of the author's name in the first quote is perfect, but in the second quote I want a parskip in front, like in my first example.   How can I find out, whether the line has enough space to put the author without a parskip behind or if there is not enough space to introduce a parskip to put the author on the next line?
90521
Like balpha once , a &lt;br&gt; line break (newline) should be used in very few cases, and surely is not the same as a new &lt;p&gt; paragraph. Still  only explains line breaks, not paragraphs:      Some sites  an additional &quot;New paragraphs only occur when there is a blank line. A single carriage does not create a new paragraph.&quot;, but I feel that's not very clear*, and the emphasis is still on line breaks while it should be on paragraphs:      So: As a minimum, please add (rephrase) a note about the blank line, and maybe use &quot;Only when really needed [...] force&quot;:  Paragraphs and line breaks Simply use a blank line between two paragraphs to start a new &lt;p&gt; paragraph. Only when really needed, end a line with two spaces to force a &lt;br/&gt; line break: How do I love thee?__     Let me count the ways   I'd even prefer an explicit example, simply as I think &lt;p&gt; should be favoured over &lt;br&gt; in most situations:  Paragraphs and line breaks Simply use a blank line to start a new &lt;p&gt; paragraph: First sentence in the first paragraph. Another sentence. And a third. Maybe making this multiple consecutive lines of text, but still one paragraph.  The second paragraph.  Only when really needed, end a line with two spaces to force a &lt;br/&gt; line break: How do I love thee?__     Let me count the ways   Alternatively, slightly change the existing &quot;Linebreaks&quot;† part, and above that add a standalone section, :  Paragraphs A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines: A blank line is any line that looks like a blank line. A line containing nothing but spaces or tabs is considered blank.  Normal paragraphs should not be indented with spaces or tabs.  Line breaks Only when really needed, end a line with two spaces to force a &lt;br/&gt; line break: How do I love thee?__     Let me count the ways   And: maybe even add a section &quot;Paragraphs&quot; to the inline post help on top of the editor? I'm not sure which help tab should then be shown  though.  * Also note how not all sites highlight the two spaces with a different background color. † Yes, I think &quot;line break&quot; likes a space too...
33299
I'm trying to put a nice square bracket over a complex text, it should look like an \overline but with ending like  \ulcorner and \urcorner. The presence of \overrightarrow and \overleftarrow makes me believe that is possible to decorate the end of the \overline bar.  I know the existence of \overbrace, but I need a square bracket; moreover, \overbrace takes too much vertical space
41041
I often format path names with \texttt which can be very long. Usually Tex will not break this text. The line will just create a hbox overflow. It looks like this:  ................ ...C:\documents and settings ................ ................ ................ ................ ................ ................ ................   How do I get Tex to create a line break?
120149
I was taught that I should use " at the start of a quote and if it carries on in subsequent paragraphs, I should put ' at the end of the first paragraph, then start the second paragraph with ' and close again with ' and so on, until the final paragraph which I close with ' ".  I cannot see any reference to this style.
80296
From question . You have to use \r when replacing text for a newline, like this  :%s/%/\r/g   But when replacing end of lines and newlines for a character, you can do it like:  :%s/\n/%/g    What section of the manual documents these behaviors, and what's the reasoning behind them?
31096
I have a long line in equation. I want to split it properly in two or three lines. I've been using \begin{split} and \end{split}, but still it is not in good position. The equation's code is below.  \begin{equation} \begin{split} \frac{r(r-1)c_{0}}{z} + \\ &amp;  \sum_{0}^{\infty}[[(j+r)(j+r+1)c_{j+1} - [(j+r)(j+r-1) - l(l+1)]c_{j}] \\ &amp;= 0, \end{split} \end{equation}
31819
I currently making a songbook and thus I want to display chords above lyrics. I have found several packages but I want to improve my TeXing skills so I wrote everything from scratch.  Until now, everything works fine apart from one thing: some chords are too long and overlaps with the next one.  I have some way to do it, by explaining each time what text correspond to each chord (see the second part of the minimal example) but it would mean rewriting all song I already have. So I wanted to know if there was a way to automatically add space when needed, without having to specify which text correspond to which chord!  Here is a minimal example (the whole code is much longer but I don't think it's needed here):  \documentclass{article}  \def\ch#1{%   \leavevmode\hbox to 0pt{\vbox{\hbox{\strut\tt#1}\kern.25cm}\hss}% }  \begin{document}   \parskip.15cm    \ch{A}Lorem ipsum \ch{B}dolor sit amet, \ch{C}consectetuer \ch{D}adipiscing elit.    \ch{A}Ut purus elit, vesti\ch{B}bulum \ch{C}ut, placerat ac, adipiscing vitae, \ch{D}felis.    \ch{A}Curabi\ch{B7sus4}tur \ch{C}dictum \ch{D7sus4}gravi\ch{E}da mauris.    \bigskip   \textit{I would want to have something that look like this:}\par   \def\foo#1#2{%     \leavevmode\vbox{\hbox{\strut\tt#1 }\hbox{#2}}%   }   \foo{A}{Curabi}\foo{B7sus4}{tur} \foo{C}{dictum}  \foo{D7sus4}{gravi}\foo{E}{da mauris}.  \end{document}   which gives   Note: I know that this might not be possible on justified multi-line paragraph, but we only have flushed/centered paragraph here (or even single lines), so the space between words should be fixed (I guess?).
32335
This question led to a new package:      I wish to typeset some relatively long URLs in a piece of text, and when I use \url{..}, the resulting text does not respect the margin boundaries that govern the main text body, instead going all the way to the edge of the paper before wrapping around.   For reference, my preamble looks like this:  \documentclass[12pt]{article} \usepackage{mathptmx} \usepackage{fullpage} \usepackage[pdftex]{hyperref}   and example of the url I'm including is:  \begin{itemize} \item Some text  \url{very-long-url} ... \end{itemize}   I'm compiling using pdflatex, although I doubt this makes a difference.
32819
I want to typeset a piece of code containing line breaks.  New lines should indent to a specified point in the previous line.  Here is a monospaced example to illustrate what I mean.  Notice how 'case' and 'of' line up below, as well as 'let' and 'in':  swap : forall a, b. Tuple a b -&gt; Tuple b a swap a b x = case x              of tuple a b y z. let x' = tuple b a z y                                in x'   The code I want to typeset is not monospaced, so I can't just use a verbatim environment to get what I want.  The actual LaTeX of the first line, for instance, is  \mathsf{swap} : \forall\alpha,\beta.\;\mathsf{Tuple}\;\alpha\;\beta\to\mathsf{Tuple}\;\beta\;\alpha   How can I align some text to a specific point in the previous line?
4082
If I want to draw an overline over some text, not an equation, how can I do it? \overline seems to only work in math mode, and when used outside of math mode, it automatically says "Missing $ inserted".
1449
I've seen on  several possibilities to include a line next to a paragraph. Like this: (the line is continuous)  text text text | text text text | text text text |   However, I would like to print that line on the margin, so that the original paragraph doesn't get any modification. In other examples the paragraph get an extra spacing with the next and previous paragraphs and the text is move a little to one side.  One of the other options I've seen is with the package pdfcomments, but I just want a real line, not a comment that will cause problems when printing. Is that possible? Maybe with Tikz?
86659
With this URL:  .  It is broken unless I add a \ to the end in front of a period:   And it works. However in the comments, I can't get this to work: (See the comments)
55530
How do I get the last column text to be at the bottom of the row?  That is I want the XXX to be aligned with the line containing the arrow. I tried playing around with \multirow{3}{-3ex}{XXX}, but obviously I don't understand \multirow. Code: \documentclass{article} \usepackage{tabularx} \usepackage{booktabs} \usepackage{multirow}  \begin{document}     \begin{tabularx}{\linewidth}[t]{l X p{1.3cm}}         &amp; Header &amp; Title \\\cmidrule(lr){2-2}\cmidrule(lr){3-3}         a. &amp; Some text text text text text text text text text text text text text text              text text text text text text text text text text              Want XXX on this line $\rightarrow$%          &amp; XXX\\     \end{tabularx} \end{document}
16574
This is probably a really basic question:  When I write code, I want to achieve a logical and readable structure of the lines, where I can see which brace closes which brace.  \begin{equation}  \begin{multlined}   Here is some random equation that goes on for a long time  \end{multlined} \end{equation}   If the equation (here I am referring to the source code, not the compiled document) goes on to where it needs to jump to the next line, it is left-aligned, which screws up the indentation. I can manually add some spaces, but then if I change the size of the window, it realigns and is wrong again. What is the right way to achieve a logical indentation?  My apologies if this has been asked before; I did not find it on previously asked questions.  Edit: Sorry, forgot to mention, I am using writelatex.com as my editor.
50282
If I want to insert a math formula, usually just a math symbol, in text paragraph, LaTeX put the formula to the next line and put it in the middle of the line?   How can I just insert between text?
61880
I have the following:  This is just normal text...  \begin{enumerate} \item First Item ?\\\\ This is the text of the first item \item Second Item ?\\\\ This is the text of the second item \end{enumerate}   Which renders the following:  This is just normal text...  1. First Item ?     This is the text of the first item  2. Second Item ?      This is the text of the second item   I want to specify that the text of the items has no indentation.  Basically, I want it to be rendered like such:  This is just normal text...  1. First Item ?  This is the text of the first item  2. Second Item ?   This is the text of the second item   How can I specify this form of no indentation?