LaTeX forum ⇒ Fonts & Character SetsLettrine-Babel Topic is solved

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Nello
Posts: 5
Joined: Sat Aug 29, 2015 1:35 pm

Lettrine-Babel

Postby Nello » Sat Aug 29, 2015 1:53 pm

I don't Know why, but every time I compile (pdftexify) using both lettrine and babel packages, I get the error "! Missing number, treated as zero". If I remove babel everything works as it should. Unfortunately in my document I need the babel package. Any solution?
Thanks

Tags:

User avatar
Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sat Aug 29, 2015 2:28 pm

Welcome,

with the amount of information given, the matter is non-reproducable.

Please provide a minimal working example that shows the problem.

  1. \documentclass[english]{article}
  2. \usepackage{babel}
  3. \usepackage{lettrine}
  4. \usepackage{blindtext}
  5. \begin{document}
  6. \lettrine{N}{ello} \blindtext
  7. \end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Nello
Posts: 5
Joined: Sat Aug 29, 2015 1:35 pm

Postby Nello » Sat Aug 29, 2015 2:54 pm

This is the preamble I use:

  1. \documentclass[dvips,a4paper,greek,hebrew,italian,10pt]{book}
  2.  
  3. \usepackage{ucs}
  4. \usepackage[utf8]{inputenc}
  5. \usepackage[LGR,HE8,T1]{fontenc}
  6. \def\HeblatexEncoding{HE8}
  7. \def\HeblatexEncodingFile{he8enc}
  8.  
  9.  
  10. \makeatletter
  11. \let\l@hebrew\l@nohyphenation
  12. \makeatother
  13.  
  14.  
  15. \usepackage[greek,hebrew,italian]{babel}
  16. \usepackage{float}
  17. \usepackage{subfigure}
  18. \usepackage{pstricks}
  19. \usepackage{caption}
  20. \usepackage[pdftex]{graphicx}
  21. \usepackage{epstopdf}
  22. \usepackage{aurical}
  23. \usepackage{wesa}
  24. \usepackage{inslrmin}
  25. \usepackage{uncial}
  26. \usepackage{gfsartemisia-euler}
  27. \usepackage{aurical}
  28. \usepackage{amsmath}
  29. \usepackage{amssymb}
  30. \usepackage{eufrak}
  31. \usepackage{psfrag}
  32. \usepackage{longtable}
  33. \usepackage{array}
  34. \usepackage{xcolor}
  35. \usepackage{colortbl}
  36. \usepackage{stmaryrd}
  37. \usepackage{mathbbol}
  38. \usepackage{bm}
  39. \usepackage{multirow}
  40. \usepackage{lscape}
  41. \usepackage{caption}
  42. \usepackage{rotating}
  43. \usepackage{makeidx}
  44. \usepackage{refstyle}
  45. \usepackage{cjhebrew}
  46. \usepackage{hebfont}
  47. \usepackage{fancyhdr}
  48. \usepackage{lgreek}
  49. \usepackage{multicol}
  50. \usepackage{cancel}
  51. \usepackage{setspace}
  52. \usepackage{fix-cm}
  53. \usepackage{textcomp}
  54. \usepackage{anyfontsize}
  55. \usepackage{titlesec, blindtext, color}
  56. \usepackage{mathtools}
  57. \usepackage{blindtext}
  58. \usepackage{lettrine}
  59.  
  60.  
  61.  
  62. \begin{document}
  63. \lettrine{N}{ello} \blindtext
  64. \end{document}

User avatar
Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sat Aug 29, 2015 4:43 pm

At a first glance, this seems to be a bug. I have reached out to maintainers.

  1. \documentclass{book}
  2. \usepackage{lettrine}
  3. \usepackage[hebrew,italian]{babel}
  4. \usepackage{blindtext}
  5. \noextrashebrew
  6. \begin{document}
  7. \lettrine{N}{ello}
  8. \blindtext
  9. \end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Nello
Posts: 5
Joined: Sat Aug 29, 2015 1:35 pm

Postby Nello » Sat Aug 29, 2015 4:55 pm

I found out that the problem lies in the hebrew and greek packages. If I remove them I can compile correctly. The problem is that I need to use those two languages.

I also tried to use the \wrapfig package, creating an image .eps of the letter I need to use, but I obtained another error. If I remove the hebrew and greek languages I can compile correctly.

  1. \documentclass[dvips,a4paper,english,hebrew,greek,italian,10pt]{book}
  2.  
  3. \usepackage[english,hebrew,greek,italian]{babel}
  4. \usepackage{wrapfig}
  5. \usepackage[pdftex]{graphicx}
  6. \usepackage{epstopdf}
  7. \usepackage{blindtext}
  8.  
  9.  
  10. \begin{document}
  11. \begin{wrapfigure}{l}{0.26\textwidth}
  12. \vspace{-2.0cm}
  13. \includegraphics[width=0.3\textwidth]{P.eps}
  14. \vspace{-25pt}
  15. \vspace{0.07cm}
  16. \end{wrapfigure}
  17. \noindent rima di definire \blindtext
  18. \end{document}
Attachments
P.eps
this is the letter to be used for the example.
(157.08 KiB) Downloaded 123 times
Last edited by Nello on Sat Aug 29, 2015 5:09 pm, edited 1 time in total.

User avatar
Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sat Aug 29, 2015 5:08 pm

Ulrike Fischer supplied a fix for the current bug:
  1. \documentclass{book}
  2. \usepackage{etoolbox}
  3. \usepackage{lettrine}
  4. \usepackage[hebrew,italian]{babel}
  5. \usepackage{blindtext}
  6. \makeatletter
  7. \patchcmd{\@lettrine}{\theDefaultLines}{\c@DefaultLines}{\typeout{success}}{Ups}
  8. \patchcmd{\@lettrine}{\theDefaultDepth}{\c@DefaultDepth}{\typeout{success}}{Ups}
  9. \patchcmd{\@lettrine}{\theL@lines}{\value{L@lines}}{\typeout{success}}{Ups}
  10. \patchcmd{\@lettrine}{\theL@lines}{\value{L@lines}}{\typeout{success}}{Ups}
  11. \patchcmd{\@lettrine}{\theL@lines}{\value{L@lines}}{\typeout{success}}{Ups}
  12. \patchcmd{\Lettrine@height}{\theL@lines}{\value{L@lines}}{\typeout{success}}{Ups}
  13. \patchcmd{\Lettrine@height}{\theL@lines}{\value{L@lines}}{\typeout{success}}{Ups}
  14. \makeatother
  15. \begin{document}
  16. \lettrine{N}{ello}
  17. \blindtext
  18. \end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Nello
Posts: 5
Joined: Sat Aug 29, 2015 1:35 pm

Postby Nello » Sat Aug 29, 2015 7:37 pm

Your suggestion seems to work, thanks. Anyway I had to update my packages, use utf8x instead of utf8, and add british to the languages.


Return to “Fonts & Character Sets”

Who is online

Users browsing this forum: No registered users and 2 guests