# Tag Info

1

From the Sweave User Manual: Code chunks start with <<name>>= at the beginning of a line That is, inserting a tab you are violating this elemental convention, and simply the R chunk is not recognized as R code, but as plain LaTeX text. This can sound inconvenient, but imagine than you want to show (not execute) verbatim some R chunk in ...

3

Since you're already loading the chemmacros package which loads and uses the chemformula package you can use the latter for the reaction. The key is the !(<below>)(<text>) syntax inside of \ch. \documentclass[12pt,letterpaper]{report} \usepackage{chemmacros} % \usepackage{siunitx} % already loaded by chemmacros' \begin{document} ...

5

You can use \chembelow[<dim>]{<code>}{<stuff>}. I have used siunitx, in addition, to write those percentages. \documentclass[12pt,letterpaper]{report} \usepackage{chemfig,chemmacros} \usepackage{siunitx} \begin{document} \begin{center} \schemestart \chembelow[1.5ex]{\chemfig{CH_4}}{} \chemsign{+} \chemfig{Cl_2} ...

7

You had a syntax error with a final } bracket missing on the last compound. Apart from that to put a label on an arrow use the general form \arrow{->[up][down]} To colour atoms, use {\color{red}H}. However, in a number of situations, such as ends of bonds, you need to write {}|{\color{red}H} instead. \documentclass[12pt,letterpaper]{report} ...

0

This is not a full solution, rather a starting point, due to lack of time and lack of knowledge on TikZ ;-) I tried to use the tcolorbox breakable and overlay features and its theorem style to make the boxes. The logos from bclogo packages can be inserted, but I fail at the positioning them correctly. This leads to a right shift of the box content as well. ...

2

You can temporarily redefine \raggedright to do nothing. The output may not look pretty: .Rnw file (process with knitr, then LaTeX): \documentclass[a4paper]{article} \usepackage[pass]{geometry} \begin{document} \let\oldraggedright\raggedright \renewcommand\raggedright{} <<echo=FALSE,results="asis">>= utils::toLatex(sessionInfo()) @ ...

3

The breakpoint is before the glue, and if it broke there, the first line would be too underfull. You can add an additional breakpoint after the glue: \hsize 5cm \hrule Do you like me? \hfill\hbox{\quad$\bigcirc$ Yes\quad$\bigcirc$ No}. Do you like me?\ \hfill\allowbreak\hbox{\quad$\bigcirc$ Yes\quad$\bigcirc$ No}. Do you like me?\ ...

1

Table can also be created as shown below. \documentclass{article} \usepackage{booktabs,siunitx,caption} \begin{document} \begin{table}[ht] \caption{Information about countries} \label{table:countries} \centering \begin{tabular*}{1.2\textwidth}{r|r|r||r|r|r||r|r|r} \toprule \multicolumn{9}{c}{Country}\\ \midrule \multicolumn{3}{c}{France} ...

5

Rather than try to improve the display of the information given in the top left-hand cell, it may be more fruitful to disentangle the information and create two groups of columns -- a "country" column and a "property" column, with the latter getting three sub-columns (population, area, and HDI). To enhance the readability of the table, it's probably also a ...

2

It's not clear to me if you want the citation call-out number to be set in blue or, instead, you wish to have the number that precedes the corresponding bibliographic entry set in blue. If it's the former you want, an easy solution involves loading the hyperref package, setting its option colorlinks to true, and specifying the additional option ...

4

