[pdftex] [OT] latex questions

Vladimir Volovich vvv at vsu.ru
Wed Feb 5 16:54:17 CET 2003


"TTH" == The Thanh Han writes:

 TTH> 1) codes between \begin{example} ... \end{example} are not
 TTH> typeset properly. If I have some vietnamese characters in the
 TTH> examples, they are typeset under the caret notation like
 TTH> ^^be. Using tcx instead of inputenc fixed this problem, however
 TTH> I wonder why I cannot use inputenc.

fancyvrb.sty is not properly interacting with inputenc. i used this
patch to solve the problem:

--- fancyvrb.sty.orig	Mon Apr  2 20:41:53 2001
+++ fancyvrb.sty	Wed Jan 22 15:12:32 2003
@@ -1233,6 +1233,17 @@
     \def\FV at Space{\space}%
     \FV at DefineTabOut
     \def\FV at ProcessLine{\immediate\write\FV at OutFile}%
+    \def\@inpenc at loop##1##2{%
+      \@tempcnta`##1\relax
+      \loop
+        \catcode\@tempcnta12
+      \ifnum\@tempcnta<`##2\relax
+         \advance\@tempcnta\@ne
+      \repeat}%
+    \@inpenc at loop\^^A\^^H%
+    \@inpenc at loop\^^K\^^K%
+    \@inpenc at loop\^^N\^^_%
+    \@inpenc at loop\^^?\^^ff%
     \immediate\openout\FV at OutFile #1\relax
     \let\FV at FontScanPrep\relax
 %% DG/SR modification begin - May. 18, 1998 (to avoid problems with ligatures)

it does not solve the problem in full, but it was sufficient for
e.g. making the russian translation of lshort work.

i can rewrite the patch to be 100% correct, but last time i was
interacting on this issue with the fancyvrb authors, they refused to
make changes to fancyvrb related to handling 8-bit characters.

 TTH> 2) how can I have bookmarks displayed closely to the original
 TTH> text, ie if a character is avail. in PDFDocEncoding then it is
 TTH> written as is, otherwise an accented letter should be replaced
 TTH> by its base letter. For examle, if \~\i is not in PDFDocEncoding
 TTH> then it should be written out as i. hyperref seems to ignore
 TTH> characters that are not in PDFDocEncoding.

i think it will be better to use the option "unicode" of hyperref,
then all characters are supposed to be translated to bookmarks
properly.

Best,
v.



More information about the pdftex mailing list