# Tag Info

3

What about this? \documentclass{article} \usepackage{lipsum} \usepackage[most]{tcolorbox} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing,calc} \newtcolorbox{mycolorbarmarg}[2]{ enhanced, blank, breakable, overlay = { \foreach \t in {0,...,#1}{ \draw[decorate,ultra thick, #2] ([xshift=-3-\t mm]frame....

0

Building from Rmano comment. Here is a fix that worked for me (remember to remove before submission): Add on line 61 after the "% Add packages and commands here. " %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %hotFIX for MDPI template on OVERLEAF remove before submission \newcommand{\endMyColumn}{\end{paracol}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Do everything you ...

0

I had the same need, but with an background color. This post is from 9 years ago but maybe someone could need too. use mdframe, like the next example: newcounter{definicion}[section] \newenvironment{definicion}[1] { \begin{flushright} \refstepcounter{definicion}\par\medskip \noindent \textbf {\textit{#1}.} - Definición \thesection.\thedefinicion \end{...

0

I had the same need, but with an background color. This post is from 9 years ago but maybe someone could need too. use mdframe, like the next example: newcounter{definicion}[section] \newenvironment{definicion}[1] { \begin{flushright} \refstepcounter{definicion}\par\medskip \noindent \textbf {\textit{#1}.} - Definición \thesection.\thedefinicion \end{...

0

I managed to combine the idea in the link posted by John and the template itself: \newenvironment<>{try1}[1]{% \setbeamertemplate{itemize item}[triangle] \setbeamercolor{itemize item}{fg=pgreen} \setbeamercolor{block body}{bg=white!95!green} \setbeamercolor{block title}{fg=white,bg=white!95!pgreen}% \begin{block}#2{#1}}{\end{block}} I just ...

0

You can change the way the itemize environment behaves (like spacing or in our case we want to change its label or "bullet points"). We have to use the enumitem package to be able to change the environment and create new environments similar to itemize. We also use the xcolor package to define colors. The symbol we want to use is \...

0

1

You can use a tabularx with an \hfill to push the content to the right. However, this doesn't allow the list to break across the page boundary. You can also define your own list-like environment (say, propertylist) using enumitem: \documentclass{article} \usepackage{enumitem,tabularx} \newlist{propertylist}{enumerate}{1} \setlist[propertylist]{% label={\...

1

You can get the table formatting you want with tabularx, using the X column specification for the middle column to fill the maximum available space, and r for the right-aligned column. Define an empty command for the label and a counter for the number. Then create an environment (axiomata) for the axiom lists that takes an optional argument for the label. ...

2

The value of \hangindent is reset at the end of each paragraph. You need to reinstate it. \documentclass{book} \newenvironment{mybibliography} {% \par \setlength{\parskip}{6pt}% \setlength{\parindent}{0pt}% \everypar{\setlength{\hangindent}{17pt}}% } {\par}% <-- don't forget \begin{document} \chapter*{Bibliography} \begin{mybibliography}...

2

An environment called foo* is no different (except by convention) from an environment called fooX, and neither mean that the environment is starred. An environment called foo* is declared exaclty like you'd declare foo: \NewDocumentEnvironment{foo*}{+b} {Starred: [##1]} {** starred end}% and you use it with: \begin{foo*} <content> \end{foo*} An ...

3

[Remark: Shortly after I posted the answer shown below, the OP updated the posting to mention that the svmono class is loaded with the option envcountsame. That's a crucial bit of information. The following answer does not apply if envcountsame is in force.] Not all conceivable environment names are known a priori to cleveref. Happily, the cleveref package ...

2

I propose this solution, with the enumitem package, and cleveref to simplifying the yping of cross references: \documentclass[11pt]{report} \usepackage{enumitem} \newlist{requirements}{enumerate}{1} \setlist[requirements,1]{wide=0pt, label=R\arabic*, widest=\textbf{R9}, font=\bfseries, leftmargin=*, ref=\textbf{R\arabic*}} \usepackage{cleveref} \crefname{...

1

Here's the complete MWE that works, in case someone else is struggling with this issue. It's taken over from here as mentioned in the comments, but for me it only compiled without the line in the preamble that resets the counter. If you need a second table that starts over with the counting, what worked for me is defining a new counter. \documentclass{...

0

The biggest problem is that you always use \end{tabular} even if the code didn't use a tabular in the begin part. You could define an auxiliary macro to store whether you should use \end{tabular} or not, like in the following. Also please note that your code does include many unwanted spaces. Make sure to put a % at the end of lines to suppress spaces there, ...

0

What's happening is that the \noindent puts you into horizontal mode at the end of the \begin{sample_text_with_noindentation} so as a consequence the new line after \begin{sample_text_with_noindentation} is interpreted as a space. The simple solution is to add \ignorespaces after \noindent.

0

Try along the following idea (untested). Put all your preamble "boilerplate" in a file classed, say, preamplebp.tex. Put all your "boilerplate" between \begin{document} and your \begin{content} (whatever that might be) in a file, say, postamblebp.tex. Put all the "boilerplate" (print bibliography, index commands?) between \end{...

1

Reading page 43 of the documentation, and using the trick of replacing \begin{env}...\end{env} with \env ... \endenv(*): \documentclass{article} \usepackage{listings} \lstset{language=SQL,keywordstyle=\underbar,numbers=none} \lstnewenvironment{egdlisting} {\minipage{\dimexpr\textwidth-2em}} {\endminipage} \begin{document} \begin{egdlisting} select * ...

0

Trying to patch the exam class to insert page breaks before questions part items, using \xpretocmd worked just fine. Your case would call for \xapptocmd. Maybe \apptocmd works as well, if your environment does not have optional arguments. This works because a command \newenvironment{envname}{<before code>}{<after code>} will define two macros, \...

1

I'm not sure what your desired typeset result is bu the following may help you. % envprob.tex SE 591990 \documentclass{article} \usepackage{tikz-cd} \usepackage{cleveref} %\makeatletter %\newcommand{\p@diagctr}{\thediagctr} \newcounter{diagctr} \newenvironment{diagram}{% \centering \refstepcounter{diagctr}% Diagram \arabic{diagctr} \[ \begin{...

5

You can save the value of equation and replace it by the current value of diagram. Using \crefalias is the key. I defined diagram with an optional argument for options to tikz-cd: they're often needed. \documentclass{article} \usepackage{amsmath} \usepackage{tikz-cd} \usepackage[noabbrev,capitalize]{cleveref} % custom environment \newcounter{diagram} \...

3

There are a few things to do here. First you want a counter, so you'll need to define this with \newcounter: \newcounter{diagram} We'll come back to this after we figure out the formatting. Your extra space on the first line is a consequence of how the equation environment manages ignoring spaces after —by setting \@ignoretrue which informs ...

Top 50 recent answers are included