Comments (13)
You are touching an issue that is nagging on me for quite some time now. In regular LaTeX one could use the enumitem
package to customize enumeration environments. Unfortunately, Beamer overrides the enumeration environments itself thus making any space customization very hard (without replicating everything in the theme again).
Your case is simpler however and you may define a new environment to add that spacing, i.e. something like this
\newenvironment{Itemize}{\vspace{1em}\begin{itemize}}{\end{itemize}}
from mtheme.
@bgat After looking into beamer's source code, I discovered that its redefined itemize/enumerate enviroments helpfully provide hooks for customization, so you don't have to create any custom environments after all.
\setbeamertemplate{itemize/enumerate body end}{\vspace{1em}}
will automatically add some extra space after the end of each itemize and enumerate environment without breaking anything else. (Note: itemize/enumerate
is the actual key name; itemize
or enumerate
separately won't work.)
Hope this helps!
from mtheme.
Another related problem which is bugging me, is the \leftmargini
of the itemize
and enumerate
environment. Our current setting looks fine for itemize
, but bad for enumerate
.
But simply increasing the \leftmargini
values doesn't help either. Because then it is the other way around. And afaik there is now easy way to change the two independently.
Any thoughts on this one?
from mtheme.
Is the problem actually due to the bullet's sidebearing? Is it actually
character width that makes it look wrong?
On Fri, Jun 19, 2015, 1:50 AM Benjamin Weiss [email protected]
wrote:
Another related problem which is bugging me, is the \leftmargini of the
itemize and enumerate environment. Our current setting looks fine for
itemize, but bad for enumerate.[image: screenshot_lists]
https://cloud.githubusercontent.com/assets/9158719/8244718/92ab634c-1624-11e5-81ac-eaed07d6db35.pngBut simply increasing the \leftmargini values doesn't help either.
Because then it is the other way around. And afaik there is now easy
way to change the two independently.Any thoughts on this one?
Reply to this email directly or view it on GitHub
#29 (comment).
Bill Gatliff
[email protected]
from mtheme.
Is it actually character width that makes it look wrong?
Yes. Because the length \leftmargini
sets the distance between the left frame margin and the start of each item. I hope you understand how I mean that. If not, just set it to zero to test it. Then it should be clear what happens.
\setlength{\leftmargini}{0pt}
So if the label of each item is wider than the bullet it doesn't fit. And it gets even worse if you have 2 digit numbers.
from mtheme.
Untested but worth trying: let \leftmargini
take its default value and instead use the itemize item
Beamer template to
\flushleft
the bullet,\flushleft
the bullet after putting it in a box of width\leftmargini
, or- add space after the bullet to push it to the left,
whichever of these actually works.
from mtheme.
As @bgat says, this ultimately comes down to the size of the bullet: since it is considerably narrower than a numeral, it is not possible to get all the alignments perfect.
The current behaviour aligns itemize
bullets perfectly with the periods after each enumerate
numeral, creating consistent spacing between each bullet and the corresponding list item.
@benjamin-weiss's proposed behaviour would align both itemize
bullets and enumerate
numerals on the left with the surrounding text. This is possible with
\setbeamertemplate{itemize item}{\makebox[\labelwidth][l]{\textbullet}}
\setbeamertemplate{enumerate item}{\makebox[\labelwidth][l]{\insertenumlabel.}}
but necessarily comes at the cost of misaligned periods and bullets on the right-hand side.
I generally prefer the first behaviour, so I'll vote to close this issue, but I'm open to other suggestions if you have them.
from mtheme.
Looking at your screenshots I actually also prefer the first one. It is the way itemize
and enumerate
are indented in LaTeX and this seems to give the best results. But if we decide to use the first one we should increase the leftmargini
value or just remove the following adjustments in the inner theme completely.
\setlength{\leftmargini}{1em}
\setlength{\leftmarginii}{1em}
\setlength{\leftmarginiii}{1em}
from mtheme.
I'd be fine with removing the adjustments.
from mtheme.
I also tested it with the default settings and I agree. Removing the adjustments is imho the best solution.
from mtheme.
Does that mean both enumerate
and itemize
would be flush to the left? I don't have a good source to cite, but whenever I encountered these types (regardless of TeX or not) they are always indented (or IMHO worse "hanging").
from mtheme.
We originally investigated the possibility of having enumerate
and itemize
flush to the left, but we have since decided that that would cause more problems than it solves. The current proposal is to remove the code
\setlength{\leftmargini}{1em}
\setlength{\leftmarginii}{1em}
\setlength{\leftmarginiii}{1em}
to return the item left margin to its default value. This fixes the issue that @benjamin-weiss raised about enumerate labels extending too far to the left relative to the surrounding text.
from mtheme.
Ah alright, then I misunderstood your intentions. With that I am fine.
from mtheme.
Related Issues (20)
- Italic in verbatim environment
- Tikz node color changes to black after \color{} HOT 1
- Fix make demo
- How can I change the font of this theme?
- Create a whiteboard sidebar when aspectratio=169
- page number in frame title
- Change mtheme license
- allowframebreaks breaks frame very strange
- Don't include appendix pages in progress bar without use of appendixnumberbeamer
- Switch sectionpage and subsectionpage to standout mode HOT 1
- .
- Issue with texlive 2023 HOT 8
- The manual contains outdated pandoc instructions
- Make word color Green HOT 1
- How to get inverted section slides?
- `pgfplotsthemetol` puts `\pgfplotsset{compat=1.9}` at end of preamble, overriding other settings
- How can I make the title page background dark (inverted colors)? HOT 1
- Metropolis design with typst implementation HOT 2
- How to change color of inverted section pages? HOT 2
- Footnotes in combination with `\fullcite` are very large and their font size cannot be adjusted HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mtheme.