Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format pdflatex --sections_up to prompt sections to chapters #16

Closed
schuang opened this issue Mar 8, 2015 · 1 comment
Closed

format pdflatex --sections_up to prompt sections to chapters #16

schuang opened this issue Mar 8, 2015 · 1 comment

Comments

@schuang
Copy link

schuang commented Mar 8, 2015

When I use 7 = for section titles in .do.txt source and run doconce format pdflatex --sections_up, \section{} in the .tex file is promoted to \chapter{} as expected, but \documentclass still uses article (not book), causing pdflatex command to fail (e.g. article does not support \chapter)

I could get around this problem by some preprocessing, but it would be great if article can also be promoted to book when 7 = is prompted to 9 by --sections_up, to avoid pdflatex errors.

Test:

$ cat intro.do.txt 
======= Introduction =======

This is the intro.

$ doconce format pdflatex intro --sections_up
translating doconce text in intro.do.txt to pdflatex
transforming sections: section to chapter...
transforming sections: subsection to section...
transforming sections: subsubsection to subsection...
output in intro.p.tex
$ doconce ptex2tex intro
output in intro.tex
$ cat intro.tex
...<snipped>
\documentclass[%
twoside,                 % oneside: electronic viewing, twoside: printing
final,                   % or draft (marks overfull hboxes, figures with paths)
10pt]{article}
...<snipped>
\chapter{Introduction}
@hplgit
Copy link
Owner

hplgit commented Mar 8, 2015

Fixed!

@hplgit hplgit closed this as completed Mar 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants