Tag Info

Hot answers tagged

52

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 ...


46

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 ...


30

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 ...


27

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


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} ...


21

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: ...


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 ...


18

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, ...


18

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 ...


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

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 ...


14

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 ...


13

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 ...


13

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}


12

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.


12

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.


12

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 ...


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

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

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

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 ...


8

One basic idea could be use a minipage and divide it in two columns: on the right put the image and on the left the text. This method is not perfect, but gives you at least something similar to a wrapped figure. Here is my code with a test image: \documentclass[11pt,t,handout]{beamer} \usepackage{graphicx} \usetheme{EastLansing} \author{Max Mustermann} ...


8

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 ...


8

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 ...


8

Without any special package, you can use 1 figure float with 3 minipages. If you want simulate that are two different figures, simply add two captions inside the minipages of the images (see MWE). If you want the images numbered as subfigures, take a look to the subfig and subcaption packages. \documentclass[a4paper]{article} \usepackage{graphicx} ...


8

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. ...


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 ...


7

You can use minipages: \documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[margin=2cm,top=3cm]{geometry} \usepackage[nottoc,notlof,notlot]{tocbibind} \usepackage[titles,subfigure]{tocloft} \usepackage{showframe,amssymb,amsmath,fancyhdr,graphicx,booktabs,array,paralist,verbatim,subfig,sectsty,mathtools,hyperref,tikz} ...



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