Tag Info

Hot answers tagged

8

\documentclass{article} \newcommand{\detail}[1]{\par\noindent\hangindent=\mylen\hangafter1-- #1} \newlength{\mylen} \settowidth{\mylen}{-- } \begin{document} \noindent\textbf{This is a header} \detail{This is a detail.} \detail{This is a detail that has too many words in it and consequently runs onto the next line of the page, and I want it to ...


4

I suggest one of my favourite packages: tcolorbox \documentclass{article} \usepackage{tcolorbox} % A new `\tcbox` command \newtcbox{\highlight}[0]{boxsep=0pt,left=0pt,top=0pt,bottom=0pt,right=0pt,boxrule=0pt,arc=0pt,auto outer arc,colback=green,width=6cm} \begin{document} \highlight{black text on a boxed green background} ...


3

A simplification of the already answered: \documentclass{article} \def\D{\par\noindent\makebox[1em][l]{-- }\hangindent1em} \begin{document} \subsubsection*{This is a header} \D This is a detail \D This is a detail that has too many words in it and consequently runs onto The next line of the page, and I want it to have a hanging indent. \end{document}


3

You can do something like this \documentclass{article} \usepackage{amsmath,amsthm,amssymb} \def\imp{\rightarrow} \newenvironment{level}% {\addtolength{\itemindent}{2em}}% {\addtolength{\itemindent}{-2em}} \begin{document} \section{formal proof} \textbf{(a)} \begin{proof}\leavevmode \begin{enumerate} \item $r$ \hfill(Given) \begin{level} ...


2

The solution is to use \textbar for the “pipe” in text mode (| is good in math mode). You seem to be using a very old template and I don't think you should be loading the IL2 package. The test \ifx\pdfoutput\undefined is a clear sign of this; note that on current TeX distributions (less than five year old or so), the test will always return false.


2

Your professor should know better. This teaches nothing about LaTeX, in my opinion; using packages is the way. But here it is; it includes a (perhaps too clumsy) implementation of Euclid's algorithm for the greatest common divisor, in order to pass a correct pair of values to \line. \documentclass{article} \makeatletter \newcommand{\crossout}[1]{% ...


2

\fcolorbox is like \fbox or \mbox and makes a horizontal (LR) box, so you need \textbf{\fcolorbox{black}{green!30}{% \parbox{3cm}{black text on a boxed green background}}} replacing 3cm by whatever width you need.


2

\documentclass{article} \newcommand{\detail}[1]{\par\noindent\hangindent=\mylen\hangafter1--\,\,#1} \newlength{\mylen} \settowidth{\mylen}{--\,\,} \begin{document} \noindent\textbf{This is a header} \detail{This is a detail.} \detail{This is a detail that has too many words in it and consequently runs onto the next line of the page, and I want ...


2

Before I give you an answer, I would like to give you couple of notes about the problems of your approach. Firstly, you should update whole File A even for small changes (instead of only changing what needs to be changed). In other words, this approach doesn't scale. Secondly, it is somehow breaking one of the nicest features of LaTeX, i.e., the possibility ...


1

You can use enumerate and enumitem \documentclass[11pt]{article} \usepackage{amsmath,amsthm,amssymb} \def\imp{\rightarrow} \usepackage{enumitem} \begin{document} \section{formal proof} \textbf{(a)} \begin{proof}\leavevmode \begin{enumerate}[ref=\arabic*] \item $r$ \hfill(Given) \item $(t \land r) \imp s$ \hfill (Given)\label{enum:second} ...


1

I think it might be best to use a package designed for typesetting this kind of proof. lplfitch is probably closest. It draws rules to mark the scopes but these can be eliminated with the help of etoolbox. The following patches the main proof command \fitchprf so that the rules have 0pt for the duration of the proof. The regular width of rules in tabulars is ...


1

This requires all section titles use the optional argument, but at least does the breaking you require. \documentclass{scrartcl} \usepackage[normalem]{ulem} \usepackage{hyperref} \renewcommand\othersectionlevelsformat[3]{% \ifnum\pdfstrcmp{#3}{\thesection}=0 \uline{#3\autodot\enskip}% \else #3\autodot\enskip \fi } \begin{document} \section ...


1

Your Professor wants you to learn TeX, he is a wise man! Try the below code. \documentclass{article} \usepackage{xcolor} \makeatletter \newbox\@tempboxb \def\cancel#1{% \leavevmode \setbox\@tempboxa\hbox{#1} \setbox\@tempboxb\hbox{x} \hbox to 0pt{\hbox to \wd\@tempboxa ...



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