I don't know why you'd want to do it, but here it is: \begin{filecontents*}{\jobname.bib} @article{ref1, author = {John Clark}, title = {Learn to use {\LaTeX}}, journal = {{\LaTeX} Journal}, volume = {1}, number = {1}, year = {2014}, pages = {1-2}, } \end{filecontents*} \documentclass{book} \usepackage[square, numbers, comma, ...

3

If I understand correctly, your marker color should be taken from a color map, right? I believe a simple solution would be to use error as input for point meta. That way, you get the mapping into the color map for free. Of course, we will need to use a different key to satisfy scatter/classes. My idea is that we simply exchange the value of point meta right ...

4

You can use marginnote package: \documentclass{article} \usepackage{amsmath} \usepackage{marginnote} \newcommand{\magic}[1]{% \textbf{#1}\marginnote{#1} } \reversemarginpar \begin{document} A function $f:A → B$ is called a \magic{bijection} or bijective function if it is both surjective and injective. \end{document}

3

First, the spacing should be set using the setspace package rather than altering \baselineskip. You can then switch between double-spacing for the main part of the document and single-spacing for the list of acronyms using \doublespacing and \singlespacing. To illustrate this, the example below uses the lipsum package to provide some dummy text. Remember to ...

0

The footnote package is designed to help with such situations. Place the \sidenote in a savenotes environment, and the footnotes will be collected up and printed after the environment: \documentclass{memoir} \usepackage[T1]{fontenc} \usepackage{footnote} \usepackage{lipsum} \begin{document} \lipsum*[1]\footnote{Text for note 1}\lipsum[2] ...

2

You're declaring twice the style mystyle, once for Proof and second for Theorem. Only the last one is remmembered. You must change one of style names and apply the change is corresponding \declaretheorem definition. \documentclass{report} \usepackage{amsfonts, amssymb, amsthm} \usepackage{mathtools} \usepackage{undertilde} \usepackage[utf8]{inputenc} ...

2

Nice work on your solution! Someone may come along with a better way to do this, but I've taken your code, added the page numbers, and solved the page height problem. I also added a conditional for the last page, to check if it was already printed as part of the last double-page spread. For my example, I used the biblatex manual which should be available ...

1

Is this what you are after? \documentclass{memoir} \usepackage[T1]{fontenc} \usepackage{lipsum} \begin{document} \sidepar{Lorem ipsum\footnotemark}% \footnotetext{\lipsum*[1]}% \lipsum \end{document}

3

The easiest way apart from deep hacks, is to put a tighttcolorbox around the \l@chapter command, which is redefined and called internally with the standard values. However, this introduces some vertical spacing above and below the chapter toc entries. The colours are hardcoded at the moment. \documentclass{book}% \usepackage{blindtext}% ...

2

Here's one way to go about implementing issues #1, #2, and #3. (I leave aside #4; but this is an issue that can be dealt with much later on.) \documentclass[11pt,twoside,openright]{book} % If we store the book title in a macro, we can use it in many places \newcommand{\thebooktitle}{Heat and Mass Transfer} % Fonts, encodings, languages ...

1

For the \cventry, maybe you can use \cvline{}{your text here} instead? For the bulleted list, how about using \cvlistitem{} or \cvlistdoublitem{} (for a two-column list)? for example:] \begin{document} \maketitle \section{A Section} \cvline{}{some text here.} \cvlistitem{item 1} \cvlistitem{item 2} \cvlistdoubleitem{item column 1}{item column 2} ...

1

Try this: \documentclass{tufte-book} \usepackage{lipsum} \makeatletter \titleformat{\chapter}% [display]% shape {\begin{minipage}{\linewidth}}% format applied to label+text {\itshape \thechapter}% label {0pt}% horizontal separation between label and title body {\Large\rmfamily\allcaps}% before the title body ...

0

Finally with a lot of fine tuning, and clearly abusing of LaTeX capabilities, I managed a result I'm almost happy with. It only works for the specified variables I was using, but I'm posting it here because someone with somewhat the same problem might find it useful. \documentclass{article} \usepackage{amsmath} \usepackage{graphicx} \makeatletter ...

1

I'm not sure whether I understand your question correctly: How do I make sure it's syntacticly correct? If I did, I think your problem can be solved with two approaches, which I both strongly recommend: Use indentation: \ifbool{@epubstate}{ \newcommand{\doofus}{\textcolor{black}{7\spadesuit}} ...

0

If you want the full command and output exactly as rendered (spacing and all) the built-in verbatim or Verbatim environment might be what you want. Eg. \begin{Verbatim} $pdflatex --shell-escape poetrytex.dtx \end{Verbatim} If you're looking for inline output, just use a monospace font, eg. \texttt{git describe --tags --dirty} 5 Looking into the aaai.sty file will learn that the area is controlled by titlebox whose default value is 2.25in. Therefore, use a less value in the preamble should remove the space, displayed below \setlength\titlebox{1in} Code \documentclass[letterpaper]{article} \usepackage{aaai} \usepackage{times} \usepackage{helvet} \usepackage{courier} ... 3 The font used for the clause titles is defined in \Cfont, \SCfont and \SSCfont; the standard definition is found in iso11.clo and it's sufficient to redefine them by adding \sffamily. The period for \clause only can be obtained with a slick trick: \makeatletter \def\@seccntformat#1{% \csname the#1\endcsname\csname dot#1\endcsname\quad } ... 2 I see no reason why typing math with$math\$ or $$math$$ should fail to work - but I do see what looks like an error in your code: \begin{letter}{H.P. \\ K. N. Technology Tehran, I. R. Iran \\ Email Add.:} \\ Tel: : } has one } too much after \\ Email Add.:, i.e. this block should read: \begin{letter}{H.P. \\ K. N. Technology Tehran, I. R. Iran \\ ...

1

Here's a first cut, but the OP would need to provide more information if he/she would like further refinement. Changes from what the OP provided in his/her MWE are as follows The blue box is moved left by placing it in an \llap The blue margin on either side of the chapter number (argument #2 of \BuildChpNum) was increased from 1ex to 2ex The actual ...

2

My own attempt After some trial and error, this is my current attempt so far: \documentclass{article} \usepackage[a4paper,margin=2cm]{geometry} \usepackage{graphicx} \usepackage{multido} \def\filename{test.pdf} \def\scale{.05} \pdfximage{\filename} \newcount\N % counter for the last doublepage spread \N=\pdflastximagepages\relax \advance\N by -1\relax ...

18

This is my favorite kind of question! Update If you get some nice icons related to emails, then you can add them to the design (I got some icons from iconfinder for my example). Here's the tcolorbox version (see below) with an icon bar added: The code: \documentclass{memoir} \usepackage{graphicx} \usepackage[many]{tcolorbox} ...

0

For the first point, you can try use the caption package and write in your preamble: \captionsetup{format=plain,justification=justified} Another valid option would beformat=hang. You also can set the width of the caption with\captionsetup{width=…}. See the details in §2 of the documentation. If you want your caption to be no wider than the figure, you ...

1

You can use \settocstylefeature[-1]{entryhook}{\LARGE\bfseries} (change \LARGE according to your needs). A complete example: \documentclass{book} \usepackage{tocstyle} \usetocstyle{standard} \settocstylefeature[-1]{entryhook}{\LARGE\bfseries} \begin{document} \tableofcontents \part{Test part} \chapter{Test chapter} \end{document}

0

As far as I know, the "DIV=calc" does not care about multicols. So you need to write something like DIV=20 and forget about the warning. One mistake: \usepackage[T1]{fontenc}. OK, what else? KOMA-script improved the possibilities of two column layout: there is a new package called scrlayer-notecolumn. You can have an independent second column on the page ...

2

To suppress the word "page" from the ToC, add these lines to the preamble: \usepackage{etoolbox} \patchcmd{\tableofcontents}{\hfil\pagename}{}{}{} To add a period after the number for clauses in the ToC (but not after) sclauses or other sectional unit entries, a redefinition of \@sect is required; in this redefinition a period is added only if the ...

2

Three solutions: With the float package: Add \usepackage{float} to your preamble, and write for your figure: \begin{figure}[H} \centering \includegraphics[…]{…} \caption{…} \label{…} \end{figure} With the caption package: Add \usepackage{caption} to your preamble, and write: \begin{minipage}{\linewidth} \centering \includegraphics[…]{…} ...

3

A simple redefinition of the symbols environment (a list) will do: \documentclass{isov2} \renewenvironment{symbols}{\list{}% {\itemsep 0pt \parsep 0pt \itemindent 0em \leftmargin 5em \labelsep 1em \labelwidth 4em \let\makelabel\symbollabel}}% {\endlist} \begin{document} Some text here \begin{symbols} \symboldef{ACSE}{association control ...

Top 50 recent answers are included