Tag Info

57

There is now a package pullquote which allows to create various shapes of inserts. All you have to specify is the text which should "flow" plus some rectangular "object" which is inserted. Everything else is calculated automatically by the environment pullquote. In principle, every shape can be defined by providing an appropriate shape function macro. See ...

52

Many text-comparing tools like diff use line-by-line comparison. This can be explained by their origin as programmers' tools. When lines are short enough, these tools work well with TeX sources - especially when combined with version control systems. Of course, there are tools like latexdiff (highly recommended!), which do not take into account line ...

34

I wrote a package pullquote which allows to create circular as well as rectangular inserts. See Two-column text with circular insert.

33

It can be done with a lot of pain and hard labor. Firstly, you will need to build the page manually, like you would an html page. We build the page, in a long single column (effectively) and we position the text blocks absolutely (using the picture environment). You can also use pict2e or tikZ if you are more familiar with them. There is also a package ...

25

There are no pros of hard-wrapping and no cons of soft-wrapping. It's just habit that makes us hard-wrap, that and not knowing about M-x longline-mode. TeX doesn't care about single newline characters[1], treating them as normal spaces. So as far as the document is concerned, there's no argument for one over the other. But wrapping is useful for us, the ...

24

For two-columns documents, a semi-manual solution is possible using the wrapfig package. It avoids cluttering the code with ad-hoc material as in Werner’s or Yiannis’ solutions. \documentclass{article} \usepackage{multicol}% for multiple columns \usepackage{wrapfig} \usepackage{calc}% for computations \begin{document} \pagestyle{empty} ...

24

Here is a similar play-by-play of what was described by @KarlOveHufthammer in his excellent answer regarding the coat-of-arms construction using Xfig. I'm running Windows 7 with Cygwin/X, and is therefore also able to use Xfig (version 3.2.5b). I also have transfig (version 3.2.5c-1, also called fig2dev) installed as part of the Cygwin/X distribution setup: ...

22

