# Tag Info

4

The scope environment of Tikz is well suited for such tasks, as it allows to shift and rotate everything it contains. My suggestion is to create one tikzpicture and then create a different scope for each axis you have. This leads to a setup like this: \begin{tikzpicture} \begin{scope} \input{X} \end{scope} \begin{scope}[yshift=6cm] ...

3

You can simply use a tabular: \documentclass{article} \usepackage{pgfplots} \usepackage{graphicx} \begin{document}‎‎ \noindent \begin{tabular}{@{}cccc@{}} & & \input{G_1} \\ & & \input{G_2} \\ \rotatebox{90}{\input{B_1}} & \rotatebox{90}{\input{B_2}} & \input{X} \\ \end{tabular} \end{document} The result:

3

Explanation Your orders are being obeyed; it's just that \nogloss{} doesn't work the way you think it does. The formatting you specify in everygla doesn't apply to material within \nogloss{} (although this isn't explicitly mentioned in the documentation). This is because expex is designed primarily to be used for interlinear glossing where every word is ...

0

I think you are most flexible if you redefine the \@makechapterhead by hand. (I'll add a remark with the reasons right before the complete code.) Two parboxes, the first as wide as the \textwidth and the second as your right margin (5cm), side by side wrapped into a \hbox should do the job \hbox{% \parbox[t]{\the\textwidth}{\Huge\bfseries\raggedright#1} ...

1

Another solution with titlesec, which works also with multiline titles: \documentclass[twoside]{book} \usepackage[right=5cm, showframe]{geometry} \usepackage[x11names]{xcolor} \usepackage[explicit]{titlesec} \titleformat{\chapter}{\Huge\bfseries}{\rlap{\hspace*{\dimexpr\textwidth + \marginparsep}\color{IndianRed3}\chaptername{} \thechapter}}{0pt}{#1} ...

3

I believe that what you are looking for is to set a footer. Here is an example of how to do this using fancyhdr: \documentclass{article} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \renewcommand{\headrulewidth}{0pt} \fancyfoot[C]{This is my personal footer that will appear in every page of the document.} \begin{document} This is my document. ...

5


2

It is quite easy to do with titlesec: \renewcommand{thesection}{\Roman{section}} \titleformat{\section}{\normalfont\large\sffamily\bfseries}%global formatting (label %and title}% {\thesection.}%label formatting {0.5em}% separation between label and title {}%commands to be applied to the title []% optional argument after title \titlespacing{0pt}{.8cm ...

1

The standard kernel's \newtheorem is somehow too basic. I'd suggest you to use either amsthm or ntheorem (by far, the most popular packages to deal with theorem-like structures). Here's one way to achieve the desired formatting using a new theorem style defined using the amsthm package: The code: \documentclass[10pt,a4paper]{article} ...

1

In order to make the framed box fit its content one needs to measure the contents width first. In this case I simply assigned the content to measure to box register 0, i.e. \setbox0=\hbox{...} and retrieve its width from \wd0. So, your box macro will be defined as \newcommand*\WideFittedFramebox[1]{% \setbox0=\hbox{\hspace{2em}#1\hspace{2em}}% ...

5


1

Do you perhaps mean something like "highlight" by "amplify"? Anyway, I think \newcommand{\colorfrac}[3][red]{\frac{{\color{#1} #2}}{{\color{#1} #3}}} would suit your purpose. \colorfrac{1}{2} would give a red '1/2' and \colorfrac[green]{1}{3} a green one (needs the color package). Edit As an answer to your comment: Of course you could, ...

3

Here is a solution \documentclass{article} \usepackage{xcolor} \begin{document} $\raisebox{\baselineskip}{4)}\frac{1}{2}=\frac{\textcolor{red}{1\cdot4}}{\textcolor{red}{2\cdot4}}=\frac{4}{8}$ $\raisebox{\baselineskip}{4)}\frac{1}{2}=\frac{\textcolor{red}{1\cdot4}}{\textcolor{red}{2\cdot4}}=\frac{4}{8}$ \end{document}

1

It's best not to use \noindent to suppress indentation as it causes problems with white space and especially blank lines at the start. You can use \@afterheading which is the mechanism latex uses to suppress indentation after headings. \documentclass[a4paper]{memoir} \setstocksize{11.0in}{8.5in} \settrimmedsize{11.0in}{8.5in}{*} \setlength{\trimtop}{0.0in} ...

2

I had two answers, the first being the same as John Kormylo's, which indents all paragraphs except the first (note the % in \mysidenote{%). The second answer for if you want a note consisting of a single paragraph to be indented is not to modify your \mysidenote macro but in any multiparagraph sidenote to put \noindent before the first paragraph of any ...

2

It's a simple fix, but I never thought of it myself until I saw it being used in a sty file. \documentclass[a4paper]{memoir} \setstocksize{11.0in}{8.5in} \settrimmedsize{11.0in}{8.5in}{*} \setlength{\trimtop}{0.0in} \setlength{\trimedge}{\stockwidth} \addtolength{\trimedge}{-\paperwidth} \settypeblocksize{9.0in}{4.87in}{*} \setlrmargins{*}{1.0in}{*} ...

2

\documentclass{article} \usepackage{multicol} \begin{document} \begin{multicols}{2} \raggedcolumns \begin{itemize}\setlength\itemsep{-0.5em} \item[1] 12-ounces package fully cooked chicken sausage links, sliced \item[4] cloves garlic, thinly sliced \item[1] 19-ounces can cannellini beans, rinsed \item[1] 14.5-ounces can low-sodium chicken broth ...

1

In fact, what is happening there is that TeXstudio is indenting the line (not the whole paragraph). Probably what you are calling paragraph is a single line. So when TXS wraps the line it shows an arrow on the left panel (near the line number) and then if you indent that line the whole block is also indented. If you want to indent only the first line of ...

1

Use the array package and define a new column type C which uses the p type and centers it. It would be possible to write this directly in the tabular column definition, but the \newcolumntype is cleaner, especially if there are more than on columns to change. \documentclass{article} \usepackage{array} ...

2

(1) Always post minimal examples that can be copied and compiled as is. This is a sniplet. MWEs makes it a lot easier to help \usepackage{array} \begin{tabular}{ | >{\centering\arraybackslash} p{5cm} | >{\centering\arraybackslash}p{2cm} | >{\centering\arraybackslash}p{2cm} | >{\centering\arraybackslash}p{2cm} |} array enables ...

2

Only if you can switch to an other class: With class memoir you could use the command \chapterstyle{section} to get the desired result. \documentclass[a4paper]{memoir} \chapterstyle{section} \usepackage{blindtext} \begin{document} \blinddocument \end{document} And the class scrbook knows an option chapterprefixline=false ...

1

Using amsmath package the code: Method 1: \begin{align*} \int \left( \frac{x+3}{2}\right) \, dx =& \int \frac{1}{2}(x+3) \, dx && \text{Factoring out a constant} \\ =& \frac{1}{2} \int (x+3) \, dx && \text{Factoring the constant outside the integral} \\ =& \frac{1}{2}\left[\frac{1}{2}x^2+3x\right]+C && \text{Applying ...

1

You'll need to redefine some internal commands (\@begintheorem and \@opargbegintheorem): \documentclass{sig-alternate} \makeatletter \def\@begintheorem#1#2{% \parskip 0pt % GM July 2000 (for tighter spacing) \trivlist \item[% \hskip 10\p@ \hskip \labelsep {{\bfseries #1\hskip 5\p@\relax#2.}}% ] \it } ...

1

The chapter title is set with \@makechapterhead, being called within \@chapter, which is itself is used by \chapter. The normal definition of \@makechapterhead is (see book.cls) \def\@makechapterhead#1{% \vspace*{50\p@}% {\parindent \z@ \raggedright \normalfont \ifnum \c@secnumdepth >\m@ne \if@mainmatter \huge\bfseries ...

1

Finally, this is what I found out, thanks to Clemens' comment (and, of course, his big help in the first question concerning enotez, that I mentioned on top of the page): \documentclass{book} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} \usepackage{enotez,multicol} \usepackage{kantlipsum,microtype} ...

8

This is not really a documentsclass, but also viable: the papercdcase package. It's beautiful because it's foldable ;) \documentclass[a4paper]{article} \usepackage[margin=0pt]{geometry} \usepackage[pdftex]{graphicx} \usepackage{papercdcase} \setcdbackmatter{% \centering \huge\bfseries\LaTeX3\par \includegraphics[scale=.5]{expl3.png} } ...

11

Here's a simlpe little example using cd-cover: \documentclass{cd-cover} \usepackage{graphicx} \setlength\parindent{0pt} \begin{document} \CDbookletTopMargin=0pt \CDbookletMargin=0pt \begin{bookletsheets} \vspace*{5mm} \hspace{5mm} \begin{center} {\LARGE \LaTeX3}\par\bigskip \includegraphics[width=4cm]{expl3} \end{center} \end{bookletsheets} \end{document} ...

3

I'm not sure if I understood your requirements correctly, but here a starting point for you with titlesec.sty and titletoc.sty. The idea is to hook your blue boxes into a new page style main with a 0pt width/height picture environment to position the blue box on the page with a \put command. \documentclass[a4paper,10pt,oneside]{article} ...

0

I have a solution, the problem is that I'm not particularly proud of it. Matlab appears to have a problem saving .eps files. The only way around this that I have found is to save a figure with a different extension (say, .png) and then convert to .eps using Inkscape or something similar.

1

First things first: the \section instruction (in standard LaTeX) does not initiate an environment. But, you kind of forsaw that you would need to change the interface with respect to the last said. At least my solution needs sections to be grouped inside environments. The conditional logic isn't that complex in the end. Say you have two conditionals ...

3

Somebody has asked Markus Kohm a similar question. So there is now a suggestion for the headings on the KOMA-Script website (German): \documentclass[chapterprefix]{scrreprt} \renewcommand*{\chapterformat}{\thechapter\autodot} \RedeclareSectionCommand[innerskip=0pt]{chapter} \makeatletter ...

1

Okay, seems that I've found a solution: I tried retain-explicit-plus as an option for \num but that doesn't do any good in tables. What I did is fairly similar to this question: Just omit the "+" sign for numbers that are positive (which gives them the "+" sign stated in S[explicit-sign=+]) and write a minus sign for negative numbers. This makes it work ...

6

Pluses are retained is retain-explicit-plus is set \documentclass{article} \usepackage{siunitx} \begin{document} \begin{tabular}{S[retain-explicit-plus]} +1.23 \\ -4.56 \\ 7.89 \\ \end{tabular} \end{doument}

2

0

In this specific example, one can avoid using \left( and right), and that fixes the spacing issue, as the other answers suggest. However, there are cases where one must use \left( and right), for instance when the inner expression is significantly taller than the function name. In these cases, one can enclose the function arguments in curly braces, and then ...

2

You don't want to remove the section counter from the reset list of chapter. \documentclass[oneside]{amsbook} \usepackage[british]{babel} \usepackage{chngcntr} % remove equation from the reset list of section \counterwithout*{equation}{section} % add equation to the reset list of chapter \counterwithin{equation}{chapter} \begin{document} \chapter{Chapter ...

4

A little modular arithmetic: \documentclass[border=2pt]{standalone} \usepackage{calc} \usepackage{tikz} \usepackage{tikz-timing} \usetikztiminglibrary[dual arrows]{clockarrows} \makeatletter \newcommand*{\pmzerodot}{% \nfss@text{% \sbox0{$\vcenter{}$}% math axis \sbox2{0}% \sbox4{0\/}% \ooalign{% 0\cr \hidewidth \kern\dimexpr\wd4-\wd2\relax % ...

5

You need to change the \sectionwidth. The res class provides an own command for that task, \newsectionwidth, which takes care about all the other lengths that depend on the \sectionwidth: \documentclass{res} \newsectionwidth{27.5pt} \begin{document} \name{HAROLD C. GOODBETTER\\[12pt]} \address{\bfseries PRESENT ADDRESS\\193 5th Avenue\\Troy, NY ...

4

Use \strut: The code: \documentclass{report} \usepackage{siunitx} \usepackage{microtype,textcomp,textgreek,mathspec} \usepackage{xpatch} % can exclude etoolbox. xpatch loads it anyway, since egreg (xpatch author) extends etoolbox \makeatletter %http://zoonek.free.fr/LaTeX/LaTeX_samples_chapter/0.html \def\thickhrulefill{\leavevmode \leaders \hrule ...

6

The space between chapterprefix and chapter is set by \chapterheadmidvskip. If there should be no additional space between this two lines you could use either \renewcommand*\chapterheadmidvskip{\par} or the new interface \RedeclareSectionCommand[innerskip=0pt]{chapter} \addchap changes secnumdepth locally, so \ifnumbered{chapter}. So your ...

1

Assuming that you use the standard procedure for creating titles, you can use the following fix (though it's needless in this particular example): \documentclass{article} \usepackage{lipsum} \usepackage{setspace} \usepackage{etoolbox} \makeatletter \AtBeginDocument{\preto\@title{\singlespacing}}% in case it isn't single spaced \makeatother \title{A very ...

3

Gonzolo's answer is probably better (certainly more flexible), but I'm not going to throw this one away. There's nothing special in having fractions here, it's just a pain to get all the braces and semicolons correctly placed for the \node commands. I've also relabeled the nodes to have abbreviated names instead of numbers. \documentclass{beamer} ...

6

You can use the tikzmark library; the idea is to place some marks at the desired locations and then to use those marks to have pointers for the explanations: \documentclass{beamer} \usetheme{Madrid} \usepackage{tikz} \usetikzlibrary{tikzmark,positioning} \begin{document} \begin{frame} \begin{exampleblock}{Baye's theorem} \[ \tikzmark{ptd}p(\theta\, |\, D) ...

1

Yes, there is a better way to include a summary. You can use the abstract environment and \renewcommand the \abstractname: \documentclass[11pt]{article} \usepackage{lipsum} \usepackage{newtxtext} \usepackage[letterpaper,margin=3.1415cm]{geometry} \usepackage{etoolbox} \makeatletter \AtBeginDocument{\preto\@title{\bfseries}}% bold thesis title \makeatother ...

5

Seperating the content from its form, or better its visual representation means that you declare the functions of a certain formatting element logically (i.e. logical markup is the basic principle involved here -- that not only (La)TeX employs!). There is no compelling reason for doing so, but it is very convenient, as I try to point out later. First, ...

1

This is perhaps not the best way to achieve this, but the traversing of a list downwards within a table is tedious, since you have to store which row is currently processed, due to cell grouping. This is perhaps a very ineffective solution -- it processes the list every time a row counter is incremented. \documentclass{article} \usepackage{etoolbox} ...

3

I've been learning how to write scripts to generate Latex reports and tables from data sources. Instead of using Latex directly to do this, the script written in your favorite language, which must have support multi-line raw strings, generates the Latex code on the fly as it is reading the data from external sources (files, XML, etc...). The script formats ...

4

You have a choice between a six-pointed asterisk, generated by \ast, and a five-pointed asterisk, generated by \star. Both of these macros need to be used in math-mode; choose whichever symbol you like better. I would also enlarge the floor-related symbols of the "outer" \floor directive slightly as a visual aid towards parsing the equation. ...

2

Use the \tag{\textasteriskcentered} command to provide for a (*) equation 'number', either in align* or in align environment, equation would do too. \documentclass{article} \usepackage{mathtools} \usepackage{mleftright} \DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor} \begin{document} \begin{align*} \floor{7\mleft(n\pi - \floor{n\pi}\mright)} ...

1

EDIT: I changed the code to a MWE. With the two commands you can print the taxes only or the sum of both values. You can place them wherever you want them to appear. \documentclass{standalone} \usepackage{pgf,pgfmath} \pgfkeys{/pgf/number format/.cd, fixed, fixed zerofill, precision=2, set thousands separator={.}, set decimal ...

Top 50 recent answers are included