Hot answers tagged

86

Remarks You may use the \addcontentsline command. The syntax is defined as follows \addcontentsline{TABLE}{LEVEL}{TITLE} TABLE stands for the type of list, where you want to add the item, possible are: toc: Table of contents lof: List of figures lot: List of tables LEVEL will be the level at which the line will appear in the list. Possible are: For toc:...


31

You can shift your axes, ticks and labels to obtain the axis effect. Adjusting the color of the plot and the size of the marks, gets you closer to the general style. Labels may be added via nodes referencing points in the data coordinate system. I have updated my previous answer to include new features of pgfplots and placed much of the code in a single ...


28

Initial remarks Firstly, consider what elements of Tufte's book design you want to emulate (the page geometry, the styling of running heads and headers, side notes, different widths and position of floats). If the answer is "everything, of course" then think seriously about simply using the tufte-latex class, which is established, well-featured and ...


23

The tufte documentclass loads the titlesec package, so we have immediate access to all of its excellent features. Indeed, tufte-common.def contains declarations for each of chapter, section and subsection using the titleformat. We can tweak them to give us what we want- in your case, using colorbox to help us. A complete MWE is at the end, but here's the ...


21

In addition to shifting the axis, you can go one step further and create what Tufte calls "range frames", where the axis lines only cover the range of the data. One way of doing this is described in Creating Tufte-style bar charts and scatterplots using PGFPlots in TUGBoat issue 34 : \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=...


21

In tufte-common.def it is said that in case XeLaTeX is used, its features for letter spacing will be used, but the authors forgot to do it, so the soul fallback mechanism is used, which miserably fails. Fix the definition: \documentclass[nofonts]{tufte-handout} \usepackage{fontspec} \usepackage{ifxetex} \setmainfont{Minion Pro} \usepackage{lipsum} \...


20

