I'd like to (resp. have to) ident the text of all section headings in a document (+ the abstract and quote enviornments, but that should be easy--by comparison) to 0.4" from the left margin of the page (like using a tab in a word processor).  The headings should look like this:    So far, I have:  \def\@seccntformat#1{\csname the#1\endcsname.\quad}   My guess is that there should be a way to replace \quad with something that works like a \absoluteposition or \tabto? Is there any onboard way to do this in Latex  I'm also using the sectsty package for some other reason but couldn't find anything about this in the documentation.
123577
I like to recreate the layout of an official template, in order to get rid of Word. Because the template is from the government, I must recreate it 1:1.   In the end, the document should look like this:  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et  accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata.  1.      First Section Title         Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod         tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At         vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren.  1.1     First Subsection Title         Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod         tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At         vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren.  1.1.1   First Subsubsection Title         Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod         tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At         vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren.   My main problem is the spacing between the section numbers and the titles. All section titles must begin on a fixed indent defined by the template, so the spacing between the numbers and the titles must be dynamic. With plain latex and titlesec I was only able to specify a fixed space. I also tried the memoir package with hangsecnum, but with this option the numbers will be aligned left, also with a fixed space between the section numbers and the title.   Would it be possible to give me a hint how to create such a layout?
45598
\documentclass[11pt,a4paper]{article}     \usepackage[T1]{fontenc}     \usepackage{lipsum}     \usepackage{tocloft}     \begin{document}      \tableofcontents     \thispagestyle{empty}         \newpage      \section{Preface} %want section number to be 0     \thispagestyle{empty}         \pagenumbering{roman}     \lipsum[1-3]     \newpage      \section{Start From Here}     \lipsum[1-5]      \section{And So On...}     \lipsum[1-5]     \end{document}      How do I get section numbering to start at 0?   Edit: I know I can do \section*{Preface}, but that removes it from the ToC, which isn't what I want.
73447
I am trying to implement a style to name tables and figures depending on the section for a thesis and can't figure out how to do it with LaTeX.  In the end it should look like this:   and my document:  \documentclass{article}  \begin{document}  \section{Start} Start text \section{Middle} Middle text \begin{table}[h]     \centering     \begin{tabular}{l}     first table\\     \end{tabular} \caption{A normal table} \end{table}  \section*{Supplemental}  \begin{table}[h]     \centering     \begin{tabular}{l}         table in supplemental part\\     \end{tabular} \caption{This should read: ``Table S1: caption text''} \end{table}  \end{document}      I don't want to change the naming permanently, it should continue normally in the next chapter. Is there any easy way to accomplish something like this?
7538
In the following code, I need to use +/- where I have used it, and plus/minus where I have used it.  \documentclass{amsart} \usepackage{lipsum} \usepackage{calc} \parindent=0 pt \parskip=12 pt plus 0 pt minus 0 pt \def\headsep{25pt} \newcommand{\LAYOUT}[5]{%   \setlength{\hoffset}{0pt}   \setlength{\voffset}{0pt}   \setlength{\topmargin}{#1 - 1in - \voffset - \headheight - \headsep}    \setlength{\oddsidemargin}{#2 - 1in - \hoffset}   \setlength{\evensidemargin}{\oddsidemargin}   \setlength{\textheight}{#3}   \setlength{\textwidth}{#4}   \setlength{\marginparwidth}{#5} } \newcommand{\FULLPAGE}{\LAYOUT{1in}{1in}{9in}{6.5in}{0.75in}}  \FULLPAGE \begin{document} \lipsum[1-10] \end{document}   If I replace the plus and minus in line 5 with + and - I get an enigmatic  "missing begin{document}" error.    If I replace the minus's in lines 10-11 with "-" I get an equally enigmatic error:  "Missing number, treated as zero. Illegal unit of measure (pt inserted)."   Can somebody please explain when one can use +/- and when one can use plus/minus?  Presumably there's a good reason why latex's error messages are so completely mystifying, and why inconsistencies like these keep appearing? It's really hard to explain to my coauthors, who regularly complain that latex is the most infuriating program ever devised by mankind.  Thanks very much for any advice!   Leo
78050
During the last phase of layout I frequently get a single line or two on a separate page. Rather then pulling the whole paragraph on that last page I would like to "squeeze" the lines on the previous page a bit.  Is there a way to mark the current page to be squeezed a bit if necessary, but let LaTeX reset this marking automatically after the page is done?
9387
I am creating table in LaTeX and I need to get the text to perform line break automaticaly when it's too long. And if possible, I'd like to get the text alignment to the left. Is it possible to handle this situation?
30907
Some lines in my document are italicized, with no spaces between words, and continue after the edge of the document. The rest of the document is fine. Here is the beginning:  \documentclass[runningheads]{llncs} \usepackage{graphicx} \usepackage{float} \usepackage{tikz} \usetikzlibrary{arrows} \usepackage[explicit]{titlesec} \usepackage{amsmath,amssymb} % define this before the line numbering. \usepackage[width=122mm,left=12mm,paperwidth=146mm,height=193mm,top=12mm,paperheight=217mm]{geometry} \begin{document} \pagestyle{headings}   And then, for example:   \subsection{b)}\\  \\  Given that h(n) is admissible, the algorithm will be optimal for:\\  f(n)=(2-w)[g(n) + w/(2-w)h(n)]  \\  when w/(2-w) \leq 1, that is when w \leq 1 the algorithm is optimal.\\ It        behaves like an A* algorithm following the heuristic:  f(n) = g(n) + w/(2-w) h(n)   And below is the result:    Any help is appreciated!
93251
I've a document, where I use the glossaries package to manage acronyms for me. Sometimes, I use a \gls{} command inside a section heading, and I have defined page headers to have the current section heading. However, when a section heading contains a \gls{} command, the headings for those pages render incorrectly, with what appears to be some code from the glossaries package appearing instead. MWE: \documentclass[a4paper, 12pt]{report} \usepackage[toc,xindy,nonumberlist,acronym,shortcuts]{glossaries} \usepackage{fancyhdr} \begin{document} \pagestyle{plain} \pagestyle{fancyplain} \renewcommand{\sectionmark}[1]{\markboth{\thesection #1}{}} \newacronym{ecg}{ECG}{electrocardiogram} \chapter{test} \gls{ecg} is ecg \pagebreak \section{\gls{ecg}} waffle here \end{document}  I should note, I am compiling this with TL2011, but I have also had a friend with TL2013 test it.
101373
If I have a document like this:  \documentclass[landscape, 12pt]{report}  \usepackage[landscape]{geometry}  \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc}  \usepackage{amsmath, amssymb, graphics, setspace} \newcommand{\mathsym}[1]{{}} \newcommand{\unicode}[1]{{}} \newcounter{mathematicapage}  \begin{document}    \begin{equation}\label{Equation:Naive_Bayes_Classifier}     P\left(H_h|E_1,E_2,\ldots ,E_e,\ldots    E_{\mathbb{E}}\right)=\frac{P\left(H_h\right) P\left(E_1|H_h\right)    P\left(E_2|H_h,E_1\right) \text{$\ldots $P}     \left(E_e|H_h,E_1,E_2,\ldots ,E_{e-1},E_{e+1} \ldots, E_{\mathbb{E}}\right) \text{$\ldots    $P}     \left(E_{\mathbb{E}}|H_h,E_1,E_2,\ldots ,E_{\mathbb{E}-1}\right)}{ P\left(E_1,E_2,\ldots,E_e, \ldots    ,E_{\mathbb{E}}\right)} \end{equation} \end{document}   How can I auto adjust this equation to appear in the entire page, using all horizontal space? (Without badboxes or smaller than the width of the page?)  If is there a kind of scale to use in equations, giving explicity how greater the equation should become, this solver my problem too.
32176
I'm having a bit of trouble with section numbering. When I use \section{} it starts at 0.1 rather than 1.0.   Here's my preamble:   \documentclass[12pt]{report} \usepackage{hyperref} \usepackage[landscape]{geometry} \usepackage{wallpaper} \usepackage{fullpage}   Any thoughts?
122882
I use a LaTeX template which center aligns all section titles. I want to left align these section titles but I do not know how. I tried  \begin{flushleft} \section{\textbf{Introduction and Background}} \end{flushleft}   but it has no effect on the section title (i.e., it is still centered). I tried   \begin{flushleft} \textbf{Introduction and Background} \end{flushleft}   and it is left aligned the word "Introduction and Background" but it is no longer a section title and thus the numbering using section number are all messed up.   I am new to LaTeX so please keep it simple.
66321
I need to display the chapter name with the \chapter* command to the left side of the header. This is one example of what I tried:      \documentclass[12pt,a4paper,oneside]{book}     \usepackage{fancyhdr}     \pagestyle{fancy}     \lhead{}     \chead{}     \rhead{\fancyplain{}{\textit{\leftmark}}}      \begin{document}     \chapter*{\centerline{Chapter Name}}      \end{document}   How can I do this?
116099
With LaTeX, I would like to set all my section titles in small capitals but I need the \textsc to be 'cancelled' in my table of content. Is that possible somehow ?  I currently do this :   \section[Introduction]{\textsc{Introduction}}   Is there a automatic way?
64380
So far, I've been trying code from various examples, and landed with:  \usepackage(titlesec) \titleformat{\section}[block]{\bfseries}{\thesection.}{1em}{}  \titleformat{\subsection}[block]{\hspace{2em}{\thesubsection}{1em}{} \titleformat{\subsubsection}[block]{\hspace{3em}}{\thesubsubsection}{1em}{}   to indent the headers and their numbering. But I don't know how to get the content within each section/subsection/subsubsection to have an indented margin. In other words, I'd like to have the section/subsection/subsubsection content to be in line with it's indented header.  Is titlesec able to do this? I've been battling with the documentation, but I think they assume some more tex knowledge than I have as everything I try doesn't seem to work.  I'd like to use titlesec because, according to my understanding, I won't have to make any further adjustments while writing the document. I'm using pandoc to generate that part from markdown, so I can't have inline formatting on my sections.  Added the following as per comment requests:  Here is what I have:    And, here is what I would like:    Or, I would like something like this:
19826
How can I format the header on every page displaying the title of the current chapter? In one of my chapters the title is too long so it is running out of the page.  Here's a minimal example of my document:  \documentclass[bibliography=totoc,version=first,listof=totoc,BCOR5mm,DIV12,index=totoc,numbers=noenddot]{scrbook} \usepackage{bibgerm} \usepackage[english,german]{babel} \usepackage[utf8]{inputenc} \usepackage{a4wide} \usepackage{wrapfig} \usepackage{caption}  \begin{document} \frontmatter \mainmatter \chapter{Very long title} \backmatter \end{document}   Here's a screenshot of my problem:
62579
With markdown, you can use some dashes for headings. For example, this: Hello ---- this is some other text  renders as this: Hello this is some other text This is fine and works well. When I want to quote that text is when the problem arises, since this Markdown: &gt; Hello &gt; ---- &gt; this is some other text  When written down shows well in the preview but not when posted:  Hello this is some other text   As an example, see an screenshot of the preview:    and a screenshot of the posted content, where the ---- becomes a &lt;hr&gt;:  Note a similar bug I also reported: .
56458
When typesetting an article documentclass, the sections appear as bold in the table of contents, with no leading dots. I would like to change these to non-bold, and insert some leading dots. I tried the following, but it seems to be ignored. Any ideas?  % change section headers and page numbers to normal instead of bold font \renewcommand{\cftsecfont}{ \normalfont } \renewcommand{\cftsecpagefont}{% \normalfont } % use leader dots with section headers \renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}