# Tag Info

7

Just for fun: \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture} \gdef\shift{0} \foreach \x in {1,...,100}{ \pgfmathsetmacro\r{random(0,5)} \xdef\shift{\shift,\r} } \foreach \sh in {0,...,5}{ \gdef\rec{0} \foreach \s [count=\c] in \shift { \ifnum\s=\sh \xdef\rec{\rec,\c} \fi } \begin{scope} \clip ...

13

Procrastination team, represent! This is just too easy with TikZ ;-) Now with correct colors, correct font and the code matches the picture. You will need to use xelatex or lualatex to typeset. \documentclass{article} \pagestyle{empty} \usepackage{fontspec} \setmainfont{Calibri} \usepackage{tikz,xcolor,mwe} \definecolor{cvgreen}{HTML}{92D14F} ...

2

Here is a working example with fixes, and I have made one suggestion: create a \newcommand by which you may define the style of tone values (C, D, etc)...I chose sans serif, but you can make it anything you like. That way, you may put them in text or math mode and they will appear as desired...as well as distinguishable from text and math variables. ...

7

If you examine the .log, you'll see the following: ! Missing $inserted. <inserted text>$ l.25 if we start our octave at C, or N_ 0=C, I've inserted a begin-math/end-math symbol since I think you left one out. Proceed, with fingers crossed. What that tells you is that TeX thinks (rightly in this ...

4


4

A Variation on the answer at Create fill-in-the-blank version of a document with ability to toggle blanks on and off It provides \answer for continuous underline (with line breaks) and \answerwords for word-by-word underline. Uncomment \TeacherCopy in the preamble, and get the teacher version. EDIT, per Manuel's request, I leave extra space for the ...

3

With the current release of siunitx (2.5 branch) this is not possible due to the way things are set up internally. Work is currently ongoing on v3, which will feature a re-write of the internals and some changes to the defined behaviour. In particular, the new version will allow more flexibility with breaks, for example in this case (full details still under ...

1

While cslstr's method is more robust, one way to do this is to replace the \hrulefill with one that uses underlines using \xleaders. \documentclass[letter,10pt]{article} \newcommand{\ulfrule}{\xleaders\hbox{\underline{ }}\hfill\kern0pt} \begin{document} \begin{enumerate} \item There \hrulefill{} in the room. \item There \ulfrule{} in the room. \item There ...

4

This method uses some redefinitions of the \uline macro from ulem to print out just the underlining from some text (with the text itself invisible). (See this answer for a similar solution.) I added a bit of space on each side of the text so the blank is a bit larger than it would need to be (to allow for handwriting). As illustrated, this will also ...

2

You are using the Lenny chapter style from fncychap (this style is, in my opinion, a little ugly and perhaps you should reconsider using it). Redefining \thechapter to produce a title and its formatting is not the thing to do; \thechapter is only for the representation of the chapter counter; misusing it as you did in your example code will produce the ...

2

I fixed some of the main issues, although I'm not sure of the layout you wanted. \raggedright affects paragraphs at a time, and stays in force until the end of the group, or end of the document, so you didn't want that there. Similarly \displaystyle is a (rarely used) declaration that affects the entire math list, it does not take an {} argument. It is ...

1

As far as I can see, this is LyX doing things in a poor way. With the default settings, the LaTeX code generated by LyX looks like Line 1 Line 2 Line 3 Line 4 An empty line in the code signifies a paragraph break. However, when you select all the four paragraphs and change the alignment to centered, the code becomes \begin{center} Line 1 ...

1

Another option is to use bbold package. \documentclass{article} \usepackage{bbold} \begin{document} $\mathbb{1}$ \end{document}

3

One option using titlesec: \documentclass{article} \usepackage{titlesec} \titleformat{\subsection}[runin] {\normalfont\large\bfseries}{\thesubsection}{1em}{} \titleformat{\subsubsection}[runin] {\normalfont\normalsize\bfseries}{\thesubsubsection}{1em}{} \begin{document} \section{Test section} test text \subsection{Test subsection} test text ...

2

\documentclass[12pt,twocolumn,headings=normal]{article} \usepackage{fullpage} \usepackage{amsmath} %\DeclareMathSizes{12}{1}{1}{1} \begin{document} this is the problem equation.. If $n \geq 2$ then \begin{multline*} P^{bb}_{g}(n,p)=*P^{bb}_{g}(n-1,p)+{}\\ (1-p)^2+p*(1-p) *P^{bb}_{g}(n-2,p) \end{multline*} Otherwise $P^{bb}_{g}(n,p)=0$ i have many like ...

3

One possible solution. Code \documentclass[12pt,twocolumn,headings=normal]{article} \usepackage{fullpage} \usepackage{amsmath} %\DeclareMathSizes{12}{1}{1}{1} \begin{document} \begin{equation*} P^{bb}_{g}(n,p)=\begin{cases} 0, & \text{if $n=0~\&~1$}.\\ p*P^{bb}_{g}(n-1,p) +(1-p)^2 &\\ {}+p*(1-p) *P^{bb}_{g}(n-2,p) , & \text{if n \geq ... 6 You can achieve this design with the etoc package. The update adds code to handle the Chapter vz. Annex thing, in order for the correct (set up in French via Babel) heading in the TOC, depending on the case. In the book class, the toc file does not contain the information that we have an annex, except via the change in the numbering which goes Alphabetical. ... 6 You can achieve your desired format using the titletoc format. I have used the command titlecontents command \titlecontents{<section>} [] % left margin {} % above code {} % numbered format {} % unnumbered format {} % filler-page-format, e.g dots to customize the chapter, and its sibling ... 0 If your TOC/etc ends up taking multiple pages, use \addtocontents{toc}{\protect\flushleft\protect\afterpage{tocheading}} to override TOC default indenting. Hoping to save future thesis editors some Googling time. 0 For reference, another approach to doing this is with Bibulous in place of BibTeX or Biblatex, and is worth noting because the implementation is straightforward. In order make a given author bold, all that is needed is to apply a "substring replace" operator into the author list variable. For example, to replace the author "J. W. Tukey" with its bold version ... 0 Another approach to doing this is with Bibulous in place of BibTeX or Biblatex. In order make a given author underlined, all that is needed is to apply a "substring replace" operator into the author list variable. For example, to replace the author "J. W. Tukey" with its underlined version "\underline{J. W. Tukey}", we can change each entrytype template ... 2 The standard way to deal with this is to use setups: \startsetups name \setupTABLE[...][...] .... \stopsetups where name can be any string. Then, you can use \bTABLE[setups=name] .... \eTABLE and context will apply the setup name. You can even define multiple setups and select them using \bTABLE[setups={one, two}] .... \eTABLE etc. 1 You can keep the effect of \setupTABLE using it after \bTABLE \starttext \bTABLE \bTR\bTD abc\eTD\bTD abcdefg\eTD\eTR \bTR\bTD 123456789\eTD\bTD 1234\eTD\eTR \eTABLE \bTABLE \setupTABLE[c][each][width=1in] \bTR\bTD 1inch\eTD\eTR \eTABLE \bTABLE \bTR\bTD This\eTD\bTD more\eTD\eTR \bTR\bTD like\eTD\bTD it\eTD\eTR \eTABLE \stoptext 6 Here is an etoc implementation. This is basically plagiarism of Gonzalo Medina's answer which I have translated with some adaptations into etoc lingua. It is fully compatible with hyperref, and needs the usual three runs to get the TOC correct (inclusive of page numbers). Caveat: the fanciful formatting is only for the table of contents. The body \part's, ... 2 I’m not quite sure what you’re looking for, but here’s something I was using today for a problem sheet that I might use again. I use the \tag* command (like \tag in an equation environment, but the argument isn’t automatically wrapped in parentheses) to put an annotation at the side of equation. I then make the text smaller and dim the colour slightly, so ... 0 I decided that the best way for me to solve this problem would be to use footnotes at the equality signs to indicate what is being used. Ordinarily, the footnote mark might be confused with an exponent, but for this purpose, the footnote will be on an equality sign (or something similar), and so there will be no confusion. It turns out though, that doing ... 1 Rather than pepper your text with explicit calls to \textbf and \textsf, you might find it easier to define a new command to mark your keywords. For example \newcommand{\key}[1]{{\bfseries\sffamily #1}} then you can mark your key words like this: here is a new \key{term} to remember. This way, if you later regret your choice of font, you only have to ... 3 Here's another option: \documentclass[ 11pt, pagesize=auto, version=last, chapterprefix=true ]{scrbook} \usepackage[frenchb]{babel} \usepackage[babel=true]{csquotes} \usepackage[T1]{fontenc} \usepackage[explicit]{titlesec} \usepackage{xcolor} \usepackage{charter} \definecolor{mybluei}{RGB}{28,138,207} \definecolor{myblueii}{RGB}{131,197,231} ... 0 Would something like that be convenient? I use flalign* to have an equations alignment in the center of the line and comments on the right side, ragged left thanks to the \llap command. If the equation on a line would overlap with the comment/justification, it is enough to write the comment on a supplementary line: \documentclass[11pt]{article} ... 2 Versions 1.1 and 1.4 of the class file acmsmall.cls -- the versions linked to in your posting and in @speravir's comment, respectively -- seem to be identical with respect to the formatting of the bibliography. Hence, the following code should work with either version of the acmsmall class file. (Aside: the website says all file versions are "2", but when ... 4 Here's an option meeting all your requirements: Color marking can be activated/deactivated at any point of your document and as many times as required. When color marking is active, each chapter entry in the ToC will have a tab to the left with the corresponding color; the chapter heading will also have this color and all pages of the chapter will also ... 3 The tufte bundle loads the titletoc and fancyhdr packages, so we can access all of their powerful commands. In particular, in the code below I have used % format the toc entries for chapter \titlecontents{chapter} [0cm] % left margin {} % above code {% % numbered format ... 4 You can use the label, ref keys from the enumitem package to control the format for the labels and the references (I added some settings for the third and fourth nesting levels just as an illustration): \documentclass{article} \usepackage{enumitem} \usepackage{cleveref} \setlist[enumerate,1]{label=(\roman*),ref=(\roman*)} ... 0 First of all, note that I canceled the "fullpage" and "doublespace" option. They are needless. (If you want doublespaced lines just use the setspace package.) The solution to you actual problem consists in reseting the section counter manually when \chapter or \chapter* is invoced. (For some reason \@addtoreset failed.) Then, you simply need to redefine ... 6 The string in question here corresponds to bytranslator, whose Italian localization can be found in the file italian.lbx; you can change the default definition using \DefineBibliographyStrings: \documentclass{article} \usepackage{fontspec} \usepackage{polyglossia} \setmainlanguage{italian} \usepackage{biblatex} \makeatletter ... 0 This is apparently not implemented at this time. 7 Try with the datetime package, by defining a new date format: \newdateformat{myformat}{\THEDAY{ten }\monthname[\THEMONTH], \THEYEAR} MWE: \documentclass{article} \usepackage[ngerman]{babel} \usepackage{datetime} \newdateformat{myformat}{\THEDAY{ten }\monthname[\THEMONTH], \THEYEAR} \begin{document} \myformat\today \end{document} Output: EDIT ... 5 If you are going to use it often, you can declare it to be a math operator. If used rarely, you can make a stack or an \underset. Here, I show all ways. Notice I made the stack a \mathrel, rather than \mathop, which has a slightly larger horizontal spacing. Choose what suits. When using the \stackunder, the vertical gap may be set with the optional ... 0 This code uses the \shortstack command in the subscript. I also use \left. before the matrix and \right| after the matrix to fit the vertical bar. \begin{align} \left. \begin{bmatrix} 0 & 1 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 1 & 0 & 0 \end{bmatrix} \right|_{\shortstack{\tinya=0\$ ...

4

Add the following lines in the preamble: \makeatletter \renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}} \patchcmd{\thebibliography} {\setlength{\labelwidth}{\hintscolumnwidth}} {\setlength{\labelwidth}{0pt}} {} {} \makeatother and you will get what you want. The line ...

6

I am not sure if something like this is what you want: \documentclass{book} \usepackage{titlesec} \usepackage[tracking=true]{microtype} \usepackage{lipsum}% juts to generate text for the example \titleformat{\chapter}[display] {\normalfont\huge\bfseries}{\filcenter\underline{\MakeUppercase{\textls[400]{\chaptertitlename}}\ \thechapter}}{20pt}{\Huge} ...

4

The piano.sty package defines the colour orange for all the dots. If you redefine the colour orange, you can change the appearance of each keyboard you insert. I'm not sure how you would change the colour for each individual dot though... \documentclass{minimal} \usepackage{piano} \begin{document} % red dots \definecolor{orange}{RGB}{255,0,0} ...

9

With the following redefinition of \keyboard now you have an optional first argument delimited by parentheses, allowing you to change the color at will: So, for example, now you can say: \keyboard[Co][Eo][Gso][Ct][Et] \keyboard(cyan)[Co][Eo][Gso][Ct][Et] \keyboard(olive)[Co][Eo][Gso][Ct][Et] The code: \documentclass[11pts]{article} \usepackage{xcolor} ...

9

Changing the way the arguments are input is not recommendable, the square bracket notation is better since the seven arguments are optional. For changing the color the simplest way is to load xcolor and change the definition of orange: \documentclass{article} \usepackage{piano} \usepackage{xcolor} \colorlet{orange}{red!20} \begin{document} ...

6

If I understand your question correctly, you want to have a kind of title for your questions and that title should be bold-faced, In this case, you can define a new theorem style and use the note field (the optional argument) to get the desired result: \documentclass{article} \usepackage{amsthm} \usepackage[framemethod=tikz]{mdframed} ...

3

Package resizegather can automatically shrink equations of environment gather of package amsmath to fit the line width. The following example compares the equation using \textstyle of rdhs' answer with resizing the overlarge equation (too large by 148.64104pt): \documentclass[landscape, 12pt]{report} \usepackage[landscape]{geometry} ...

1

I adapted this using the suggestions of Claudio in Add a curved arrow and a bracket to a table to my purposes. The advantage of using tikz over stretching symbols is that tikz produces a uniform look for all of the braces by actually generating an arbitrarily sized brace. By setting the amplitude parameter in the code below I am able to control how wide a ...

5

Let us be colorful with tcolorbox: \documentclass{article} \usepackage{listings} \lstdefinestyle{mystyle}{% basicstyle=\small\ttfamily, breaklines=true, columns=fullflexible, }% \usepackage{tcolorbox} \tcbuselibrary{most} \newtcblisting{session}{% width=\linewidth, arc=3pt, top=-2mm, bottom=-2mm, left=0mm, ...

2

The scalerel package allows one to stretch glyphs to fit the size of a second item. Also, I used a TABstack to create the assembly. If you wish the vertical spacing to be the same as your original, edit \setstackgap{S}{1pt} to be 0pt. I just thought that the small extra gap looked better. \documentclass{article} \usepackage{tabstackengine} ...

3

You can try with fancyvrb that also allows for friendlier input: \documentclass{article} \usepackage{fancyvrb} \DefineVerbatimEnvironment{session}{Verbatim}{frame=single,fontsize=\small} \begin{document} \author{Subham Soni S.} \date{\today} \title{Compiling and Installing a Kernel 3.13.3 On Ubuntu, Debian and its Derivatives} \maketitle To replace the ...

Top 50 recent answers are included