[tex4ht] [bug #136] #line in output

2016-06-01 Thread Karl Berry
Follow-up Comment #2, bug #136 (project tex4ht):

hi deimi - wow, that is great!  the only (trivial) thing is that the strings
should start with "#line ", rather than "// line".  #line is what the C
preprocessor recognizes.

Can you send me the changes you made to insert those?
(That is, assuming you're ok with them being distributed under the LPPL.)

Just wondering -- is there any chance that perhaps the same code could be done
for the generated .4ht and other files?  (%line 777 "tex4ht-4ht.tex", etc.)
The derivation is so complex, it's often quite hard, at least for me, to track
back a given line to the source.

thanks!



___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



Re: [tex4ht] babel breaks quotes in HTML code (Re: TOC as an HTML aside)

2016-06-01 Thread Hans Georg Schaathun
On Wed, Jun 01, 2016 at 10:10:33PM +0200, Hans Georg Schaathun wrote:
> On Wed, Jun 01, 2016 at 01:13:31PM +0200, Daniel Becker wrote:
> > here is another example:
> > 
> > Website: http://www.jpberlin.de/d.becker/
> > TeX-File: http://www.jpberlin.de/d.becker/website.tex
> > Configuration: http://www.jpberlin.de/d.becker/htlatexconf.cfg
> 
> Thanks a lot, Daniel.  This is exactly the kind of solution
> I was looking for.
> 
> Unfortunately, I run into a nasty problem when I switch language
> for babel.  Changing «english» for «nynorsk» as babel option,
> the HTML for a TOC entry in the left hand navigation becomes
> (for example) this:
>  oc-subsection\T1\guillemotright  href="links.html#x16-270003.2" id="QQ2-16-28">Links
> 
> Evidently, there is some smart mechanism which tries to fix the
> quotation marks.  Does anyone know how to fix this?  I don't
> quite understand why this is a problem in these particular tags,
> and not other instances of quotes in HTML attributes ...

I found a solution.
The following lines prevents the active inch mark ("):
\RequirePackage[shorthands=off]{babel}

However, I suppose there might be a better solution.


-- 
:-- Hans Georg


[tex4ht] babel breaks quotes in HTML code (Re: TOC as an HTML aside)

2016-06-01 Thread Hans Georg Schaathun
On Wed, Jun 01, 2016 at 01:13:31PM +0200, Daniel Becker wrote:
> here is another example:
> 
> Website: http://www.jpberlin.de/d.becker/
> TeX-File: http://www.jpberlin.de/d.becker/website.tex
> Configuration: http://www.jpberlin.de/d.becker/htlatexconf.cfg

Thanks a lot, Daniel.  This is exactly the kind of solution
I was looking for.

Unfortunately, I run into a nasty problem when I switch language
for babel.  Changing «english» for «nynorsk» as babel option,
the HTML for a TOC entry in the left hand navigation becomes
(for example) this:
Links

Evidently, there is some smart mechanism which tries to fix the
quotation marks.  Does anyone know how to fix this?  I don't
quite understand why this is a problem in these particular tags,
and not other instances of quotes in HTML attributes ...

TIA
-- 
:-- Hans Georg


Re: [tex4ht] TOC as an HTML aside

2016-06-01 Thread Daniel Becker
Hallo -

>> I would like to see the table of contents of my TeX document displayed
>> as some kind of navigation menu, probably as an HTML aside in a fixed
>> position on the side of the page.  I am sure I can hack it up with a
>> bit of scripting, but I am not sure which is the best approach to start.
>> 
> 
> you can create such navigational menu using simple CSS:

here is another example:

Website: http://www.jpberlin.de/d.becker/
TeX-File: http://www.jpberlin.de/d.becker/website.tex
Configuration: http://www.jpberlin.de/d.becker/htlatexconf.cfg

Command(s):
pdflatex --shell-escape website.tex

bibtex website.tex

pdflatex --shell-escape website.tex

pdflatex --shell-escape website.tex

htlatex website.tex "htlatexconf"

Hope this helps -

Daniel


Re: [tex4ht] TOC as an HTML aside

2016-06-01 Thread Michal Hoftich
Hi Hans,

>
> I would like to see the table of contents of my TeX document displayed
> as some kind of navigation menu, probably as an HTML aside in a fixed
> position on the side of the page.  I am sure I can hack it up with a
> bit of scripting, but I am not sure which is the best approach to start.
>

you can create such navigational menu using simple CSS:

\Preamble{xhtml}
\Css{body{max-width:40em;margin:0 auto;}}
\Css{.tableofcontents{float:left;width:10em;margin-left:-12em;position:fixed;}}
\Css{@media (max-width:64em){
   .tableofcontents{float:none;width:100\%;margin-left:0;position:normal;}}}
\begin{document}
\let\contentsname\empty
\EndPreamble

This will make centered document with sidepanel, which will collapse
when the browser windows is too small.

With scripting, you can create something more interesting see:

https://github.com/michal-h21/tex4ht-enhanced-web
http://tex.stackexchange.com/a/239944/2891

Best regards,
Michal


[tex4ht] [bug #136] #line in output

2016-06-01 Thread Deimantas Galčius
Follow-up Comment #1, bug #136 (project tex4ht):

Hi Karl, 

I'm attaching two files: tex4ht.c and tex4ht-srclineno.c. Both are generated
from sources; the latter is with line numbers. Please can you check if it is
something that you want?

Thank you, 
---deimi 

(file #237)
___

Additional Item Attachment:

File name: 136.tar.gz Size:104 KB


___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



[tex4ht] TOC as an HTML aside

2016-06-01 Thread Hans Georg Schaathun
Hi,

I would like to see the table of contents of my TeX document displayed
as some kind of navigation menu, probably as an HTML aside in a fixed
position on the side of the page.  I am sure I can hack it up with a
bit of scripting, but I am not sure which is the best approach to start.

Before I start fiddling on my own, has anyone done it before?  Are there
any good examples I could look at?

TIA
-- 
:-- Hans Georg