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

-H option removes Header and EOD tags #120

Open
GoogleCodeExporter opened this issue Apr 18, 2015 · 6 comments
Open

-H option removes Header and EOD tags #120

GoogleCodeExporter opened this issue Apr 18, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

Run :
./txt2tags -H -t targetWithHeaderAndEODTags sample.t2t

The output file miss the Header and EOD tags.

It's crazy, this is an incredibly big bug !! Or my point of view is crazy for 
other people ! For me :

It's OK to remove the header informations :
<H1>TXT2TAGS SAMPLE</H1>
<FONT SIZE="4"><I>Aurelio Jargas</I></FONT><BR>
<FONT SIZE="4">06/24/2011</FONT>
Or the footer ones :
<!-- html code generated by txt2tags 2.6.679 (http://txt2tags.org) -->
<!-- cmdline: txt2tags -t html sample.t2t -->

But not the other header tags :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META NAME="generator" CONTENT="http://txt2tags.org">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
or the footer ones :
</BODY></HTML>

Who wants invalid documents ? 

Original issue reported on code.google.com by fgalla...@gmail.com on 25 Jun 2011 at 3:34

@GoogleCodeExporter
Copy link
Author

So, I understand the %!include concept :
%!include(html): ''header.html'
%!include(html): ''footer.html'

But what about people who just wants easily switch between generating two valid 
documents, one with header and the other without ?
I think we probably need one option for that.
And the name "--no-headers" is particularly ambiguous since in txt2tags 
semantic, headers are obviously the three first lines of the document, with 
specific informations.

Original comment by fgalla...@gmail.com on 25 Jun 2011 at 3:57

@GoogleCodeExporter
Copy link
Author

It's not only useful with the %!include option. Most of the website I create 
are with this --no-headers option, for the simple reason that the "real" 
headers are in my index.php file: my txt2tags files won't need the html headers 
in the target they generate because those targets will be included in the php 
file.

For example:
http://ifiction.free.fr/articles_inform7.php
is included into:
http://ifiction.free.fr/index.php?id=articles_inform7

As for people who want to remove the txt2tags "headers", they can simply remove 
them by hands, or use a postproc rule to delete them in the output.

I think this issue could be closed with a "won't fix".


Original comment by eforg...@gmail.com on 26 Jun 2011 at 9:45

  • Added labels: Priority-Medium, Type-Other
  • Removed labels: Priority-Critical, Type-Defect

@GoogleCodeExporter
Copy link
Author

When I talk of %include concept, it was a general name for txt2tags and 
non-txt2tags classical usage of header and footer.

I agree with you on the point that it's easy to remove the 3 lines of header 
manually.
But txt2tags should makes easy (not manual) most of the common uses.
So the question is : "Is it a common use, a need for users ?". Maybe not, but I 
would like to have one or two advices in more before close.

Finally, there is still the problem of the ambiguous name : --no-headers = no 
header and no footer (in a quite HTML centric point of view), and is not 
specifically related to the 3 txt2tags headers, but remove them because they 
are part of THE header. It's quite confusing, isn't it ?

Original comment by fgalla...@gmail.com on 26 Jun 2011 at 2:36

@GoogleCodeExporter
Copy link
Author

Florent, to remove the headers from the source file (first three lines), ust 
leave the first line of the source empty. It will be a headless txt2tags source 
file. When converting this file, you'll get the HTML headers as in your first 
request.

But you're right, the --no-headers name is confusing since the footer is also 
removed. A best name would be --body-only.

I think now that templates are here, all this mess will vanish. In the template 
the user specify exactly wich tags he wants to use. Than maybe --no-headers 
could be better renamed to --no-template. Makes sense, since with no template, 
all that we have left is the document BODY.

But boy, everyday I regret more and more about the "first three lines" idea. 
It's simple when you actually *have* 3 lines of headings. Other than that, it's 
just confusing.

Title: Foo bar
Author: John

as the first lines would be a better choice.

Original comment by aureliojargas@gmail.com on 21 Dec 2011 at 10:34

@GoogleCodeExporter
Copy link
Author

About the first three lines : the other good soft, Pandoc, has it too !

Original comment by fgalla...@gmail.com on 23 Dec 2011 at 6:12

@GoogleCodeExporter
Copy link
Author

The conversion is not so easy, because there is not two worlds, the one for the 
documents with header, and the other for the documents without header. You have 
a document with an header, and sometime you want it headless :

1) leave the first line empty
2) remove the 3 old first lines : you don't want them inside your doc ! -> you 
should save the header somewhere, it's work !
2bis) don't remove them : it's ugly AND you lose all the %%config area ! -> 
doesn't work at all !

Original comment by fgalla...@gmail.com on 28 Dec 2011 at 11:40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant