I'm trying to change how section numbering is displayed in a Latex document I'm working on. What I want to do is this:
Section Title
(i) Subsection title in normal weight
(a) Lorem ipsum (no subsubsection title being used)...
I've come up with the following, but it's not right in terms of indenting etc.
\renewcommand{\thesubsection}{(\textnormal{\roman{subsection}})}
\renewcommand{\thesubsubsection}{\indent(\textnormal{\alph{subsubsection}})}
Can anyone point me in the right direction? Thanks!
Use the titlesec package. The titlesec manual is here, and plenty of other resources are available elsewhere.
I don't have a direct answer, but the memoir package provides some help with customization and is very well documented.
Related
I just started using the article chapterstyle in Memoir.
I'm composing in LyX, with each section of the article in a child document.
When compiling from the main document, I want each section to be numbered as follows:
1. Introduction
2. Related Literature
2.1 Literature from Long Ago
2.2 Literature from Yesterday
... Etc.
n-1. Conclusion
n. References
To accomplish this the top-level section headings use \chapter. Numbering, formatting, etc. is perfect. Except: each \chapter is triggering a page eject, and I can't figure out how to fix this.
What's the easiest way to make each \chapter (section of the article) begin below the preceding one when there's space on the page?
memoir has a macro called \clearforchapter that normally ensures that chapters start at the correct page. You can disable it like this:
\documentclass{memoir}
\renewcommand{\clearforchapter}{}
\begin{document}
\chapter{test}
test
\chapter{test2}
test
\end{document}
I'm designing my diploma thesis and would like to make a big question mark to every problem and a exclamation mark to every solution. It should like like this:
Do you know any Latex-Libraries to accomplish that behaviour? If there is no such library I would be more than happy if you could help me getting started writing my own Latex-Command.
Here is one basic approach. No packages are involved.
A particular thing about your layout is the use of the margin, correlated with that line of text. One way about it is to define a simple environment, which uses Latex command for margin notes, \marginpar. Then you can also set up fonts as you please, within this environment. Below I also insert an unrelated margin note, as an example in case you are not familiar with those.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\newenvironment{Q} {\hspace{\stretch{1}} \Huge} {\marginpar{ \Huge{?} } \newline}
\newenvironment{A} {\hspace{\stretch{1}} \Huge} {\marginpar{ \Huge{!} } \newline}
\begin{document}
\section{First section}
Some text ... Margin note entered {\em here} \marginpar{NOTE} ... more text \\
\vspace{0.5in}
\begin{Q} Here is a question \end{Q}
State your question ... \\
\begin{A} This is an answer \end{A}
Go with the answer ... \\
New paragraph, for other text ...
\end{document}
See this page in Latex Wikibooks for a very clear explanation of how to define a new environment. If you end up wanting more control see the package environ.
Margin notes provide you with a few options. If you want to reverse the logic of where they are placed, use \reversemarginpar. You can also set up different text to appear depending on which margin the note goes in by using \marginpar[left text]{right text}. See the Wikibooks article on footnotes and margin notes, which spells out where notes go based on the document type.
Here are some posts for more specialized uses: on notes in both margins, and on notes in narrow margnins. For doing far more with margin notes see package magrinnote, and there are yet other packages, like todonotes. See this post for a visual show off of what it can do.
I've used a basic way to change font size, and no special symbols. A list of these fonts can be found in this post, for example. You can use very particular fonts and/or symbols if you like, which are convenient to set up in the new environment. See, for example, this post, which also has another way of formatting for your Q&A. Also informative may be this post.
Note that you can also use existing environments inside this new one, if you wish. You can also set up a counter, and have an ability to cross-reference these. See this post for an example.
I am trying to customise the position of the page number to make them all appear at the bottom centre in Lyx. I plan to use the fancyhdr package in the preamble section of the document, but I get the following error msg:
'LaTex Error: Command /footruleskip already defined'
I guess it has something to do with me forcing a footnote formatting which may already be defined by fancyhdr package, as i have the following in my preamble:
\setlength{\skip\footins}{0.8cm}
Any suggestion how I get around this problem and set the page number position together with the footnote setting? Many thanks.
This link should help: http://en.wikibooks.org/wiki/LaTeX/Page_Layout#Customising_with_fancyhdr. You can use the lhead, chead, rhead, lfoot, cfoot and rfoot commands to tell it what you what where (section names, page numbers, custom text, etc). I think you still need to specify them even if they are empty. For only a page number at the bottom center, that would be:
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\lhead{}
\chead{}
\rhead{}
\lfoot{}
\cfoot{\thepage}
\rfoot{}
Perhaps your error could be fixed by using \renewcommand instead of trying to define an already existing value.
I'm trying to do my thesis with LyX and small problems like this are killing me because of having to adhere to the strict format of my school. Anyhow, this page came up as I searched for over an hour for the answer to your question. I'm using the memoir layout (kind of, I've already had to edit it) because my school's latex .cls file is supposedly based on memoir.cls (which I couldn't get to work correctly with LyX despite hours of persistence). I ended up putting this code into my preamble and it displayed the page numbers in the bottom-center per my formatting requirements.
\makeevenfoot{headings}{}{\thepage}{}
\makeoddfoot{headings}{}{\thepage}{}
\makeevenhead{headings}{}{}{}
\makeoddhead{headings}{}{}{}
Hope this helps anyone else that finds this page. Now if I can just figure out how to tell LyX that I have no chapters and I want sections to be 1 instead of 0.1. I'll probably just use section* and call my sections "Section" #. Anyway, I hope this helps someone who is as close to punching themselves in the face for using LyX as I am.
I've been using the beamer class to create presentations in LaTeX and I love it. Recently I started using the \note command to add notes to my handout so that I have a printed version with some pointers to remind myself of things I want to say in the lecture.
I have a problem with the longer lines in the notes environment as they seems to spill of the right end of the page without formatting correctly. I don't know if this is so for a reason, but in any case, I would like to find out how to change it. Clearly, I do not want to change the width of the text everywhere, only in the note environment.
Here is a minimal example:
\documentclass[beamer]{beamer}
\title{An example of itemize in notes not working in beamer}
\usetheme{Boadilla}
\setbeameroption{show notes}
\begin{document}
\begin{frame}
$$ e^{i\pi}+1=0$$
\end{frame}
\note[itemize]{
\item At vero eos et accusamus et iusto odio dignissimos ducimus qui blandiis pra
}
\end{document}
Without the [itemize] option it works fine, but if you put a \begin{itemize}...\end{itemize} environment manually the result is the same.
Any ideas?
Thanks
I finally found a good answer, by re-posting on TeX.SE. It turns out that there's a small bug in Beamer that is responsible for this behavior. A workaround is given in the TeX.SE site. Hopefully, the workaround or a real fix will be included in the next Beamer release, as is currently planned.
Cheers.
I had the same problem, so I created a command in the preamble which defined a new style for my note page, and I also changed the template of the notes a bit. This is what I have (just before the \begin{document}:
\usepackage{setspace}
\usetemplatenote{\setlength{\leftmargin}{1cm} \beamertemplatefootempty \insertnote}
\newcommand{\notepage}[1]{\note{\setlength{\parskip}{0.7em}
\setlength{\parindent}{0.4em}
\scriptsize #1 }}
So instead of using \note in the document, I call \notepage, and the note will be formatted the way I defined before. Try this formatting and if you don't like you can change the values of the margins, indentation and skip between paragraphs to suit your needs.
By the way, I don't understand why you are using
\documentclass[beamer]{beamer}
\setbeameroption{show notes}
The way I do it is to have the three options and comment/uncomment according to what I need:
%\documentclass[notes]{beamer}
%\documentclass[notes=hide]{beamer}
\documentclass[notes=only]{beamer}
Try changing the theme before going to more drastic measures.
I noticed that changing the theme from Boadilla to something else, or deleting the reference to a theme altogether, solved the problem. FWIW, the two themes I used to test this were Warsaw and Berlin.
I found the above to be true for the following versions of Beamer: 3.07-2 and 3.10-2.
I'm currently using the apalike style for my bibliography, using natbib for author-year, however when I generate the bibliography I lose the labels that normally precede the reference,
i.e. [S. Rostami, 2010] Shahin Rostami (2010) https://stackoverflow.com/questions/ask etc etc..
I read apalike.bst and it seems this is intended, my quesiton is, how do I get them back? Something I can include in the preamble? Otherwise is there a similar style that shows labels?
Also, I'm doing this all in Lyx.
OK, a real answer!
Advice: don't use homebrew citation styles in scientific articles. If your university recommends a specific style (e.g., APA, Chicago), use the existing matching style. Otherwise, you can get a feel for what is the dominant citation/reflist style by looking at what styles used by the articles you cite.
If you really do want to create such a homebrew cite/reflist style, then the easy option is to copy the .bbl file into your article and edit that: with luck, you can devise a regex that will create all or most of the labels you want. But rerunning Bibtex will not respect the changes you have made. The "right" thing is to clone apalike.bst and change the way it generates the author/date sentence to include the label information as well. BST hacking is a bit of a black art —time-consuming, fiddly, and poorly documented— but the language is not essentially difficult. Look at btxhak, Designing Bibtex styles and Nicolas Markey's tutorial to get started. Alternatively, there are some bst-hackery-avoiding suggestions in this SO Q&A.