Tag Info

Hot answers tagged

96

Well someone has to go first.... ! I have partially completed my PhD, and, use this on the inside cover of my submissions to add some 'artistic-flair', however, the source for the word-cloud is actually my BibTeX Database, so the cloud is relevant to each document, and, the sample above is effectively the last one that I produced. In terms of ...


65

Here's a nineteenth century-style advertisement for TeX, demonstrating XeTeX's OpenType support and the power of OpenType fonts. A single font, Phaeton, was used to produce this file: all the text, the abbreviations, the banners, the ornaments used in the background and the image of the man on the horse are glyphs in the font. % save this document as ...


49

Well, it is Christmas: % save this document as example.tex % compile this document with: xelatex example.tex on a machine which has the Zapfino Extra LT Pro font (or edit the font declaration) --- you'll also need a background graphic, or comment it out \documentclass{article} % Needed to make sure your page dimensions % are the same as that of the ...


46

A very simple demonstration of using LaTeX fonts with pdfLaTeX. A pamphlet with a powerful message from George Orwell. Code \documentclass{article} \usepackage[landscape,a4paper,hmargin=1.5cm,vmargin=1.5cm]{geometry} \usepackage[osf]{garamondx} \usepackage[T1]{fontenc} \usepackage[cmyk,dvipsnames]{xcolor} \usepackage{tikz} \usepackage{multicol} ...


45

I'm not a type designer or a typographer, but I thought use TikZ to illustrate a type design. Here is my idea: I add a text to right side to complement the figure and show typography with a Sans Serif font, the numbers can be used in a pretty good cover :). The output can be downloaded here. Code \documentclass{article} ...


40

Here's a demonstration of TeX's hyphenation and justification algorithm. Apart from changing a few \sfcodes and using character protrusion with microtype, this is TeX's default output with no manual line breaks or hyphenation points. % save this document as example.tex % compile this document with: xelatex -shell-escape example.tex \documentclass{article} ...


34

The minimal class doesn't define size changing commands, so any example that relies on them won't work. It doesn't set \parindent, nor many other useful parameters, among which \tabcolsep: tabular environments will not show properly. The "really minimal" class for typesetting purposes is article. As David Carlisle and Joseph Wright remark, the minimal ...


31

For February, there are many possibilities at Can we make a love heart with LaTeX? Here’s my heart with one of the few poems I could stand seeing every day for a month: % Compile with lualatex \documentclass[svgnames,12pt]{article} \usepackage{fontspec,microtype,shapepar,xcolor} ...


30

Last summer I taught a cryptography course. Next summer I will again, but I'll use PythonTex! The example below shows off PythonTex, TeX, and a little bit of tikz. Good for March? % save this document as example.tex % compile this document with: pdflatex -shell-escape example.tex \documentclass[11pt]{article} \usepackage{tikz} \usepackage{pythontex} ...


23

Having read through the answers at the thread that Joseph linked to in the comments, I think that a practical answer to this question is: If you're not sure whether to use minimal or not, don't use minimal. A corollary of that for this site (and other places where your code may be viewed by others less Knowledgeable in the Ways of TeX) would be: If ...


21

One possible solution, at least for requests 1, 2 3, and 5, using mdframed: \documentclass{article} \usepackage[a5paper]{geometry} \usepackage{xcolor} \usepackage{caption} \usepackage{booktabs} \usepackage[framemethod=tikz]{mdframed} \usetikzlibrary{calc} \usepackage{lipsum} \newcounter{exa}[section] \renewcommand\theexa{\thesection.\arabic{exa}} ...


20

Use e.g. the \Checkmark and \XSolidBrush symbols from the bbding package. Good alternatives are \ding{51} and \ding{55} from the pifont package. \usepackage{bbding} %... \begin{itemize} \item[\Checkmark] foo \item[\XSolidBrush] bar \end{itemize} You can even define a special macro for it: \newcommand*\tick{\item[\Checkmark]} ...


20

