This is the Latex code and its compiled pdf version that I have rn, but my Latex doesn't seem to be doing what I want it to do.
I want to create a list with main bullet points and subpoints, the first main point being "P(x) : "..."", and the second and third being "bullet point 2" and "bullet point 3"
I also want to have a nested list under the first one, but for some reasons when I try putting it, Latex thinks that its just an indented version of the main list, rather than a sub list
Does anyone know how fix this?
#Need help with a nested list in Latex
1 messages · Page 1 of 1 (latest)
I feel like enumerate is inappropriate for this. Why not give dedicated environments a try? https://www.overleaf.com/learn/latex/Theorems_and_proofs
Numbering is done automatically, and you need not enter math mode every time
After all, your intention is not to enumerate list of things, it concerns mathematical expressions.
@soft crater I more just want to understand why the nested list isn't nesting properly, could you tell me what is going wrong and how to fix this?
Could you most the source code rather than posting a screenshot of it?
Increases the likelihood of getting proper help by 50% (!)
🫰😄
Thank you, I noticed that the code is not functional at all so it will take some time to fix it myself.
First line of consideration I'd make is to examine the enumitem package to create a new kind of enumerate environment that accomodate for your use case.
Again, if you have to enter mathmode every time you start an item then it probably means you shouldn't assert this way of typesetting a list of mathematical expressions
Could you post the source code rather than attaching the file?
In particular this section of the code.
I don't need the whole thing, just need minimal example to work with
How do I post the source code? Do you want me to just copy paste it here?
You seem to have it done it here. Perhaps change the extension of your file to tex from tex_2?
.tex_2 is not a valid extension for Discord to detect
🤦♀️ thank you.
I have a question
mhm?
Say if you have a list within a list
List A
sublist 1
sublist 2
sublist 3
List B
sublist ...
You want the counter of the sublist to be unrelated to the List?
I'm not sure what you mean by
Latex thinks that its just an indented version of the main list, rather than a sub list
I have this so far
yeah thats good but I want it indented
I thought you didn't want that
I can quite literally do -
Code and explanation coming up, just cleaning up the code now
https://paste.opensuse.org/pastes/af5422218874
Here is the full code and how it looks
I've created an environment called myprop to deal with numbering of your propositions and to separate out propositions (which is easier to work with)
and using enumitem package I created an enumerate clone called myenum to be used within myprop (you don't have to)
where the first level is numbered in arabic (1. 2. 3. ...) and second level is just an em dash (—)
As I found in the amsthm documentation, you must use \leavevmode command before starting myenum in myprop due to spacing issues, but it works quite well
Especially because you can nest myenum environment
and this isn't hard-coded or anything, if you don't want an em dash for level 2 you can always change it to something
Let me know how you go
Um so I fixed my issue without revamping my whole code like you did, I just put $ around the first list item
I have addressed that in line 30 of my pastebin.
In any case I will consider the post answered in full.