Tag Info

Hot answers tagged

47

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


43

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


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

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


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


17

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

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}


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


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.


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

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

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


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

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


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


7

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


7

For XeTeX, I suggest our xeCJK package. The package not only handle the line breaking, but also sets the fonts and takes care of the punctuations. See also How to write Japanese with LaTeX?. An example: \documentclass{article} \usepackage[BoldFont]{xeCJK} % compatible with some packages which relys on CJK \usepackage{ruby} \setCJKmainfont{MS Mincho} % Set a ...


7

You can use the lettrine package for this, which is usually used for having a large first letter that spans several lines. It needs a bit of adjustment because of the symbol's large depth: \documentclass{report} \usepackage[english]{babel} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{xcolor} \usepackage{fourier} \usepackage{blindtext} ...


6

Use English rather than Latin or use hyphenation for Latin via the babel package and the overflow problem would go away! \documentclass[a4paper]{article} \usepackage[latin]{babel} \usepackage{lipsum} \usepackage{shapepar} \begin{document} \lipsum[1] \shapepar[8.5cm]{\circleshape} \lipsum*[1] \end{document} This will also work, that points certainly that ...


6

One way is to use the wrapgifure environment: \documentclass[twoside]{article} \usepackage{lipsum} \usepackage{wrapfig} \setlength{\wrapoverhang}{\marginparwidth} \addtolength{\wrapoverhang}{\marginparsep} \usepackage[left=1in,right=2.5in,top=1in,bottom=1in]{geometry} \begin{document} \lipsum[1] \begin{wrapfigure}[11]{O}{6.3cm} \vspace{-10pt} %% If needed ...


6

Normal Length Words: One way to do this is to use \nohypens from the hyphenat package. Here is a comparison without (on the left) and with \nohypens (on the right): Notes: If you wish to disable hyphenation for the entire document (not that I am recommending that), you can use \usepackage[none]{hyphenat} Code: \documentclass{article} ...


6

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



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