put them all together in one figure environment and the three minipages without an empty line \documentclass[english]{article} \usepackage[demo]{graphicx} \usepackage{babel,blindtext} \begin{document} \blindtext \begin{figure}[!htb] \minipage{0.32\textwidth} \includegraphics[width=\linewidth]{delete_gesture.png} \caption{A really Awesome ...


18

You could use the amsthm package. As per their recommendations, which is what most people use, you should define the environment as \theoremstyle{definition} \newtheorem{exmp}{Example}[section] and than use is as \begin{exmp} This is the example. \end{exmp} Note however, that the above definition will give the examples its own counter. If you already ...


14

Use a package which provides such symbols, such as MnSymbol, bbding or pifont. There are more. Use math mode within the square brackets if required. Example: \documentclass[a4paper,10pt]{article} \usepackage{pifont} \begin{document} \begin{itemize} \item[\ding{51}] yes \item[\ding{55}] no \end{itemize} \end{document} You could define your own name ...


13

Update I included @Marco’s code (setting the title with frametitlefont to be able to add an extra headline to each environment) and implemented an unnumbered version for examples (example*) Have a look at the mdframed package. \documentclass{scrartcl} \usepackage[framemethod=TikZ]{mdframed} \usepackage{xcolor} % EXAMPLES %% set the counter for your ...


13

This is just a partial answer (for a complete answer, go to the last exampe). I used the thmtools package as a front-end for amsthm to define a theorem-like structure. The use of \interlinepenalty 10000 in postheadhook prevents pagebreaks as requested. \documentclass{book} \usepackage{xcolor} \usepackage{amsthm} \usepackage{amssymb} ...


12

I have posted several versions of a couple of book chapters at the following website: http://www.princeton.edu/~gkv/aofd/fonts There you will find the same 100-plus page document typeset with Lucida, Minion-Math, MathTime, Cambria, Tex-Gyre and others. Comments, and other examples, would be welcome.


12

The source code for ConTeXt beginner's manual and the revised reference manual are available at https://foundry.supelec.fr/projects/contextman/. The source of most other manuals can be browsed at http://context.aanhet.net/svn/. There is a svn repo for other manuals as well, but I cannot find its address.


12

TikZ should be pretty useful doing this. It's a package to 'draw' stuff in latex. I tried replicating your picture, there are still some rough edges, but it looks pretty nice I think. \documentclass{article} \usepackage{tikz} \begin{document} \usetikzlibrary{arrows,positioning} \begin{tikzpicture} [% nd/.style = {circle,fill=black,text=white,inner ...


11

This is a home brewed macro called \loremlines. Call as \loremlines{number of lines}. Note differences in multi column texts. % Split a box into two \documentclass{article} \usepackage{lipsum,multicol} \begin{document} \newbox\one \newbox\two \long\def\loremlines#1{% \setbox\one=\vbox {% Test.\footnote{a footnote}% \lipsum\footnote{Another ...


11

Avoid line breaks within abbreviations, and use a thinner space than between normal words. LaTeX provides \thinspace for this, and a shortcut \,. This example shows how it looks without the space normal spaces, where line breaks can occur within abbreviations a non-breakable space, so no line break but the abbreviation looks too wide a thin space, ...


11

This is an example of automated environment using stringstrings and parselines packages to separate plain contents and a complex format, so the first word and the second word are aligned in two parallel diagonals, whereas the remaining text is right-aligned, and the three parts of each line also are formatted distinctly with color gradients across the rows. ...


10

There is a package called manuscript, which is a small gem. Try this to as a demonstration of bad type, wide paragraphs and double lined texts. \documentclass{book} \usepackage{manuscript,lipsum,xcolor} \usepackage[paperwidth=18.75in,paperheight=18.25in, marginratio=1:1]{geometry} \usepackage{graphicx} \begin{document} ...


10

The code must be compiled externally. Loading the code of article.cls and all sorts of packages in the beamer run would lead to chaos. But theoretically if --shell-escape is active it is possible to trigger this external run on-the-fly during the compilation of the beamer run and then to include the resulting pdf with the graphic-option of showexpl. The main ...


10

You can use a TikZ node with inner sep=0pt that holds the table, and then draw a rectangle around it. Update: You can enclose this TikZ/tabular construct in a table environment to add a table caption and label to it. \documentclass{article} \usepackage{tikz} \usepackage[bf]{caption} \begin{document} \begin{table} \caption{A table with rounded corners} ...


9

Does the source really have enough information inside to produce such nice formating? No it hasn't. It contains just the mark up and neither the drop-capital image, nor the corresponding style. The font is missing as well. Can this format be readily applied to a LaTeX document? What do you exactly mean by readily? As it is, without any changes? ...


9

Readability is not simply "being able to read each word", but also being able to understand the relationships between the words, between the paragraphs and so on. Titles are put into evidence because that's their role: stick out as much as necessary for the reader to spot them and know that something has changed. Paragraphs are indented for the same reason ...


9

Here's a step-by-step example of how to create a document with a bibliography using TeXMaker. Create a bib file Using the Bibliography menu, enter your bibliography entries. Save these as (Here I've chosen the name mybibfile.bib). Here is a sample screen shot: The first element of any bib file entry is the citekey. This must be unique for each entry ...


8

The numbering of examples is hardwired in linguex; you can modify it by changing the corresponding command. Here's a commented minimal document. \documentclass{article} \usepackage{linguex} % We want that the label to an example has also the section number \renewcommand{\Exarabic}{\thesection.\arabic} % We want to reset the ExNo counter at each section ...



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