GeneralLast char of caption of picture

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
artemff
Posts: 113
Joined: Sat Oct 17, 2009 11:15 pm

Last char of caption of picture

Post by artemff »

Last char of caption of a picture (in {figure} enviroment) is located on place of previous - two char is mixed, but on right of picture enough space(almost half of list). Why this happens? And how prevent this?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Re: Last char of caption of picture

Post by Stefan Kottwitz »

Hi,

please show the code that's producing this behavior. I've never got captions with mixed chars.

Stefan
LaTeX.org admin
artemff
Posts: 113
Joined: Sat Oct 17, 2009 11:15 pm

Last char of caption of picture

Post by artemff »

Stefan_K, Hi

Code: Select all

\begin{figure}    
    \includegraphics{images/circuit6.eps}
    \caption{Эквивалентный генератор ЭДС}
\end{figure} 
In attachment photo.
Attachments
circuit6.png
circuit6.png (10.91 KiB) Viewed 4772 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Last char of caption of picture

Post by Stefan Kottwitz »

I cannot reproduce the problem because you did not post a compilable example. Post a complete small example with preamble to get a solution - because this example works fine for me:

Code: Select all

\documentclass[a4paper,10pt]{article}
\usepackage[demo]{graphicx}
\usepackage[utf8]{inputenc}
\usepackage[russian]{babel}
\begin{document}
\begin{figure}   
    \includegraphics{images/circuit6.eps}
    \caption{Эквивалентный генератор ЭДС}
\end{figure} 
\end{document}
Output:
caption.png
caption.png (5.57 KiB) Viewed 4800 times
Stefan
LaTeX.org admin
artemff
Posts: 113
Joined: Sat Oct 17, 2009 11:15 pm

Last char of caption of picture

Post by artemff »

Stefan_K
Sorry :oops: . It's only in output *.pdf file, in *.dvi it's normally.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Re: Last char of caption of picture

Post by Stefan Kottwitz »

Did you try my example or only yours?
My file works in all ways I've tried: dvi, ps, pdf (both with dvipdfm and ps2pdf).

Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Last char of caption of picture

Post by localghost »

Code: Select all

\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[russian]{babel}
\usepackage[demo]{graphicx}

\begin{document}
  \begin{figure}[!ht]   
    \centering
    \includegraphics{images/circuit6.eps}
    \caption{Эквивалентный генератор ЭДС}
  \end{figure}
\end{document}
Works also when compiling to DVI. See the attachment.
Attachments
cyrillic-prblm.zip
The above code compiled to DVI.
(435 Bytes) Downloaded 156 times
artemff
Posts: 113
Joined: Sat Oct 17, 2009 11:15 pm

Re: Last char of caption of picture

Post by artemff »

localghost, Your compiled example work. But if I create such tex file and compile it - it doesn't "work" in pdf file.
Maybe I use dvipdfm.exe incorrectly? dvipdfm.exe <name of *.dvi file>
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Last char of caption of picture

Post by localghost »

I was able to reproduce the misbehaviour. As already shown, the code given above looks fine when compiled to DVI. Converting from DVI to PS or PDF results in an ugly output (on my system more extreme than shown by artemff). So I compiled the code example with the pdflatex compiler engine and during this run Metafont was called to generate the necessary font metrics. After this step the conversion from DVI to PS or PDF works fine.

If you are not stick to the use of the latex compiler engine, compile your documents directly with pdflatex to PDF. Moreover it is always good to use the right font and input encoding.

Code: Select all

\usepackage[T2A]{fontenc}
\usepackage[cp1251]{inputenc}
The fontenc manual can explain more.
artemff
Posts: 113
Joined: Sat Oct 17, 2009 11:15 pm

Re: Last char of caption of picture

Post by artemff »

localghost, Thank you... pdflatex produce correct text.
Post Reply