Use package cutwin and run the example with xelatex because I use an eps image as vector graphic which has no background. Using a png image with clipping may also be possible. \documentclass{article} \usepackage{cutwin,graphicx,pstricks,lipsum} \begin{document} \opencutcenter \newcommand\Margins{% 0.4\textwidth, 0.4\textwidth, 0.35\textwidth, ...

21

Another answer is that TeX has a fixed maximum size of input lines, that is, if a non-wrapped line exceeds a certain length, there will be an error message. This limit is quite large nowadays. You'll find it in your texmf.cnf: buf_size = 200000 But it used to be smaller in the past, and anyway, who wants to think about something like this while writing ...

20

It depends a little on the kind of landscape page you want to create. The easiest way to do it is to put your landscape material into a caption-less [p] float (except it is a figure or table which should have a caption). Without the caption the float number isn't increased so it doesn't affect other, "real" floats. You can create the landscape mode then by ...

20

Just to add another answer here in case anyone else has this question - you can wrap text around figures quite nicely with the wrapfig package. Here's a short example showing left and right aligned images with captions, with the text wrapped around. This example is also viewable on writeLaTeX if you want to see the pdf output next to the code. ...

19

I don't think there are automated approached for this kind of thing in LaTeX. The procedure I've implemented is based on trial-and-error and uses \parshape. Here are the steps I followed: 0. Preliminaries \parshape <n> <i1> <w1> <i2> <w2> ... <in> <wn> The first "argument" to \parshape represents the number of ...

17

I study computer science, therefore my answer is strongly biased. Anyway, it is considered good practice keeping 80 cols as maximum width. The reason is quite funny as well, it is related to the dimension of the punched cards used in the old days. Hard wrapping makes the code nice and tidy, as there are some editors that do not wrap lines when you open a ...

16

One option would be to use a \parbox: \documentclass{article} \usepackage{booktabs} \usepackage{multirow} \usepackage{rotating} \begin{document} \begin{table*}[t] \centering \begin{tabular}{c c c c c c c} \toprule \midrule & & \multicolumn{5}{c}{Predicted valence }\\ \cmidrule{3-7} ...

15

The answers so far (maybe with the exception of Andrew's – dialectical as always) have argued for the pros of hard line breaks. So let me add a somewhat different viewpoint: (1) As a community, we do care a lot about semantical markup: We leave the actual formatting of our document's text to a post-processor (e.g., pdflatex), which does a fairly good job in ...

14

XeTeX has \XeTeXlinebreaklocale, followed by language code, to set language specific line breaking behaviour, e.g. \XeTeXlinebreaklocale "zh" or\XeTeXlinebreaklocale "th" to set line breaking for Chinese or Thai, respectively. Some languages have dedicated packages for XeLaTeX that handles this and more language specific stuff, like xeCJK.

14

Package pdfrender is able to "highlight" text (except for PK fonts) that can be broken across lines and even pages: \documentclass[a5paper]{article} \usepackage{xcolor} \usepackage{pdfrender} \usepackage{lipsum} \begin{document} \textpdfrender{ TextRenderingMode=FillStroke, FillColor=red, LineWidth=.07ex, }{\lipsum[2]} \end{document}

14

If you want to change the behaviour of \underbrace globally you could say \documentclass{article} \usepackage{amsmath} \makeatletter \let\ams@underbrace=\underbrace \def\underbrace#1_#2{% \setbox0=\hbox{$\displaystyle#1$}% \ams@underbrace{#1}_{\parbox[t]{\the\wd0}{#2}}% } \makeatother \begin{document} $\underbrace{f(x) = a^2 + 2ab + b^2}_{This is some ... 13 For single column documents you can try the cutwin package to put something (e.g., a quote or a diagram) into a cutout in a paragraph. 13 Here is a much more manual approach, but perhaps similar in style to @YiannisLazarides' answer, for inserting a pull quote. It uses the \parshape primitive to adjust the indentation (or line width) on a per-line basis: \documentclass{article} \usepackage[margin=1in]{geometry}% http://ctan.org/pkg/geometry \usepackage{graphicx}% ... 11 These are called wrapped illustrations and you can use Donald Arseneau's wrapfig package to create them. wrapfig provides the environments wrapfigure and wrap-table for typesetting a float at the edge of the text, and making the text wrap around it. The wrapfigure and wrap-table environments interact properly with the \caption command to produce proper ... 11 Another option to using a parboxas @GonzaloMedina suggested is to abandon the rotated \multirow and use trimmed cmidrules for a more "traditional" table head. \documentclass[a4paper]{article} \usepackage{rotating,booktabs,multirow} \begin{document} \begin{table*}[t] \centering \begin{tabular}{c c c c c c} \toprule ... 11 I want my editor to display code in an indented manner as I like it. For example: \starttext \startsection Some text in a section that might continue for multiple lines \startitemize \item The first item which if spread over multiple lines should indent nicely \stopitemize Next paragraph with proper indentation \stopsection ... 11 It helps when you post questions to make complete documents including loading all the packages you need, I guessed \usepackage{booktabs,xfrac,amsmath} in this case. Also I fixed a few font issues (for multi-letter identifiers and angle brackets) Changing margins within a LaTeX list is a bit delicate, but this is I think the layout you want ... 11 Try this \documentclass[draft]{article} \usepackage{graphicx,caption} \usepackage[latin]{babel} \def\lorem{\raggedright Fusce adipiscing justo. Nullam in enim. Pellentesque felis orci. } \begin{document} \begingroup \parindent0pt \fboxsep1pt\fboxrule0.4pt \hsize=3cm\footnotesize \hfil\fbox{\vbox to 5cm{\vfill \includegraphics[width=\hsize]{./images/amato} ... 10 It's almost always an inferior idea to force the reader to crane his/her neck 90 degrees in order to read some header line. In the present table, I can't see a good reason for inflicting this inconvenience on the readers, especially as the first column's header ("Actual valence") is almost exactly as wide as the longest entry in that column ("Little ... 10 In this code I define a \parunderbrace command, with two arguments, which adjusts automatically to the width of the formula: \documentclass{article} \usepackage{mathtools} \usepackage{ragged2e} \newlength\ubwidth \newcommand\parunderbrace[2]{\settowidth\ubwidth{$#1\$}\underbrace{#1}_{\parbox{\ubwidth}{\scriptsize\RaggedRight#2}}} \begin{document} \[ ...

9

Use \includegraphics from graphicx: \documentclass{article} \usepackage{lipsum} \usepackage{graphicx} \begin{document} Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec ...

9

The standard verbatim environment is very basic. To have automatic line breaking, use the listings package and its breaklines=true option: \documentclass[11pt]{article} \usepackage{listings} \lstset{ basicstyle=\small\ttfamily, columns=flexible, breaklines=true } \begin{document} With the standard \texttt{verbatim} environment: \begin{verbatim} C ...

8

You might be interested in the tabularx environment that allows for "wrapped contents" within an X column: \documentclass{article} \usepackage{multicol}% http://ctan.org/pkg/multicol \usepackage{tabularx}% http://ctan.org/pkg/tabularx \begin{document} \begin{multicols}{3} \section{Another Subsubsection} Lorem ipsum dolor sit amet, consectetur adipisicing ...

Only top voted, non community-wiki answers of a minimum length are eligible