You could use the sidenotes-package: \documentclass[twoside]{scrartcl} \usepackage{showframe} \usepackage{graphicx} \usepackage{placeins} \usepackage{sidenotes} \usepackage{kantlipsum} \usepackage[a4paper,left=24.8mm,top=27.4mm,headsep=2\baselineskip,textwidth=107mm,marginparsep=8.2mm,marginparwidth=49.4mm,textheight=49\baselineskip,...


20

If you compile a tufte-handout document with pdfLaTeX and the default settings, then it uses Palatino and Helvetica for the fonts. You can load these in another document class by adding the following to your preamble: % Palatino for main text and math \usepackage[osf,sc]{mathpazo} % Helvetica for sans serif % (scaled to match size of Palatino) \usepackage[...


15

There are three bits of information for each chapter: \thechapter, which is the number. (For instance, 2 of "Chapter 2.") \chaptername, which is the current language equivalent of the word "chapter." And \chaptermark, the actual title of the chapter. It looks like you're looking for \chaptermark. See also Section 9 of the fancyhdr documentation, especially ...


13

I'm not sure if LyX exposes them, but the Tufte-LaTeX document classes provide a few options for adjusting the positions of captions and margin notes. Adjusting margin notes and sidenotes positions First, if you want to adjust the minimum distance between all margin notes (and not just one or two), then you can set the \marginparpush length: % The default ...


12

If I understand your question correctly, you're looking for some code to create running heads that are similar to those in the Tufte-LaTeX document classes. The running heads display the page numbers and chapter/section heading. In the Tufte-LaTeX document classes, the running heads extend beyond the main text block into the margin notes area. The ...


12

Pgfplots allows a very fine axis customization thanks to options like: x/y/z axis line style x/y/ztick style x/yt/zticklabel style Basically, if you shift elements in a proper manner, you can achieve something similar. An humble attempt intended as proof of concept: \documentclass[border=10pt]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \...


12

EDIT Recent versions of pgfplots come with axis line shift, which allows us to simplify the style as follows: \documentclass{standalone} \usepackage{pgfplots} \def\axisdefaultwidth{360pt} \pgfplotsset{ every axis/.append style={thick},tick style={thick,black}, % range3frame/.style={ tick align=outside, scaled ticks=false, enlargelimits=...


12

It's a bug in the tufte suite. The minimal example \documentclass{tufte-book} \title{this is a title} \author{me} \begin{document} \maketitle \end{document} also fails when compiled with latex, because with latex and xelatex there's no possibility of using microtype for letterspacing, so tufte-common.def resorts to using soul features. However, \...


12

As already mentioned in the comment to the question -- in PGFPlots v1.13 the key axis line shift has been introduced which allows to easily produce Tufte like axis (have a look at section 4.9.10 on page 255 in the manual). However, v1.13 does not take into account the axis labels, etc. when shifting the axis. This has been reported on the PGFPlots bug ...


11

Instead of using the newfloat package, you can create the example floating object in a fashion similar to the one used for the tufte classes; this will give you the possibility to automatically inherit the desired formatting. In the following example I defined the example floating object from scratch, using the "tufte way"; the code follows the tufte ...


11

The problem is that the tufte-book class is not yet able to work with LuaTeX > 0.85 which is a bit ridiculous, because it's been quite some time since that release. The tufte-book class checks whether it can use the letterspace package by querying the value of \pdftexversion. If that value is unset, it falls back to soul. Modern LuaTeX does not have the ...


10

The culprit appears to be the \FloatBarrier command (provided by the placeins package). If we remove the \FloatBarrier command from the code that generates the marginfigure, then no space is inserted: \documentclass{tufte-book} % Remove \FloatBarrier from marginfigure definition % to prevent unwanted spaces. \makeatletter% so we can use @ commands \...


10

The default page layout of the tufte-book document class has about a 57 pt outer margin for A4 paper and a 62 pt outer margin for US letter paper. (For reference, 1 inch is 72.27 pt.) To ensure that no marginal material falls within an inch of the edge of the page, we need to do two things: adjust the page layout slightly and make sure that the figures and ...


10

Precisely for these cases, in tufte-handout the command \title has an optional argument which is used to typeset its content to the header: \documentclass{tufte-handout} \title[An inquiry into something interesting]{This is the title of the paper: An inquiry into something interesting to talk about in order to finish} \usepackage{blindtext} \begin{document}...


9

After removing all the invisible characters from your input, there are still some problems. For instance, in order to use commands with @ in their name, you have to surround the code with \makeatletter and \makeatother. I have tried to correct the small problems of your code; here is a version with only the needed packages. I tried to guess the meaning of \...


9

This is a tocdepth issue. According to lines 67-68 of tufte-book.cls % Only show the chapter titles in the table of contents \setcounter{tocdepth}{0} which also affects \listoftheorems You can counter it (pun intended!) by using, for example \setcounter{tocdepth}{1} as in the MWE below %\documentclass{article} \documentclass{tufte-book} \usepackage{...


9

Here's one possibility: \documentclass[dvipsnames,svgnames,x11names]{article} \usepackage{refcount} \usepackage{titletoc} \usepackage{tikzpagenodes} \usetikzlibrary{calc} \newcounter{chapmark} %\setcounter{tocdepth}{1} \colorlet{mycolor}{BrickRed} \titlecontents{section}% [0em] {\vspace{1.5\baselineskip}\LARGE\rmfamily\itshape} {\hspace*{0em}\llap{\...


9

I guess your first chapter is part of the frontmatter, i.e. it is placed between \frontmatter and \mainmatter. In the \frontmatter chapters are unnumbered, as demonstrated by this example: \documentclass{tufte-book} \setcounter{secnumdepth}{4} \begin{document} \frontmatter \chapter{Test} \mainmatter \chapter{Test2} \end{document} Hence, just move your ...


9

Because LaTeX's output routine runs asynchronously with TeX's page builder, margin notes can appear on the wrong side of the page when they're near the top of the page. As LaTeX places margin notes, it looks to see if it's currently on a recto or verso page and places the margin note accordingly. However, TeX may come along after the margin note has been ...


8

If you want to remove only "Fig." (in Russian "Рис."), then \makeatletter \renewcommand{\fnum@figure}{\thefigure} \makeatother in the document preamble will print the caption as 1: Foto If instead you want to get rid also of the number and the colon, a slightly more complicated patch is required: the whole \@caption command must be modified. \...


8

tufte-book modifies the \cite-command heavily, you can turn this behavior off, using the nobib-option: \documentclass[titlepage, a4paper, twoside, justified, nobib]{tufte-book} In order to get natbib working, you have to call and configure it manually: \usepackage{natbib} \setcitestyle{authoryear} You also have to use plainnat instead of plain: \...


8

The definition of \tuftebreak can be improved: \documentclass{tufte-book} \usepackage{kantlipsum,cleveref} \makeatletter \def\tuftebreak{% \if@nobreak\else \par \ifdim\lastskip<\tufteskipamount \removelastskip \penalty -100 \tufteskip \fi \fi } \makeatother \begin{document} \section{Monday} \kant[1] \section{Tuesday} \...


8

The chapter and section headings are unnumbered in the tufte-book document class. Since \ref wants to print the chapter/section number and can't find it, it complains in the log file: Package hyperref Warning: Suppressing empty link on input line 18. If you turn on the chapter and section numbering (by adding \setcounter{secnumdepth}{1} to the preamble of ...


7

First you have to define a layout with enough margin space. paperwidth=170mm, paperheight=240mm, left=142pt, top=40pt, textwidth=280pt, marginparsep=20pt, marginparwidth=100pt, textheight=560pt, footskip=40pt The asymmetric layout is a little bit tricky. If I understand correctly, you want the margin and text width to be the same, but the page is shifted ...


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