7
votes
Accepted
Smarter way to write bullet point notes?
The easylist package is suitable for this kind of use cases. You choose a symbol as package option (at, sharp, ampersand, pilcrow, for @, #, &, ¶ respectively, or not choose a symbol for the ...
6
votes
Accepted
How to make it so that newcommand takes the rest of my line as argument?
Here's a LuaLaTeX-based solution. It sets up a Lua function, called process_items, which acts as a preprocessor: By the time TeX gets to process the input lines in question, it will not "see"...
6
votes
Accepted
Nested lists with roman numerals
Since you mention that the roman-lowercase enumeration style is a one-off requirement for your document, I suggest you (a) load the enumitem package and (b) use its machinery to provide the formatting ...
5
votes
Nested lists with roman numerals
Like this.
%! TEX program = pdflatex
\documentclass{article}
\usepackage[shortlabels]{enumitem}
\begin{document}
\setlist[enumerate,1]{label=(\roman*)}
\setlist[enumerate,2]{label=(\roman{enumi}.\...
5
votes
Smarter way to write bullet point notes?
You can include Markdown in LaTeX using the markdown package:
\documentclass{article}
\usepackage{markdown}
\begin{document}
\begin{markdown}
main phrase
* hence A
1. since A follows B
1. ...
4
votes
Accepted
How can I write line numbers inside boxed code
I warmly suggest tcolorbox.
\begin{filecontents*}{\jobname.sol}
function hello() public returns bool {
uint256 amount = 100
return amount * 100
return true;
}
\end{filecontents*}
\...
4
votes
How to make it so that newcommand takes the rest of my line as argument?
If you don't plan to use nested lists in this case, you can implement the job in expl3.
Split the input at \item and massage the resulting sequence so that uppercasing of the first letter is performed....
3
votes
How to make it so that newcommand takes the rest of my line as argument?
You can borrow the \eoldef macro from OpTeX. Syntax:
\eoldef\macro #1{body of the macro, #1 can be used}
The \macro is defined with its parameter separated by the end of line.
In your LaTeX document ...
3
votes
How can I write line numbers inside boxed code
Use the option framexleftmargin to include the numbers:
\expandafter\def\csname ver@fixltx2e.sty\endcsname{}
\documentclass[10pt,journal,compsoc]{IEEEtran}
\PassOptionsToPackage{table}{xcolor}
\...
3
votes
Smarter way to write bullet point notes?
Just for fun. Of course, you have to remember your level.
\documentclass{article}
\usepackage{outlines}
\usepackage{enumitem}
\usepackage{showframe}% alignment tool
\begin{document}
\begin{outline}
\...
2
votes
Accepted
How to define a custom description environment?
Just
% definition
\NewDocumentEnvironment{my desp}{ m m }{%
\begin{description}[align=right, itemindent=0cm, leftmargin=\labelsep+#1, font=#2]
}{
\end{description}%
}
% usage
\begin{my desp}{3cm}{...
1
vote
Accepted
List with the first item equals the last number in another list + 1
You can try this:
\documentclass{article}
\usepackage{enumitem}% <-- changed
\begin{document}
List 1
\begin{enumerate}
\item A
\item B
\end{enumerate}
List 2
\begin{...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
lists × 2727enumerate × 704
itemize × 428
enumitem × 415
spacing × 270
indentation × 218
tables × 181
beamer × 180
description × 176
horizontal-alignment × 157
numbering × 98
environments × 97
macros × 90
formatting × 90
vertical-alignment × 85
cross-referencing × 83
table-of-contents × 62
theorems × 57
line-breaking × 51
nesting × 51
equations × 48
page-breaking × 48
multicol × 44
tikz-pgf × 43
hyperref × 39