Comments (2)
Can you paste the raw email text.
from email_reply_parser.
@danielchatfield, these are the raw email texts:
+++ Tom Brewe [Nov 15 14 10:34 ]:<br>
>Although I have set `mainlang=german` (or ngerman), the table of contents still renders as *Contents* instead of *Inhaltsverzeichnis*<br>
>Same for figures (*figure* instead of *Abbildung*)<br>
>I am using xelatex as latex engine. Is there anything I am missing?<br>
>Can I overwrite the strings in the template if it doesn't work natively?<br>
<br>
There is nothing in the template that says "Contents" -- that is<br>
generated by xelatex itself. This seems to be a LaTeX issue; I am<br>
not sure what is going on. (I assume you're using an up-to-date<br>
version of pandoc?)<br>
<br>
Try creating a simple latex file (`pandoc -s -t latex -o my.tex --toc`)<br>
and then compiling it manually with xelatex. If the latex looks right<br>
to you, and the answer isn't revealed by xelatex's error log, then<br>
you might try on tex stack exchange.
On Oct 18, 2014, at 11:58 AM, Pablo Rodr=C3=ADguez <notifications@github.=
com> wrote:
> Given the default header ID names, you could just use "TOC" as the head=
er, although in that case, you may want the TOC section title to be empty=
.
> =
> Your method is simpler, but if the user wants to have the title specifi=
ed in the YAML metadata, it has to be typed again. If the title changes (=
what is often the case when you=E2=80=99re writting a book), it has to be=
replaced twice. I think this should be avoided.
> =
> A compromise solution would be to repeat the title from YAML metadata w=
ith the following:
> =
> # toc {#toc}
Well, the IDs are not case sensitive as I recall, so that is equivalent t=
o
# toc
since Pandoc will give it the ID of "#toc". I used #TOC since that's the =
ID pandoc assigns to the section it generates.
Anyway, I think that the compromise sounds good. There could be a YAML va=
riable, perhaps, "toc-title" that sets the title (if present) in the case=
where you just name the section "toc" or "TOC":
---
toc-title: Contents
...
# toc
# Section 1
[...]
eqivalent to:
# Contents {#toc}
# Section 1
[...]
> If you decided that the generated TOC would replace any Markdown conten=
t in this section, this could actually allow you to manually make a TOC i=
n the source file for plain text readability (which you would have to mai=
ntain) that would get replaced with the hyperlinked one:
> =
> [I must confess I=E2=80=99m not sure I get it.]
> =
> Do you really think that it makes sense to write a table of content tha=
t doesn=E2=80=99t get in the final document?
> =
I worded that a wrong when I said "which you would have to maintain". You=
wouldn't have to manually edit that section; you would manually run pand=
oc to make a new markdown version where it replaced that section with the=
new markdown toc text. It's probably not worth it since you'd have to ru=
n pandoc to convert your markdown file to a markdown file and give severa=
l options depending on your preferences in order to not change the style:=
pandoc -s --toc --to=3Dmarkdown --atx-headers myfile.md -o myfile.md
Currently, Pandoc will insert the generated toc content into a section wi=
th the ID of #toc now, but for markdown format output, it doesn't get put=
into a section like with HTML. =
For example, the source:
# Section 1
Some stuff.
# Section 2
More stuff.
If you could designate the toc section and that section's content was rep=
laced with the generated toc content, you could output to markdown format=
and Pandoc would put the toc in that section with the #toc ID, and that =
markdown source could be run back through Pandoc again to get the toc con=
tent updated without duplicating the toc in the resulting output. =
For the example source, ` pandoc --toc -s --to=3Dmarkdown --atx-headers` =
might output:
# toc
- Section 1
- Section 2
# Section 1
Some stuff.
# Section 2
More stuff.
Then, if we edit this file and add a section 3:
# Section 3
Yet more stuff.
then outputs with `--toc` would replace the "# toc" section with the upda=
ted content, with the markdown version becoming:
# toc
- Section 1
- Section 2
- Section 3
# Section 1
Some stuff.
# Section 2
More stuff.
# Section 3
Yet more stuff.
rather than duplicating the toc as it would now. =
We could use this as our new source file if we wanted. The benefit here w=
ould be having a readable toc at the top that we wouldn't have to manuall=
y update or remove when we edit the file. In other words, at this point, =
passing the result again through `pandoc --toc -s --to=3Dmarkdown --atx-h=
eaders` repeatedly would result in the same output.
Also, the toc section could also be removed if the --toc option is not us=
ed.
As you mention, you could also have the toc section title set from a YAML=
variable like, say, "toc-title" as well.
This part was just a little idea that your original post made me think of=
and now seems like it's not really that useful for the work involved.
-Ryan
from email_reply_parser.
Related Issues (20)
- Support for other languages? HOT 2
- uninitialized constant Api::V1::PostsController::EmailReplyParser
- This needs a decent website HOT 1
- Failure to strip replies from emails with parents lacking quote '>' char, e.g. Yahoo Mail. HOT 3
- Dutch end of email is not detected correctly HOT 1
- Question: Python port HOT 4
- Not detecting quoted content in emails coming from Mail.app HOT 2
- Emails from Microsoft Outlook ios app get parsed wrong HOT 4
- Gmail's signature is not being detected HOT 1
- Multi-line reply headers not recognized if quoted ones are found below HOT 1
- hidden quotes
- Issue with parsing when two consecutive replies are on email from same person HOT 1
- Signature regular expression
- Signatures of replies sent by Google Inbox are not detected HOT 2
- Signatures are not found when using Machine Learning
- String that makes email_reply_parser hang forever(?) HOT 1
- Microsoft Outlook headers not being detected in replies HOT 2
- Kind regards HOT 1
- If emal body content > at the beginning of the line lib ignored the line
- issue in parsing email reply for html content HOT 1
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 email_reply_parser.