New hot document: Tips & Tricks
In txt2tags, you ever wondered how to:
- Make strike, subscript or superscript text?
- Insert the ALT text for images?
- Create a custom DIV or SPAN?
- Make a line break <BR>?
- Load extra LaTeX packages?
- Make colored code snippets?
Fear don’t. Txt2tags Tips & Tricks!
Leave a comment to share your own tip or suggest a new!
September 25, 2006 at 5:04 pm
very useful! :-)
typo found: section “8. Config Overview” you wrote “thier” meaning “tier”… ;-)
September 25, 2006 at 6:30 pm
Ouch! Fixed, thanks :)
September 27, 2006 at 7:43 am
Hi Aurélio,
I prefer to use pgf to incude pictures in my latex documents, so these q&d achieve the conversion :
%!postproc(tex): ‘(\usepackage{amsfonts,graphicx,url})’ ‘\1\n\usepackage{pgf}’
%!postproc(tex): ‘includegraphics{(.*).png}’ ‘pgfimage[width=\linewidth]{\1}’
PS: I don’t forgot you, I will soonly publish my ktxt2tags app. But I’m a bit busy currently :-)
September 27, 2006 at 11:15 am
Hi bobuse,
The first postproc you can change by a single:
%!style(tex): pgf
Ok, tell me any news on the K world :)
September 27, 2006 at 12:53 pm
Thank you for this tip ;-)
November 16, 2006 at 2:49 pm
I have been trying very hard to do something like
%!preproc: ‘DEF(.*)DEF’ [\1 http://www.google.com/search?q=define:\1]
But it just doesn’t work and I don’t know why.
Could you explain why? It break the web or don’t add the \1 on the link (I tried many things).
Why I can do on preproc ?
Finally I got success on this way:
%!postproc(html): ‘–([^ ].*?)–’ <a HREF=”http://www.google.com/search?q=define:1″ rel=”nofollow”>\1</a>
So –css– is converted to a link to google define css
I think is useful.
Cumprimentos.
November 18, 2006 at 7:33 am
Hello Ruben,
The problem is that the “:” char is not recognized by txt2tags as valid for URLs, inside the form data (after the “?”). If you just change from PreProc to PostProc on your first rule, it will work:
%!postproc(html): 'DEF(.*?)DEF' '<a href="\1">\1</a>'But your second filter is fine.
April 25, 2007 at 10:09 am
Thank You
November 17, 2007 at 11:11 am
Hello Aurelio !
no need for new translation ?
I suggest a tip for html generation pages.
I worked in iso8859-1 (in use in France) for my website.
Now installing Debian Etch : all is in UTF8. This is fully incompatible for my website.
People working with 2 different codes depending of their OS
So now I generate ´ ù aso with a translation table :
a line for each character :
%!preproc(html) : “è” “è”
I already need another command
%!postproc(html) : “&” “&”
because I got è without it.
And I put these commands in the RC file.
Seems to work
Bye
Claude
November 18, 2007 at 6:17 pm
Hello Claude!
In this case, you must use the %!encoding setting on every document, reflecting the source file encoding (ISO or UTF).
Nice to see you here
May 12, 2008 at 6:33 am
Remove latex title and title page.
–no-header removes the title but then its not a valid self
contained latex file any more. Leaving the first line of your
input file blank and putting this on the second line does it:
%!postproc(tex): \\maketitle %\maketitle
Given the minimalist philosophy of txt2tags I think this should
be easier to do, e.g. maybe: txt2tags –no-title -t tex input.t2t