🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #12109

c++2latex: problems with # in comments

#12109
From: Andreas Huck
Date: Fri, 06 Mar 1998 00:00
34 lines
1566 bytes
Hi!

I got a problem with c++2latex. It doesn't translate the 
"carpet character" # if it's written somewhere in a comment.
For example:

  // #nodes/leaves in subtree

is translated to

\hspace*{2\indentation}$/$$/$ #nodes$/$leaves in subtree\mbox{}\\

which produces an error because # is not writen as \# and 
therefore interpreted as macro parameter by latex:

! You can't use `macro parameter character #' in horizontal mode.
l.152 \hspace*{2\indentation}$/$$/$ #
                                     nodes$/$leaves in subtree mbox{}\\

The newest version of c++2latex I found is from 1995 and I had 
to do some minor changes to the source to make it compatible with
stdlib.h. I used the distribution from:

http://tug2.cs.umb.edu/ctan/tex-archive/support/C++2LaTeX-1_1pl1/

with  flex version 2.5.4.

A solution like "query-replace" in the tex file produced by c++2latex
is not what I am searching for :-)

Thanks for hints.
-- 
Andreas.Huck@mchp.siemens.de
Technical Details
Message-ID: <34FFEF62.2D98E207@mchp.siemens.de>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f9e16,3593b011639bff17,start
X-Google-Attributes: gidf9e16,public
X-Google-Thread: 10ba33,3593b011639bff17,start
X-Google-Attributes: gid10ba33,public
From: Andreas Huck <Andreas.Huck@mchp.siemens.de>
Subject: c++2latex: problems with # in comments
Date: 1998/03/06
Message-ID: <34FFEF62.2D98E207@mchp.siemens.de>
X-Deja-AN: 331387051
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Organization: Siemens Inc.
Newsgroups: comp.text.tex,gnu.g++.help